Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Strive for Power

Fantasy Slave Management/RPG Erotic Game · By Strive4Power

Laboratory - magic & endurance enhancements

A topic by JesterHell created Nov 06, 2018 Views: 9,762 Replies: 9
Viewing posts 1 to 7

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.

Come onto the discord. Maverick and/or Lazerus are usually willing to help people write mod code.
It seems you're trying to modify a dictionary. To do so, you need to modify the dictionary object after it's created, usually in globals.gd, func init(). Feel free to check my mod code for about 50 examples of how I modded the code.

could you inv or tell me where to go in order to find this mYthical place

nevermind

I was interested in the same idea.  I found one more spot that needs to be edited and I think it ties to the trait box

add to  characters/description.gd  about line 169 or so where "augmentstr" is located

if person.mods.has('augmentmaf'):
text += "[color=#B05DB0]Through magical modification, the potential of $his magical affinity has increased.[/color]\n"
if person.mods.has('augmentend'):
text += "[color=#B05DB0]Through magical modification, the potential of $his endurance has increased.[/color]\n"

The other thing to watch out for, which bite me, is that you need tabs not spaces and I have my Notepad++ set to put in spaces.  So turn on the show all characters to make sure it is doing it correctly.

Thanks D.stu and dirdir for the suggestions, changing the characters/description.gd worked and the new options show up so double thanks to dirdir.

The funny thing is I started getting all sorts of errors when I tried to make it a MOD but if I just change the games base files it works fine... but it works and that's all I care about.

Can you give us one link to download your mod?

(+1)

Any news of this mod? does it finished yet?

Congratulations on setting an incredible record at necroposting a thread that is 5 years, 7 months, and 4 days old.
As to your question, I have never seen any evidence here or on Discord that this mod was ever distributed.