Jump to content

Recommended Posts

I've been working on a character mod for DST. I have the art and dialogue all finished, and it seems to work well. I want to add a few perks though, and I just can't figure out how to code it. 

 

I tried looking at a few coding tutorials and referencing other lines of code, but I just can't get anything to work.

 

I want her to lose 10 health when she eats a veggie, and I want her speed and damage to increase to 1.25 when her sanity goes lower than 0.2. 

 

This seems so simple to me, but I just can't get anything to work. Can anyone help me out?

 

Thanks!

 

post-712890-0-95759900-1445133322_thumb.

I don't really know anything about modding and all that, need help with my own mod and such. But from what I'm reading, Maybe it doesn't like the > Sign. I don't know really just what it seems like to me. Hope you get help soon!

Thanks, and good luck with yours. Hm, that's strange. I've seen it work in other peoples mods, so I guess I just didn't do it right.

 

One other problem I have, is with the hat mod ive been making. I thought it was finally finished, but I get this error itemdoesntwork.png

Thanks Blue! That helped a lot. I was eventually able to get that item working in the game maskworks1.png 

I even got the food thing working. 

 

There's still one problem, the low sanity doesn't seem to be doing anything. It doesn't crash the game at least. itemdoesntwork.png

How I was able to get the food thing to work, is I added this,

Capture.png

Now I assume I could copy that, change 'eater' to sanityfn, maybe 'oneat' could be changed to 'inst'. But what do I change 'SetOnEatfn' to? Or am I going in the wrong direction?

 

Thanks again for your help!

I had an issue with the movement speed before as well, Is there another thing like this? (Maybe this counts for sanity stuff as well?)

 

--Revived from human/Movement Speed base: 4,6local function onbecamehuman(inst)	-- Set speed when loading or reviving from ghost (optional)	inst.components.locomotor.walkspeed = 7.5	inst.components.locomotor.runspeed = 7.5end

There might be another code interferring with your movement speed stuff so it takes priority over one and not the other. This one is just when the characters loads, into the world or into a cave or something. I think i removed the other code i tried adding in and now i move faster.

Edited by xTheFallenOnesx

I just went in and edited the default combat multiplier to 50, The code looks the same and i could two shot a beefalo with my fists. It looks fine to me, perhaps there is something in the code you created that is making the entire thing null and void? Wish i was of more help x3

This is in my character.lua under the master_postinit

-- Damage multiplier (optional)	inst.components.combat.damagemultiplier = 50 --TUNING.WENDY_DAMAGE_MULT

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