Action Help

Someone over on the garage forum suggested that I move my problem here but anyway. I am trying to create a mod that adds a item that acts as an alternative to the acetylene torch, mostly for opening locked metal doors. I tried essentially copying the original torch’s code with the exception that it uses batteries instead of acetylene. But here is the problem when ever I tried to use it because of the action name it says it requires acetylene to be loaded in the tool in order to perform it. I am wondering if there is a way around this or if there is a non hard coding way of adding my own action.

If you mean the Your torch doesn’t have enough acetylene to cut that. message, it is hard coded in iuse.cpp and can not be changed via json. You need to either add a new use function, or change the existing function. Both solution require to recompile the game (and can not be distributed like a mod).

Btw. the function also mentions “Acetylene gas” when you chose the same square as the character to cut to, so you might want to change that as well.

Alternatively, you could write your use function in Lua (a scripting language), that script can be loaded and used just like json (without recompilation).