Jump to content

[Guide] The Big Book of DST Character Creation


Goregonzola
 Share

Recommended Posts

„How can I create my own custom survivor?”

„I’m having a wee bit of trouble with the modicon. How can I make it work?

„Modmain? Lua? What? Where am I?”

 

I had these, and tons of other similar questions when I’ve first tried myself in DST character modding.

Hey there, Sümi here! Creator of the Wolemorm, Williams and Welnyel mods, and the author of this guidebook.

 

I decided to write the Big Book of DST Character Creation to answer the FAQ of the beginners and the questions of my rookie past self. I received a lot of selfless help and support from the modding community, I feel like now is the time for me to pass the great knowledge.

 

Some important notes before we begin:

Spoiler

- This guide is mainly made for DST modding. I have no experience (so far) in RoG or any of the DLC’s modding. Some of these guides might apply to singleplayer DS as well, but it’s highly random - some folder structures and programming parts can be really different there.

- English is my secondary language. Feel free to note any stinky, ugly grammatical error.

- Making mistakes is my second favourite hobby after modding. Pinpoint anything if I’m wrong about it, but I’ll do my best.

- My mods are far from perfect. I’m still learning the craft too. This will be an eye-opening journey for me as well.

- This guide will partly be a collection of other outstanding tutorials and guides. I will link and credit them throughout my guide. I will mainly talk about the creation itself in this thread, however most of the extra chapters are other tutorials bunched together.

- I named my character Watson for this tutorial, with the prefab name “watson”. Whenever you see “watson” in this thread, you should use your own character’s prefab name instead.

I will divide the guidebook into smaller, separate chapters, so readers can search more easily about what they’re interested in.

 

Chapter 0 – Who is my character?

Spoiler

You already know this aren’t you? You have a well-defined look, a finished perk system, their voice, exact stat values.

No? It’s okay.

I rarely have everything in mind when I start working on my next survivor. However, it doesn’t mean that you should go into this completely blindly.  Whenever I start my next project, I make sure that…

a) I have a clear vision about the character’s look or theme. It’s a djinn. It’s a wolemorm-skittersquid amalgamation. If it feels good to look at them, it’s half a victory. If you come up with a good design, you can basically tell its perks by looking at it.

OR

b) I have a clear vision about the character’s perks or abilities. The players would have to combo their foods with this guy. This character should benefit from the dark. You can go wild with this method. Let’s stick with the light-focused character: it can be an owl, a nightmare creature, a vampire, you name it. This thing also works backwards: If it has a feel-good gameplay gimmick, it’s also half a victory.

If you plan to implement a character from an existing game/movie/series, most of its looks and abilities are given before you even start modding. It’s not a bad strategy, though, you lose some of the creative freedom with character implantation.

Very important: Set realistic goals. You probably won’t be able to create an airbender with ranged and elemental attacks for the first time. Start small, but get better constantly. Expand your comfort zone.

Chapter 1 - The tools you need

Spoiler

There are some programs that are crucial to create your own character mod. Luckily for you, all of these can be downloaded completely free!

Let’s see the list:

- Any kind of graphic editor/graphic design software, that supports transparency. The best bet is Adobe Photoshop, though it has a monthly subscription fee. I wouldn’t recommend it if you would only use it for a quick, one-time modding. GIMP is a very well-known and widely adored free alternative, but pick anything that works for you. DO NOT use Microsoft Paint please. It’s a disaster.

Here’s the link for GIMP: GIMP – GNU Image Manipulation Program

 

The Extended Sample Character. It’s an outstanding starting kit created by @Dragon Wolf Leo. I know, I know, it’s a furry character by default, but it contains almost every possible body part that you can add to a survivor. The basic coding is already written in it, you don’t have to deal with folder arrangement either. You can pick whether you want a DS, DS Shipwrecked or DST template (though, we will mainly work with the DST template in this guide).

Here’s the link: Extended Sample Character - Modding Tools, Tutorials & Examples - Klei Entertainment Forums

 

Don’t Starve Mod tools. It can be used from Steam, it’s completely free. In your Library, check the Software box to reveal it, or just search for it in the search bar. We will use this tool many times during our creation: texture review, mod uploading, item creating, attaching sounds, etc.  Very important.

Here’s a link that I’ve found, if you failed to locate it with the previously written method: Don't Starve Mod Tools · AppID: 245850 · SteamDB

 

Notepad ++. This is the software that we will use to write/edit our codings (it’s also completely free). If you’re familiar with any other alternative, feel free to use it, I’ve only used Notepad++ during my modding career. It’s simple, easy to use, and it does its job perfectly well. It’s also available in languages other than English.

Pick the latest version and download it from here: Downloads | Notepad++ (notepad-plus-plus.org)

 

A software that can open .zip files. There are a ton of options to choose from: WinRAR, 7-Zip, you name it. Most PC users already have one on their computers, zip is a reguralry used format. I don’t add a link for this, you can easily find one online.

 

Determination and patience. Ha-ha-ha… Really, it’s important to not rush. There are a lot of factors that determine how much time a mod requires. Turn on some music, grab a cup of your favourite rehydration liquid and take your time. The journey is more important than destination… or at least, it’s as important.

 

The last thing is a bit optional, but it’s better to have a drawing tablet for this. If it’s a one time or meme-themed mod you want to make it’s perfectly fine to do it without said tablet, but if you’re interested in digital art in general, it can be a huge game-changer. Some of the “screenless” tablets are available at a fairly low price.

Chapter 2 – Setting up your mod

Spoiler

To be honest, this is the most tedious chapter. Try to not get bored halfway through, the fun awaits you in the next chapter.

Create a folder for your mods. Trust me. It will easily get chaotic if you don’t take the time to manage your folders. Create a “parent folder” somewhere, name it as you wish. This is where your mod(s) will be located.

Open the Extended Sample Character’s .zip file and extract it into your parent folder.

Now, you must choose a name for your survivor that you will use every time you reference it from now on. It can also be anything, but it has to be in all small letters, and it can’t have the same name as an in-game character/item/creature. For this guide, I will name my character watson. Whenever I’ll write watson in this guide, you have to use your own character’s name. This will be your character’s prefab name.

Open your parent folder and rename the “extended sample character-DST” folder to watson. If you open it, you should see an anim, a bigportraits, an exported, an images and a scripts folder, three modicon files, a modinfo and a modmain file.

The first thing you must do is to delete every single TEX and XML file in every single folder. Destroy them all! Open your anim folder and delete everything inside it as well. I’ll explain later why we did all of this.

The next thing to do is to replace every “esctemplate” to watson in EVERY file’s and folder’s name. File name, picture name, everything. Remember: small letters. If you double-checked everything, you can march forward.


Right click on modmain.lua, and click on “Edit with Notepad++”.

 image.png.0074420ab396d2d48157541f68a93cdb.png

First thing to do: Do not panic. This thing isn’t as complex as it seems, you don’t have to understand everything here (yet).


We will replace every single “esctemplate” in our coding files with a quick trick. Press Ctrl+Shift+F. This window should show up:

image.png.d52ac38413e38ff1e5a940b10e60494b.png 

Fill it the same way as I did: Add the word you want to be replaced (esctemplate), the word you want to be replaced with (watson) and the folder you want to apply all of this (parent folder/watson). Make sure Match case is ticked. Hit Replace in Files.

If it was successful (66 occurrences were replaced), do the same with ESCTEMPLATE and WATSON (the directory should stay the same).

Congratulations! You’re ready to work on your survivor!

Chapter 3 – Creating the look

Spoiler

YES! Finally! You’ve reached the milestone we all have been waiting for. Head into parent folder/watson/exported/watson. Here, you can see your future survivor’s body parts. Legs, faces, tails, you name it. There should be an SMCL file in this folder that you’ve already renamed to watson. Open it.

image.png.a85b0166246782df9ba9525ca8717d84.png

This is where you can examine how your character will look in the game, without launching the actual game every time you change something. Cool, isn’t it? This software called Spriter.

You don’t have to do anything here. You can drag your character’s body parts all over the place, but it wouldn’t result in anything. Always close this software without saving (at least when you’re working with your character’s look).

“This is so overwhelming. How do I even start replacing all of these files?”

I’m glad you asked! You have to plan your character’s structure first. Open a new document in your chosen graphic software and start sketching. Try different colors, face structures, body proportions.

If you start replacing your body parts without setting a clear design goal, that will quickly result in a potato-shaped survivor. So many modders make  this mistake… They don’t check how the head fits to the face, the torso to the arms, etc. It becomes an absolute nightmare.


Look at the attached picture below. These sketches do look worse than the character’s final form, but they give you a great example about their personality, their mood. Wickerbottom looks like a burned-out librarian. Her main feature will probably be books. Great design, it almost speaks to you. Create a similar sketch figure of your character. Work and refine it until you achieve something simple, but sharp. No one will see these experimentations, be brave, try out many directions. Try your best, but don’t overthink it.

image.png.7d5d5c99cc8762fb8038dc20ce1ace1e.png
 

Second most common mistake: Make sure your character’s head is B I G. Let’s face it, small headed characters look very unnatural in the game’s world. Let’s examine WX 78, who has the smallest head of the roaster:

 image.png.1273f4dd3a40ca6f013b2ebbb7c330e5.png

His head is almost twice the size of his body. Other characters even have big, fluffy hair, so their ratios are even bigger. Do not make the common mistake: Check your ratios.

OKAY. You have a handsome sketch with awesome ratios, it looks promising. Now what?

Examine the game’s other art rules. Sharp edges. Faded colors. No pupils. Tired face. It’s okay to do some smaller rule breakings, but always attach a big contrast in compensation. For example, you can curve the character’s cheeks a bit, but maybe add a sharper hairstyle.

Compare my very first character’s old and new assets:

image.png.c66ba9bd37ae8b6c4adca995d44e6432.png

This is a character from an animated series. She has strong pink colours and round lines by her original design. You can convert anything to DS style, but some things are harder to convert than others. What are the main mistakes with the first design?

The before version has very thin lines, vibrant colours, way too smooth curves and a really bad looking posture. It doesn’t match with the environment; it pulls the player out of the experience.

Another big mistake I certainly made is that I left large surfaces too bland and one-colored. If you feel like your character lacks texture, like my survivor’s heart hair, add some stripes or doodle-lines to it. It’s a cheap, but effective.

Side note: You can see that the game’s original character’s doodle lines never cross their main outline. To achieve the same, select the area you want to doodle, and then add the stripes. This way, you don’t have to worry about crossing their main outlines.

I’m getting ahead of myself. We still only have our sketch version, we didn’t even get to replace the body parts. How do I do that?

Open Spriter again and see which body parts of your characters fit into which compartment. Some might work better as a pigtail than as part of their main hair. You don’t have to scheme everything on a blueprint, just gain a general vision about it.

Now, about the replacing, here’s my strategy: Most design softwares work with layers. Select the layer that contains your sketch version (if it’s on multiple layers, just merge them), and lower its opacity. This way your sketch will becomes almost transparent. Open a new layer above the previous one. This way, you can trace your final version over your own prototype version (DO NOT trace other artists’ drawings). It’s genius Paul, it’s GENIUS!

Also important: Every time you trace a new body part, do it on an individual layer. Front head, face, hair, everything should have their own layers. Double-check whenever you start a new body part.

If a finished drawing blocks your vision, turn off its opacity as well, just make sure you can revert it later. The process should look something like this:

1. Finish your sketch, 2. Reduce opacity, 3. Open new layer, draw the body part, 4. Open new layer, (reduce previous layer’s opacity,) draw the body part.

image.png.fe16e452b04973b5b923964600017d3d.png

Save regularly!

Let’s say you drew the head and the face just like I did. Let’s replace the sample one with the one you just created!

Open the sample head in a new page in your graphic software. It should be located in parent folder/watson/exported/watson/headbase/headbase-0.png. Once you opened it, go back to your drawing file (we’re still in our graphic software), select the head (double check the layer) and hit Ctrl+C. March back to the headbase-0, and slam Ctrl+V. The head should appear over the sample head. Go ahead and resize yours until it becomes the same size with the other one. Delete the sample head and hit save. If you open Spriter now, your new head should proudly be there.

“Why is it still covered with the other head?”

In DS there are different files for hatless and with-hat heads and hairs. Just replace parent folder/watson/exported/watson/headbase_hat/headbase_hat-0 with the same head asset. If it looks weird when you try it in-game, just erase a bit from the top. There will be a lot of trial and error like this.

If the head you added is too big/small or out of place, DO NOT to try to move it in Spriter. Open headbase-0 and headbase_hat-0 again in the graphic software and do the resizing there. If you would do it in Spriter, it would either mess up your files or just wouldn’t do anything at all.

You should do the rest of the creation with the same strategy. Trace body part, replace sample part with it, check it in Spriter, do some adjustments until it looks right.

If you don’t want to feature a tail, skirt or something in your character’s structure, open parent folder/watson/exported/watson_cleared and copy the folder of the body part you want to remove. Head back to parent folder/watson/exported/watson and hit Ctrl+V. The body part should be invisible now in your Spriter.

You have to create your own ghost as well. I tend to forget this. It’s located in parent folder/watson/exported/ghost_watson_build. The steps are the same.

You can check the character’s look in-game before you start the coding if you wish. Check Chapter 7 to learn how to do that.

Some additional tips:

- What if the body part you just replaced doesn’t show up in Spriter? Let’s say you look for face-1. Hold right-click on the character’s face in Spriter. You should see a list of all the available face files, so you can pick to which face you want to make visible. If you don’t save when you close Spriter, it will set every change you made back as it should be.

 

- With hands and many other small body parts, I usually do the strategy reversed. For example: I would open hand-0, I would copy+paste it inside my drawing file, I would reduce its opacity, and I would only then do the tracing. Of course, the new hand will still be brought back and saved inside the hand-0 file. Small body parts are tricky, they must be in place very precisely, or it will look silly in-game.

 

- If you feel lazy with some body parts, just recolor the sample ones. This might be noticeable by some subscribers later, but it’s still an option. You can use this technique if you want to recolor some of your colors later as well. Open the body part you want to recolor and change its settings inside Hue/saturation. Use this option for this, not the Bucket tool.

 

- SWAP_ICON-0 will be a small asset in the game. Try to replicate something similar to the sample one with your own character’s head.

 

- Creating side views: To create a handsome side view, I usually use the technique attached below, it’s pretty self-explanatory. You can really feel like an engineer with it. Sometimes it’s okay to break some small rules if it’s not noticeable and makes the art look better. Double check layers!

image.png.55fe5e16224d5a30e233b90880055b1f.png

- You have to be extra precise with the faces. If they don’t get positioned right (compared to each other), your character will have quite weird ticks in the game. There are several ways to avoid this, you can easily get the experience for it to pull it out well.

 

- Not sure about which face does what? Worst case scenario: try to copy the expression of the sample. Face_0 and face_04 are the default ones, 1-3 and 5-7 is blinking, 8-10 is eating, 13 is dying. The other ones are more situational.

 

- The safest head shape is the oval shaped one. Other forms might look silly with certain headwear in-game. Of course, you don’t have to create a perfect oval, just keep the hats in mind.

 

- Do you feel like your character’s outline is thick enough? Wrong! Or… at least I’m usually wrong with it. You have to run around a bit with your character later in-game to see if it’s too thick or too thin lined.

 

- The character’s hair stucks behind the head in the side view? The easiest solution is to add the hair to the head. The only downside is that it won’t bounce as much as it would otherwise.

 

- I advise you to draw the character’s mouth on the head instead of the face in the side view. If your character does the idle animation, the mouth might move weirdly if you draw it on the face.

 

- You can change your character’s look at any point. Even if it has been already published. Don’t stress.

 

Do not change the body parts’ file ratios. They will immediately get messed up. It can be changed, but I wouldn’t advise to do it if you’re just started. It can get a little complicated.

Chapter 4 – Big portraits and modicon

Spoiler

More art! Yay! Let’s see big portraits first:

It’s actually a great refresh after the tiring, precise work that the previous assets required.

The great @Fidooop collected some really neat frames and tips to start with. You can find his article here:

{TUTORIAL + TEMPLATES} How To Mimic Don't Starve Together's Big Portrait Style - [Don't Starve Together] Mods and Tools - Klei Entertainment Forums

I’m going to be honest: I can’t really add anything more that he hasn’t already told there. There are a few unwritten rules about big portraits, but he explains them there really well.

This next link, however, will greatly make your life easier. It’s a font-generator, you can generate a cool-looking golden and silver name banner. We will need them later anyways, so why not download them now?

Character Portrait Name Generator for Don't Starve Together (dstealth.com)

There’s a sample frame for the portrait in the Extended Sample Character bundle as well. You can find it in parent folder/watson/bigportraits. It’s positioned just right and it’s in the right resolution. If you do use this, draw your figure in a different file and copy and paste it above the sample frame. Drawing directly on the frame might result in a pixelated portrait figure.

There are some bugs regarding big portraits. You can find the solutions in the troubleshoot chapter.

Modicons.

There’s a sample for this as well, in parent folder/watson.

There are zero rules about this, just create something appealing. You can use the previously written trick with Hue/saturation if you want to change the sample’s color.

Modicons also have some problems. Check the solution in the troubleshoot chapter.

Chapter 5 – The images folder

Spoiler

You don’t really have to spend too much time in here. It’s a quick routine work.

I assume you already renamed everything in here, and you already finished your character’s look.

Basically, you just have to replace the assets inside the avatars, map_icons, saveslot_portraits and selectscreen_portraits folders with your character's assets.

I usually print screen my final character art from the Spriter, I copy the head part from the screenshot and paste it in every image file needed. Though, you can do it in any other comfortable way as well.

Selectscreen portraits are not used anymore, but you can replace them “just in case”.

Put the previously downloaded name banners here as well (if you haven’t downloaded it yet, you can do it here: Character Portrait Name Generator for Don't Starve Together (dstealth.com))

Name banners also also have some problems, its solution is in the troubleshoot chapter.

Chapter 6 – Stats, abilities, codings

Spoiler

Fasten the seat belts! This sure will be quite a ride!

Let’s start with modmain.lua. Open it with Notepad++ from parent folder/watson. Let’s examine it in order.

- Prefab files: We will see later that there are certain prefab files in our mods. All of them should be listed in here. I will talk about them later.

- Assets: Remember all the TEX and XML files we annihilated at the beginning? Those will all be automatically regenerated with our new asset files. Everything that has a TEX and XML (or sound format) file should be listed here. These are mainly assets from the images folder. If you want to add custom items for example, its files should be listed here as well.

- Blue local things: It’s a bit more advanced. You basically translate some lines to the game. “Yes computer, local require means GLOBAL.REQUIRE to you. Aren’t ya an atta little boy?” If you get advanced with some codings, you probably have to expand it with additional similar lines.

- STRINGS.CHARACTER stuff: It’s pretty self-explanatory. Make sure you don’t delete any of the “ symbols.

The only other thing you should change here is the character’s gender. It’s FEMALE by default, pick any of the listed options.

You don’t have to add anything else here.

Modmain is the file the game will check first about your mod. Names, skins, sounds will all be mentioned here if you add them later. Some perks might also land in here, but they will mainly be located in your character’s lua file.

Take a quick look into modinfo.lua. There is nothing much you can do here just yet. You can change your mod’s in-game name, description, the author and the version. Fill these with your own informations as you want.

If you’re finished here, let’s head into parent folder/watson/scripts.

You can see a file here named speech_watson. This file contains every single line that your character can say in the game. The Extended Sample Character contains Wilson’s lines by default, but you can change any of these manually.

“But it’s 3000 lines long!?”

Brutal, isn’t it? Of course, you can always replace the most regularly used ones (like the hound warning, darkness warnings, etc.), to save some time, but characters with unique speech lines can be more appealing.

If you do take the time to change it, try to think yourself in your character’s place, act its personality. Make sure the lines are fitting to the time and space, and that they’re not annoying if you have to read them multiple times.

An additional option is to replace the speech file with one of the main game character’s speech files. They are in Steam/steamapps/common/Don’t Starve Together/data/databundles/scripts. Scroll down inside the zip file to find them. It’s also a good idea to import one of them anyway, since the characters most certainly got new lines since the Extended Sample got updated.

If you finished here, we can finally visit our last folder we haven’t visited yet. Navigate yourself into parent folder/watson/scripts/prefabs. You should see watson.lua there and watson_none.lua. As far as I know, the second one is mainly used about skin related stuff, we will not use it in this guide.

Open watson.lua. This is where most of your perks will take place, your character’s prefab file. There are some exceptions, those are meant to be placed in the previously visited modmain file. With a decent amount of experience, you will be able to decide where it should go. In worst case, you can always search for a reference in the game’s files or in some other mods.

Let’s run though really quick what the sample offers by default:

- local assets: I’ve only added custom tools’ animation file sources here before. We will only use this in the extra chapters.

- Your character’s stats: I don’t think I have to explain this.

- Custom starting inventory: Do you want to add a starting item to your character? Add it here. If you want to start with multiple copies of an item, write its prefab name as many times as many items you want to start with.

- local function onbecamehuman and onbecameghost: Don’t mind these. Death and revive stuff. The only time you might use this if you want to add perks about these, but even then, you can just create a new function.

- local function onload: Stuff that happens when you load the game. Again, don’t mind it, unless you want to add a perk that wants to manipulate loading. It doesn’t used often.

- local common_postnit: You will mostly use this to add tags to your characters, like “monster” (pigs and bunnymen will attack your character), or your own tags later on.

- local master_postnit: This is quite important once you start to add own perks to your character. Server-related stuffs must be added here. For now, I just explain the things that are already here. At inst.soundsname, you can replace what voice you want to use with your character. You can write any of the in-game’s survivor’s name to use theirs. You can also change your character’s damage multiplier and hunger rate here as well.

That’s all that the Extended Sample character can offer by its default. I will write about a slight amount of “perk theory”, then I’ll explain how you can add the perks you want.

The most important advice I can give you about perk coding: Don’t set the bar too high, but try something more advanced every time. It’s okay to update your character periodically, as you get better and more comfortable about it.

Set a main design goal to the perks. The best if you can summarize it in a single sentence. Wolfgang is strong, but only if you keep feeding him. Wendy has a ghost, be she’s slightly more vulnerable in herself. Simple, and you can remember it easily.

Now let’s examine Walter the same way. He’s the ranged character, the rider character, the sanity character, but he hates being damaged. Now that’s a long sentence. Maybe too long…? What answer do you give to a beginner, when they ask “What can this scout kid do?”.

Don’t create a thick perk list just so you can make the review videos of your mod longer. This is a survival game, not an RPG. However, you can add many small extras if they fit to the whole picture and don’t turn the playstyle to a whole new track.

How do you pick positive and negative perks?

Imagine the best situation where your character can really shine. You play as Warly. Best situation: You have a ton of different foods and your portable Crock Pot, so you can apply some outstanding food-related buffs with them to your teammates. The character shines in the support role, and outstanding in the kitchen.

What’s the opposite of this holy condition? You have some uncooked food with small variety, and you even lost your Crock Pot. Apply the downside here and make this situation even more miserable: Make Warly picky, unable to eat the uncooked food and extra hungry. Bingo! You have a great downside package. You don’t have to use this idea every time, but it’s a decent approach.

Another great advice: If you can, make the positive perks useful to the whole group (even in an indirect way, you don’t have to make everyone a clear support), but make the negative ones only affect you. This motivates teamwork and reduces frustration.

If you’re making a non-original character (Mickey Mouse, Voldemort, Wolfgang Amadeus Mozart, etc.) their perks are mostly given in theory, but try your best to make some synergy between them as well.

Now that we’re smart and clever, let’s see how we can add these abilities in practice.

Before we begin, make sure you only add one or two changes at a time. After each change, boot up the game and test your mod (see Chapter 7), so you can pinpoint more easily what went wrong.

If you’re new in character modding, I advise to start with tags and simple speed/strength/hunger rate stuff first, that you can add by simply changing a number or adding a single word.

 I will add a few easy lines here to get the basic idea with them. You can add these into your character’s prefab file (watson.lua), in the local master_postnit section if you want. There’s a damage multiplier line there already, you can add these under that. The values can be changed, even to negative ones (it reverses the effect).

- inst.components.sanity.night_drain_mult = 1 – Night Sanity multiplier. Change the number to configure the rate. 1 means 1x (default) rate, 2 means 2x rate.

- inst.components.health:StartRegen(amount, period) – Passive Health restoration. Amount is in Health point value, period is in seconds.

- inst.components.sanity.dapperness = 1 – Passive Sanity restoration. It’s 1 Sanity per seconds, change it as you want.

- inst.components.health.absorb = 0.10  - The character’s defense. This coding blocks 10% of every attack. I have no idea what this does if you add a negative value. The first person who tests this gets a whole free like by me.

- inst.components.combat.damagemultiplier = 1 - Damage multiplier. Change the number to configure the rate. 1 means 1x (default) rate, 2 means 2x rate, 0.5 means 0.5x rate. Doesn’t work with negative values.

- inst.components.locomotor.runspeed = 4 - Speed multiplier. Change the number to configure the rate. 4 is default Wilson speed. Doesn’t work with negative values.

These are some examples to get a first experience about adding lines and changing values, the basics of the basics.

Tags are similarly easy to use. They are single lines, that have complicated codings rooted somewhere else. They’re easy to add, but they can give you some decent perks to begin with. Check the original characters’ prefab files in Steam/steamapps/common/Don’t Starve Together/data/databundles/scripts/prefabs. For example, Webber has the “monster” tag (makes pigmen and bunnymen hostile), Walter the “nowormholesanityloss” (it makes him immune to wormhole sanity penalty), and so on. If you know what exactly you are looking for, you might find it as a tag. They go inside the local common_postinit section.

Once you get a better understanding of the lua files’ construction and about the general coding system of DS, you can try more difficult perks.

The last thing I want to explain here is the structure of the local functions. Character perks use this structure most often. If you want to add a new one, place it above or below local function onload. The line that triggers the function should be placed inside local master_postnit (it’s the inst:ListenForEvent line in the example)

image.png.68dcb9828bc64036a24db8d0d311280e.png

The attached image contains one of Williams’ local functions. It gives him the ability to restore a certain amount of Health when he holds his magic lamp.

- Name of the function: It can be anything. You only use it to reference to it later.

- What should a function do: Now this part can be from 3 to 100+ lines long. It’s really straightforward, this is what the perk is about.

- inst:ListenForEvent: This is the part of the example that tells the game when your function should trigger. It’s mostly the same format (inst:ListenForEvent), but there are a few exceptions.

- When should your function trigger: This part determines that what action should triggers the function.

This is a very general description, I only featured it just to make your life easier once you start examining other mods or the game’s files.

Writing new perks can be hard sometimes. The best thing you can do is to search for reference. If you have a clear idea about the perk, find a character that has something very similar in its toolkit. Use the in-game characters’ or other modded survivors’ coding as a reference.

Chapter 7 – Mod testing & uploading

Spoiler

Finally! At last, you’re about to actually see your character in the game!

If you made sure that you finished everything, go into your parent folder, and copy the watson folder. Head into Steam/steamapps/common/Don’t Starve Together/mods and paste your folder there. If that’s done, launch Don’t Starve Together. A black window should pop up with passing white texts. This is the thing called the autocompiler. It creates the animations and the previously deleted, new versions of the XML and TEX files.

Once it’s finished working, start a new game and tick your mod in the Mods section. If you managed to do everything right, your survivor should be a playable character there. If the game crashes or does some buggy stuff, quit DST, and examine the Troubleshoot chapter to solve the issue.

If you can play your character flawlessly (try it with caves enabled as well) and you think it’s in a publishable condition, go ahead and skyrocket it to the Workshop!

Quit the game and launch Don’t Starve Mod Tools via Steam. Out of the five available options, choose Don’t Starve Mod Tools. Change the “Target Game’s Workshop” to Don’t Starve Together and hit “Add”.

- Update Data: Tick the box and hit Browse. Locate your mod inside Steam/steamapps/common/Don’t Starve Together/mods. Make sure you compiled it before you upload it.

- Update Preview Image: Create a nice-looking thumbnail for your mod that will appear in the Workshop. Locate it. If the upload fails, it might be because the file you added here is too big.

- Pick the character tag in the Tags section.

- Change Visibility to Hidden, so you can edit its description later.

Smash the Publish! button into the face. If everything went all righty, the Mod Tools will inform you about it.

Locate your mod through your Steam profile in the Workshop Items section.

What makes an attractive Workshop page?

- Write an appealing description about your mod and character. Make it short and straightforward.

- Create some screenshots and upload them. People don’t really like to download unknown stuff into their games. Naked Workshop pages are the worst. Make your subscribers feel like they download something that’s been refined very carefully.

If the thumbnail looks pixelated, doesn’t quite fit, or most of its surface is plain black, change it as well. This will be the first impression your customers will experience, make sure it’s a pleasant one.

If the page looks decent, swap the visibility to public and wait for the feedback.

Congratulations! You just finished your mod!

Chapter 8 – Troubleshoot

Spoiler

It’s really important to learn how to debug your own mods. If your mod crashes the game, stucks in an endless loading screen, refuses to start the server with the Dedicated Server failed to start message, you have to examine what went wrong. These can happen by a huge number of different mistakes.

Good thing the game can practically tell you what went wrong. If you experience any of the previous problems, head into Computer/Documents/Klei/DoNotStarveTogether and check the client_log file. It should note every single step you made since you launched the game. Scroll down until you can find your buggy part.

If you can’t find the bug report there, head deeper into Computer/Documents/Klei/DoNotStarveTogether, sort the folders here by date, open the newest, open the newest one again, go into Master and open server_log. Act the same, scroll down until you find the buggy part. Try to debug the part that’s messy.

The rest of this chapter will be about specific, returning problems:

- The survivor is too small in the game: The Extended Sample is great in many ways, but its assets are really small. Don’t try to resize every single body part, there’s a much simpler solution. Open your character’s prefab file (watson.lua), head into the local common_postinit section and add the following line:

inst.AnimState:SetScale(1.1, 1.1)

This line stretches your character 110% both on the X and Y axis. You may have to increase or decrease the values. Experiment with them until your character looks good.

 

-  The golden names do not show up: Open the XML file of your golden name and make sure it looks like this:

<Atlas><Texture filename="names_gold_watson.tex" /><Elements><Element name="watson.tex" u1="0.00048828125" u2="0.85498046875" v1="0.1533203125" v2="0.9990234375" /></Elements></Atlas>

Sometimes the autocompiler messes this file up and generates something different. It usually adds “Element Name” as names_gold_watson.tex. Change it to watson.tex. It should solve the problem.

 

- Modicon doesn’t look as it should: This is also an autocompiler disease. The solution is simple: Drag the modicon PNG into the images folder. Toss your mod into the mods folder, run the game, so the autocompiler can compile your files. Quit the game, open your mod in the mods folder again. Drag the modicon PNG as well as the other generated modicon files and toss them back into their original place (in the watson folder). If you boot the game again, the modicon should look as it’s intended.

 

- Missing big portrait: Blame the autocompiler again. Head into your character’s big portrait folder. Copy and paste your big portrait and rename the new PNG to watson_none. Throw your mod into the mods folder, compile it. Launch the game and check if it works by now. If it’s still missing, locate the big portrait folder again and open the watson_none’s XML file. Change the “name” value from “watson_none.tex” to “watson_none_oval.tex”. That should do the trick.

 

- Starting item doesn't show up: Common problem with easy solution. Mostly happens with custom items. Let's say I want to add a custom item named "wagiclamp", but it doesn't get displayed in the character selection screen. You can solve it by adding this one line into your modmain.lua, anywhere below the blue local lines:

TUNING.STARTING_ITEM_IMAGE_OVERRIDE.wagiclamp = {atlas = "images/inventoryimages/wagiclamp.xml", image = "wagiclamp.tex" }

Replace wagiclamp with your own item prefab name.

Extra 1 – Unique character voice

Spoiler

There’s an easy to understand, quick tutorial video about this, created by Chuck. You can watch it here:

(24) [DST] Making custom character mod sounds - YouTube

Additionally, @TheSkylarr made a more in-depth, written guide about the topic:

[Guide] Custom Character Voice in 2022 - Tutorials and Guides - Klei Entertainment Forums

To get some audio files, boot up Google for some. It’s okay if it’s copyrighted, as long as you don’t make money with it. Search for royalty free audios if you want to play extra safe.

I use Audacity to cut the audio. It’s free and easy to learn. Link:

Audacity ® | Free, open source, cross-platform audio software for multi-track recording and editing. (audacityteam.org)

Extra 2 – Custom item/food/crafting tab

Spoiler

There are two great guides about this topic.

The first one is created by @Malacath. He explains the process genuinely well, from start to finish. Here’s the thread:

[Tutorial] Creating a "handslot-equippable-item" from scratch - Tutorials & Guides - Klei Entertainment Forums

The second thread I would like to add here is the item and crafting tab template by @Yakuzashi. The images are in the right size, it’s easy to understand where and how to add them. Masterpiece. Link:

[Template/Tutorial] Custom crafting tab and items - Tutorials and Guides - Klei Entertainment Forums

I wrote this in a different thread, I see no real reason not to include it. It's a short tutorial on how to restrict a recipe or item to a certain tag:

If you want to create a recipe that's only available to a specific character to craft, create a coding like this and add it to your modmain.lua's bottom:

AddRecipe("name_of_the_item",{ Ingredient("first_ingredient_name", quantity), Ingredient("second_ingredient_name", quantity)}, tab_name, tech_level,nil,nil,nil,1,"required_tag_for_craft", "images/inventoryimages/name_of_the_item.xml", "name_of_the_item.tex")

The red part is where you can add what tag is required to make the recipe appear for the survivors.

If you want to make the custom item tag restricted, add this to your item's prefab file. You should add it inside the local function fn(Sim) part under the inst.entity:SetPristine() part.

inst:AddComponent("equippable")
inst.components.equippable.restrictedtag = "required_tag_for_craft"
inst.components.equippable:SetOnEquip( OnEquip )
inst.components.equippable:SetOnUnequip( OnUnequip )

Extra 3 – Configurable options

Spoiler

It’s not as hard as most beginner modders think it is. It provides a wide freedom for your subscribers to play your character as they wish.

I will show you how to make your character’s Health configurable here.

First, delete this line from your watson.lua:

image.png.a3a2510ec98e0ae4072329893851b30e.png

Let’s give the health scaling option a coding name. It can be anything, I will name it WATSON_HEALTH in this example. Scroll down into the local master_postnit section and change the health line to this:

image.png.0dd3fa7490d0a484622f8e57029718ea.png

If that’s done, head into your modmain.lua. Scroll all the way down to the bottom and add this line:

TUNING.WATSON_HEALTH = GetModConfigData("WATSON_HEALTH")

Next and least we go and visit the modinfo.lua. Your file should look something like this, except I didn’t do the small changes you've made earlier in here. We will work with the configuration_options part.

 image.png.372d7dd84b98c583df764706a43358b8.png

After some small adjustments, you should come up with a coding like this:

image.png.295adfdc8c2fb37f9e7c5507d987fdbe.png

It can be expanded with additional values, with additional configuration options (Sanity, Hunger, Hunger rate, etc.), if you keep it well constructed. Here’s an extra example from my Welnyel character mod:

 image.thumb.png.7920660cca539a3a2ec085c1766569c7.png

Just remember:

-          Add the TUNING line to the modmain.lua just as we did earlier.

-          Add the TUNING bit where it should be in the character’s lua file.

-          Add the TUNING options in the modinfo.lua

Extra 4 – Skins

Spoiler

The one, the only @Hornete made an exceptional guide about this subject, I’ll link it below.

Very important: You can’t use any in-game skin assets for this. That’s not allowed.

[Tutorial] Making Custom Skins for Modded Characters! - Tutorials and Guides - Klei Entertainment Forums

Extra 5 – Custom talking fonts

Spoiler

It is what it is: You can create your very own talking fonts for your character, similarly to Wormwood’s fonts. This tutorial is brought to you by @Lucemodok:

[TUTORIAL] How to Add Talking Fonts to the Game - Tutorials and Guides - Klei Entertainment Forums

 

Epilogue

This guide would never have been created if I hadn’t received the much selfless help from the DST modding community when I started. I would like to bunch my appreciation here and ceremonially hand it over to the forum.

Thank you everyone!

Happy modding!

 

 I have also made a video guide about the same topic:

 

Edited by Goregonzola
  • Like 18
  • Thanks 2
  • Health 4
  • Sanity 1
  • Big Ups 1
  • GL Happy 1
  • Potato Cup 4
Link to comment
Share on other sites

Hola no hablo ingles seguí sus pasos pero quede estancado en esto.
me recomendaron su tutorial pero sigo teniendo el mismo problema :s

Hello, I don't speak English, I followed in his footsteps but I got stuck in this,

 They recommended your tutorial to me but I still have the same problem: s
 

 

Link to comment
Share on other sites

On 4/16/2021 at 12:50 PM, C_Thun said:

„How can I create my own custom survivor?”

„I’m having a wee bit of trouble with the modicon. How can I make it work?

„Modmain? Lua? What? Where am I?”

 

I had these, and tons of other similar questions when I’ve first tried myself in DST character modding.

Hey there, Sümi here! Creator of the Wolemorm, Williams and Welnyel mods, and the author of this guidebook.

 

I decided to write the Big Book of DST Character Creation to answer the FAQ of the beginners and the questions of my rookie past self. I received a lot of selfless help and support from the modding community, I feel like now is the time for me to pass the great knowledge.

Some important notes before we begin:

  Reveal hidden contents

It’s mainly made for DST modding. I have no experience (so far) in RoG or any of the DLC’s modding. Some of these guides might apply to singleplayer DS as well, but it’s highly random.

- English is my secondary language. Feel free to note any stinky, ugly grammatical error.

- Making mistakes is my second favourite hobby after modding. Pinpoint anything if I’m wrong about it, but I’ll do my best.

- My mods are far from perfect. I’m still learning the craft too. This will be an eye-opening journey for me as well.

- This guide will partly be a collection of other outstanding tutorials and guides. I will link and credit them throughout my guide. I will mainly talk about the creation itself in this thread, however most of the extra chapters are other tutorials bunched together.

- I named my character Watson for this tutorial, with the prefab name “watson”. Whenever you see “watson” in this thread, you should use your own character’s prefab name instead.

I will divide the guidebook into smaller, separate chapters, so readers can search more easily about what they’re interested in.

 

Chapter 0 – Who is my character?

  Reveal hidden contents

You already know this aren’t you? You have a well-defined look, a finished perk system, its voice, exact stat values.

No? It’s okay.

I rarely have everything in mind when I start working on my next survivor. However, it doesn’t mean that you should go into this completely blindly.  Whenever I start my next project, I make sure that…

a) I have a clear vision about the character’s look or theme. It’s a djinn. It’s a wolemorm-skittersquid amalgamation. If it feels good to look at him/her, it’s half a victory. If you come up with a good design, you can basically tell its perks by looking at it.

OR

b) I have a clear vision about the character’s perks or abilities. The players would have to combo their foods with this guy. This character should benefit from the dark. You can go wild with this method. Let’s stick with the light-focused character: it can be an owl, a nightmare creature, a vampire, you name it. This thing also works backwards: If it has a feel-good gameplay gimmick, it’s also half a victory.

If you plan to implement a character from an existing game/movie/series, most of its looks and abilities are given before you even start modding. It’s not a bad strategy, though, you lose some of the creative freedom with character implantation.

Very important: Set realistic goals. You probably won’t be able to create an airbender with ranged and elemental attacks for the first time. Start small, but get better constantly. Expand your comfort zone.

Chapter 1 - The tools you need

  Reveal hidden contents

There are some programs that are crucial to create your own character mod. Luckily for you, all of these can be downloaded completely free!

Let’s see the list:

- Any kind of graphic editor/graphic design software, that supports transparency. The best bet is Adobe Photoshop, though it has a monthly subscription fee. I wouldn’t recommend it if you would only use it for a quick, one-time modding. GIMP is a very well-known and widely adored free alternative, but pick anything that works for you. DO NOT use Microsoft Paint please. It’s a disaster.

Here’s the link for GIMP: GIMP – GNU Image Manipulation Program

 

The Extended Sample Character. It’s an outstanding starting kit created by @Dragon Wolf Leo. I know, I know, it’s a furry character by default, but it contains almost every possible body part that you can add to a survivor. The basic coding is already written in it, you don’t have to deal with folder arrangement either. You can pick whether you want a DS, DS Shipwrecked or DST template (though, we will mainly work with the DST template in this guide).

Here’s the link: Extended Sample Character - Modding Tools, Tutorials & Examples - Klei Entertainment Forums

 

Don’t Starve Mod tools. It can be used from Steam, it’s completely free. In your Library, check the Software box to reveal it, or just search for it in the search bar. We will use this tool many times during our creation: texture review, mod uploading, item creating, attaching sounds, etc.  Very important.

Here’s a link that I’ve found, if you failed to locate it with the previously written method: Don't Starve Mod Tools · AppID: 245850 · SteamDB

 

Notepad ++. This is the software that we will be using to write/edit our codings (it’s also completely free). If you’re familiar with any other alternative, feel free to use it, I’ve only used Notepad++ during my modding career. It’s simple, easy to use, and it does its job perfectly well. It’s also available in languages other than English.

Pick the latest version and download it from here: Downloads | Notepad++ (notepad-plus-plus.org)

 

A software that can open .zip files. There are a ton of options to choose from: WinRAR, 7-Zip, you name it. Most PC users already have one in their computers, zip is a reguralry used format. I don’t add a link for this, you can easily find one online.

 

Determination and patience. Ha-ha-ha… Really, it’s important to not rush. There are a lot of factors that determine how much time a mod requires. Turn on some music, grab a cup of your favourite rehydration liquid and take your time. The journey is more important than destination… or at least, it’s as important.

 

The last thing is a bit optional, but it’s better to have a drawing tablet for this. If it’s a one time or meme-themed mod you want to make it’s perfectly fine to do it without said tablet, but if you’re interested in digital art in general, it can be a huge game-changer. Some of the “screenless” tablets are available at a fairly low price.

Chapter 2 – Setting up your mod

  Reveal hidden contents

To be honest, this is the most tedious chapter. Try to not get bored halfway through, the fun awaits you in the next chapter.

Create a folder for your mods. Trust me. It will easily get chaotic if you don’t take the time to manage your folders. Create a “parent folder” somewhere, name it as you wish. This is where your mod(s) will be located.

Open the Extended Sample Character’s .zip file and extract it into your parent folder.

Now, you must choose a name for your survivor that you will use every time you reference it from now on. It can also be anything, but it has to be in all small letters, and it can’t have the same name as an in-game character/item/creature. For this guide, I will name my character watson. Whenever I’ll write watson in this guide, you have to use your own character’s name. This will be your character’s prefab name.

Open your parent folder and rename the “extended sample character-DST” folder to watson. If you open it, you should see an anim, a bigportraits, an exported, an images and a scripts folder, three modicon files, a modinfo and a modmain file.

The first thing you must do is to delete every single TEX and XML file in every single folder. Destroy them all! Open your anim folder and delete everything inside it as well. I’ll explain later why we did all of this.

The next thing to do is to replace every “esctemplate” to watson in EVERY file’s and folder’s name. File name, picture name, everything. Remember: small letters. If you double-checked everything, you can march forward.


Right click on modmain.lua, and click on “Edit with Notepad++”.

 image.png.0074420ab396d2d48157541f68a93cdb.png

First thing to do: Do not panic. This thing isn’t as complex as it seems, you don’t have to understand everything here (yet).


We will replace every single “esctemplate” in our coding files with a quick trick. Press Ctrl+Shift+F. This window should show up:

image.png.d52ac38413e38ff1e5a940b10e60494b.png 

Fill it the same way as I did: Add the word you want to be replaced (esctemplate), the word you want to be replaced with (watson) and the folder you want to apply all of this (parent folder/watson). Make sure Match case is ticked. Hit Replace in Files.

If it was successful (66 occurrences were replaced), do the same with ESCTEMPLATE and WATSON (the directory should stay the same).

Congratulations! You’re ready to work on your survivor!

Chapter 3 – Creating the look

  Reveal hidden contents

YES! Finally! You’ve reached the milestone we all have been waiting for. Head into parent folder/watson/exported/watson. Here, you can see your future survivor’s body parts. Legs, faces, tails, you name it. There should be an SMCL file in this folder that you’ve already renamed to watson. Open it.

image.png.a85b0166246782df9ba9525ca8717d84.png

This is where you can examine how your character will look in the game, without launching the actual game every time you change something. Cool, isn’t it? This software called Spriter.

You don’t have to do anything here. You can drag your character’s body parts all over the place, but it wouldn’t result in anything. Always close this software without saving (at least when you’re working with your character’s look).

“This is so overwhelming. How do I even start replacing all of these files?”

I’m glad you asked! You have to plan your character’s structure first. Open a new document in your chosen graphic software and start sketching. Try different colors, face structures, body proportions.

If you start replacing your body parts without setting a clear design goal, that will quickly result in a potato-shaped survivor. So many modders make  this mistake… They don’t check how the head fits to the face, the torso to the arms, etc. It becomes an absolute nightmare.


Look at the attached picture below. These sketches do look worse than the character’s final form, but they give you a great example about their personality, their mood. Wickerbottom looks like a burned-out librarian. Her main feature will probably be books. Great design, it almost speaks to you. Create a similar sketch figure of your character. Work and refine it until you achieve something simple, but sharp. No one will see these experimentations, be brave, try out many directions. Try your best, but don’t overthink it.

image.png.7d5d5c99cc8762fb8038dc20ce1ace1e.png
 

Second most common mistake: Make sure your character’s head is B I G. Let’s face it, small headed characters look very unnatural in the game’s world. Let’s examine WX 78, who has the smallest head of the roaster:

 image.png.1273f4dd3a40ca6f013b2ebbb7c330e5.png

His head is almost twice the size of his body. Other characters even have big, fluffy hair, so their ratios are even bigger. Do not make the common mistake: Check your ratios.

OKAY. You have a handsome sketch with awesome ratios, it looks promising. Now what?

Examine the game’s other art rules. Sharp edges. Faded colors. No pupils. Tired face. It’s okay to do some smaller rule breakings, but always attach a big contrast in compensation. For example, you can curve the character’s cheeks a bit, but maybe add a sharper hairstyle.

Compare my very first character’s old and new assets:

image.png.c66ba9bd37ae8b6c4adca995d44e6432.png

This is a character from an animated series. She has strong pink colours and round lines by her original design. You can convert anything to DS style, but some things are harder to convert than others. What are the main mistakes with the first design?

The before version has very thin lines, vibrant colours, way too smooth curves and a really bad looking posture. It doesn’t match with the environment; it pulls the player out of the experience.

Another big mistake I certainly made is that I left large surfaces too bland and one-colored. If you feel like your character lacks texture, like my survivor’s heart hair, add some stripes or doodle-lines to it. It’s a cheap, but effective.

Side note: You can see that the game’s original character’s doodle lines never cross their main outline. To achieve the same, select the area you want to doodle, and then add the stripes. This way, you don’t have to worry about crossing their main outlines.

I’m getting ahead of myself. We still only have our sketch version, we didn’t even get to replace the body parts. How do I do that?

Open Spriter again and see which body parts of your characters fit into which compartment. Some might work better as a pigtail than as part of their main hair. You don’t have to scheme everything on a blueprint, just gain a general vision about it.

Now, about the replacing, here’s my strategy: Most design softwares work with layers. Select the layer that contains your sketch version (if it’s on multiple layers, just merge them), and lower its opacity. This way your sketch will becomes almost transparent. Open a new layer above the previous one. This way, you can trace your final version over your own prototype version (DO NOT trace other artists’ drawings). It’s genius Paul, it’s GENIUS!

Also important: Every time you trace a new body part, do it on an individual layer. Front head, face, hair, everything should have their own layers. Double-check whenever you start a new body part.

If a finished drawing blocks your vision, turn off its opacity as well, just make sure you can revert it later. The process should look something like this:

1. Finish your sketch, 2. Reduce opacity, 3. Open new layer, draw the body part, 4. Open new layer, (reduce previous layer’s opacity,) draw the body part.

image.png.fe16e452b04973b5b923964600017d3d.png

Save regularly!

Let’s say you drew the head and the face just like I did. Let’s replace the sample one with the one you just created!

Open the sample head in a new page in your graphic software. It should be located in parent folder/watson/exported/watson/headbase/headbase-0.png. Once you opened it, go back to your drawing file (we’re still in our graphic software), select the head (double check the layer) and hit Ctrl+C. March back to the headbase-0, and slam Ctrl+V. The head should appear over the sample head. Go ahead and resize yours until it becomes the same size with the other one. Delete the sample head and hit save. If you open Spriter now, your new head should proudly be there.

“Why is it still covered with the other head?”

In DS there are different files for hatless and with-hat heads and hairs. Just replace parent folder/watson/exported/watson/headbase_hat/headbase_hat-0 with the same head asset. If it looks weird when you try it in-game, just erase a bit from the top. There will be a lot of trial and error like this.

If the head you added is too big/small or out of place, DO NOT to try to move it in Spriter. Open headbase-0 and headbase_hat-0 again in the graphic software and do the resizing there. If you would do it in Spriter, it would either mess up your files or just wouldn’t do anything at all.

You should do the rest of the creation with the same strategy. Trace body part, replace sample part with it, check it in Spriter, do some adjustments until it looks right.

If you don’t want to feature a tail, skirt or something in your character’s structure, open parent folder/watson/exported/watson_cleared and copy the folder of the body part you want to remove. Head back to parent folder/watson/exported/watson and hit Ctrl+V. The body part should be invisible now in your Spriter.

You have to create your own ghost as well. I tend to forget this. It’s located in parent folder/watson/exported/ghost_watson_build. The steps are the same.

You can check the character’s look in-game before you start the coding if you wish. Check Chapter 7 to learn how to do that.

Some additional tips:

- What if the body part you just replaced doesn’t show up in Spriter? Let’s say you look for face-1. Hold right-click on the character’s face in Spriter. You should see a list of all the available face files, so you can pick to which face you want to make visible. If you don’t save when you close Spriter, it will set every change you made back as it should be.

 

- With hands and many other small body parts, I usually do the strategy reversed. For example: I would open hand-0, I would copy+paste it inside my drawing file, I would reduce its opacity, and I would only then do the tracing. Of course, the new hand will still be brought back and saved inside the hand-0 file. Small body parts are tricky, they must be in place very precisely, or it will look silly in-game.

 

- If you feel lazy with some body parts, just recolor the sample ones. This might be noticeable by some subscribers later, but it’s still an option. You can use this technique if you want to recolor some of your colors later as well. Open the body part you want to recolor and change its settings inside Hue/saturation. Use this option for this, not the Bucket tool.

 

- SWAP_ICON-0 will be a small asset in the game. Try to replicate something similar to the sample one with your own character’s head.

 

- Creating side views: To create a handsome side view, I usually use the technique attached below, it’s pretty self-explanatory. You can really feel like an engineer with it. Sometimes it’s okay to break some small rules if it’s not noticeable and makes the art look better. Double check layers!

image.png.55fe5e16224d5a30e233b90880055b1f.png

- You have to be extra precise with the faces. If they don’t get positioned right (compared to each other), your character will have quite weird ticks in the game. There are several ways to avoid this, you can easily get the experience for it to pull it out well.

 

- Not sure about which face does what? Worst case scenario: try to copy the expression of the sample. Face_0 and face_04 are the default ones, 1-3 and 5-7 is blinking, 8-10 is eating, 13 is dying. The other ones are more situational.

 

- The safest head shape is the oval shaped one. Other forms might look silly with certain headwear in-game. Of course, you don’t have to create a perfect oval, just keep the hats in mind.

 

- Do you feel like your character’s outline is thick enough? Wrong! Or… at least I’m usually wrong with it. You have to run around a bit with your character later in-game to see if it’s too thick or too thin lined.

 

- The character’s hair stucks behind the head in the side view? The easiest solution is to add the hair to the head. The only downside is that it won’t bounce as much as it would otherwise.

 

- I advise you to draw the character’s mouth on the head instead of the face in the side view. If your character does the idle animation, the mouth might move weirdly if you draw it on the face.

 

- You can change your character’s look at any point. Even if it has been already published. Don’t stress.

 

Do not change the body parts’ file ratios. They will immediately get messed up. It can be changed, but I wouldn’t advise to do it if you’re just started. It can get a little complicated.

Chapter 4 – Big portraits and modicon

  Reveal hidden contents

More art! Yay! Let’s see big portraits first:

It’s actually a great refresh after the tiring, precise work that the previous assets required.

The great @Fidooop collected some really neat frames and tips to start with. You can find his article here:

{TUTORIAL + TEMPLATES} How To Mimic Don't Starve Together's Big Portrait Style - [Don't Starve Together] Mods and Tools - Klei Entertainment Forums

I’m going to be honest: I can’t really add anything more that he hasn’t already told there. There are a few unwritten rules about big portraits, but he explains them there really well.

This next link, however, will greatly make your life easier. It’s a font-generator, you can generate a cool-looking golden and silver name banner. We will need them later anyways, so why not download them now?

Character Portrait Name Generator for Don't Starve Together (dstealth.com)

There’s a sample frame for the portrait in the Extended Sample Character bundle as well. You can find it in parent folder/watson/bigportraits. It’s positioned just right and it’s in the right resolution. If you do use this, draw your figure in a different file and copy and paste it above the sample frame. Drawing directly on the frame might result in a pixelated portrait figure.

There are some bugs regarding big portraits. You can find the solutions in the troubleshoot chapter.

Modicons.

There’s a sample for this as well, in parent folder/watson.

There are zero rules about this, just create something appealing. You can use the previously written trick with Hue/saturation if you want to change the sample’s color.

Modicons also have some problems. Check the solution in the troubleshoot chapter.

Chapter 5 – The images folder

  Reveal hidden contents

You don’t really have to spend too much time in here. It’s a quick routine work.

I assume you already renamed everything in here, and you already finished your character’s look. Open Spriter, zoom on your character’s front, drag away its extra arms and take a Print Screen. Paste it in an image editor (or your graphic software), select your character’s head, and hit Ctrl+C.

You can replace most of the assets here with the copied picture.

Selectscreen portraits are not used anymore, but you can replace them “just in case”.

Put the previously downloaded name banners here as well (if you haven’t downloaded it yet, you can do it here: Character Portrait Name Generator for Don't Starve Together (dstealth.com))

Name banners also also have some problems, its solution is in the troubleshoot chapter.

Chapter 6 – Stats, abilities, codings

  Reveal hidden contents

Fasten the seat belts! This sure will be quite a ride!

Let’s start with modmain.lua. Open it with Notepad++ from parent folder/watson. Let’s examine it in order.

- Prefab files: We will see later that there are certain prefab files in our mods. All of them should be listed in here. I will talk about them later.

- Assets: Remember all the TEX and XML files we annihilated at the beginning? Those will all be automatically regenerated with our new asset files. Everything that has a TEX and XML (or sound format) file should be listed here. These are mainly assets from the images folder. If you want to add custom items for example, its files should be listed here as well.

- Blue local things: It’s a bit more advanced. You basically translate some lines to the game. “Yes computer, local require means GLOBAL.REQUIRE to you. Aren’t ya an atta little boy?” If you get advanced with some codings, you probably have to expand it with additional similar lines.

- STRINGS.CHARACTER stuff: It’s pretty self-explanatory. Make sure you don’t delete any of the “ symbols.

The only other thing you should change here is the character’s gender. It’s FEMALE by default, pick any of the listed options.

You don’t have to add anything else here.

Modmain is the file the game will check first about your mod. Names, skins, sounds will all be mentioned here if you add them later. Some perks might also land in here, but they will mainly be located in your character’s lua file.

Take a quick look into modinfo.lua. There is nothing much you can do here just yet. You can change your mod’s in-game name, description, the author and the version. Fill these with your own informations as you want.

If you’re finished here, let’s head into parent folder/watson/scripts.

You can see a file here named speech_watson. This file contains every single line that your character can say in the game. The Extended Sample Character contains Wilson’s lines by default, but you can change any of these manually.

“But it’s 3000 lines long!?”

Brutal, isn’t it? Of course, you can always replace the most regularly used ones (like the hound warning, darkness warnings, etc.), to save some time, but characters with unique speech lines can be more appealing.

If you do take the time to change it, try to think yourself in your character’s place, act its personality. Make sure the lines are fitting to the time and space, and that they’re not annoying if you have to read them multiple times.

An additional option is to replace the speech file with one of the main game character’s speech files. They are in Steam/steamapps/common/Don’t Starve Together/data/databundles/scripts. Scroll down inside the zip file to find them. It’s also a good idea to import one of them anyway, since the characters most certainly got new lines since the Extended Sample got updated.

If you finished here, we can finally visit our last folder we haven’t visited yet. Navigate yourself into parent folder/watson/scripts/prefabs. You should see watson.lua there and watson_none.lua. As far as I know, the second one is mainly used about skin related stuff, we will not use it in this guide.

Open watson.lua. This is where most of your perks will take place, your character’s prefab file. There are some exceptions, those are meant to be placed in the previously visited modmain file. With a decent amount of experience, you will be able to decide where it should go. In worst case, you can always search for a reference in the game’s files or in some other mods.

Let’s run though really quick what the sample offers by default:

- local assets: I’ve only added custom tools’ animation file sources here before. We will only use this in the extra chapters.

- Your character’s stats: I don’t think I have to explain this.

- Custom starting inventory: Do you want to add a starting item to your character? Add it here. If you want to start with multiple copies of an item, write its prefab name as many times as many items you want to start with.

- local function onbecamehuman and onbecameghost: Don’t mind these. Death and revive stuff. The only time you might use this if you want to add perks about these, but even then, you can just create a new function.

- local function onload: Stuff that happens when you load the game. Again, don’t mind it, unless you want to add a perk that wants to manipulate loading. It doesn’t used often.

- local common_postnit: You will mostly use this to add tags to your characters, like “monster” (pigs and bunnymen will attack your character), or your own tags later on.

- local master_postnit: This is quite important once you start to add own perks to your character. Server-related stuffs must be added here. For now, I just explain the things that are already here. At inst.soundsname, you can replace what voice you want to use with your character. You can write any of the in-game’s survivor’s name to use theirs. You can also change your character’s damage multiplier and hunger rate here as well.

That’s all that the Extended Sample character can offer by its default. I will write about a slight amount of “perk theory”, then I’ll explain how you can add the perks you want.

The most important advice I can give you about perk coding: Don’t set the bar too high, but try something more advanced every time. It’s okay to update your character periodically, as you get better and more comfortable about it.

Set a main design goal to the perks. The best if you can summarize it in a single sentence. Wolfgang is strong, but only if you keep feeding him. Wendy has a ghost, be she’s slightly more vulnerable in herself. Simple, and you can remember it easily.

Now let’s examine Walter the same way. He’s the ranged character, the rider character, the sanity character, but he hates being damaged. Now that’s a long sentence. Maybe too long…? What answer do you give to a beginner, when they ask “What can this scout kid do?”.

Don’t create a thick perk list just so you can make the review videos of your mod longer. This is a survival game, not an RPG. However, you can add many small extras if they fit to the whole picture and don’t turn the playstyle to a whole new track.

How do you pick positive and negative perks?

Imagine the best situation where your character can really shine. You play as Warly. Best situation: You have a ton of different foods and your portable Crock Pot, so you can apply some outstanding food-related buffs with them to your teammates. The character shines in the support role, and outstanding in the kitchen.

What’s the opposite of this holy condition? You have some uncooked food with small variety, and you even lost your Crock Pot. Apply the downside here and make this situation even more miserable: Make Warly picky, unable to eat the uncooked food and extra hungry. Bingo! You have a great downside package. You don’t have to use this idea every time, but it’s a decent approach.

Another great advice: If you can, make the positive perks useful to the whole group (even in an indirect way, you don’t have to make everyone a clear support), but make the negative ones only affect you. This motivates teamwork and reduces frustration.

If you’re making a non-original character (Mickey Mouse, Voldemort, Wolfgang Amadeus Mozart, etc.) their perks are mostly given in theory, but try your best to make some synergy between them as well.

Now that we’re smart and clever, let’s see how we can add these abilities in practice.

Before we begin, make sure you only add one or two changes at a time. After each change, boot up the game and test your mod (see Chapter 7), so you can pinpoint more easily what went wrong.

If you’re new in character modding, I advise to start with tags and simple speed/strength/hunger rate stuff first, that you can add by simply changing a number or adding a single word.

 I will add a few easy lines here to get the basic idea with them. You can add these into your character’s prefab file (watson.lua), in the local master_postnit section if you want. There’s a damage multiplier line there already, you can add these under that. The values can be changed, even to negative ones (it reverses the effect).

- inst.components.sanity.night_drain_mult = 1 – Night Sanity multiplier. Change the number to configure the rate. 1 means 1x (default) rate, 2 means 2x rate.

- inst.components.health:StartRegen(amount, period) – Passive Health restoration. Amount is in Health point value, period is in seconds.

- inst.components.sanity.dapperness = 1 – Passive Sanity restoration. It’s 1 Sanity per seconds, change it as you want.

- inst.components.health.absorb = 0.10  - The character’s defense. This coding blocks 10% of every attack. I have no idea what this does if you add a negative value. The first person who tests this gets a whole free like by me.

- inst.components.combat.damagemultiplier = 1 - Damage multiplier. Change the number to configure the rate. 1 means 1x (default) rate, 2 means 2x rate, 0.5 means 0.5x rate. Doesn’t work with negative values.

- inst.components.locomotor.walkspeed = 4 - Speed multiplier. Change the number to configure the rate. 4 is default Wilson speed. Doesn’t work with negative values.

These are some examples to get a first experience about adding lines and changing values, the basics of the basics.

Tags are similarly easy to use. They are single lines, that have complicated codings rooted somewhere else. They’re easy to add, but they can give you some decent perks to begin with. Check the original characters’ prefab files in Steam/steamapps/common/Don’t Starve Together/data/databundles/scripts/prefabs. For example, Webber has the “monster” tag (makes pigmen and bunnymen hostile), Walter the “nowormholesanityloss” (it makes him immune to wormhole sanity penalty), and so on. If you know what exactly you are looking for, you might find it as a tag. They go inside the local common_postinit section.

Once you get a better understanding of the lua files’ construction and about the general coding system of DS, you can try more difficult perks.

The last thing I want to explain here is the structure of the local functions. Character perks use this structure most often. If you want to add a new one, place it above or below local function onload. The line that triggers the function should be placed inside local master_postnit (it’s the inst:ListenForEvent line in the example)

image.png.68dcb9828bc64036a24db8d0d311280e.png

The attached image contains one of Williams’ local functions. It gives him the ability to restore a certain amount of Health when he holds his magic lamp.

- Name of the function: It can be anything. You only use it to reference to it later.

- What should a function do: Now this part can be from 3 to 100+ lines long. It’s really straightforward, this is what the perk is about.

- inst:ListenForEvent: This is the part of the example that tells the game when your function should trigger. It’s mostly the same format (inst:ListenForEvent), but there are a few exceptions.

- When should your function trigger: This part determines that what action should triggers the function.

This is a very general description, I only featured it just to make your life easier once you start examining other mods or the game’s files.

Writing new perks can be hard sometimes. The best thing you can do is to search for reference. If you have a clear idea about the perk, find a character that has something very similar in its toolkit. Use the in-game characters’ or other modded survivors’ coding as a reference.

Chapter 7 – Mod testing & uploading

  Reveal hidden contents

Finally! At last, you’re about to actually see your character in the game!

If you made sure that you finished everything, go into your parent folder, and copy the watson folder. Head into Steam/steamapps/common/Don’t Starve Together/mods and paste your folder there. If that’s done, launch Don’t Starve Together. A black window should pop up with passing white texts. This is the thing called the autocompiler. It creates the animations and the previously deleted, new versions of the XML and TEX files.

Once it’s finished working, start a new game and tick your mod in the Mods section. If you managed to do everything right, your survivor should be a playable character there. If the game crashes or does some buggy stuff, quit DST, and examine the Troubleshoot chapter to solve the issue.

If you can play your character flawlessly (try it with caves enabled as well) and you think it’s in a publishable condition, go ahead and skyrocket it to the Workshop!

Quit the game and launch Don’t Starve Mod Tools via Steam. Out of the five available options, choose Don’t Starve Mod Tools. Change the “Target Game’s Workshop” to Don’t Starve Together and hit “Add”.

- Update Data: Tick the box and hit Browse. Locate your mod inside Steam/steamapps/common/Don’t Starve Together/mods. Make sure you compiled it before you upload it.

- Update Preview Image: Create a nice-looking thumbnail for your mod that will appear in the Workshop. Locate it. If the upload fails, it might be because the file you added here is too big.

- Pick the character tag in the Tags section.

- Change Visibility to Hidden, so you can edit its description later.

Smash the Publish! button into the face. If everything went all righty, the Mod Tools will inform you about it.

Locate your mod through your Steam profile in the Workshop Items section.

What makes an attractive Workshop page?

- Write an appealing description about your mod and character. Make it’s short and straightforward.

- Create some screenshots and upload them. People don’t really like to download unknown stuff into their games. Naked Workshop pages are the worst. Make your subscribers feel like they download something that’s been refined very carefully.

If the thumbnail looks pixelated, doesn’t quite fit or most of its surface is plain black, change it as well. This will be the first impression the customers will experience, make sure it’s a pleasant one.

If the page looks decent, swap the visibility to public and wait for the feedback.

Congratulations! You just finished your mod!

Chapter 8 – Troubleshoot

  Reveal hidden contents

It’s really important to learn how to debug your own mods. If your mod crashes the game, stucks in an endless loading screen, refuses to start the server with the Dedicated Server failed to start message, you have to examine what went wrong. These can happen by a huge number of different mistakes.

Good thing the game can practically tell you what went wrong. If you experience any of the previous problems, head into Computer/Documents/Klei/DoNotStarveTogether and check the client_log file. It should note every single step you made since you launched the game. Scroll down until you can find your buggy part.

If you can’t find the bug report there, head deeper into Computer/Documents/Klei/DoNotStarveTogether/169275625, sort the folders here by date, open the newest, go into Master and open server_log. Act the same, scroll down until you find the buggy part. Try to debug the part that’s messy.

The rest of this chapter will be about specific, returning problems:

- The survivor is too small in the game: The Extended Sample is great in many ways, but its assets are really small. Don’t try to resize every single body part, there’s a much simpler solution. Open your character’s prefab file (watson.lua), head into the local common_postinit section and add the following line:

inst.AnimState:SetScale(1.1, 1.1)

This line stretches your character 110% both on the X and Y axis. You may have to increase or decrease the values. Experiment with them until your character looks good.

 

-  The golden names do not show up: Open the XML file of your golden name and make sure it looks like this:

<Atlas><Texture filename="names_gold_watson.tex" /><Elements><Element name="watson.tex" u1="0.00048828125" u2="0.85498046875" v1="0.1533203125" v2="0.9990234375" /></Elements></Atlas>

Sometimes the autocompiler messes this file up and generates something different. It usually adds “Element Name” as names_gold_watson.tex. Change it to watson.tex. It should solve the problem.

 

- Modicon doesn’t looks as it should: This is also an autocompiler disease. The solution is simple: Drag the modicon PNG into the images folder. Toss your mod into the mods folder, run the game, so the autocompiler can compile your files. Quit the game, open your mod in the mods folder again. Drag the modicon PNG as well as the other generated modicon files and toss them back into their original place (in the watson folder). If you boot the game again, the modicon should look as it’s intended.

 

- Missing big portrait: Blame the autocompiler again. Head into your character’s big portrait folder. Copy and paste your big portrait and rename the new PNG to watson_none. Throw your mod into the mods folder, compile it. Launch the game and check if it works by now. If it’s still missing, locate the big portrait folder again and open the watson_none’s XML file. Change the “name” value from “watson_none.tex” to “watson_none_oval.tex”. That should do the trick.

 

- Starting item doesn't show up: Common problem with easy solution. Mostly happens with custom items. Let's say I want to add a custom item named "wagiclamp", but it doesn't get displayed in the character selection screen. You can solve it by adding this one line into your modmain.lua, anywhere below the blue local lines:

TUNING.STARTING_ITEM_IMAGE_OVERRIDE.wagiclamp = {atlas = "images/inventoryimages/wagiclamp.xml", image = "wagiclamp.tex" }

Replace wagiclamp with your own item prefab name.

Extra 1 – Unique character voice

  Reveal hidden contents

There’s an easy to understand, quick tutorial video about this, created by Chuck. You can watch it here:

(24) [DST] Making custom character mod sounds - YouTube

To get some audio files, boot up Google for some. It’s okay if it’s copyrighted, as long as you don’t make money with it. Search for royalty free audios if you want to play extra safe.

I use Audacity to cut the audio. It’s free and easy to learn. Link:

Audacity ® | Free, open source, cross-platform audio software for multi-track recording and editing. (audacityteam.org)

Extra 2 – Custom item/food/crafting tab

  Reveal hidden contents

There are two great guides about this topic.

The first one is created by @Malacath. He explains the process genuinely well, from start to finish. Here’s the thread:

[Tutorial] Creating a "handslot-equippable-item" from scratch - Tutorials & Guides - Klei Entertainment Forums

The second thread I would like to add here is the item and crafting tab template by @Yakuzashi. The images are in the right size, it’s easy to understand where and how to add them. Masterpiece. Link:

[Template/Tutorial] Custom crafting tab and items - Tutorials and Guides - Klei Entertainment Forums

I wrote this in a different thread, I see no real reason not to include it. It's a short tutorial on how to restrict a recipe or item to a certain tag:

If you want to create a recipe that's only available to a specific character to craft, create a coding like this and add it to your modmain.lua's bottom:

AddRecipe("name_of_the_item",{ Ingredient("first_ingredient_name", quantity), Ingredient("second_ingredient_name", quantity)}, tab_name, tech_level,nil,nil,nil,1,"required_tag_for_craft", "images/inventoryimages/name_of_the_item.xml", "name_of_the_item.tex")

The red part is where you can add what tag is required to make the recipe appear for the survivors.

If you want to make the custom item tag restricted, add this to your item's prefab file. You should add it inside the local function fn(Sim) part under the inst.entity:SetPristine() part.

inst:AddComponent("equippable")
inst.components.equippable.restrictedtag = "required_tag_for_craft"
inst.components.equippable:SetOnEquip( OnEquip )
inst.components.equippable:SetOnUnequip( OnUnequip )

Extra 3 – Configurable options

  Reveal hidden contents

It’s not as hard as most beginner modders think it is. It provides a wide freedom for your subscribers to play your character as they wish.

I will show you how to make your character’s Health configurable here.

First, delete this line from your watson.lua:

image.png.a3a2510ec98e0ae4072329893851b30e.png

Let’s give the health scaling option a coding name. It can be anything, I will name it WATSON_HEALTH in this example. Scroll down into the local master_postnit section and change the health line to this:

image.png.0dd3fa7490d0a484622f8e57029718ea.png

If that’s done, head into your modmain.lua. Scroll all the way down to the bottom and add this line:

TUNING.WATSON_HEALTH = GetModConfigData("WATSON_HEALTH")

Next and least we go and visit the modinfo.lua. Your file should look something like this, except I didn’t done some small changes you made earlier in here. We will work with the configuration_options part.

 image.png.372d7dd84b98c583df764706a43358b8.png

After some small adjustments, you should come up with a coding like this:

image.png.295adfdc8c2fb37f9e7c5507d987fdbe.png

It can be expanded with additional values, with additional configuration options (Sanity, Hunger, Hunger rate, etc.), if you keep it well constructed. Here’s an extra example from my Welnyel character mod:

 image.thumb.png.7920660cca539a3a2ec085c1766569c7.png

Just remember:

-          Add the TUNING line to the modmain.lua just as we did earlier.

-          Add the TUNING bit where it should be in the character’s lua file.

-          Add the TUNING options in the modinfo.lua

Extra 4 – Skins

  Reveal hidden contents

The one, the only @Hornete made an exceptional guide about this subject, I’ll link it below.

Very important: You can’t use any in-game skin assets for this. That’s not allowed.

[Tutorial] Making Custom Skins for Modded Characters! - Tutorials and Guides - Klei Entertainment Forums

Extra 5 – Custom talking fonts

  Reveal hidden contents

It is what it is: You can create your very own talking fonts for your character, similarly to Wormwood’s fonts. This tutorial is brought to you by @Lucemodok:

[TUTORIAL] How to Add Talking Fonts to the Game - Tutorials and Guides - Klei Entertainment Forums

 

Epilogue

This guide would never have been created if I hadn’t received the much selfless help from the DST modding community when I started. I would like to bunch my appreciation here and ceremonially hand it over to the forum.

Thank you everyone!

Happy modding!

 

 

You, my friend, are absolutely [[coke milk]]. This is EXACTLY what I needed to get my Joker mod figured out! Thank you so much!

  • Like 1
Link to comment
Share on other sites

On 4/16/2021 at 12:50 PM, C_Thun said:

- inst.components.sanity.night_drain_mult = 1 – Night Sanity multiplier. Change the number to configure the rate. 1 means 1x (default) rate, 2 means 2x rate.

Alright, would it be possible to set this up so that it slowly RESTORES sanity during the night? 

I imagine I would do it by setting the number to -1, but am I correct?
(I can't test that just yet, as I'm still making the sprites)

Link to comment
Share on other sites

On 4/16/2021 at 12:50 PM, C_Thun said:

I assume you already renamed everything in here, and you already finished your character’s look. Open Spriter, zoom on your character’s front, drag away its extra arms and take a Print Screen. Paste it in an image editor (or your graphic software), select your character’s head, and hit Ctrl+C.

You can replace most of the assets here with the copied picture.

Selectscreen portraits are not used anymore, but you can replace them “just in case”.

What exactly is all this? I'm not sure I really understand...

If I'm taking a screenshot of it, how would I select his head? Or am I removing everything but the head.

Then, what exactly am I replacing? the stuff in Avatars? Saveslot_portraits? mapicons?

Sorry for all the questions, guess I don't fully get it.

Link to comment
Share on other sites

@ScrewdriverLad I might have overcomplicated that part of the guide a bit.

Basically, you just have to replace the assets inside the avatars, map_icons, saveslot_portraits and selectscreen_portraits folders with your character's assets.

I usually print screen my final character art from the Spriter, I copy the head part from the screenshot and paste it in every image file needed. Though, you can do it in any other comfortable way as well.

Edited by C_Thun
  • Sanity 1
Link to comment
Share on other sites

4 hours ago, C_Thun said:

 

@ScrewdriverLad I might have overcomplicated that part of the guide a bit.

Basically, you just have to replace the assets inside the avatars, map_icons, saveslot_portraits and selectscreen_portraits folders with your character's assets.

I usually print screen my final character art from the Spriter, I copy the head part from the screenshot and paste it in every image file needed. Though, you can do it in any other comfortable way as well.

Ah, that makes a lot more sense, thank you!

Link to comment
Share on other sites

Hey, I just got the following error: 

Quote

[00:00:29]: WARNING: icon paths for mod woker (Joker) are not valid. Got icon_atlas="modicon.xml" and icon="modicon.tex".
Please ensure that these point to valid files in your mod folder, or else comment out those lines from your modinfo.lua.    

It looks like (to my untrained eye) the mod icon didn't get given any .xml or .tex files. I've commented the lines out for now, but how do I get them to generate?

Link to comment
Share on other sites

Also, I keep getting this error. It keeps crashing when I try to generate the world

Quote

[00:00:21]: error loading module 'speech_woker' from file '../mods/woker\scripts\speech_woker.lua':
    [string "cannot OLDFILEACCESSMETHOD @../mods/woker\scripts\speech_woker...."]:2426: '}' expected (to close '{' at line 733) near 'TRINKET_5'

I've done everything I can think of, adding and shuffling around "}"s but I just am utterly lost. 

(Sorry if I'm bothering you with all these questions, I just don't know where else to ask)

 

Edit: I temporarily replaced my character's speech file with Wilson's, and it no longer crashes! However, None of my character's sprites appear on the character selection screen, his stats are all "?" and when I selected him it got stuck on that beige transition screen before you're supposed to start. Any clue what happened?

Edited by ScrewdriverLad
I had more Info and additional questions.
Link to comment
Share on other sites

Hi c-thun! You seem to be very informed on character modding this game. I'm currently trying to make my own for the first time ever. First 2 pictures characters just don't show up. I can still pick the character but it just freezes at the third picture. Any advice? Oops gotta upload in 2 posts. 

error2.png

Link to comment
Share on other sites

4 hours ago, JezusOfJordan said:

error3.png

That's exactly what's been happening to me! does it freeze just before loading the world?

EDIT: Thanks to someone on Discord, I figured it out! In modmain.lua, the very first line should be:
 

Quote

PrefabFiles = {
    "woker",
    "woker_none",

instead of 

Quote

woker = {
    "woker",
    "woker_none",

my character is named woker in the files if you're wondering

Edited by ScrewdriverLad
solved the problem!
  • Like 1
Link to comment
Share on other sites

@ScrewdriverLad Foods are basically the same as non-equipable items, you just have to add an edible component and health/sanity/hunger values to them. It should look something like this:

Quote

    inst:AddComponent("edible")
    inst.components.edible.healthvalue = 50
    inst.components.edible.hungervalue = 50
    inst.components.edible.sanityvalue = 50

You have to put this at the bottom of the local function fn(Sim) part in your food item's prefab file. Adding expiration time and such should work similarly.

Check out the in-game foods' prefab lines or my Williams character mod's prefab files, as he has many different consumable items.

If you need additional information, check out this guide: [TUTORIAL] Fun With Food - Tutorials and Guides - Klei Entertainment Forums

Link to comment
Share on other sites

**EDIT**
--i figured it out i had to get rid of my health tuning and use set max health--
********

sorry to just add more questions onto the thread but how would one go about making health and hunger values change when your character transforms? i have my transformation and everything working but i am not sure how to make those two values change any help would be appreciated :)

this is a snippet of the code i currently have that works fine (i assume this is where youd put the health and hunger components because it where i put the damage and speeds that worked fine, but it seemed to make it crash when i did...)

 

local function TurnBackToNormal(inst)
	-- Do whatever is needed to be in the normal state.
	-- You at least need to change the animation build, if your character needs to look different.
	inst.components.locomotor.walkspeed = 6
	inst.components.locomotor.runspeed = 8
	inst.components.combat.damagemultiplier = 1
	inst.AnimState:SetBuild("crowlie")
	inst.isInSecondForm = false
end

local function TurnIntoSecondForm(inst)
	-- Do whatever is needed to be in the shadow creature state.
	-- You at least need to change the animation build, if your character needs to look different.
	inst.components.locomotor.walkspeed = 8
	inst.components.locomotor.runspeed = 10
	inst.components.combat.damagemultiplier = 2
	inst.AnimState:SetBuild("crowley_form")
	inst.isInSecondForm = true
end

 

Edited by lord2clash
Link to comment
Share on other sites

Can you help? I decided to edit Wagstaff stats, and made him faster, but for whatever reason damage multiplier does not work. 

inst.AnimState:SetFilmGrainStrength(0) --2
    inst.AnimState:SetFilmGrainScale(10)
    inst.AnimState:SetDesaturation(0) -- 1
    inst.AnimState:SetSepia(0) -- 0.1

    inst.oneat = oneat
    inst:ListenForEvent("oneatsomething", inst.oneat)
    inst:ListenForEvent("healthdelta", function() checkfilters(inst) end)
    
    inst.checkfilters = checkfilters

    inst.components.hunger:SetMax(TUNING.WILSON_HUNGER * 1.5 )
    inst.components.sanity:SetMax(TUNING.WILSON_SANITY*.75)   
    inst.components.combat.damagemultiplier = 3.6
    inst.components.locomotor.runspeed = 1.9 * TUNING.WILSON_RUN_SPEED    
end

Link to comment
Share on other sites

On 6/23/2022 at 10:10 AM, MrYiang said:

I have a little question here, like, can i do this but just for an "SPECIFICT Character"?

@MrYiang Sorry for awkwardly long answer, I'm blushing heavily.

I usually add a new tag to my character: inst:AddTag("example")

When I want to specify the owner, eater or the inst, I add an extra layer of "if" to the code:  if inst:HasTag("example")

@MrGrouge Oh, neat! So , is it working, or is there still some stuff to fix?

Edited by C_Thun
Link to comment
Share on other sites

Hi! so I've been trying to test my mod but for what ever reason when I actually try to play as my character the game just freezes on a white screen? I've had no errors or issues, the game doesn't even say it's not responding or anything like that. I haven't added any code that wasn't in the template, do you have any idea what might cause this?

Edited by Lovely Roses
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...