Here's my version of handling custom characters as their own packages:
In addition to code in my previous reply, change func create in gallery.gd to this:
func create(code):
var custompath = load("res://files/scripts/characters/custom/" + code + "/" + code + ".gd").new()
var _slave = ''
if !characters.has(code):
_slave = globals.newslave(custompath.characters[code].basics[0], custompath.characters[code].basics[1], custompath.characters[code].basics[2], custompath.characters[code].basics[3])
_slave.cleartraits()
_slave.imagefull = null
if _slave.age == 'child' && globals.rules.children == false:
_slave.age = 'teen'
for i in custompath.characters[code]:
if i in _slave:
_slave[i] = custompath.characters[code][i]
elif i in _slave.stats:
_slave.stats[i] = custompath.characters[code][i]
else:
_slave = globals.newslave(characters[code].basics[0], characters[code].basics[1],characters[code].basics[2],characters[code].basics[3])
_slave.cleartraits()
_slave.imagefull = null
if _slave.age == 'child' && globals.rules.children == false:
_slave.age = 'teen'
for i in characters[code]:
if i in _slave:
_slave[i] = characters[code][i]
elif i in _slave.stats:
_slave.stats[i] = characters[code][i]
return _slave
Then, create a folder "custom" in scripts/characters. Here's a Template Package for a custom character. It goes to that custom folder. It contains a folder with template character file in it. Same file is for character images. Image paths in code in previous reply need to be edited from images/custom to new path scripts/characters/custom. The character.unique (in this case Template) has to be added to var custompool in globals.gd of course, unless there's a way to automatically scan scripts/characters/custom and add all the content to it. And... that's pretty much it.