Jump to content

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

Edited by julz1981

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

Edited by julz1981

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?

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?

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

Yeah, there's a large. And I think there's a Huge, as well.

 

 

and there is a crazyness_med etc

 

   inst:AddComponent("dapperness")
    inst.components.dapperness.dapperness = TUNING.CRAZINESS_SMALL
 
found in 
 
armor_sanity.lua
Edited by mikey99222

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