CharacterCorpsePrototype: use of picture/pictures

Pi-C
Smart Inserter
Smart Inserter
Posts: 1794
Joined: Sun Oct 14, 2018 8:13 am
Contact:

CharacterCorpsePrototype: use of picture/pictures

Post by Pi-C »

The documentation for CharacterCorpsePrototype tells us that pictures is mandatory if picture is not defined, and that picture is mandatory if pictures is not defined. However, it doesn't tell which will be used if both picture and pictures are defined in the prototype.

According to my tests, pictures will be used in that case. Could you add this info, please?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Bilka
Factorio Staff
Factorio Staff
Posts: 3701
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: CharacterCorpsePrototype: use of picture/pictures

Post by Bilka »

Thanks for the note. I've adjusted the description of "picture" to make clear it's only loaded if "pictures" is not defined.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1794
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: CharacterCorpsePrototype: use of picture/pictures

Post by Pi-C »

Thank you! Also, I've just found something about CharacterCorpsePrototype::armor_picture_mapping:
Table of key value pairs, the keys are armor names and the values are numbers. The number is the Animation that is associated with the armor, e.g. using 1 will associate the armor with the first Animation in the pictures table.
However, this may also be an empty table! Could you add this, too, please?

Actually, this feature is quite useful for my Character mod helper. Character mods using it will create tables with the character/corpse properties they want to change. Depending on whether a character selector mod is active, the default character/corpse will be overwritten with all properties in these tables – but if the modified corpse has only one picture and its armor_picture_mapping is set to nil the original armor_picture_mapping would NOT be overwritten and the game would crash on loading because the referenced pictures don't exist. Having armor_picture_mapping as an empty table in the data of the new corpse is more intuitive and convenient because the empty table will overwrite the default character's armor_picture_mapping for good, so no further action is required. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Post Reply

Return to “Resolved Requests”