pixelpuppet Posted November 30, 2014 Share Posted November 30, 2014 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") thenlocal 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 endend Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.