[FE8] Creating and Inserting Battle Screens

Welcome to my battle screen tutorial. Here I will teach you both how to make battle screens that are insertable and how to actually insert them into your ROM.

Things you will need:
FEBuilder
Usenti

For Buildfile users:
A hex editor (I reccomend HxD)

PART 1
Making your battle screen

First, you should know the standard layout for battle screens. It looks something like this.

Blank Battle Screen

The blue plates are where the character names will go. The red plates are where the item names will go. The green plates are where the HP bars will go, and the purple plates are where the ATK/HIT/CRIT will go. You may notice the image is 256px wide, but the GBA screen is only 240px wide - there are two reasons for the extra length (highlighted here in yellow). The first is that it will become visible during screenshake. The second is that there is also a solo version of the battle screen where the bottom right area is centered, and thus visible.

Of most significance are the name and item name plates. This is because these both use their own unique tilesheet. What is a tilesheet? Well, it’s a collection of tiles. The GBA renders images using 8x8 tiles, and our tilesheets will have to contain every unique tile we use for our battle screen. This limits the amount of unique tiles we can use, of course, so you will want to try and reuse tiles while creating your screen. I highly recommend using usenti and enabling the tile grid in the view menu (and setting it to 8x8 tiles).

Now, when rendering our image, we will use TSA, or Tile to Screen Arrangement. More on this later, but the important bit is that TSA can flip images horizontally or vertically. This means every tile you use is actually 4 tiles - the original tile, the horizontally flipped version, the vertical flip, and the horizontal + vertical flip. In other words, if we take a tile and modify it in one of those 4 ways, we won’t need to add it to the tilesheet again.

As stated previously, the name and item plates use their own seperate tilesheets, so that just leaves our main tilesheet. This means that this sheet will have to contain every other tile that is used in the battle screen. So how many tiles do you have to work with? 68 tiles, including one tile for blank space. I highly recommend keeping track of how many tiles you are using and trying to work with patterns that allow you to reuse tiles.

The second thing to remember is the palette. You can use 16 colors as with most palettes. However, there are some things to keep in mind. The 0th color is, as with all palettes, transparent. The 1th - 3th colors are used for the item and character name text. Typically, they are gray, white and dark brown (outline). You can change them if you would like, but keep in mind they will also be used for the text. Lastly, the faction palettes. You will want your image to have 4 consecutive palettes, or 64 colors. Each palette will be used for one of the 4 factions. In order, they are ally (blue), enemy (red), NPC (green) and gray. You can use 16 color mode on usenti to preview how your battle screen will look with each palette.

PART 2
Making your tilesheets

First, the item and name plates. These are the simplest since they have their own sheets and are 1 to 1. Refer to the previous image of the battle screen layout for the positioning of the tiles. You will copy each tile to a long sheet one tile high (or 8px). Start with the topleftmost tile, then the bottomleftmost tile, then the next column, and so on. The item plates will be 16px (or 2 tiles) longer since they are 2 tiles larger.

Now, the more difficult main tilesheet. Start with a blank 136x32 image. Leave the topleftmost tile blank. Then, take a copy of your battle screen, preferably with the name and item plate areas removed. For each unique tile (remember that flipping is NOT unique), copy it to the tilesheet. Continue until you have every unique tile. Don’t worry if you might have forgotten one - you can always add it in later.

PART 3
Constructing your battle screen with TSA

Now that we have our tilesheets, we will have to tell the game how to consturct them back into our battle screen. Open FEBuilder and head to the battle screen editor. From there you can import images for each of the tilesheets. Go ahead and do so for your tilesheets. You may notice that the preview looks like a buggy mess aside from the name and item plates. Take your empty tile and erase all the mess around the plates. To your left is the tile selector. You may notice every tile from your main sheet has its own row with 8 columns. The first 4 will be each of the rotations as mentioned previously. The second will be the same thing but using the opposite side’s palette.

Go ahead and use the GUI to reconstruct your battle screen. Make sure not to overwrite the name and item plates or else the text won’t display properly! Once you’re done, simply write to ROM and boom! You now have a functioning battle screen.

During this part you may notice that you forgot to add some tiles to your main sheet. Fret not! Simply add them in and reimport the main sheet. Don’t worry about messing up your progress - as long as you don’t move your old tiles around, it will remain the same.

If you remember previously I also mentioned a solo version of the battle screen. Head to the patch menu in FEBuilder and search for “TSA” and you should find the editor. You may notice the image has a hole in the middle. This is where the item name will go. As before, don’t overwrite it, or the text won’t display properly!

If you are using FEBuilder, congratulations! You now have inserted your new battlescreen.
If you are using Buildfiles, we’ve got a couple extra steps ahead.

PART 4
Creating an EA installer

For our installer, we will need 3 things - the tilesheets, the palette and the TSA. For the first 2, we should already have them from creating the battle screen in the first place. The tilesheets need to be compressed, so don’t forget to use --lz77, or to run Png2Dmp with compression, depending on your method. The palette, as stated before, needs to have all 4 faction palettes included. This should bring the total length (in bytes) of the palette dmp up to 128.

That just leaves our TSA. There are 6 TSAs used for the battle screen - TSAs 1 to 5 are used on the regular screen, and the solo screen has an extra TSA. Below I will list the locations of the TSA pointers and the TSA’s lengths (in decimal). After saving your ROM with the battle screen, open it in your hex editor. Go to each pointer’s address, grab the pointer there, depointerize it, and go to the address. From there, copy a block with the specified length to a new file and save. You will do this 6 times (once for each TSA).

Now that you have all the pieces, simply include them with labels and point to them at the pointer locations in the list below. Don’t forget to ALIGN 4 before your labels.

Feel free to reference my own installer here.

// Main Tiles - pointer at 51F68
// Left Name Tiles - pointer at 51FC8
// Right Name Tiles - pointer at 52088
// Left Weapon Tiles - pointer at 52028
// Right Weapon Tiles - pointer at 52164

// Palette - pointer at 52178

// TSA1 - pointer at 51CBC // length 180
// TSA2 - pointer at 51CC0 // length 540
// TSA3 - pointer at 51378 // length 210
// TSA4 - pointer at 51380 // length 224
// TSA5 - pointer at 52170 // length 80
// TSA Single - pointer at 5141C // length 224

And that’s all! Feel free to leave any questions or comments below.

20 Likes

Very nice! But Pik, might be a good idea to link to your own installer, so that people have a visual example of the tilesheets, how you organized inserting the TSA, etc. Might give people a handy checklist to make sure they have everything they need, since there are a few different parts here

4 Likes

Late as heck but yes sure

2 Likes

I’m a buildfile user. I got all the way through the “build the screen out of the tiles in FEB” step, but now the text in-game is glitchy.
loltext
(don’t mind the HP bars not being aligned properly; I’ll fix that later)

Did I accidentally do this? Is there somewhere else I should be building the name/item plates than the main editor? I don’t think it’s an issue of having too many tiles, because this screen uses way fewer tiles than the vanilla FE8 one. There’s got to be something obvious I’m missing.

2 Likes

Yes, looks like you overwrote them. You can correct it manually using the same editor, you want to assemble the plates in the same tile order you used when making the sheets. For example, this is my right item plate sheet
RightItem
And here it is on my battle screen
image
Note the order where every 2 tiles form a column
Even identical tiles need to be duplicated on the plate sheets since they are technically unique (since they dictate where text is going to be drawn)

1 Like

Okay, I think I’m on the cusp of getting it right.
loltext2

Focusing on getting the name plate right, since I’m pretty sure the item plate is just a matter of using mirrored tiles. I broke the name plate into constituent tiles with each one being unique, giving me this tile sheet:
small battle screen nameplate4
But FEB said it was too large and the image has to be 112×8, so I figured I could cut it down by re-using the bottom and side tiles:
small battle screen nameplate2
But that clearly wasn’t the case because it gave me that glitchy text.

Okay, a while later of having the “compose post” thingy open in the background and I’ve figured it out. I was using an 8×3 area for the name plate whereas FEB expected 7×2. I sort of reverse engineered my problem by just using the “import entire image” button and seeing how FEB formatted things, then mimicking that.
fixedtext
Thanks for your help!

3 Likes

Yeah, the plate sizes are set to fit the example image I posted earlier. Glad to see you got it working!

Is it possible to turn horizontal plates vertical? Like moving the HP from the bottom to the sides of the screen in between the name and stats

Possible, of course. Has it been done already, no. You’ll have to look into modifying the relevant ASM that draws the HP bars to the screen.

1 Like

Got it, any ideas where to start for anything ASM related?

This thread is the best place to start learning

1 Like

You Da Man!