Jump to content

Assistance with better healing for modded characters.


Recommended Posts

Does anyone know a way to make all items with the healer component more effective as a custom character?

Or just make bandages and healing salves more effective with a custom character.

 

Also first time trying to ask for help on forums, a friend suggested me to do so and I have no idea if I'm doing it right. Thanks in advance!

Link to comment
Share on other sites

You need something like this:

--prefab file
local MULT = 1.25

local _newHealthDoDelta(self, amount, cause, ...)
	if amont > 0 and cause and cause.components.healer then amount = amount * MULT end
	return self.inst._oldHealthDoDelta(self, amount, cause, ...)
end

--prefab fn
inst._oldHealthDoDelta = inst.components.health.DoDelta
inst.components.health.DoDelta = _newHealthDoDelta

Or you can add a custom tag to a character and add PostInit to the healer component.

Edited by ksaab
Link to comment
Share on other sites

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
 Share

×
  • Create New...