Jump to content

code help?


Recommended Posts

I am trying to change up some of the stats for a custom character and I don't know how to set the damage multiplier for her.

 

This is what I've added so far
 

local fn = function(inst)
 
inst.soundsname = "willow"
 
inst.entity:AddMiniMapEntity()
    inst.MiniMapEntity:SetIcon("neptune.tex")
 
local light = inst.entity:AddLight()
light:SetFalloff(20)
light:SetIntensity(0.001)
light:SetRadius(5)
light:SetColour(255/255, 255/255, 255/255)
light:Enable(true)
TUNING.SEEDS_GROW_TIME = (4*TUNING.SEEDS_GROW_TIME/6)
TUNING.FARM1_GROW_BONUS = (TUNING.FARM1_GROW_BONUS/2)
TUNING.FARM2_GROW_BONUS = (TUNING.FARM1_GROW_BONUS/2)
TUNING.FARM3_GROW_BONUS = (TUNING.FARM1_GROW_BONUS/2)
TUNING.POOP_FERTILIZE = (TUNING.POOP_FERTILIZE*1.5)
TUNING.POOP_SOILCYCLES = (TUNING.POOP_SOILCYCLES*1.5)
TUNING.GUANO_FERTILIZE = (TUNING.GUANO_FERTILIZE*1.5)
TUNING.GUANO_SOILCYCLES = (TUNING.GUANO_SOILCYCLES*1.5)
TUNING.WILSON_WALK_SPEED = (TUNING.WILSON_WALK_SPEED*0.9)
TUNING.WILSON_RUN_SPEED = (TUNING.WILSON_RUN_SPEED*0.9)
TUNING.DAMAGE = 2
end
 
It doesn't crash in game and works fine except for the damage i tried to add in. I don't think the TUNING.DAMAGE is right so could anybody help?
Link to comment
Share on other sites

@ace43609, The way you're affecting the rest of the stuff through TUNING would've been okay in single-player, but in DST it'll be a problem, because it'll change those values for everyone. You should look at where those values are being called in the game's code (e.g. for TUNING.WILSON_WALK_SPEED it's in player_common-- using a Find In Files search is very helpful for this), and then use the approach that that part of the code is using. For the fertilizer stuff, though, you will need a more complicated approach to modify it properly, since you'll have to check that the character fertilizing is yours. 

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