Adding new iuse function

Greetings. I have a question - is there any mean to add new iuse function in mod without main gamedata being involved, so it could work only when mod is activated.

For example: we have a two variants of the talking doll. I want to add a new one with different speech lines but I can’t since the use_action DOLLCHAT takes lines from already existing doll.

OH… hmm not the one to go for on help for stuff like this, but I am first responder, so I will do my best. Should be a way with .json’s to add possible results to the talking doll. Would be kind of nice to have doll choose from a variety of random sayings. Untill now I didn’t even realize that you could (a)ctivate them and get a message…I just always stole the batteries out of them/ left them to be broken down later, maybe if they can be for parts.

Yeah, batteries and spare parts is the main benefit but I think about authenticity too.

^.^ always nice. I just didn’t even realize they do that.

You can either edit the game code and PR the changes on github or make a lua iuse function.
For lua iuse functions, there is an example in the docs somewhere.

Both seems hard for me since I can’t into the code. But that’s a good reason to start studying. Thanks for the help.

For activating a manhack. Which is useful if thats the kind of iuse your trying to make. Otherwise, you have to know how to write lua, the equivalent code from the C++ iuse coding, how to make the game read the lua file, etc.

See relevant topics:
“Lua modding prototype” by CIB
CIB’s devlog
Way to add new iuse values to a mod?
Questions about the old .lua coding system

Their messages are creepy as hell, too…