Jump to content

Looking for aid with some custom character traits


Recommended Posts

Hey there. So me and a pal are recently getting back into DST together and thought it would be fun at taking a crack at making our own modded characters. I've gone through some tutorials, picked up and poked around with a character template - pretty sure we can get custom art assets, speech and basic stats to work on our own. 

The thing I'm struggling with is specific character traits, thought that's probably not the exact term for it.

For example, I'm looking for ways to:

  1. Have a character be immune to cold and heat.
  2. Have a character gain sanity in rain.
  3. Have a character gain sanity from crockpot foods.
  4. Increase the sanity loss in nighttime darkness.
  5. Increase the damage taken from low sanity monsters.
  6. Slow a character's hunger depletion rate.
  7. Having character X gain sanity while around character Y and vice versa.

Among some other, more complicated things. Figured it's better to start with small stuff though while we begin understanding how this game's coding works. I've seen some other mods with some of the traits listed above, and apparently it's not uncommon for people to look at how other mods are built and borrow and modify assets from them, right? 

So if anyone has a moment to kind of point us in the right direction with this, what part of a modded character do you usually have to poke through for to find this kind of info? Just the modmain.lua or are we going to have to go messing around in the scripts or somewhere else for character specific traits? There isn't like a compiled list anywhere that I've missed for that kind of thing. I think?

And if any kind souls already know what kind of code could achieve the effects desired above and feel like sharing, it'd be super appreciated of course! Thanks for any possible help. Cheers!

EDIT: Whoops, wrong forum. My bad!

Link to comment
Share on other sites

@circle666,

Though this post does belong on the DST forum, anything that doesn't involve a DST-only feature (like networking, or multiple characters) is valid for the singleplayer version. As such, it is reasonable to ask for help in this forum.

 

Most character traits will be coded in the constructor function for your character prefab (It's usually called 'fn'.). In some cases (when something beyond your character needs to be changed to make a trait work), some work in 'modmain.lua' may be required.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...