#4532 closed defect (fixed)
Garrisoned units die when being promoted
Reported by: | elexis | Owned by: | mimo |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 22 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
As reported by Merov, in this Alpha 21 replay 20 champions were garrisoned in his ship at minute 24 and few seconds later, all of them disappeared without any apparent reason on the middle of the sea.
The ship has entity ID 20605, the turn was shortly before 3025 and the commands.txt
doesn't contain a delete or ungarrison order around that time.
Attachments (1)
Change History (9)
by , 7 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 7 years ago
Summary: | Unexplained disappearance of garrisoned units → Garrisoned units die when being promoted |
---|
The commands to garrison that ship are:
turn 2967 500 cmd 8 {"type":"garrison","entities":[21747,21748,21774,21863,21872,21873,22048,22057,22212,22213],"target":20605,"queued":false} turn 2843 500 cmd 8 {"type":"garrison","entities":[21462,21461,21454,21346,21335,21334,21092,20996,20964,20743,20579,20577,20562,20323,20216,20179,20144,20018,19690,19495,19122,19109],"target":20605,"queued":false} turn 2847 500 cmd 8 {"type":"garrison","entities":[19772],"target":20605,"queued":false} turn 2889 500 cmd 8 {"type":"garrison","entities":[19109,19122,19690,19772,20018,20144,20179,20216,20323,20562,20577,20579,20743,20964,20996,21092,21334,21335,21346,21454,21461,21462],"target":20605,"queued":false} turn 2920 500 cmd 8 {"type":"garrison","entities":[18422,18717,19084,19566],"target":20605,"queued":false} turn 2938 500 cmd 8 {"type":"garrison","entities":[18422,18717],"target":20605,"queued":false} turn 2967 500 cmd 8 {"type":"garrison","entities":[21747,21748,21774,21863,21872,21873,22048,22057,22212,22213],"target":20605,"queued":false}
Those entities are
18422,18717,19084,19109,19122,19495,19566,19690,19772,20018,20144,20179,20216,20323,20562,20577,20579,20743,20964,20996,21092,21334,21335,21346,21454,21461,21462,21747,21748,21774,21863,21872,21873,22048,22057,22212,22213
As suspected, it's the promotion:
Executing turn 3024 of 3999 WARNING: Promotion.prototype.Promote19109 WARNING: Promotion.prototype.Promote19122 WARNING: Promotion.prototype.Promote19495 WARNING: Promotion.prototype.Promote19690 WARNING: Promotion.prototype.Promote20018 WARNING: Promotion.prototype.Promote20144 WARNING: Promotion.prototype.Promote20179 WARNING: Promotion.prototype.Promote20216 WARNING: Promotion.prototype.Promote20323 WARNING: Promotion.prototype.Promote20562 WARNING: Promotion.prototype.Promote20577 WARNING: Promotion.prototype.Promote20579 WARNING: Promotion.prototype.Promote20743 WARNING: Promotion.prototype.Promote20964 WARNING: Promotion.prototype.Promote20996 WARNING: Promotion.prototype.Promote21092 WARNING: Promotion.prototype.Promote21334 WARNING: Promotion.prototype.Promote21335 WARNING: Promotion.prototype.Promote21346 WARNING: Promotion.prototype.Promote21454 WARNING: Promotion.prototype.Promote21461 WARNING: Promotion.prototype.Promote21462 WARNING: Promotion.prototype.Promote21747 WARNING: Promotion.prototype.Promote21748 WARNING: Promotion.prototype.Promote21774 WARNING: Promotion.prototype.Promote21863 WARNING: Promotion.prototype.Promote21872 WARNING: Promotion.prototype.Promote21873 WARNING: Promotion.prototype.Promote22048 WARNING: Promotion.prototype.Promote22057 WARNING: Promotion.prototype.Promote22212 WARNING: Promotion.prototype.Promote22213 WARNING: Promotion.prototype.Promote22734 WARNING: Health.prototype.Reduce Death 19109 WARNING: Health.prototype.Reduce Death 19122 WARNING: Health.prototype.Reduce Death 19690 WARNING: Health.prototype.Reduce Death 20018 WARNING: Health.prototype.Reduce Death 20144 WARNING: Health.prototype.Reduce Death 20179 WARNING: Health.prototype.Reduce Death 20216 WARNING: Health.prototype.Reduce Death 20323 WARNING: Health.prototype.Reduce Death 20562 WARNING: Health.prototype.Reduce Death 20577 WARNING: Health.prototype.Reduce Death 20579 WARNING: Health.prototype.Reduce Death 20743 WARNING: Health.prototype.Reduce Death 20964 WARNING: Health.prototype.Reduce Death 20996 WARNING: Health.prototype.Reduce Death 21092 WARNING: Health.prototype.Reduce Death 21334 WARNING: Health.prototype.Reduce Death 21335 WARNING: Health.prototype.Reduce Death 21346 WARNING: Health.prototype.Reduce Death 21454 WARNING: Health.prototype.Reduce Death 21461 WARNING: Health.prototype.Reduce Death 21462 WARNING: Health.prototype.Reduce Death 21747 WARNING: Health.prototype.Reduce Death 21748 WARNING: Health.prototype.Reduce Death 21863 WARNING: Health.prototype.Reduce Death 22057
Couldn't reproduce this yet
comment:2 by , 7 years ago
We don't support upgrading garrisoned units, and the promotion code reuses that code IIRC, so that's probably the issue right there.
comment:3 by , 7 years ago
Since those units were macedonian spear infantry champions and because of this command, the case should be clear:
turn 2945 500 cmd 8 {"type":"research","entity":18930,"template":"successors/upgrade_mace_silvershields"}
However I can't reproduce, when I garrison those units in a ship, then research the tech it doesn't nuke those units.
comment:4 by , 7 years ago
We do support upgrading garrisoned units, but in a buggy way for ships when no place for ungarrison can be found. I think, in the OnGlobalEntityRenamed function of GarrisonHolder, replacing this.Eject(msg.entity) by this.Eject(msg.entity, true) should fix the issue.
Edit: Elexis, the problem must happen when the ship is full, as when units are not removed, there is no room for the renamed units. The initial units are then removed later when destroyed.
comment:5 by , 7 years ago
I can reproduce the bug in svn, with a ship full with basic CS and promoting them: they indeed disappear, and the change proposed in comment 4 fixes it.
comment:7 by , 7 years ago
Milestone: | Backlog → Alpha 22 |
---|
comment:8 by , 7 years ago
I can reproduce it now too (with the macedonian champs and the upgrade), my previous attempts failed because the ship had space to garrison the new units.
Thanks mimo!
Replay provided by Merov