Nepgear Player Replacer [Character selection mod compatibility]

by Toshayo

Replaces the engineer with Nepgear. Character selection mod compatible.

Tweaks
14 days ago
1.1 - 2.0
1.93K

b Missing icons

15 days ago

Hi! I've just noticed that your mod doesn't create icons for the new character and corpse. The character icon is used by miniMAXIme in the "Available characters" GUI, where players can toggle characters they want/don't want to use. Currently, the icon of the default character will be displayed there instead. Likewise, the icon of the default corpse will be shown, for example, in editor mode (GUI tab "Unsorted"). It would be great if you could add fitting icons. :-)

While I'm at it: In data.lua, you use the following to create character and corpse:

-- Create character
local new_character = table.deepcopy(data.raw["character"]["character"])
CharModHelper.apply_properties(new_character, NEPGEAR.character)
data:extend({ new_character })

-- Create corpse
local new_corpse = table.deepcopy(data.raw["character-corpse"]["character-corpse"])
CharModHelper.apply_properties(new_corpse, NEPGEAR.corpse)
data:extend({new_corpse})

You can shorten this to

-- Create prototypes
CharModHelper.create_prototypes(NEPGEAR)

This is the preferred way to create prototypes. Currently, it makes no difference whether you call create_prototypes or apply_properties, but if I ever should be forced to do modify create_prototypes, your mod wouldn't be aware of these changes.

I'm thinking about making apply_properties a local function in a future version of "Character Mod Helper" (to enforce using the other function). Changing now would make your mod future-proof. :-)

14 days ago

Thanks a lot for the notice!
I've updated the mod to both include icons (tested in editor's entity "Unsorted" tab and "Available characters" GUIs) and the prototype creation call.
These changes appear in version 2.1.3 of the mod

14 days ago

Thanks for the prompt fix! By mere chance, I've noticed the new version just 2 minutes after you've uploaded it. I can confirm that everything works as expected now. You've also switched to calling create_prototypes, thanks! By the way, I like how you restructured the mod, makes the code much cleaner and easier to read. :-)

14 days ago

By the way, I like how you restructured the mod, makes the code much cleaner and easier to read. :-)

Thanks! :D

New response