Jump to content

Creating your own character


Recommended Posts

Creating Your Own Character

With Klei Entertainment deliberately helping the community to create their own characters, the boundary for modding your own character into the game has dropped drastically. Though, that wall could be a lot shorter in my opinion, so what I plan to do with this tutorial is to make it so nearly anyone could create their own character, no matter who you are.

-The Tools
-Textool
-Notepad++
-Build Renamer
Textool will be used to make textures.
Notepad++ will be used to edit Lua files.
The HT editor has one purpose we'll see later, but if you want your character to be compatible with other's it's vital.

-Where to Start
You'll need the June 7th beta to start off, you can find out how to get that in this thread.
Next, you'll of course need the samplecharacter mod to start with. The June 7th build says it comes with it... but it only brings in the anim file. Here's a full kit to get you started.

-Changing the Textures
Now, i'm sure most of you guys want to mod a character in to show your own OC, which is perfectly fine. This is why i'll be starting off with what I could say is the biggest part about making a character, changing how it actually looks.
In the file you downloaded, you'll see a template is included. That should easily tell you where everything goes. Simply follow those guides and everything should work out fine.
To actually get it in the game though, you'll have to turn it into a tex file, which is where the previously mentioned Textool comes in. Open Texcreator.exe and use the settings below.
post-16511-13764595041273_thumb.png
These are the settings you'll want to use for exporting your character.
Once you've done that, you'll want to name your file:
atlas-0
and put it in the wod zip file in the anim folder where you found the template.

-Adding New Stats
This is the other reason you're going to be modding a character in. You want a character with new stats. Now, i'm not the most knowledgeable in this subject, but I do get the basics and can help you know what you're doing.
Firstly, your stats will be put in your character's prefab file, which can be found in the prefab folder. Open it with Notepad++ and find the comment reading "-- todo: Add an example special power here.". It might seem troubling that we have no base power to work with. But don't worry, existing characters will be our guide.
Let's look at the two simplest characters in terms of how their stats. Wes and Wolfgang, polar opposites, but they touch upon the same files.
post-16511-13764595041841_thumb.png
Wolfgang's stats.
post-16511-13764595041995_thumb.png
Wes' stats.
We have a nice base here. Simply by copying the lines we want, pasting them in our file under our comment, and tweaking the values as we want. But, what if we want to change something else?
Well, if you look at the stats, they all seem to have one thing in common, they point to something called "components". This is referencing the components folder in the Don't Starve data files. Simply go to the root of your Don't starve folder, go to data, scripts, and then the components folder. Here you'll find most of the features that make up the game. Let's say we want to make a character faster than the others. All we have to do is travel to the game's speed file, "locomotor.lua", and look for this part:
post-16511-13764595042171_thumb.png
Copy this and paste it under the comment in your file... but we're not done yet. We need to make it so this specifically references the locomotor file. Looking back at Wolfgang's and Wes' stats, they start out with "inst.components.", and then reference the file of the stat they're changing for their character. To make it so our character is actually faster, what we will have to type in will be around the lines of this:
post-16511-13764595042395_thumb.png
Now, depending on how you want to do this, you could either just put a number in here, or, you could have it reference the default speed, and multiply it by a number.
Posted Image
or
Posted Image
This will make your character run faster. But to make him compatible with other characters, we'll have to dabble a bit.

-Getting Rid of that "wod"
As you see, the character seems to keep being called "wod" throughout the file. This is not the name of our character though! Well, don't worry, it doesn't have to be. But to make sure our character is compatible with others, we'll have to change this "wod' to something else, anything other than wod.
So, this starts off rather simple. All you have to do is open your modmain.lua and your wod.lua prefab file, and replace all the "wod"s in it with your character's name. You can easily do this in Notepad++ by pressing Ctrl+H.
Posted Image
Now you'll also need to replace all the "wod"s in the filenames with your new 3 letter set. Once you've done that, we're going to get into the tricky part of this.
Remember when we were in the zip file where we put in our .tex file? There was another file in there, and that was the build.bin file. To get this to work, we'll have to edit one specific part of that file to our character's name. Simply drag it out into the folder you placed the HXD, and open it up.

There was originally a section written by Kiopho, but Handsome Matt made an even EASIER to use program, so all thanks to both of them!

[MENTION=16511]ShinyCrobat[/MENTION] I just made a quick tool so you guys don't have to hex-edit anything anymore. C:

Posted Image

-Giving your Character his own in-game text
Simple, just follow the template given to you at the bottom of the prefab file and you're ready to go.


Well, I think that just about wraps it up! I hope this tutorial is helpful, and if you have any trouble, just ask me or anyone else who has created a character. If something's wrong in the tutorial, tell me. I'm not perfect, but I am willing to go back and fix something if I flubbed up somewhere. Now, go out and create your own character, and help the population of Don't Starve grow! Edited by ShinyCrobat
  • Like 13
Link to comment
Share on other sites

Just a quick little niggle, try to use alphabetical characters for the name and replace the instances of "wod" with something unique for your character to prevent conflicting mods.

Yeah. Personally, I made Whiskers use d72, as I find it very unlikely someone else will use that set.
Link to comment
Share on other sites

You can name your character whatever you want by the way, even more than 3 letters. I'm using another freeware called HxD for HEX editing.Here's how it goes.1 - Open your file2 - Go to the section to the right just where the name "wod" startspost-34080-13764595100582_thumb.jpg3 - Delete itpost-34080-13764595100831_thumb.jpg4 - Make sure you're in "Insert" mode and not "Overwrite" mode and type your new name. Here "mycharacter"post-34080-13764595101055_thumb.jpg5 - Count the number of letters of the new name. It's 11 for our example which is 0B in HEX. Then move to the HEX section to the left at offset 00000010 (first bloc of second line). That bloc refers to the length of the name.post-34080-13764595101295_thumb.jpg6 - Replace it (overwrite) with the new lenght which is 0Bpost-34080-13764595101512_thumb.jpgYou're done. Save and quit.

Edited by kiopho
  • Like 3
Link to comment
Share on other sites

  • Developer

Sorry for not updating the thread earlier with your program, Handsome Matt, I had 4 impacted wisdom teeth taken out today, and times are NOT good.

There's no need to apologize for someone ripping part of your face out. :( Get well soon!
Link to comment
Share on other sites

You can name your character whatever you want by the way, even more than 3 letters. I'm using another freeware called HxD for HEX editing.

Thank you SO MUCH for this. I have created quite a few characters for myself and I never new you could use a different length for the file name. This opens up so many names!

Edit: This is what happens when I get too eager to post!

[MENTION=16511]ShinyCrobat[/MENTION] I just made a quick tool so you guys don't have to hex-edit anything anymore. C:

Posted Image

Download here.

Oh well, now I have OPTIONS!

I just kinda skimmed, but I'll look through it in more detail when I can get an artist to make the character's anim textures and bigportait & all that.

What kind of character do you have in mind? Edited by Xina42
Link to comment
Share on other sites

What kind of character do you have in mind?

I've been trying to make a Beefalo-man character by the name of Wellington, his perks would be natural winter protection and doesn't starve as easy, his negative attributes are vegetarianism and a skittish nature. (Aka, he doesn't freeze as fast in winter, and he has more hunger & his hunger drains slower, but he also can't eat meat and goes insane faster, I also plan on making him a little better in combat than Wilson but not as good as wolfgang)I also thought maybe I'd make a Koalafant character to compliment him, though I have no real ideas for his abilities yet. I also have another secret Idea for a third monster morph that will get some attention if the first two can be made.
Link to comment
Share on other sites

Can someone help?:dejection:I made a character myself and everything works except that he's invisible in the world and you can see only he's shadow. Even when equipped he looks the same.I checked those 2 things in tex creator, I used the build rennamer and I don't know what's wrong.:spidercowers:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
  • Create New...