Jump to content

Recommended Posts

Hello,

I really like this mod: http://steamcommunity.com/sharedfiles/filedetails/?id=380122571&searchtext=

but it doesn't feel balanced. I have been playing Wigfred and I was attempting to use that experience to balance the character. At first the main problem seemed to be that he could work all night, so I changed the night-vision from the whole screen basically to this: 

 

if TheWorld.state.isnight then
local light = inst.entity:AddLight()
inst.Light:Enable(true)
inst.Light:SetRadius(2)
inst.Light:SetFalloff(.7)
inst.Light:SetIntensity(.3)
inst.Light:SetColour(0/255,185/255,255/255)
 
That feels a lot better, but the scythe is still really strong. I'm not sure how to go about it, he is much weaker than the other "fighting" characters and he dies quite easily. He functions as more of a glass cannon. If you get hit it hurts and you only have 120 health. So I was thinking that the scythe could scale with how insane you are? And it needs a recipe. I of course do not know how to do any of that, so direction would be great. Also I don't know if this is the right way to balance it, so suggestions there would be helpful too. I have already changed a lot of the text lines to give the character a personal feel, so I'm invested.   

To be fair, it's quite challenging to balance death itself :p

 

How to add a recipe:

First make sure you have these lines somewhere above:

local Recipe = GLOBAL.Recipe
local RECIPETABS = GLOBAL.RECIPETABS
local STRINGS = GLOBAL.STRINGS
local TECH = GLOBAL.TECH

Then add this somewhere below said lines:

STRINGS.RECIPE_DESC.MY_PREFAB= "This is a recipe description."
local rec = Recipe("my_prefab", {Ingredient("goldnugget",3),Ingredient("grass",4),Ingredient("honey",40)}, RECIPETABS.WAR, TECH.SCIENCE_ONE)
rec.atlas = "images/my_image.xml"
rec.image = "my_image.tex"


 

Thanks for the help! I just add that to the weapon Lua? I was thinking that I could use an few if statements to base the weapon damage on his sanity and time of day. I'll have to review how to do that, but I'm not sure how to use GetPercent. Should it be variable = GetPercent() ?

And then I could use the variable in my if statements? Also I'm doing this for DST, I just realized that I posted this in the wrong forum.

I just add that to the weapon Lua?

no, i think its supposed to be in your characters prefab.

alternatively, not sure if this still works in DST though, but in my DS mod i add recipes like this near the end of the modmain. This makes sure that it only applies to that character and adds it after the initialisation of the character, which works better in DST as far as ive read about it:

AddPrefabPostInit("prefabnameofyourcharacter",function(inst)                        local nameofyouritemprefab_recipe = Recipe("nameofyouritemprefab", {Ingredient("monstermeat", 1)}, GLOBAL.RECIPETABS.WAR, GLOBAL.TECH.NONE)	                    nameofyouritemprefab_recipe.sortkey = 3	                    nameofyouritemprefab_recipe.atlas="images/inventoryimages/itemprefabname.xml"                          GLOBAL.STRINGS.RECIPE_DESC.NAMEOFYOURITEMPREFAB= "This is an item."end)
Edited by Seiai

Thanks guys, 

 

Both ways seem to give the same result. Which is probably due to an oversight on my part.

 

LUA ERROR stack traceback:
        scripts/widgets/image.lua(30,1) in function 'SetTexture'
        scripts/widgets/image.lua(11,1) in function '_ctor'
        scripts/class.lua(181,1) in function 'Image'
        scripts/widgets/ingredientui.lua(28,1) in function '_ctor'
        scripts/class.lua(181,1) in function 'IngredientUI'
        scripts/widgets/recipepopup.lua(280,1) in function 'Refresh'
        scripts/widgets/recipepopup.lua(290,1) in function 'SetRecipe'
        scripts/widgets/controllercrafting.lua(132,1) in function 'SelectRecipe'
        scripts/widgets/controllercrafting.lua(156,1) in function 'SelectNextRecipe'
        scripts/widgets/controllercrafting.lua(247,1) in function 'OnUpdate'
        scripts/frontend.lua(599,1) in function 'Update'
        scripts/update.lua(93,1)
 
I don't know where to look for the error here. 

So I was playing with friends and I had to revert the changes I made because they could not move around. Then when I went to replicated my problem it worked. So I don't have that issue anymore. I will add the finite durablity, I think I can do that much (famous last words). But I also wanted to change the strength of the scythe based on the time of day and the character's sanity. I made a bit of an if statement but I'm sure it's wrong. But hopefully you'll see what I'm attempting. 

 

local function scythedamage(inst, data)
 
local sanity = GetPercent
 
if TheWorld.state.isday and santiy > 50 then
 
inst.components.weapon:SetDamage(TUNING.SPEAR_DAMAGE)
 
else inst.components.weapon:SetDamage(TUNING.SPEAR_DAMAGE*2)
 
end
end
 

So this definitely doesn't work. It takes 7 hits to kill a spider at all times of day.

Also adding the recipe makes people who join my game no have animations and be able to craft everything.

Edited by jct0064

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