Jump to content

Recommended Posts

I'm trying to make a character that, in certain situations, gets no benefit from / is completely unable to use healing items such as healing salves and honey poultices. 

 

Problem is, I don't know how to do that, and I can't find anything, in the base game or other mods, that does something similar. Any ideas?

 

I'd prefer to avoid editing the honey poultice and healing salve files if I can. 

@Patriarachnid Change the heal action's function.

ACTIONS = GLOBAL.ACTIONSlocal orig_heal_fn = ACTIONS.HEAL.fnlocal function disable_heal()    ACTIONS.HEAL.fn = function(act) endendlocal function enable_heal()    ACTIONS.HEAL.fn = orig_heal_fnend

@Patriarachnid You can put that in the modmain, but if it's supposed to be character specific, you can put it in your character file too with a few modifications.

For use in the character's file, just remove this part:

ACTIONS = GLOBAL.ACTIONS

When do you want to activate/deactivate it? Just call the disable_heal or enable_heal functions.

 

Edit: Have a look in actions.lua, the part with the Heal action's function. You can see that it's what calls functions in the Healer component, so changing it to an empty function will deactivate it.

Edited by Blueberrys

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...