[Genhis] [1.1.53] Corpse Armor sprite variation inconsistent with Character
Posted: Mon Mar 07, 2022 6:04 am
As the title states, the player's corpse will display a different sprite compared to a living player when wearing light-armor or modular-armor.
(2nd & 4th columns):
Left to right: no armor, light-armor, heavy-armor, modular-armor, power-armor, power-armor-mk2
Top row: player corpse, Bottom row: living player
Notably, when wearing light-armor, the living player displays armor tier 1, whereas their corpse displays tier 2; when wearing modular-armor the player displays tier 2 & the corpse shows tier 3.
Whereas in the living character animations, the tiers are defined as such: (same file, lines 1247-1445)
Code copied on March 6, 2022 from version 1.1.53, build 59373. I deleted the entities.lua file and ran a steam integrity check to confirm I had the latest version of the file.
I would suggest updating the corpse prototype to match the living character's definitions, that way each armor tier gets two armor types and it's even (:
This was tested using a vanilla launch of the game, no mods were enabled (the log mentions a mod package error, this is just because that mod is broken, it wasn't enabled/loaded)
A save is also attached that contains the world used to take the screenshot. This issue occurs in any world, the save is just to lay out every combination of armor, player, and corpse to easily show the issue.
(2nd & 4th columns):
Left to right: no armor, light-armor, heavy-armor, modular-armor, power-armor, power-armor-mk2
Top row: player corpse, Bottom row: living player
Notably, when wearing light-armor, the living player displays armor tier 1, whereas their corpse displays tier 2; when wearing modular-armor the player displays tier 2 & the corpse shows tier 3.
Code Analysis
This appears to be caused by the following code in base/prototypes/entity/entities.lua:1143Code: Select all
-- The highest index found in the corpse is the graphics variation used
armor_picture_mapping =
{
["light-armor"] = 2,
["heavy-armor"] = 2,
["modular-armor"] = 3,
["power-armor"] = 3,
["power-armor-mk2"] = 3
}
Code: Select all
animations =
{
{
(animations for tier 1)
},
{
armors = {"heavy-armor", "modular-armor"},
(animations for tier 2)
},
{
armors = {"power-armor", "power-armor-mk2"},
(animations for tier 3)
}
}
I would suggest updating the corpse prototype to match the living character's definitions, that way each armor tier gets two armor types and it's even (:
Code: Select all
armor_picture_mapping =
{
["heavy-armor"] = 2,
["modular-armor"] = 2,
["power-armor"] = 3,
["power-armor-mk2"] = 3
}
Attachments & Other Info
A log file is attached, although there shouldn't be anything relevant there (the bug report instructions said to include it anyways, ).This was tested using a vanilla launch of the game, no mods were enabled (the log mentions a mod package error, this is just because that mod is broken, it wasn't enabled/loaded)
A save is also attached that contains the world used to take the screenshot. This issue occurs in any world, the save is just to lay out every combination of armor, player, and corpse to easily show the issue.