Jump to content

[Tutorial] Using Extended Sample Character Template


Dragon Wolf Leo
 Share

Recommended Posts

I did a mod using this tool years ago and it worked fine. I am a bit rusty though, so when I tried to make another mod this time around I wasn't having such an easy time. I went through all of the files, made sure they were all named properly and even checked to make sure nothing had possibly corrupted. But I have been trying to solve this same reoccurring issue. I click into the game and go to create an offline server to test my character mod, but I don't even make it to the loading screen and I get an error message.
"An Error occurred while starting game, check log for details"

or something along those lines. But uh... I don't know how to check the log files, so I can't really solve a problem if I don't know what it is exactly. I was just hoping you may have some suggestions?

Please help, I would really appreciate it. Been spending countless hours on this...

Preview.png

Link to comment
Share on other sites

I've been trying to no avail to make my character mod, but unfortunately, I somehow cannot get the auto-compiler to make the animation for the non-ghost version of my character. It will create the ghost_(character)_build.zip, but not the other one.

I've just no idea what else I could possibly be doing wrong now... and I'm aware this little information probably won't get me far, but any insight I can get would be nice.

Edited by Fafnya
Clarification, just in case.
Link to comment
Share on other sites

On 18/12/2014 at 9:31 AM, Dleowolf said:

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.
 

Thanks so much and my name is Cleo.

Link to comment
Share on other sites

On 7/7/2018 at 2:30 AM, SheppyGiblet said:

Thank u a lot for making this tutorial but I would like to know if it is still relevant to windows 10 users because I couldn't access my steam in the program files.

Did you go to Program Files, or Program Files(x86)?

And also, on the steam app, you can right click Don't Starve, select properties>local files, and then click Browse Local Files to pull up the folder.

Link to comment
Share on other sites

I was trying to make a mod for DST I just randomly decided to do a mod, never done it before, but I wanted to try it, got finished with the video along with reading the instructions and I got a warning.

I really want to do this mod, so any help would be greatly appreciated.

Here is a picture: 

 

20180717021355_1.jpg

Edited by Ranch_Man
Link to comment
Share on other sites

I'm having trouble creating mod. When I watched the Mod tutorial, I prepared everything necessary to make the mode, and then ran the AutoComfiler.
However, the AutoComfiler did not generate the Tex file. How do I solve this problem?
Thank you for reading:)

Link to comment
Share on other sites

+Because Autocomfiler did not create tex file, I changed png file directly to tex file. But when I change the name file of the character that comes out when I select the character into a tex file, the game turns off when I try to pick my character.

Link to comment
Share on other sites

++When I run AutoComfiler, the following letters appear, I think this is relevant with what I asked you. The letter below means '~ is not an internal or external command, a executable program, or a batch file.'

I'm really sorry to post you several times.

20180818_234357.png

Edited by ingkko1203
Link to comment
Share on other sites

On 8/19/2018 at 11:03 AM, yoshido124 said:

 

 

Plssssss heeeeeelp 

I followed every step of the video, but I get this error; -; If anyone can help I'd appreciate it ;-;

 

image.thumb.png.f71cdc7b6492a9e28cb1dcd15e50d8bb.png

 

I got past that by restoring all the files that it tells you to until eventually you got them all back. They don't seem to do anything bad, think it was just an error caused from updates or something (idk I am new)

Link to comment
Share on other sites

Hi,

So basically I did renamed everything, deleted two zips in anim and all the .tex and .xml files, started the game and the autocompiler.exe did the job, BUT

the .tex and .xml files didn't reappear as they should. And also the game is telling me that the mod is crashed. 

What should I do?

PS: I am modding the DST.

  • Like 1
Link to comment
Share on other sites

[00:02:18]: DoLuaFile Error: (null)
[00:02:18]: LuaError but no error string
[00:02:18]: Error loading main.lua
[00:02:18]: Failed mSimulation->Reset()
[00:02:18]: Error during game restart!
[00:02:23]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:23]: Collecting garbage...
[00:02:23]: lua_gc took 0.02 seconds
[00:02:23]: ~ShardLuaProxy()
[00:02:23]: ~cEventLeaderboardProxy()
[00:02:23]: ~ItemServerLuaProxy()
[00:02:23]: ~InventoryLuaProxy()
[00:02:23]: ~NetworkLuaProxy()
[00:02:23]: ~SimLuaProxy()
[00:02:23]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:23]: lua_close took 0.01 seconds
[00:02:24]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:24]: [Steam] Auth ticket cancelled
[00:02:24]: CurlRequestManager::ClientThread::Main() complete
[00:02:24]: HttpClient2 discarded 0 callbacks.
[00:02:24]: steamnetworkingsockets_lowlevel.cpp (88) : Assertion Failed: SteamDatagramTransportLock held for 250.8ms!
[00:02:24]: Shutting down
 

anyone know what's going wrong here? i followed the tut and it doesnt say crashed on the game, if someone can help thatd be much appreciated

Link to comment
Share on other sites

Hello.Thank you very much for making this cool mode.XD9999
I tried hard to create mode after taking this course, but it keeps getting wrong. Is there anyone kind who knows how to solve this problem?;;;D

h....help me plz......;D
I am sorry to use the translator because my English is not good. ;;;D;;; I am sorry to use the translator because my English is not good. ;;;D;;;%EC%98%A4%EB%A5%98.png?type=w773

 

Edited by Zillvr
Link to comment
Share on other sites

Hi

Thanks so much for the tutorial! It worked!!

One thing - I can't get the character's name to show properly on the character select screen. It says "Sample" instead of my character's name. I revised the xml files  in the <images> folder as you said to do in your notes but still not working. :( The same happens on the bigportrait - my character doesn't show up even though I revised the xml files.

 

 

Could you please help?? Thank you!

 

Link to comment
Share on other sites

I made a Charlie Character on my own (I know there's already one but I wanted to give it my touch) but the only thing i couldn't do was to give her an item, I wanted her to start with a "Nightmare Amulet" any idea of how can I give it to her?

Link to comment
Share on other sites

On 3/23/2019 at 7:10 AM, Matutres said:

I made a Charlie Character on my own (I know there's already one but I wanted to give it my touch) but the only thing i couldn't do was to give her an item, I wanted her to start with a "Nightmare Amulet" any idea of how can I give it to her?

I know how if you're modding singleplayer don't starve this will probably work but in dst I'm not sure

 

}
local prefabs = {}
local start_inv = {
    "purpleamulet",
}

put it  after

        Asset( "ANIM", "anim/esctemplate.zip" ),

Link to comment
Share on other sites

I made a small utility script for renaming characters easily.

It conserves case, so it should take care of both "esctemplate" and "ESCTEMPLATE" replacements at once.
It also changes filenames accordingly.

You can find it here, and a post I wrote with more details on how to use it here.

Hope this helps someone. =)

Link to comment
Share on other sites

On 2/8/2019 at 8:07 AM, Topaz_Chaz said:

Hey, would someone be willing to help me? I'm modding for DST, but it crashes as it loads the world. I have no idea what to do. I'm stuck. Here's the client_log file. Thanks!

client_log.txt

"[00:04:46]: [string "scripts/util.lua"]:550: Could not find an asset matching images/avatars/avatar_phelps.tex in any of the search paths."

You're missing that file.
Check that you have an image called "avatar_phelps.png" in images\avatars and make sure you let the autocompiler run its course.
You should be able to see it say that it's processing that file, I think.

As a general tip, whenever you encounter a crash, search the log file for the first time the word "error" appears and look around there.
The line I just copied appears one line above the first time "error" shows in the file.

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...