Opened 23 months ago
Closed 14 months ago
#6566 closed defect (fixed)
Han gather_grain animation is not chosen correctly for Spearman and Pikeman
Reported by: | Langbart | Owned by: | Freagarach |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 27 |
Component: | Simulation | Keywords: | |
Cc: | Patch: | Phab:D4937 |
Description (last modified by )
I could not find the steps to reproduce the problem conclusively, but it happened to me at least twice and only with the
Han
. See the attached replay (animation_broke_rice_gather.txt
) and the GIF below for more clarity. The unit still farms, but the gather_grain
animation does not work properly.
possibly related
Similar sounding problem reported by
borg
via the forum
EDIT 12/Jun/22 with [26937]
The issue is still noticeable, see attached replay (
farmMe_rP26937.txt
~3min mark) and GIF below for more clarity.
The unit simply stops the animation, still gathering though.
EDIT 13/Jun/22
Reproduce: Add a small distance between the rice field and the drop point, so that the unit has to walk. The problem can only be observed for Han citizen-soldiers.
Seems to do with
approach_rice.xml
and the line <variant file="biped/approach_rice.xml"/>
in the binaries/data/mods/public/art/actors/units/han/
files.
Ref: [26937]
Update
to reproduce
- Open
Atlas
and place a CC and aHan
rice field next to each other without leaving a gap between them. - Place a
han/infantry_spearman_b.xml
and ahan/infantry_halberdman_b.xml
and start the simulation. (Only these two unit types - Spearman and Pikeman - are affected by theHan
.) - Order them to gather
- Wait until they reach the CC, the animation for gathering is not chosen.
issue
wiki/Actors#Randomnessandselections
If two variants have equal frequency values, they have equal chance of being selected.
I think in Atlas the top line is always chosen, moving the line for gather_grain
above carry_food
would also work, at least in Atlas.
-
binaries/data/mods/public/art/actors/units/han/infantry_spearman_b.xml
a b 33 33 </group> 34 34 <group> 35 35 <variant file="biped/base_spearman_shield_relax.xml"/> 36 <variant file="biped/gather_grain.xml"/> 36 37 <variant file="biped/carry_food.xml"> 37 38 <props> 38 39 <prop actor="props/units/helmets/han_ricehat.xml" attachpoint="helmet"/> … … 43 44 <variant file="biped/formations/anti_cavalry_back.xml"/> 44 45 <variant file="biped/attack_slaughter.xml"/> 45 46 <variant file="biped/gather_tree.xml"/> 46 <variant file="biped/gather_grain.xml"/>47 47 <variant file="biped/gather_fruit.xml"/> 48 48 <variant file="biped/gather_meat.xml"/> 49 49 <variant file="biped/gather_rock.xml"/>
possible solution
-
binaries/data/mods/public/art/actors/units/han/infantry_spearman_b.xml
a b 38 38 <prop actor="props/units/helmets/han_ricehat.xml" attachpoint="helmet"/> 39 39 </props> 40 40 </variant> 41 <variant file="biped/attack_capture.xml"/>42 <variant file="biped/formations/anti_cavalry_front.xml"/>43 <variant file="biped/formations/anti_cavalry_back.xml"/>44 <variant file="biped/attack_slaughter.xml"/>45 <variant file="biped/gather_tree.xml"/>46 <variant file="biped/gather_grain.xml"/>47 <variant file="biped/gather_fruit.xml"/>48 <variant file="biped/gather_meat.xml"/>49 <variant file="biped/gather_rock.xml"/>50 <variant file="biped/gather_ore.xml"/>51 <variant file="biped/gather_ruins.xml"/>52 <variant file="biped/gather_praise.xml"/>53 <variant file="biped/build.xml"/>54 <variant file="biped/build_farm.xml"/>55 <variant file="biped/death_infantry.xml"/>56 41 <variant file="biped/carry_meat.xml"/> 57 42 <variant file="biped/carry_wood.xml"/> 58 43 <variant file="biped/carry_stone.xml"/> … … 68 53 <variant file="biped/approach_praise.xml"/> 69 54 </group> 70 55 <group> 71 <variant name="Idle"/> 56 <variant frequency="1" name="Idle"/> 57 <variant file="biped/attack_capture.xml"/> 58 <variant file="biped/attack_slaughter.xml"/> 59 <variant file="biped/gather_tree.xml"/> 60 <variant file="biped/gather_grain.xml"/> 61 <variant file="biped/gather_fruit.xml"/> 62 <variant file="biped/gather_meat.xml"/> 63 <variant file="biped/gather_rock.xml"/> 64 <variant file="biped/gather_ore.xml"/> 65 <variant file="biped/gather_ruins.xml"/> 66 <variant file="biped/gather_praise.xml"/> 67 <variant file="biped/build.xml"/> 68 <variant file="biped/build_farm.xml"/> 69 <variant file="biped/death_infantry.xml"/> 72 70 </group> 73 71 <material>player_trans.xml</material> 74 72 </actor>
additional nitpick
Other actors, such as romans/infantry_spearman_b.xml
, should receive a similar treatment.
Attachments (4)
Change History (18)
by , 23 months ago
Attachment: | animation_broke_rice_gather.txt added |
---|
by , 23 months ago
Attachment: | anim_broke.gif added |
---|
comment:1 by , 23 months ago
comment:2 by , 23 months ago
comment:3 by , 23 months ago
will be checked tomorrow with the new Git update and is expected to be closed as well.
comment:4 by , 23 months ago
Description: | modified (diff) |
---|
by , 23 months ago
Attachment: | farmMe_rP26937.txt added |
---|
by , 23 months ago
Attachment: | farmMe_rP26937.gif added |
---|
comment:5 by , 23 months ago
Description: | modified (diff) |
---|
comment:6 by , 23 months ago
Description: | modified (diff) |
---|---|
Summary: | Gather_grain animation for Han sometimes does not work properly → Han gather_grain animation is not chosen correctly for Spearman and Pikeman |
final update
comment:11 by , 22 months ago
Milestone: | Alpha 26 → Alpha 27 |
---|
UnitAI.prototype.SetAnimationVariant@simulation/components/UnitAI.js:4584:7 UnitAI.prototype.SetDefaultAnimationVariant@simulation/components/UnitAI.js:4607:9 enter@simulation/components/UnitAI.js:2673:11 FSM.prototype.SwitchToNextState@globalscripts/FSM.js:366:14 FSM.prototype.ProcessMessage@globalscripts/FSM.js:274:8 UnitAI.prototype.ProcessMessage@simulation/components/UnitAI.js:4347:15 ResourceGatherer.prototype.StopGathering@simulation/components/ResourceGatherer.js:243:14 ResourceGatherer.prototype.PerformGather@simulation/components/ResourceGatherer.js:286:8 Timer.prototype.OnUpdate@simulation/components/Timer.js:139:44 WARNING: carry_food UnitAI.prototype.SetAnimationVariant@simulation/components/UnitAI.js:4584:7 enter@simulation/components/UnitAI.js:2461:11 FSM.prototype.SwitchToNextState@globalscripts/FSM.js:366:14 FSM.prototype.ProcessMessage@globalscripts/FSM.js:274:8 UnitAI.prototype.OnMotionUpdate@simulation/components/UnitAI.js:4268:15 WARNING: approach_grain WARNING: GATHERING WARNING: RETURNINGRESOURCE WARNING: DROPPINGRESOURCES WARNING: GATHER.APPROACHING WARNING: GATHERING
It seems that when the field is too close, something is not reset properly.
comment:12 by , 21 months ago
Component: | Art & Animation → Simulation |
---|
comment:13 by , 14 months ago
Owner: | set to |
---|---|
Patch: | → Phab:D4937 |
https://code.wildfiregames.com/D4937 should fix the UnitAI issue. I guess it would be nice if we wouldn't need to rely on stuff hidden away in UnitAI. '
Ref: https://trac.wildfiregames.com/changeset/26937