Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Strive: Conquest

A successor to first Strive For Power game, currently at alpha stage · By Strive4Power

Adding a sex trait through mods, with new effect

A topic by RandomFap created May 11, 2023 Views: 1,830
Viewing posts 1 to 1
(2 edits) (+1)

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