circle666 Posted June 18, 2016 Share Posted June 18, 2016 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: Have a character be immune to cold and heat. Have a character gain sanity in rain. Have a character gain sanity from crockpot foods. Increase the sanity loss in nighttime darkness. Increase the damage taken from low sanity monsters. Slow a character's hunger depletion rate. 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 More sharing options...
whismerhill Posted June 18, 2016 Share Posted June 18, 2016 wrong forum : http://forums.kleientertainment.com/forum/79-dont-starve-together-mods-and-tools/ Link to comment Share on other sites More sharing options...
Arkathorn Posted June 18, 2016 Share Posted June 18, 2016 @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 More sharing options...
circle666 Posted June 18, 2016 Author Share Posted June 18, 2016 @Arkathorn Ah, thank you very much! I've opened a favorite workshop mod and there are a couple of different coding bit's I've been looking for in the prefabs lua. This will be of great help, thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
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.