Jump to content

Recommended Posts

im a noob at modding, but i've been fooling around with editing .tex files and prefab files for existing characters (making copies of the original files before hand of course) and i was wondering if anyone here could tell me how i'd go about decreasing or increasing the amount of health wigfrid regains after killing something? its a bit different than editing health/sanity/hunger. i think this is the block i need to edit in some way, or am i wrong

 

local function onkill(inst, data)
if data.cause == inst.prefab 
and not data.inst:HasTag("prey") 
and not data.inst:HasTag("veggie") 
and not data.inst:HasTag("structure") then
local delta = (data.inst.components.combat.defaultdamage) * 0.25
        inst.components.health:DoDelta(delta, false, "battleborn")
        inst.components.sanity:DoDelta(delta)
 
        if math.random() < .1 and not data.inst.components.health.nofadeout then
        local time = data.inst.components.health.destroytime or 2
        inst:DoTaskInTime(time, function()
        local s = medScale
        if data.inst:HasTag("smallcreature") then
        s = smallScale
    elseif data.inst:HasTag("largecreature") then
    s = largeScale
    end
        local fx = SpawnPrefab("wathgrithr_spirit")
        fx.Transform:SetPosition(data.inst:GetPosition():Get())
        fx.Transform:SetScale(s,s,s)
    end)
        end
 
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...