Jump to content

How to give Dapperness to the walking cane?


julz1981

Recommended Posts

Hi, i would like the cane to give a very slight sanity boost, like 1/min or wathever the smallest is!

 

Because who can say cane without dapper?

 

so, how would i do this? i searched in the tuning.lua and didnt find anything "mind you i completely suck at moding" :p

Link to comment
Share on other sites

great thank you, i will probably try tiny first XD

 

 

 

edit: So, just to be sure, i should add it somewhere in there?

local function fn(Sim)
    local inst = CreateEntity()
    local trans = inst.entity:AddTransform()
    local anim = inst.entity:AddAnimState()
    inst.entity:AddSoundEmitter()        
    MakeInventoryPhysics(inst)
    
    anim:SetBank("cane")
    anim:SetBuild("cane")
    anim:PlayAnimation("idle")
    
    
    inst:AddComponent("weapon")
    inst.components.weapon:SetDamage(TUNING.CANE_DAMAGE)
    
    inst:AddComponent("inspectable")
    
    inst:AddComponent("inventoryitem")
    
    inst:AddComponent("equippable")
    
    inst.components.equippable:SetOnEquip( onequip )
    inst.components.equippable:SetOnUnequip( onunequip )
    inst.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MUL

Link to comment
Share on other sites

Hi everyone i'm working on a similar mod but instead of sanity its health, i cant seem to find the equivalent of dapperness for health. will i have to fiddle/experiment with the in-game ticks? or is there an equivalent to dapperness?

i personally dont know, but you should look in the life-giving amulet scripts, but why would you make a cane heal you?

Link to comment
Share on other sites

i personally dont know, but you should look in the life-giving amulet scripts, but why would you make a cane heal you?

 

Im not making a healing cane, i want it so that when my hunger stat is at full my health bar starts to slowly fill up

 

sort of like

 

if (hunger ==100)

{

     heals some hp  

}

 

that's the idea at least

 

i have some basic knowledge of LUA

Link to comment
Share on other sites

Archived

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.

×
  • Create New...