So I've spent the last hour trying to figure out why the two new Laboratory enhancements I've "added" are not showing up as I've copied both the laboratory.gb and effects.gb into a mod folder, changed them by just adding new entries next to the old ones but the problem is that I'm getting no option to use them and the only Error I'm getting is,
SCRIPT ERROR: traitpanelshow: Invalid call. Nonexistant function 'dictionary' in base 'Nil'
files/scripts/Mansion.gd:3834
Which is linked to the Trait Removal button not the Enhancements button
To effects.gb I've added,
augmentmaf = {code = 'augmentmaf', maf_max = 2},
augmentend = {code = 'augmentend', end_max = 2},
and to laboratory.gb I've added,
"maf" : {price = {mana = 75, gold = 200}, items = {bestialessenceing = 2, magicessenceing = 2}, time = 5},
"end" : {price = {mana = 75, gold = 200}, items = {bestialessenceing = 2, natureessenceing = 2}, time = 5},
if person.mods.has('augmentmaf') == false:
newbutton = get_node("labmodpanel/ScrollContainer1/secondarymodlist/buttontemp").duplicate()
newbutton.visible = true
newbutton.set_text('Enhanced magic')
get_node("labmodpanel/ScrollContainer1/secondarymodlist").add_child(newbutton)
newbutton.connect("pressed",self,'customenh', [dict[string],'maf'])
newbutton.set_meta('effect', 'maf')
if person.mods.has('augmentend') == false:
newbutton = get_node("labmodpanel/ScrollContainer1/secondarymodlist/buttontemp").duplicate()
newbutton.visible = true
newbutton.set_text('Enhanced endurance')
get_node("labmodpanel/ScrollContainer1/secondarymodlist").add_child(newbutton)
newbutton.connect("pressed",self,'customenh', [dict[string],'end'])
newbutton.set_meta('effect', 'end')
elif modification.code == 'mod' && action == 'maf':
text = "Due to magical augmentation, $name's magical affinity will have more room for growth. (increases maximum magic by 2) \n\nRequirements:"
elif modification.code == 'mod' && action == 'end':
text = "Due to magical augmentation, $name's endurance will have more room for growth. (increases maximum endurance by 2) \n\nRequirements:"
elif result == 'maf':
person.mods['augmentmaf'] = 'augmentmaf'
person.add_effect(globals.effectdict.augmentmaf)
elif result == 'end':
person.mods['augmentend'] = 'augmentend'
person.add_effect(globals.effectdict.augmentend)
I'm not sure whats wrong as I added the new entries next to the ones for enhanced str & agi, I also used notepad++ to search all scripts files for references to "stat"_max and augment"stat" and didn't find anything that seems relevant.