After some work, I managed to get a few custom classes working. They're mostly untested, but do not return an error. They have no name or description. Use your imagination.
Some things I've noticed :
Requiring one of class and one of race use different syntaxes.
You CAN require a class to have at most at certain stat, with less than or equal.
Class stat changes can be negative.
I could not find how to make a class require a sexual trait.
I've copied the classes I made below if anyone is interested. To use them, copy them at the end of /src/classes.gd , before the final bracket}.
-----
barbarian = {
code = 'barbarian',
name = '',
descript = '',
icon = load("res://assets/images/iconsclasses/Fighter.png"),
tags = [],
categories = ['combat'],
showupreqs = [{code = 'has_profession', value = 'apprentice', check = false}], # Cannot be shortstack or caster-type
reqs = [{code = 'stat', type = 'physics_factor', operant = 'gte', value = 3}],
statchanges = {physics_bonus = 5, hpmax = 15, hitrate = 5},
traits = [],
skills = [],
combatskills = [],
},
rain_dancer = {
code = 'rain_dancer',
name = '',
descript = '',
icon = load("res://assets/images/iconsclasses/dancer.png"),
tags = [],
categories = ['social','combat'],
showupreqs = [{code = 'one_of_races', value = ['Scylla','Nereid','Dryad','Slime']},{code = 'has_profession', value = 'burning_soul', check = false}],
reqs = [{code = 'has_profession', value = 'dancer', check = true},{code = 'one_of_races', value = ['Scylla','Nereid','Dryad','Slime']},{code = 'has_profession', value = 'burning_soul', check = false}],
statchanges = {hitrate = 10, speed = 5, evasion = 15, resistwater = 25},
traits = [],
skills = [],
combatskills = ['blizzard','water_atk'],
},
airborne_fighter = {
code = 'airborne_fighter',
name = '',
descript = '',
icon = load("res://assets/images/iconsclasses/valkyry.png"),
tags = [],
categories = ['combat'],
showupreqs = [{code = 'one_of_races', value = ['Fairy','Demon','Seraph','Dragonkin','Harpy']}],
reqs = [{code = 'one_of_races', value = ['Fairy','Demon','Seraph','Dragonkin','Harpy']},{code = 'stat', type = 'physics', operant = 'gte', value = 25},{code = 'has_profession', value = 'rogue', check = true}],
statchanges = {physics_bonus = 5, speed = 10, evasion = 5, critchance = 2, resistair = 25},
traits = [],
skills = [],
combatskills = ['lightning','air_cutter'],
},
burning_soul = {
code = 'burning_soul',
name = '',
descript = '',
icon = load("res://assets/images/iconsclasses/Dragon_Knight.png"),
tags = [],
categories = ['combat'],
showupreqs = [{code = 'one_of_races', value = ['Kobold','Demon','Dragonkin']},{code = 'has_profession', value = 'rain_dancer', check = false}],
reqs = [{code = 'one_of_races', value = ['Kobold','Demon','Dragonkin']},{code = 'stat', type = 'timid_factor', operant = 'lte', value = 3},{code = 'has_profession', value = 'rain_dancer', check = false}],
statchanges = {hpmax = 5, physics_bonus = 5, resistfire = 25, speed = 3},
traits = [],
skills = ['fear'],
combatskills = ['fire_cleave','fire_burst','firearr'],
},
earthshaper = {
code = 'earthshaper',
name = '',
descript = '',
icon = load("res://assets/images/iconsclasses/foreman.png"),
tags = [],
categories = ['labor'],
showupreqs = [{code = 'one_of_races', value = ['Gnome','Dwarf','Taurus','Centaur']}],
reqs = [{code = 'one_of_races', value = ['Gnome','Dwarf','Taurus','Centaur']},{code = 'stat', type = 'physics_factor', operant = 'gte', value = 2},{code = 'stat', type = 'wits', operant = 'gte', value = 10}],
statchanges = {physics_bonus = 10, resistearth = 25, armor = 10, hpmax = 10},
traits = [],
skills = ['hardwork'],
combatskills = ['earth_atk'],
},
devoted = {
code = 'devoted',
name = '',
descript = '',
icon = load("res://assets/images/iconsskills/Reward_with_sex 3.png"),
tags = [],
categories = ['social','sexual'],
showupreqs = [],
reqs = [{code = 'stat', type = 'sexuals', operant = 'gte', value = 40}],
statchanges = {sexuals_factor = 1, charm_factor = 1, wits_factor = -1},
traits = [],
skills = ['rewardsex'],
combatskills = ['protect'],
},