Protogen Character

by Focsy

Recolorable Protogen Character with CharacterModHelper Support.

Content
1 year, 2 months ago
2.0
1.57K
Armor Environment

g Incompatibility with Metal And Stars

11 months ago

when using Protogen Character with the Metal And Stars mod, it throws this error.

Failed to load mods: Error while loading entity prototype "character-corpse" (character-corpse): Invalid pictures index: 5, expected value in the range of 1 to 4. in property tree at ROOT.character-corpse.character-corpse Modifications: Base mod > Space Age > Metal and Stars > Protogen Character

When asking them about it, they said is was more likely this mod having the direct issue, let me know if you need any more information.

Also, love this mod, thank you so much for bringing it to 2.0

10 months ago

Thank you for the report, i will take a look in it.

10 months ago

i will take a look in it.

If everything is working as I expect, you shouldn't have to do anything: I've updated CharacterModHelper (version 2.03). When function check_my_prototypes is called in the final data stage, all armors that are available in armor_picture_mapping of only the default corpse will be added to armor_picture_mapping of the new corpse. They will be set to the index of the last picture.

Please try it out and check if it really works! I don't have SA, so I can't check with metal-and-stars myself …

2 days ago
(updated 2 days ago)

Just confirmed that with Metal and Stars (and CharacterModHelper 2.04), the issue still occurs, but is resolved by adding an armor_picture_mapping to the corpse, something like the following snippet:

PROTOCHAR.protos.corpse.armor_picture_mapping = {
    ["heavy-armor"] = 2,
    ["light-armor"] = 2,
    ["modular-armor"] = 3,
    ["power-armor"] = 3,
    ["power-armor-mk2"] = 3
}

Not entirely sure of the implementation in CharacterModHelper, but it doesn't seem like it quite resolves this issue yet. In the meanwhile, this mod could be patched by adding those lines to the end (after the PROTOCHAR.protos.corpse.pictures definition, around line 590 of data.lua).

Correction: CharacterModHelper actually does fix the issue, but because in this mod CharModHelper.check_my_prototypes(PROTOCHAR.protos) is run in data-final-fixes.lua, it runs after Metal and Stars does whatever it does to cause the issue, and so the fix is never run. The actual fix here would be to move CharModHelper.check_my_prototypes(PROTOCHAR.protos) from data-final-fixes.lua to data.lua. (Probably.) (Maybe?)

Edit: I noticed the README says to put the check_my_prototypes call in data-final-fixes.lua, so it might be that the specific check might need to be moved up to the data.lua phase.

New response