I have been looking at different mods to understand how things work but it seems like adding a new sex trait effect is not obvious (no easy copy-paste from another mod).
Sure, I can add a sex trait with
var sex_traits = { killjoy_aura= { code = "killjoy_aura", name = "", descript = "", starting = true, random_generation = false, negative = false, acquire_reqs = [], reqs = [], effects = [{effect = 'killjoy_aura', trigger = 'end_turn'}], }, } func load_tables(): modding_core.load_table(Traitdata.sex_traits, sex_traits)
But then defining the killjoy_aura effect and inserting it to InteractionMainModule.gd seems to be a challenge. If I do it manually without mods it work,
func killjoy_aura(caster): for i in participants: i.horny-= 10 i.sens -= 10
but how to add it by mods? I try to look at what was done in the kennel mod but no idea how to make it work in my case.
I tried
extends "res://gui_modules/Interaction/Scripts/InteractionMainModule.gd" func killjoy_aura(caster): for i in participants: i.horny-= 10 i.sens -= 10
in a extra_effect.gd file and adding
func extend_nodes(): var sexInteractionNode = modding_core.get_spec_node(input_handler.NODE_SEX) modding_core.extend_node(sexInteractionNode, path + '/extra_effect.gd')
but it does not seem to work.
EDIT: Weird Typo
EDIT: Found my problem. Needs to add
[NodeScripts] module_name=true
in mod_config.ini file