[Tutorial] Using Extended Sample Character Template


Dragon Wolf Leo
 Share

Recommended Posts

This is a guide for my extended sample character mod.

 

Video Walkthrough

 

Provided by Sabeku.

 

What You Need

 

Where to get the Mod Tools

E9kpvvr.png

Games > Tools > Don't Starve Mod Tools

 

Installing the Mod
Check this thread for instructions on installing the mod: http://forums.kleientertainment.com/topic/29657-how-to-install-and-use-mods/

 

Editing the mod's info
Open modinfo.lua with your text editor. This is the information displayed in the Mods screen. This is pretty straightforward, so you shouldn't have much of a problem here.

Renaming the character
You probably have an amazing new name for your character, so you probably want to change the template's name to that. Let's walk through what has to be renamed.

In Notepad++, press Ctrl + Shift + F to open the Find in Files dialog.

There are two ways the character is named, all lowercase (esctemplate) and all uppercase (ESCTEMPLATE). The capitalization is important! Set Directory to the location of your mod, and check the Match Case checkbox. Replace esctemplate with yourcharacter, and ESCTEMPLATE with YOURCHARACTER.

Open modmain.lua with your text editor.
We should already see your character's name since we used Find in Files. So now, you can go through and change the strings such as your character's title, quote, and description.

Next, go to scripts\speech_esctemplate.lua. Change the file name to speech_[your character's name].lua. If you want to change your character's speech, this is what you'll edit.

By default, this includes Wilson's lines for Base Don't Starve. If you want to use a different character's speech file as a base, get it from dont_starve\data\scripts.

If you have Reign of Giants, it is highly suggested you use a speech file for that instead. Get it from dont_starve\data\DLC0001\scripts.

Next, go to scripts\prefabs\esctemplate.lua. Change esctemplate.lua to [your character's name].lua. Open it.

Just like in modmain.lua, replace all instances of esctemplate with your character's name.

Let's change your character's voice. Find the line inst.soundsname = "willow". Replace willow with the character's voice you want to use. The voices available are wilson, willow, wolfgang, wendy, wx78, wickerbottom, woodie, maxwell, wathgrithr, and webber.

Now on to renaming the rest of the files.
In the bigportraits and images folders, there are many .png, .tex, and .xml files. We want to change the name of the .png files to replace esctemplate with your characters names. While you can change the names of the .tex and .xml files, it's not necessary since the compiler will rebuild these files, so you can actually delete these and let them re-appear with your character's name when compiling.

Go to the exported folder. There are two or three folders, esctemplate, esctemplate_cleared, and if you're modding DST, ghost_esctemplate_build. For now, you can ignore esctemplate_cleared (if you want) since that's only there for reference, but you should rename the other two to your character's name, and also the .scml files inside them.

Finally, let's go to the anim folder.
You'll see one or two .zip files, esctemplate.zip, and if you're modding DST, ghost_esctemplate_build.zip. These aren't quite easy to rename, since it requires also changing the name within build.bin to work. But you don't need to. The contents of the exported folder will compile into this folder, so you can just delete these. New ones will appear, already renamed to your character's name.

Now our character should be fully renamed. It's a good idea to test the mod at this point to see if we've done this correctly.

Compiling
Compiling the mod will convert your .png files to .tex and .xml files, and your .scml to .zip files in the anim folder. This is usually done automatically, since the autocompiler launches whenever you start Don't Starve, as long as you have the mod tools installed.

Alternatively you can force-run the compiler by running Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\autocompiler.exe.

If you need it, there's another way to compile the Spriter project by using scml.exe in the mod_tools folder directly. Start your Command Prompt, and drag the path of scml.exe, the path to your .scml file, and the path to your mod folder.

It should look something like this:

XS8NCCg.gif?1

 

Png files that aren't in the exported folder can be converted in a similar way, but using png.exe instead.

If everything ran smoothly, we can work on the art next.

 

DST Big Portraits and Names Additional Instructions

These directions need to be followed in the DST of the template or the mod will crash. This may have to be repeated after editing either of the files involved:

After you compile bigportraits/[character]_none.png and images/names_[character].png, you will need to edit the resulting .xml in a text editor.

In bigportraits/[character]_none.xml, change the Element name to "[character]_none_oval.tex". (Do not change the Texture filename).

In images/names_[character].png, change the Element name to "[character].tex". (Do not change the Texture filename).

Creating art
Remember, you need an image editor with transparency support!

 

For Don't Starve Together, here's a useful tutorial/template for making the big portrait by @Fidooop.

 

All edits to images will automatically compile except for modicon.png. This is what we need TEX Tools for. If you decide to draw a new modicon, use TEXCreator to convert from .png to .tex.

 

The images in the bigportraits and images folders are meant to be automatically compiled by the autocompiler. You can also use png.exe in the mod_tools folder if you wish to do it yourself.

 

Though, if you wish to use TEXTools for these instead, convert the .tex files to png first rather than using the ones provided. This is to avoid crashing caused by textures that don't have dimensions of the power of 2.

Now let's take a closer look at how to draw our character's in-game art. Your character's art is in all the folders within the exported folder. Open the .scml with Spriter, which comes with Don't Starve Mod Tools. You can preview the changes you make by opening this. This will save you time as opposed to opening Don't Starve every time you make a change.

The template provided includes all animatable parts (or symbols), but it's likely the character you wish to make doesn't need a certain symbol, such as hairpigtails, tail, and/or skirt. Rather than having to edit the .scml to remove these, you can clear out the .png files of these symbols. This is why I included the folder esctemplate_cleared. You can simply replace a symbol with one of these cleared version to "remove" it.

 

Information on faces used can be found here.

Try not to change the dimensions of any part, unless you absolutely know what your doing. Changing the dimensions (length and width) of the images will require editing the .scml as well, which includes updating the length and width of a part, and also having to recalculate pivots using this complicated equation if resized from the center of the image:
NewPivot = (OldLength*OldPivot+((NewLength-OldLength)/2))/NewLength
Additionally, this will make updating to future versions of the template a bit more inconvenient.

 

Don't forget to compile your mod to see the changes.

Cleaning up

Note: If uploading to Steam Workshop, this step is not necessary if you choose not to upload redundant files.

If you've finally completed your mod, and want to release it to the public without taking up any unnecessary file space, you may want to remove some of your extra work files. (Though, if you like the clutter, you don't have to do any of this!)

Please back up your mod before deleting anything!

The entire exported folder can be removed, since everything compiles into the anims folder.

All .png files can be removed, since all image data is stored as .tex and .xml files. This includes the ones in the bigportraits and images folders, and also modicon.png.

Do not remove anything else.

 

 

Troubleshooting

If problems arise, check your log to see what the error is. For Don't Starve, this is located in Documents\Klei\DoNotStarve\log.txt. For Don't Starve Together, this is located in Documents\Klei\DoNotStarveTogether\client_log.txt

In DST, make sure you didn't skip the additional steps for big portraits and names.

This is the basics for using this template. I hope this tutorial was helpful.
 

Edited by Dleowolf
  • Like 57
  • Thanks 8
  • Sanity 1
  • GL Happy 1
Link to comment
Share on other sites

This guide is super awesome! It looks really straight forward and you explain everything really well. 

 

I've been using the extended template for a few days and it's really useful, the things it adds are really cool. It's just a little beyond me though, and this guide certainly helps clear up a lot.

 

Thank you so much Dleowolf!

Link to comment
Share on other sites

Great template - it's incredibly helpful, the guide is very well laid out. This is really just the best thing I could have found for my purposes.

 

I'm experiencing issues trying to create a character for DST, however - maybe it's just because I'm a beginner and can't identify problems that would be obvious to others. 1.0.2 is working fine for creating basegame characters, but 1.1 doesn't seem to be working; it crashes in basegame and I haven't been able to test it out in DST yet. Any help or advice you'd have would be really appreciated.

 

Thanks for your time, this is a great resource. c:

  • Like 1
Link to comment
Share on other sites

Great template - it's incredibly helpful, the guide is very well laid out. This is really just the best thing I could have found for my purposes.

 

I'm experiencing issues trying to create a character for DST, however - maybe it's just because I'm a beginner and can't identify problems that would be obvious to others. 1.0.2 is working fine for creating basegame characters, but 1.1 doesn't seem to be working; it crashes in basegame and I haven't been able to test it out in DST yet. Any help or advice you'd have would be really appreciated.

 

Thanks for your time, this is a great resource. c:

 

1.1 is only for Don't Starve Together while 1.0.2 is only for single player Don't Starve. The resulting compiled animations are identical though.

  • Thanks 2
Link to comment
Share on other sites

Good Morning! Thankyou so much for publishing this, it's been a huge help! =D I was gutted when I found out my RoG character wouldn't work in DST.

 

I have one question though, if you'd be so kind. Is it possible to export the files from Spriter directly to a sprite sheet? Or do I have to align the images manually? I'm trying to create characters for myself and friends & it would save a lot of time and aggro if the former is possible. (Damned overlap!)

 

Thankyou very much in advance. ^_^ 

Link to comment
Share on other sites

Good Morning! Thankyou so much for publishing this, it's been a huge help! =D I was gutted when I found out my RoG character wouldn't work in DST.

 

I have one question though, if you'd be so kind. Is it possible to export the files from Spriter directly to a sprite sheet? Or do I have to align the images manually? I'm trying to create characters for myself and friends & it would save a lot of time and aggro if the former is possible. (Damned overlap!)

 

Thankyou very much in advance. ^_^ 

 

You can use TEXTool to export sprite sheet textures from anim\esctemplate.zip. However, inserting a custom sprite sheet back inside the .zip will likely result in clipping.

Link to comment
Share on other sites

Hi! Thank you SO much for this tutorial, I really appreciate it.

Though, it seems I'm doing something wrong: My game keeps crashing everytime I enable my mod. Mod itself shows up right in mod menu but when I proceed to click "I understand" (after mod installed) it just stops working. Any suggestions?

 

Oh, and sorry for my bad english - it's my third language. 

  • Like 1
Link to comment
Share on other sites

Thank you so much for the tutorial! and supplying such a nice base. I'm really sorry to have to bug you I'm sure my problems are like super obvious but this is my first mod and I cant seem to get around it which is super frusturating. I followed the first steps in renaming my character, all the way until I have to compile(I am modding for dst and I moved the file over into the dont starve single player mods folder) BUT when I clicked autocompiler it went(super fast mind you like I couldnt even read what it was saying) and when I double checked the folder(anim, which I'm assuming should have something in it if sucessfully compiled) it had nothing. I've tried redoing the process two times and still no cigar.

also when I enable the mod in Dst or ds its all good to go and then I pull up the pick your character thing and nada..

I unzipped the files, so I dont know if thats my issue because they were rar or not.. idk I'm a super noob

I already have all of my textures down and everything using the templates you generously provided and spriter, so I think thats pretty much good to go... I hope. please help I'm like super dumb ackkk

 

Link to comment
Share on other sites

Hi! Thank you SO much for this tutorial, I really appreciate it.

Though, it seems I'm doing something wrong: My game keeps crashing everytime I enable my mod. Mod itself shows up right in mod menu but when I proceed to click "I understand" (after mod installed) it just stops working. Any suggestions?

 

Oh, and sorry for my bad english - it's my third language. 

 

 

Thank you so much for the tutorial! and supplying such a nice base. I'm really sorry to have to bug you I'm sure my problems are like super obvious but this is my first mod and I cant seem to get around it which is super frusturating. I followed the first steps in renaming my character, all the way until I have to compile(I am modding for dst and I moved the file over into the dont starve single player mods folder) BUT when I clicked autocompiler it went(super fast mind you like I couldnt even read what it was saying) and when I double checked the folder(anim, which I'm assuming should have something in it if sucessfully compiled) it had nothing. I've tried redoing the process two times and still no cigar.

also when I enable the mod in Dst or ds its all good to go and then I pull up the pick your character thing and nada..

I unzipped the files, so I dont know if thats my issue because they were rar or not.. idk I'm a super noob

I already have all of my textures down and everything using the templates you generously provided and spriter, so I think thats pretty much good to go... I hope. please help I'm like super dumb ackkk

Yeah, the game will crash if the compiled builds don't show up in the anim folder. Sometimes the autocompiler pretends the scml project doesn't exist. This seems to happen to some people, and I don't quite understand why.

 

There's an alternative way to compile by using scml.exe in the mod_tools folder directly. Start you Command Prompt, and type the path of scml.exe, the path to your .scml file, and the path to your mod folder.

It should look something like this:

"C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\scml.exe" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\extended sample character\exported\esctemplate\esctemplate.scml" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\extended sample character"

If this works for you, I'll update the tutorial to include this.

Link to comment
Share on other sites

I figured out that problem; I guess my computer is finnicky but i had the folder inside the folder; (ex. extended sample character>extended sample character>anim, big port, etc) now it compiles and the character appears on the character selection screen; once trying to log in as that character this lovely thing pops up:

http://fc09.deviantart.net/fs71/i/2014/354/e/4/pain_in_my_ass_yo_by_attalyx-d8ahc9p.png

here is pretty much everything else I'd assume could possibly interfere with it (ranging from her ds character skin, my dst log, etc)

http://sta.sh/2dpbkkdvp50?edit=1

thank you so much for you help haha I'm getting so frusturated by my own stupidity @_@

 

Link to comment
Share on other sites

I figured out that problem; I guess my computer is finnicky but i had the folder inside the folder; (ex. extended sample character>extended sample character>anim, big port, etc) now it compiles and the character appears on the character selection screen; once trying to log in as that character this lovely thing pops up:

http://fc09.deviantart.net/fs71/i/2014/354/e/4/pain_in_my_ass_yo_by_attalyx-d8ahc9p.png

here is pretty much everything else I'd assume could possibly interfere with it (ranging from her ds character skin, my dst log, etc)

http://sta.sh/2dpbkkdvp50?edit=1

thank you so much for you help haha I'm getting so frusturated by my own stupidity @_@

 

The problem might caused by the capitalization. So, esctemplate to mangle, and ESCTEMPLATE to MANGLE.

Link to comment
Share on other sites

The problem might caused by the capitalization. So, esctemplate to mangle, and ESCTEMPLATE to MANGLE.

 

Oh I'm dumb lol, I adjusted everything and triple checked... but you guessed it; now im having the same issue as Nightingamer. I ran the cmd, tried pulling it up again and crashed again (All the files are there also) man this just isn't my game. Thank you for being so patient with me! I really want to get this down.

Link to comment
Share on other sites

Oh I'm dumb lol, I adjusted everything and triple checked... but you guessed it; now im having the same issue as Nightingamer. I ran the cmd, tried pulling it up again and crashed again (All the files are there also) man this just isn't my game. Thank you for being so patient with me! I really want to get this down.

 

Could you post your crash log again?

Link to comment
Share on other sites

I'm having a problem that when I try to launch the game, either Don't Starve or DST, the compiler will not add any files to the anim folder. It did one time originally, but it will not do it again. I've tried everything I can, tried using the command prompt line you provided, restarting from scratch numerous times, but no matter what I do I cannot get the autocompiler to do anything with the files. Do you know what I can do to fix this?

Edited by TheFriday
Link to comment
Share on other sites

I'm having a problem that when I try to launch the game, either Don't Starve or DST, the compiler will not add any files to the anim folder. It did one time originally, but it will not do it again. I've tried everything I can, tried using the command prompt line you provided, restarting from scratch numerous times, but no matter what I do I cannot get the autocompiler to do anything with the files. Do you know what I can do to fix this?

 

What happens when you use the command prompt line? Did you edit the paths to how it's located on your computer?

Link to comment
Share on other sites

Yes, I change the it so that it matches my directory. Which turns out to be;

 

"C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\scml.exe" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\thefday\exported\friday\friday.scml" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\thefday"

 

Which gives me the error;

 

ERROR: Missing image 'face/face-14.png' referenced by 'friday.scml'.

 

I also tried adding a face-14.png image, but it still gave me the same error.

Link to comment
Share on other sites

In the images and bigportraits folder, there should be a .tex and .xml for every .png, which should have been created by the compiler. If they are there, perhaps open the .xml files with a text editor to see if it says "mangle.tex" instead of "esctemplate.tex".

 

They are there and when opening each of them they all are mangle.tex

 

EDIT: All is well! I managed to fix it by just recaching everything thank you so much for you help!

Edited by Attalyx
Link to comment
Share on other sites

Yes, I change the it so that it matches my directory. Which turns out to be;

 

"C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\scml.exe" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\thefday\exported\friday\friday.scml" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\thefday"

 

Which gives me the error;

 

ERROR: Missing image 'face/face-14.png' referenced by 'friday.scml'.

 

I also tried adding a face-14.png image, but it still gave me the same error.

 

That's strange. If you open friday.scml with a text editor, you should be able to find this line:

  <file id="14" name="face/face-14.png" width="200" height="200" pivot_x="0.542747" pivot_y="0.570502"/>

It should look like this. Other than that, I have no idea why your face-14.png is being ignored.

Link to comment
Share on other sites

Yeah, that's what it shows, just as you said.

 

        ...

        <file id="13" name="face/face-13.png" width="200" height="200" pivot_x="0.542747" pivot_y="0.570502"/>
        <file id="14" name="face/face-14.png" width="200" height="200" pivot_x="0.542747" pivot_y="0.570502"/>
        <file id="15" name="face/face-15.png" width="200" height="200" pivot_x="0.542747" pivot_y="0.570502"/>
        ...
 
What am I looking at to fix this?
Link to comment
Share on other sites

Hi! Thank you SO much for this tutorial, I really appreciate it.

Though, it seems I'm doing something wrong: My game keeps crashing everytime I enable my mod. Mod itself shows up right in mod menu but when I proceed to click "I understand" (after mod installed) it just stops working. Any suggestions?

 

Oh, and sorry for my bad english - it's my third language. 

Hey,

I had the same issues so I made a solution for everyone.

I wrote this helper file https://www.dropbox.com/s/a4iymoy1obfvi7f/compiler.cmd?dl=0. (you can edit it to check it's content it's really small)

Just drag your character's folder onto the compiler.cmd and it will compile it (you must have steam installed correctly and downloaded the don't starve mod tools via steam)

 

@OP you can include this if you want (it works for renamed folders and modified folder structure).

Link to comment
Share on other sites

Can anyone tell me what exactly all those files do? It's really a pain in the arse. For example in the foot folder, what are all these foot-images specifically for? I don't want to test it until I randomly see what I draw.

 

And the facial expressions, why is there a black and white image? And in what situations do they all activate? Is there any guide?

  • Like 1
Link to comment
Share on other sites

Hey, Dleowolf! It's great that you're finally making a guide for your fantastic template, but I think your tutorial could use some streamlining. Since you already recommended Notepad++ as your text editor, a better way to replace all of the esctemplate text is to do something like this:

 

notepad___replace_by_dragondeplatino-d8a

(The full directory is "C:\Program Files (x86)\Steam\SteamApps\common\dont_starve\mods\yourcharacter" and you get to this menu by pressing ctrl+H)

 

This won't replace the esctemplate inside the build.bin, but it will handle everything else in one easy step. Oh, and remember to do it for ESCTEMPLATE/YOURCHARACTER too. You can use this image if you want.

Edited by DragonDePlatino
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