![Custom Sprites for Final Fantasy V](https://i2.wp.com/whitegiantrpg.com/wp-content/uploads/1d9cdc0b525fc222e4c00f9d4029c6ac-538x218.png)
We all remember the classic game Final Fantasy V, right?
Wait, that’s not right at all! What’s going on here?!
This blog post is part of a series on the WGRPG Tournaments.
The Motivation
We’re about one year away from the next WGRPG Tournament, which will feature Final Fantasy V (Pixel Remaster). In order to make things more fun, we modded the game to add in custom character names and sprites. Also, because it’s awesome!
We’re also releasing the app we wrote to the world, which you can use to swap around various sprites –including our custom WGRPG sprites! There’s also instructions for adding your own custom sprites:
https://github.com/sorlok/FF5ReSprite
Please also check our our artist for this project, Carvel:
https://www.instagram.com/pixelcarvel/
One small caveat: we only changed the map sprites (the ones you walk around as). The battle sprites are unchanged. With that out of the way, let’s begin!
The Frameworks
The Final Fantasy V Pixel Remaster (FF5) was written in Unity, which is a popular commercial game engine similar to Godot (the one Last Dream 2 uses). As a side effect of the decision to use Unity, all of FF5’s assets are now in a relatively standard format. We can use a tool like “BepInEx”, combined with the “Magicite” plugin, to hook the asset pipeline and export all of those graphics. We can then use those same tools to re-inject our custom assets. Links to all our tools are found in the GitHub page. Here’s a sample exported folder, with some annotations:
Basically, once we find the folder that contains the character or NPC whose graphics we want to replace, we first read all of the “.spritedata” files. These tell us which animation frames exist. Next, we load our custom sprites and replace each animation frame with our own artwork. Here’s the output with Exdeath replaced by yours truly:
Here’s a few technical details you can skip if you only care about the results:
-
Magicite exports to <FF5_Data>/StreamingAssets/MagiciteExport, and reads in from something like <FF5_Data>/StreamingAssets/Magicite/WGRPG. So your mods and our mod can coexist!
-
Those weird lines in the original art are Unity’s attempt to avoid the “hairline” pixel artifacts you sometimes see in OpenGL games. Our tool could certainly add those in as well, but we haven’t seen the need for it yet.
-
Most sprite frames are 16×16, but Faris has ONE sprite that’s 18×16. We cheat and pretend it’s 16×16 too. Also, some characters have frames that others do not –for example, there is no graphic of Krile “tied up”, since she joins after that scene occurs. For those cases, we just substitute the next-closest thing.
-
In case you were wondering, the ordering of each sprite frame is different for every character. So “Default_00” is in a different spot for, say, Bartz than for Krile.
Renaming Characters
Of course, changing sprites is no fun unless you can also rename your characters. But wait… FF5 only allows you to rename Bartz! How do we work around this? Well, it turns out that BepInEx can export more than just graphics! The “message” folder contains all of the text in the game (it’s stored this way to make translation to other languages easier), and the “master” folder contains a bunch of .csv files that describe how the game functions. You can find things like “weapons.csv”, “ability.csv”, “job.csv”… and a very tiny file called “character_default_name.csv”, which looks like this:
id,character_id,tag_name,mes_id_name
1,1,BARTZ,MSG_CHAR_NAME_01
2,6,BARTZ,MSG_CHAR_NAME_01
This establishes the character “BARTZ” with the name MSG_CHAR_NAME_01, which itself refers to “system_en.txt” in the “message” folder. And here we see:
MSG_CHAR_NAME_01 Bartz
So it’s a little convoluted, but this basically allows us to abstract Bartz’s name into the “BARTZ” variable. But hang on… how do they even use this in the game? Well, if you look at “story_mes_en.txt”, you’ll see a bunch of lines similar to this:
E0162_06_409_a_11 It’s because (BARTZ) isn’t here, I suppose.
Ah, so it looks like “(BARTZ)” is some kind of special text that replaces itself with “Bartz” before the game shows you a message. With that in mind, all we need to do is add the other characters to “character_default_name.csv”:
id,character_id,tag_name,mes_id_name
1,1,BARTZ,MSG_CHAR_NAME_01
2,6,BARTZ,MSG_CHAR_NAME_01
3,2,LENNA,MSG_CHAR_NAME_02
4,3,GALUF,MSG_CHAR_NAME_03
5,4,FARIS,MSG_CHAR_NAME_04
6,5,KRILE,MSG_CHAR_NAME_05
Interestingly enough, the other characters’ names are already in “system_en.txt”. Maybe they were thinking of letting you rename your entire party, then changed their mind?
MSG_CHAR_NAME_01 Bartz
MSG_CHAR_NAME_02 Lenna
MSG_CHAR_NAME_03 Galuf
MSG_CHAR_NAME_04 Faris
MSG_CHAR_NAME_05 Krile
MSG_CHAR_NAME_06 ???
Finally, we need to search through every message in the game and replace, e.g., “Lenna” with “(LENNA)”. The “message” folder makes this task super easy.
This section is already a bit technical, but here’s a few more (hopefully) interesting details for the curious:
-
Bartz has two entries, because he shows up as “???” when the game first starts. (He only gets assigned his name after rescuing Lenna.)
-
Once a character joins your party, their “default” name gets copied over into your save file. So you can’t use our program to change, say, Faris’s name after she joins.
-
We let you rename NPCs, but it’s kind of a quirk in how the game works. Basically, we make a fake “EXDEATH” default character name, even though there is no Exdeath who ever joins your party. This also means that NPC names will take effect immediately (no need to start a new game).
The Multi Tool
We wanted to make sure that it was as easy as possible to replace character names and sprites, so we made a “FF5 Multi Tool” that can handle the complexity for you. Once you install the app, you’ll see all the default names and sprites:
Use the drop-down lists to change the sprites, and the text boxes to change the names. You can mix and match all sorts of things:
Then, just click “Apply Changes” and you’re off to the races!
Custom Sprites
But wait, there’s more! What if you want to make your own sprites to use in FF5? Well, grab our custom template file, and modify each of the 16×16 placeholder sprites to serve your needs:
The instructions for how to do this are included in our project’s README file:
https://github.com/sorlok/FF5ReSprite/blob/main/README.md#custom-graphics
Conclusion
We here at WGRPG Studios grew up playing these amazing games, and releasing this tool is our way to give back to the community. The project is released under an Open Source license (MIT), so feel free to make your own improvements and additions. And until next time, happy gaming!
Share