Overview
Since the last towerfall update, it is possible to add in new characters to the roster(without crashing the game!)! In this guide, I will take you through the steps of creating a new character from scratch. To do this, I will be using a cyan archer re-color I made for halloween.
Introduction
Some time ago, I stumbled upon @AngeBl0w’s guide about editing character data :
[link]
Since then, I have had much fun playing around the data, sprite data and image files of the game.
Before update 1.3.1, adding in a tenth character would make the game crash. Since that has now been fixed, I think it is a good time to share my knowledge on character-making.
Like AngeBl0w said in his guide, ” I don’t promote y’all sharing the base TF files. Thats rude. Keep custom stuff to yourself unless you and your buddies can manage the sprite sheets and the character data. I’m not responsible for y’all breakingany EULAs or anything.” However, Matt has gone through the trouble of allowing new characters, so I don’t think he would be too mad about us messing with his game :P.
I encourage you to read Ange’s guide and to play around in the XML and PNG files to get a little familiar with them if you indeed go through with this guide.
In any case, back up your things, save often and have fun!
Creating Your Sprites
To do that, you’ll need some kind of image-editing software. I’m personally using Paint.NET, which kinda is the poor man’s version of photoshop, but works quite well. There are two main files in which you’ll be playing.
First one is the Atlas file for in-game sprites. You can find it by left clicking on towerfall in your library, then properties > local files > browse local files, then make your way to DarkWorldContent > Atlas. The files you want is atlas.png. Once it is opened up in your software of choice, you can create your character anywhere in the empty area.
You can see in this screenshot my ”original” halloween and red cyans on the right side of the background files.
Unless you are comfortable writing out animation that will be compatible with towerfall (which I am not), you’ll need to make your character based on an already existing one. Since I was just doing some re-coloring, that was quite simple for me, but if you intent on really making an OC from scratch, I sugest you copy and paste every sprite of a character, then replace them with new, coresponding ones. That way, you’ll know which sprite will be used when and won’t have to go through the trouble of writing out animation and stuff.
Depending on which character you will base yours upon, you will need to make a set of bodys, heads, heads with no hats, hats, heads with crowns, corpses, arms with bows, gems and corpses.
The other file you want, menuAtlas.png, is found in content > atlas. This one will be used to make the win and lose pictures, the character selection pictures and the big gems. Once again, you can simply place them anywhere in the empty area. For the win/lose and selection pictures, just use the same dimmensions as all the other ones. For the gems, copy any other gem set and replace them with your own. Just remember which one you took, it’ll be needed later on.
Coding in Your Character’s Sprite
This might get tricky explaining this in word and picture form, so hang on.
I don’t know if you listened to me, read AngeBl0w’s guide and explored the XML files, so I’ll try to be clear enough to be understood even if you didn’t. It would really help you if you did, tho.
So, go into content > Atlas > GameData, and open ArcherData.xml with notepad. If you’re familiar with HTML coding, this will look familiar to you. Basically, the tag <XXX> means the start of ”XXX” and </XXX> means the end of ”XXX”. For example, everything between the tags <Archer> and </Archer> will be characteristics of that archer. Tags with an exclamation mark like <!– Cyan –> don’t mean anything to the game and are just there for clarity.
Let me explain a bit how this all will work. So, to load any character into the game, towerfall will look at the values between the corresponding tags. For exemple, to load the cyan archer’s head, it will look between the <HeadNormal> and </HeadNormal> tags. By default, this value is PlayerHeadNormal6. This value then refers to the SpriteData XML file, which tells the game what texture to load and how to animate it. This texture value refers to the atlas XML file, which tells the game where the texture, or sprite, is located on the atlas.png file and how big it is.
So, to add new sprite data, what we basically do is create an Atlas entry to our new sprite, make a SpriteData entry refering to it and then use that reference as a value for the tags in the ArcherData file.
Ok, let’s begin by duplicating all the tags of the characters you have based yours on. Since I am using cyan, I will copy all the way from <!– Cyan –> to </Archer>. Even though I’m using cyan’s alt as a base, I still copy the Archer stuff, not the AltArcher stuff.
Paste it AFTER </AltArcher>, and then change the name of the first tag to recognize which section is your new section.
Then, you can edit the character’s colors, name, SFX, music, gender, etc. Except for the corpse tags, these values are just text and don’t refer to any sprites (so don’t edit the corpse value just yet). Use AngelBl0w’s guide for more info on this!
(I also added the phrase <StartNoHat>True</StartNoHat>, because I don’t like cyan’s hatless head. To make it have a permanent hat, I replace it’s hatless head sprite by it’s head with hat sprite, and make it start without a hat)
Because I am using cyan’s alt, now I will copy the corpse, sprite, hats and portraits tags of the original cyan alt over to my new character. If in your situation the breathing also varies from the original to the alt, copy that also. The statue tags are useless since dark world, so don’t bother.
(as mentionned earlier, you may notice that <HeadNormal> and <HeadNoHat> are the same, to get the perma-hat. This also saved me some time, because I didn’t have to bother making modded hat sprites.)
What you need to do next is open up the spriteData.xml file (content > Atlas > SpriteData) and atlas.xml file (DarkWorldContent > Atlas).
Now what you have to do is copy the value that is inside each sprite tag, then find them in the the spriteData file, using ctrl+f.
You should find a block of tags that begin with <sprite_string id=”XXX”>
What you are interested in is the <Texture> tag, because it is that value that refers to the atlas file. Copy and paste the texture value and find it in the atlas file. You should find an entry that looks like this :
Next step is to duplicate the SubTexture entry. Rename it. I advise only adding a simple part at the end, to simplify things later. I simply added HALL (for halloween) at the end of the name. Now, you need to change the X and Y values of your new texture entry to match your sprites. Use the X Y coordinates of the original sprite to find where the pixel they indicate is in comparison to the actual sprite. You need to make sure your sprite’s X and Y value are placed in the same manner. For example, if the X and Y values point at 3 pixels left and 2 pixels up of the original sprite, you need to write your sprite’s X and Y value so they point at 3 pixels left and 2 pixels up of your sprite.
If you are using Paint.NET, using the pixel grid and coordinates in the bottom right help.
When you are finished with the SubTexture entry (new entry with new name and good X Y value), save and go back into the spriteData file. Then, duplicate the whole sprite string, all the way from <sprite_string id=”XXX”> to </sprite_string>. What you need to do in this new sprite string is change the value of the texture tag to the name of the one you just made in the atlas file(in my case, ”player/cyan_AltHALL”). If you used a simple named change, you can simply apply the change here, or go with a copy/paste if you wanna be sure everything carries over smoothly. You also need to change the value of the sprite_string id tag. I simply added HALL once again.
Save the spriteData file, and now use the newly created sprite string id value in the sprite tag you beginned with (in my case body).
Well, if you have gotten all the way here, you pretty much know all there is to know. The body, heads, hat, bow and gameplay gem are all done exactly the same way. The corpse is done pretty much the same way, the only difference being the spriteData document is changed for the corpseSpriteData document (found in the same folder). Just go through the steps once again one tag at the time, and you should eventually be done! All that is left is the menu sprites, and if you managed to do this, they should be a breeze!
Menu Sprites
Making a new section for this was not really neccesary, but whatever. The proccess of adding in your new menu files is actually very similar to the gameplay sprites.
The win/lose and character select portraits, being still images, don’t even need a sprite_string entry. That means you only need to open up the menuAtlas.xml file (content > Atlas) next to your archerData file. Take the value/name of the portrait you want to change and find it in the menuAtlas file. No spriteData this time. Duplicate the entry and give a new name. Finding the good X and Y coordinates here is easy because the portrait are big rectangles or squares, and the X Y is the top left corner. When you are done making the texture entry, copy it’s name over to your archerData, and you’re done.
Big gems are sprites, so the process is identical to gameplay sprites. However, you need to use the menuSpriteData.xml file instead of the spriteData file. The atlas file used is of course menuAtlas.xml file.
Conclusion
Okay, I know this whole thing might not be crystal clear, but I hope it has given you some knowledge on the inner workings of towerfall. Maybe some of you might have as much fun modding as I had!
Also, if you make new characters and want to make them team colors, you probably need to change the <RedTexture> and <BlueTexture> tags, found in the spriteData file. By now you should know what to do next 😛 (I haven’t tried it yet, maybe I’m wrong)
Feel free to comment, ask questions, suggest edits and link to screenshots of your own characters!
My final advice would be to save often and to often boot the game to see if it doesn’t crash. If you followed my instructions to the letter it should be fine, but if you wait until the end to boot and it crashes, you won’t know where to look for mistakes. I crashed the game so often while figuring everything out, I hope you’ll have a smoother experience! If it does crash, the errror log might give you clues has to why it did.
Here are the final results of my red and halloween character, alongside their vanilla counterpart :
You can get them
My custom archers : Training Dummy (New brown archer), Crimson Puppet (Red Cyan archer) and Spooky Puppet (Halloween-themed Cyan archer) from TowerFall
, alongside a new brown archer based on the training dummy!
Have fun!
TheVortex
Modding Group!
If you went through all this, you clearly have SOME interest in modding towerfall. Well, here is a brand-new Steam group dedicated to this subject! Don’t be shy and join up!
[link]