ace43609 Posted December 16, 2014 Share Posted December 16, 2014 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 = 2end 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 More sharing options...
ace43609 Posted December 16, 2014 Author Share Posted December 16, 2014 I fixed it! Turns out I had the wrong thing for it..I instead used inst.components.combat.damagemultiplier = 2 I was looking through another mod's files to see what I did wrong and it fixed it! Link to comment Share on other sites More sharing options...
rezecib Posted December 16, 2014 Share Posted December 16, 2014 @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 More sharing options...
ace43609 Posted December 19, 2014 Author Share Posted December 19, 2014 Thank you for the helpful advice! Porting characters is harder for me than i thought it was and I really need to learn not do do all my work over all-nighters... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now