Update all female_citizen actors so that idle animations properly show carried resources.

By refactoring unitAI slightly, we can easily improve our support for
running/walking/idle animations.
Other gatherer entities (and other entities with custom walking
animations for certain variants) will need to be updated individually at
a later point to support this feature.

Reviewed By: bb, fatherbushido (a while ago)
Differential Revision: https://code.wildfiregames.com/D311
This was SVN commit r20631.
This commit is contained in:
wraitii 2017-12-10 10:06:08 +00:00
parent f7aa7ac79e
commit 8446b92f1b
32 changed files with 239 additions and 270 deletions

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<props>
<prop actor="props/units/heads/new/head_female_dudette_b.xml" attachpoint="head"/>
@ -14,7 +14,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -28,16 +38,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans_spec.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<props>
<prop actor="props/units/heads/new/head_kart_fem_1.xml" attachpoint="head"/>
</props>
@ -17,7 +17,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -31,16 +41,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<props>
<prop actor="props/units/heads/new/head_female_celt.xml" attachpoint="head"/>
@ -13,7 +13,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -27,16 +37,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans.xml</material>
</actor>

View File

@ -15,7 +15,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/attack_capture.xml"/>
@ -30,16 +40,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
<variant file="biped/death_infantry.xml"/>
</group>
<material>basic_specmap.xml</material>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<props>
<prop actor="props/units/heads/new/head_female_e.xml" attachpoint="head"/>
</props>
@ -53,7 +53,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -67,16 +77,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<textures>
<texture file="skeletal/gown_green.dds" name="baseTex"/>
@ -13,7 +13,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -27,15 +37,5 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<props>
<prop actor="props/units/heads/new/head_pers_fem_1.xml" attachpoint="head"/>
<prop actor="props/units/heads/iber_helmet_02.xml" attachpoint="helmet"/>
@ -18,7 +18,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -32,16 +42,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<props>
<prop actor="props/units/heads/new/dudette_head.xml" attachpoint="head"/>
@ -14,7 +14,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -28,16 +38,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans_spec.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<props>
<prop actor="props/units/heads/new/head_maur_fem.xml" attachpoint="head"/>
</props>
@ -53,7 +53,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -67,16 +77,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans_spec.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<props>
<prop actor="props/units/heads/new/head_pers_fem_1.xml" attachpoint="head"/>
</props>
@ -23,7 +23,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -37,16 +47,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<props>
<prop actor="props/units/heads/new/head_ptol_fem.xml" attachpoint="head"/>
@ -14,7 +14,17 @@
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant name="Idle" frequency="1"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -28,16 +38,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans_spec.xml</material>
</actor>

View File

@ -15,9 +15,9 @@
<texture file="skeletal/ptol_cleopatra.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/attack_ranged_archer.xml"/>
<variant file="biped/attack_slaughter.xml"/>
<variant file="biped/female_death.xml"/>
@ -31,16 +31,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
<variant file="biped/death_infantry.xml"/>
</group>
<material>player_trans.xml</material>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<props>
<prop actor="props/units/heads/new/dudette_head.xml" attachpoint="head"/>
@ -15,8 +15,18 @@
<texture file="skeletal/rome_fem_a.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant frequency="1" name="Idle"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
@ -31,16 +41,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<props>
<prop actor="props/units/heads/new/head_maur_fem.xml" attachpoint="head"/>
@ -14,6 +14,16 @@
</variant>
</group>
<group>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant frequency="1" name="Idle"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
@ -28,16 +38,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans_spec.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_tunic_short.dae</mesh>
<props>
<prop actor="props/units/heads/new/dudette_head.xml" attachpoint="head"/>
@ -14,6 +14,16 @@
</variant>
</group>
<group>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant frequency="1" name="Idle"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
@ -28,16 +38,6 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
<material>player_trans_spec.xml</material>
</actor>

View File

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="biped/female_base.xml">
<variant>
<mesh>skeletal/new/f_dress.dae</mesh>
<textures>
<texture file="skeletal/gown_green.dds" name="baseTex"/>
@ -13,6 +13,16 @@
</variant>
</group>
<group>
<!-- In this group, defined overloads for "Idle", "Walk" and "Run" -->
<variant file="biped/female_base_walk.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
</group>
<group>
<!-- In this group, define overloads for other animation types, since they presumably do not collide with each other -->
<variant frequency="1" name="Idle"/>
<variant file="biped/attack_melee_female.xml"/>
<variant file="biped/attack_slaughter.xml"/>
@ -27,15 +37,5 @@
<variant file="biped/gather_praise.xml"/>
<variant file="biped/female_build.xml"/>
<variant file="biped/female_build_farm.xml"/>
<variant file="biped/female_carry_food.xml"/>
<variant file="biped/female_carry_meat.xml"/>
<variant file="biped/female_carry_wood.xml"/>
<variant file="biped/female_carry_stone.xml"/>
<variant file="biped/female_carry_metal.xml"/>
<variant file="biped/female_carry_food_idle.xml"/>
<variant file="biped/female_carry_meat_idle.xml"/>
<variant file="biped/female_carry_wood_idle.xml"/>
<variant file="biped/female_carry_stone_idle.xml"/>
<variant file="biped/female_carry_metal_idle.xml"/>
</group>
</actor>

View File

@ -1,6 +1,7 @@
<variant name="carry_food">
<animations>
<animation file="biped/new/male_carry_grain.dae" name="carry_food" speed="20"/>
<animation file="biped/new/male_carry_grain.dae" name="Walk" speed="20"/>
<animation file="biped/new/male_carry_grain_idle.dae" name="Idle" speed="20"/>
</animations>
<props>
<prop actor="props/units/shuttle_basket.xml" attachpoint="weapon_R"/>

View File

@ -1,6 +1,7 @@
<variant name="carry_meat">
<animations>
<animation file="biped/new/male_carry_meat.dae" name="carry_meat" speed="20"/>
<animation file="biped/new/male_carry_meat.dae" name="Walk" speed="20"/>
<animation file="biped/new/male_carry_meat_idle.dae" name="Idle" speed="20"/>
</animations>
<props>
<prop actor="props/units/shuttle_meat_male_R.xml" attachpoint="weapon_R"/>

View File

@ -1,6 +1,7 @@
<variant name="carry_metal">
<animations>
<animation file="biped/new/male_carry_ore.dae" name="carry_metal" speed="20"/>
<animation file="biped/new/male_carry_ore.dae" name="Walk" speed="20"/>
<animation file="biped/new/male_carry_ore_idle.dae" name="Idle" speed="20"/>
</animations>
<props>
<prop actor="props/units/shuttle_metal.xml" attachpoint="weapon_R"/>

View File

@ -1,6 +1,7 @@
<variant name="carry_stone">
<animations>
<animation file="biped/new/male_carry_ore.dae" name="carry_stone" speed="20"/>
<animation file="biped/new/male_carry_ore.dae" name="Walk" speed="20"/>
<animation file="biped/new/male_carry_ore_idle.dae" name="Idle" speed="20"/>
</animations>
<props>
<prop actor="props/units/shuttle_stone.xml" attachpoint="weapon_R"/>

View File

@ -1,6 +1,7 @@
<variant name="carry_wood">
<animations>
<animation file="biped/new/male_carry_wood.dae" name="carry_wood" speed="20"/>
<animation file="biped/new/male_carry_wood.dae" name="Walk" speed="20"/>
<animation file="biped/new/male_carry_wood_idle.dae" name="Idle" speed="20"/>
</animations>
<props>
<prop actor="props/units/shuttle_wood.xml" attachpoint="weapon_R"/>

View File

@ -1,6 +1,7 @@
<variant name="carry_food">
<animations>
<animation file="biped/new/fem_carry_grain.dae" name="carry_food" speed="25"/>
<animation file="biped/new/fem_carry_grain_idle.dae" name="Idle" speed="25"/>
<animation file="biped/new/fem_carry_grain.dae" name="Walk" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_basket_back.xml" attachpoint="back"/>

View File

@ -1,10 +0,0 @@
<variant name="carry_food_idle">
<animations>
<animation file="biped/new/fem_carry_grain_idle.dae" name="carry_food_idle" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_basket_back.xml" attachpoint="back"/>
<prop attachpoint="weapon_L"/>
<prop attachpoint="weapon_R"/>
</props>
</variant>

View File

@ -1,6 +1,7 @@
<variant name="carry_meat">
<animations>
<animation file="biped/new/fem_carry_meat.dae" name="carry_meat" speed="25"/>
<animation file="biped/new/fem_carry_meat_idle.dae" name="Idle" speed="25"/>
<animation file="biped/new/fem_carry_meat.dae" name="Walk" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_meat_female.xml" attachpoint="weapon_R"/>

View File

@ -1,9 +0,0 @@
<variant name="carry_meat_idle">
<animations>
<animation file="biped/new/fem_carry_meat_idle.dae" name="carry_meat_idle" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_meat.xml" attachpoint="weapon_R"/>
<prop attachpoint="weapon_L"/>
</props>
</variant>

View File

@ -1,6 +1,7 @@
<variant name="carry_metal">
<animations>
<animation file="biped/new/fem_carry_ore.dae" name="carry_metal" speed="25"/>
<animation file="biped/new/fem_carry_ore_idle.dae" name="Idle" speed="25"/>
<animation file="biped/new/fem_carry_ore.dae" name="Walk" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_metal.xml" attachpoint="weapon_R"/>

View File

@ -1,9 +0,0 @@
<variant name="carry_metal_idle">
<animations>
<animation file="biped/new/fem_carry_ore_idle.dae" name="carry_metal_idle" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_metal.xml" attachpoint="weapon_R"/>
<prop attachpoint="weapon_L"/>
</props>
</variant>

View File

@ -1,6 +1,7 @@
<variant name="carry_stone">
<animations>
<animation file="biped/new/fem_carry_ore.dae" name="carry_stone" speed="25"/>
<animation file="biped/new/fem_carry_ore_idle.dae" name="Idle" speed="25"/>
<animation file="biped/new/fem_carry_ore.dae" name="Walk" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_stone.xml" attachpoint="weapon_R"/>

View File

@ -1,9 +0,0 @@
<variant name="carry_stone_idle">
<animations>
<animation file="biped/new/fem_carry_ore_idle.dae" name="carry_stone_idle" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_stone.xml" attachpoint="weapon_R"/>
<prop attachpoint="weapon_L"/>
</props>
</variant>

View File

@ -1,6 +1,7 @@
<variant name="carry_wood">
<animations>
<animation file="biped/new/fem_carry_wood.dae" name="carry_wood" speed="25"/>
<animation file="biped/new/fem_carry_wood_idle.dae" name="Idle" speed="25"/>
<animation file="biped/new/fem_carry_wood.dae" name="Walk" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_wood.xml" attachpoint="weapon_R"/>

View File

@ -1,9 +0,0 @@
<variant name="carry_wood_idle">
<animations>
<animation file="biped/new/fem_carry_wood_idle.dae" name="carry_wood_idle" speed="25"/>
</animations>
<props>
<prop actor="props/units/shuttle_wood.xml" attachpoint="weapon_R"/>
<prop attachpoint="weapon_L"/>
</props>
</variant>

View File

@ -638,7 +638,7 @@ UnitAI.prototype.UnitFsmSpec = {
Engine.QueryInterface(this.entity, IID_ResourceGatherer).CommitResources(dropsiteTypes);
// Stop showing the carried resource animation.
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
// Our next order should always be a Gather,
// so just switch back to that order
@ -1606,7 +1606,7 @@ UnitAI.prototype.UnitFsmSpec = {
"WALKINGANDFIGHTING": {
"enter": function () {
// Show weapons rather than carried resources.
this.SetGathererAnimationOverride(true);
this.SetAnimationVariant("combat");
this.StartTimer(0, 1000);
this.SelectAnimation("move");
@ -1671,7 +1671,7 @@ UnitAI.prototype.UnitFsmSpec = {
"ESCORTING": {
"enter": function () {
// Show weapons rather than carried resources.
this.SetGathererAnimationOverride(true);
this.SetAnimationVariant("combat");
this.StartTimer(0, 1000);
this.SelectAnimation("move");
@ -1805,7 +1805,7 @@ UnitAI.prototype.UnitFsmSpec = {
"APPROACHING": {
"enter": function () {
// Show weapons rather than carried resources.
this.SetGathererAnimationOverride(true);
this.SetAnimationVariant("combat");
this.SelectAnimation("move");
this.StartTimer(1000, 1000);
@ -1813,7 +1813,7 @@ UnitAI.prototype.UnitFsmSpec = {
"leave": function() {
// Show carried resources when walking.
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
this.StopTimer();
},
@ -2043,7 +2043,7 @@ UnitAI.prototype.UnitFsmSpec = {
"CHASING": {
"enter": function () {
// Show weapons rather than carried resources.
this.SetGathererAnimationOverride(true);
this.SetAnimationVariant("combat");
this.SelectAnimation("move");
var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
@ -2068,7 +2068,7 @@ UnitAI.prototype.UnitFsmSpec = {
// Reset normal speed in case it was changed
this.SetMoveSpeed(this.GetWalkSpeed());
// Show carried resources when walking.
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
this.StopTimer();
},
@ -2315,6 +2315,7 @@ UnitAI.prototype.UnitFsmSpec = {
// off to a different target.)
if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer))
{
this.SetDefaultAnimationVariant();
var typename = "gather_" + this.order.data.type.specific;
this.SelectAnimation(typename, false, 1.0, typename);
}
@ -2332,7 +2333,7 @@ UnitAI.prototype.UnitFsmSpec = {
delete this.gatheringTarget;
// Show the carried resource, if we've gathered anything.
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
},
"Timer": function(msg) {
@ -2631,7 +2632,7 @@ UnitAI.prototype.UnitFsmSpec = {
cmpResourceGatherer.CommitResources(dropsiteTypes);
// Stop showing the carried resource animation.
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
// Our next order should always be a Gather,
// so just switch back to that order
@ -2799,7 +2800,7 @@ UnitAI.prototype.UnitFsmSpec = {
{
let dropsiteTypes = cmpResourceDropsite.GetTypes();
cmpResourceGatherer.CommitResources(dropsiteTypes);
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
}
// We finished building it.
@ -2808,7 +2809,7 @@ UnitAI.prototype.UnitFsmSpec = {
{
if (this.CanReturnResource(msg.data.newentity, true))
{
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
this.PushOrderFront("ReturnResource", { "target": msg.data.newentity, "force": false });
}
return;
@ -2827,7 +2828,7 @@ UnitAI.prototype.UnitFsmSpec = {
{
if (this.CanReturnResource(msg.data.newentity, true))
{
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
this.PushOrder("ReturnResource", { "target": msg.data.newentity, "force": false });
}
this.PerformGather(msg.data.newentity, true, false);
@ -2973,7 +2974,7 @@ UnitAI.prototype.UnitFsmSpec = {
if (cmpResourceGatherer)
{
cmpResourceGatherer.CommitResources(dropsiteTypes);
this.SetGathererAnimationOverride();
this.SetDefaultAnimationVariant();
}
}
@ -4244,37 +4245,51 @@ UnitAI.prototype.PlaySound = function(name)
}
};
UnitAI.prototype.SetGathererAnimationOverride = function(disable)
/*
* Set a visualActor animation variant.
* By changing the animation variant, you can change animations based on unitAI state.
* If there are no specific variants or the variant doesn't exist in the actor,
* the actor fallbacks to any existing animation.
* @param type if present, switch to a specific animation variant.
*/
UnitAI.prototype.SetAnimationVariant = function(type)
{
var cmpResourceGatherer = Engine.QueryInterface(this.entity, IID_ResourceGatherer);
if (!cmpResourceGatherer)
return;
var cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
if (!cmpVisual)
return;
// Remove the animation override, so that weapons are shown again.
if (disable)
cmpVisual.SetVariant("animationVariant", type);
return;
};
/*
* Reset the animation variant to default behavior
* Default behavior is to pick a resource-carrying variant if resources are being carried.
* Otherwise pick nothing in particular.
*/
UnitAI.prototype.SetDefaultAnimationVariant = function()
{
let cmpResourceGatherer = Engine.QueryInterface(this.entity, IID_ResourceGatherer);
if (!cmpResourceGatherer)
{
cmpVisual.ResetMoveAnimation("walk");
this.SetAnimationVariant("");
return;
}
// Work out what we're carrying, in order to select an appropriate animation
var type = cmpResourceGatherer.GetLastCarriedType();
let type = cmpResourceGatherer.GetLastCarriedType();
if (type)
{
var typename = "carry_" + type.generic;
let typename = "carry_" + type.generic;
// Special case for meat
if (type.specific == "meat")
typename = "carry_" + type.specific;
cmpVisual.ReplaceMoveAnimation("walk", typename);
this.SetAnimationVariant(typename);
return;
}
else
cmpVisual.ResetMoveAnimation("walk");
this.SetAnimationVariant("");
};
UnitAI.prototype.SelectAnimation = function(name, once, speed, sound)