Jump to content

Recommended Posts

Would anyone know exactly how one would go about making a modded character receive reduced damage from Charlie?
Or at the very least if there's some sort of mod which had something similar to this I could look through?

I genuinely haven't been able to find anything that references her damage aside from Negating it entirely. :(

There is no easy way to change it directly.

If you add this to the master postinit of your character prefab, it should work:

Spoiler

if inst.components.combat then
    local old_GetAttacked = inst.components.combat.GetAttacked
    inst.components.combat.GetAttacked = function(self,attacker, damage, weapon, stimuli,...)
        if stimuli == "darkness" then
            damage = damage * 0.5 --half of damage, change it to what you want
        end
        return old_GetAttacked(self,attacker, damage, weapon, stimuli,...)
    end
end

 

 

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...