In README/character-mods.txt you'll find the following description
In data.lua:
-- Define character properties
IROBOT = require("__CharacterModHelper__.common")("IRobot")
IROBOT.character = { name = "IRobot_character_skin" }
IROBOT.corpse = { name = IROBOT.character.name.."-corpse" }
…
-- Create character
local character = table.deepcopy(data.raw["character"]["character"])
CharModHelper.apply_properties(character, IROBOT.character)
data:extend({character})
-- Create corpse
local corpse = table.deepcopy(data.raw["character-corpse"]["character-corpse"])
CharModHelper.apply_properties(corpse, IROBOT.corpse)
data:extend({corpse})
In data-final-fixes.lua:
-- Keep or overwrite the default prototypes? --
CharModHelper.check_my_prototypes(IROBOT)
If you have multiple characters, the easiest way is to add more levels to the table and loop over them.
In data.lua:
-- Define character properties
IROBOT = require("__CharacterModHelper__.common")("IRobot")
IROBOT.skins = {}
IROBOT.skins.name1 = {}
IROBOT.skins.name1.character = { name = "IRobot_character_skin" },
IROBOT.skins.name1.corpse = { name = IROBOT.skins.name1.character.name.."-corpse" }
IROBOT.skins.name2 = {}
IROBOT.skins.name2.character = { name = "second_character_skin" },
IROBOT.skins.name2.corpse = { name = IROBOT.skins.name2.character.name.."-corpse" }
…
-- Create prototypes
local character, corpse
for name, prototypes in pairs(IROBOT.skins) do
character = table.deepcopy(data.raw["character"]["character"])
corpse = table.deepcopy(data.raw["character-corpse"]["character-corpse"])
CharModHelper.apply_properties(character, prototypes.character)
CharModHelper.apply_properties(character, prototypes.corpse)
data:extend({character, corpse})
end
In data-final-fixes.lua:
-- Keep or overwrite the default prototypes? --
for name, prototypes in pairs(IROBOT.skins) do
CharModHelper.check_my_prototypes(prototypes)
end