Jump to content

Need Help with Custom Character Perks!!


Recommended Posts

Hello, so I got back into DST a few days ago after like 2 years of not playing, and I decided to make a mod right away since it was something I wanted to do even back then but couldn't for various reasons. I've made the art, and I've renamed him and changed his stats.
I basically just need to add the perks and I'll be done with the in-game stuff. I made him using esctemplate btw.
The perks I wrote are as follows:

1.Goes insane easily.
2.Blood thirsty.
3.Small stomach, but goes hungry much slower.
4.Can heal people with his blood, his own wounds heal faster.
5.Can manipulate darkness.

For the 1st one I just set his max sanity low.
For the 2nd one I just set the damage multiplier to 5, but I still need to test it for balancing purposes.
I start needing help with the 3rd one, because I can set his max hunger low, but I have no idea how to make it deplete more slowly.
For the 4th one, I probably need to add a character exclusive item that heals others but requires you to use your own health (wont affect max health though), sort of like the telltale heart but it just heals health instead of reviving people. And for the health regen, I wanted it to go faster but without it depleting more hunger, I don't know if that's possible though.
For the 5th one, I was thinking of making a nightmare amulet that never breaks, but again, I don't know how to go about it.

Any help is appreciated a whole bunch, thank you!! :tranquillity:

Edited by Nova Fox
Link to comment
Share on other sites

For the 3rd perk, there's a line in the esctamplate prefab's "local master_postinit" function

	inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE

If you change the "1" that changes how fast hunger drains. For example if you change the "1" to "0.8" then your character will lose hunger 20% slower than Wilson does.

I'm new to modding, so I can't really help too terribly much with the other perks.

  • Thanks 1
Link to comment
Share on other sites

Hi so a little update to this, I managed to implement technically all of the perks!
I changed my idea for the darkness manipulation, i managed to make him be able to craft nightmare fuel in exchange for his health (so i don't need the amulet anymore).
With this same method I implemented the "blood" I suppose. I still have an issue with it, though.
Since the blood is gonna heal the same amount as the honey poultice, I just made him able to craft honey poultice with his health, which makes the item show up as the honey poultice and have the same name. I wanted to change at least the image, but I didn't know how. I tried making an inventoryitems folder with the new image (in .tex, and i also created the .xml file since the autocompiler didnt), but the game sort of just ignored it. So I still have an issue with that, idk if i'll need to create an entirely different item for this.
I used this thread as a guide for that.
As for the health regen, I took some code from this mod.
So basically I just need help with the healing item now. I'm trying to look for a guide for making custom inventory items but I haven't gotten any luck finding any. :(

Update, again.
Managed to fix my last issue with the inventory item. The way I managed to get it working was very messy and I visited many threads and took the useful things from them to implement to my item mod. I used this thread for getting the item to at least show up (I removed all the code involving it being an equippable item and I didnt include the swap animation thing since this is a basic inventory item that does not require that), if you look through its pages you'll see someone asking about the name of the item, so i fixed that issue in that same thread too, took some other lines of code posted there for the examination description and recipe description.
After that whole deal I just couldn't make the image to show up on the recipe tab, and I fixed it taking the code from the modmain.lua posted on this other thread.
So yeah. I suppose I should've just looked harder through the forum before making this thread. Sorry about that. I'll keep this up just cuz I think it could help someone else.

Edited by Nova Fox
Update of my situation
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...