Maspalio
October 16th, 2016, 13:21
Hello all,
Still working on my Ruleset, i have a hard time adding functions depending from the ActionsManager (manager_actions.lua file) without copying the full file.
What i'm trying to do : I have written a new function that changes the rolls slightly and have put it in a new lua file. This file is loaded from base.xml via script name="InsertNameHere" as usual.
To call this function, i need to change the resolveAction function contained in the CoreRPG manager_action.lua file, adding the ref to "InsertNameHere".
So i went from
local rMessage = createActionMessage(rSource, rRoll); to local
rMessage = InsertNameHere.createActionMessage(rSource, rRoll); ... a minor change.
My problem : as i launch the game, i have to reintroduce the entire file, function after function as they are all missing... It's the reverse of the includefile spirit, as i have to duplicate this CoreRPG file for just a line...
I guess i'm doing this wrong. How can i modify the resolveAction alone, without copying a billion other functions i still have in core?
Thanks a ton for your help. Going crazy on that one...
Still working on my Ruleset, i have a hard time adding functions depending from the ActionsManager (manager_actions.lua file) without copying the full file.
What i'm trying to do : I have written a new function that changes the rolls slightly and have put it in a new lua file. This file is loaded from base.xml via script name="InsertNameHere" as usual.
To call this function, i need to change the resolveAction function contained in the CoreRPG manager_action.lua file, adding the ref to "InsertNameHere".
So i went from
local rMessage = createActionMessage(rSource, rRoll); to local
rMessage = InsertNameHere.createActionMessage(rSource, rRoll); ... a minor change.
My problem : as i launch the game, i have to reintroduce the entire file, function after function as they are all missing... It's the reverse of the includefile spirit, as i have to duplicate this CoreRPG file for just a line...
I guess i'm doing this wrong. How can i modify the resolveAction alone, without copying a billion other functions i still have in core?
Thanks a ton for your help. Going crazy on that one...