[Genhis] [1.1.53] Corpse Armor sprite variation inconsistent with Character

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Penguin_Spy
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Feb 26, 2017 3:09 am
Contact:

[Genhis] [1.1.53] Corpse Armor sprite variation inconsistent with Character

Post by Penguin_Spy »

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):
20220306211621_1.jpg
20220306211621_1.jpg (715.88 KiB) Viewed 662 times
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:1143

Code: 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
    }
Whereas in the living character animations, the tiers are defined as such: (same file, lines 1247-1445)

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)
      }
    }
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 (:

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.
Attachments
factorio-current.log
(11.32 KiB) Downloaded 18 times
character corpse armor variation inconsistency.zip
(2.44 MiB) Downloaded 21 times
I exist.

Genhis
Factorio Staff
Factorio Staff
Posts: 42
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis] [1.1.53] Corpse Armor sprite variation inconsistent with Character

Post by Genhis »

Thanks for the report and for the attached save, it made testing a lot easier. :) The issue is fixed for the next release.

Post Reply

Return to “Resolved Problems and Bugs”