Jump to content

[HELP] Character Perks


Recommended Posts

I'm building a character mod and want to know how to add willows pyro habits. I found a willowfire.lua file in the games folder. Wondering if I could just load this to my character and if it would work? I tried it and nothing happened in terms of fires starting. I did however get an overlay. 

 

willowfire.lua:

local function fn()    local inst = CreateEntity()    inst.entity:AddTransform()    inst.entity:AddNetwork()    MakeInventoryPhysics(inst)    --HASHEATER (from heater component) added to pristine state for optimization    inst:AddTag("HASHEATER")    inst.entity:SetPristine()    if not TheWorld.ismastersim then        return inst    end    MakeSmallBurnable(inst, 4 + math.random() * 4)    MakeSmallPropagator(inst)    inst.components.burnable:Ignite()    inst:AddComponent("heater")    inst.components.heater.heat = 70    return instendreturn Prefab("common/willowfire", fn) 

 

Thanks!

Link to comment
Share on other sites

In your characters Prefab, right after function master_postinit

--master_postinit    inst:AddComponent("firebug")    inst.components.firebug.prefab = "willowfire"    inst.components.firebug.sanity_threshold = TUNING.WILLOW_LIGHTFIRE_SANITY_THRESH

I think that's what you were looking for?

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