Jump to content

Inserting Custom Battle Frames


shadowofchaos
 Share

Recommended Posts

Needed Programs:

*GBA Graphics Editor (Look in Nintenlord's Hacking Utilities)

*Wingrit (Get it from ROMHacking.net. Click here.)

Credits:

Ryrumeli - For teaching me in the first place. And helping me understand.

FlyingAce - For getting the FE8 offsets.

FE7 Battle Frame Offsets:

Image starts at 0x1D88B4. Palette starts at 0x1D8FA0. TSA is at 0x1D8C34.

(Name Frames have a width of 6, Weapon Name frames have a width of 7)

Enemy Name Frame: 1D8ABC

Enemy Weapon Name Frame: 1D8B0C

Player Name Frame: 1D8B78

Player Weapon Name Frame: 1D8BC8

FE8 Battle Frame Offsets:

Image starts at 0x801C14. Palette starts at 0x802558. TSA is at 0x80210C.

(Name Frames have a width of 6, Weapon Name frames have a width of 7)

Enemy Name Frame: 801F7C

Enemy Weapon Name Frame: 801FF4

Player Name Frame: 802044

Player Weapon Name Frame: 8020BC

Note: FE8 has a more generous tile limit than FE7.

Yep, you know those frames you see in battle right?

These look familiar?

FE7Frame.pngFE8Frame.png

Want to change these?

First, we need designs to replace them with.

For the purposes of this tutorial, we'll be using the "Fire Emblem: Dream of Five" battle frame design by AstraLunaSol for FE7 and "Fire Emblem 4: Rebirth" battle frame design by Lord Glenn for FE8.

They gave me permission to use them for the tutorial.

FE7 "FE:DoF":

DoFTemplate.png

FE8 "FE4R":

FE4RBattleTemp-n.png

Also, be prepared to hear a lot about "tile limits". For this tutorial, a tile is an 8x8 pixel image that is used to construct your battle frame by flipping it horizontally, vertically, or both. That's what the "TSA" does, as well as say what palette to use.

Still prepared to go through this pain? Then open up your ROM in GBA Graphics Editor to get started. Enter the image offset.

Step One for the Entire Tutorial:

StartingOut.png

"The hell is this?"

Patience... you'll need A LOT for this. I'm 85% sure that the first time you follow this tutorial, you won't get it to work. I sure didn't.

Step 2 is the palette:

Slightly Big Image:

Step2.png

"Still doesn't look that familiar"

Step 3, enter the TSA offset and check the "Use TSA":

FE7:

FE7Step3.png

FE8:

FE8Step3.png

"If I squint at it... sorta looks familiar"

Step 4, modify the Width and Height Respectively:

FE7:

FE7Size.png

FE8:

FE8Size.png

FE8 has an extra one. I'm assuming it's the Promotion one because of the design.

End Result:

"Save as bitmap" into an image for your respective game. You should get one of these. This is the goal of our "first step".

FE7FrameTSA.pngFE8FrameTSA.png

Okay, we got those images now. But remember before you clicked "Use TSA"? It was some screwed up image?

Well, that's what we need to make. Those are the tiles that the TSA uses.

You can tile it yourself by taking each UNIQUE tile in your image and put it into another image. You'd best use a grid for this process. I don't know how to do this in other programs, but in GIMP, it's under "Preferences" and "Default Grid". Change it to 8x8 and click show grid.

However, I don't want to do that. I can get wingrit to do it for me.

This is where it gets messy.

Anyways, crop your template images into one side. And we need to make the palette.

"Step Two" for the entire tutorial:

I will ONLY be going from the FE7 portion for now, since the process is the same. I'll be showing progress on the FE8 side occasionally, but not step by step like the FE7 one.

Anyways, this is what you should end up with.

One side of the template.

DoFTemplateCropped.pngFE4RBattleTempCropped.png

I don't know where else to do this but GIMP, but the bitmaps you saved earlier, you need to view their palette.

On GIMP, you view the color map. Basically, we have to make the palette for this side, and all of the other palletes for Enemy, NPC, and the Battle Arena Gray/Purple.

Here's the thing, DO NOT touch the first 4 colors. Basically copy them, because those are the Text colors. You can if you want, but for the purposes of this tutorial, I won't.

FE7FramePalette.png

If it doesn't look like that, try adjusting the size of the "Colormap" window. (If you don't have one, go to "Windows", "Dockable Dialogs", then "colormap".

In GIMP, for YOUR image, go to Image, then mode, then indexed. "Generate optimum palette", then "Convert". You should have something in your colormap window now.

Colormap.png

Anyways, go on the original image/bitmap you got. Click on the first color:

1stColor.png

Copy that.

Double click on your color in the toolbox. Paste it. Press Enter/OK.

Toolbox.png

Go on your cropped image.

Click the plus button.

Plus.png

And you should get:

NewColor.png

Repeat for the other three colors.

FourColors.png

IMPORTANT. You need to reorder them. The first color should be the transparency color you have. Second should be the purple, then white, then the brown-black text color.

To do this in GIMP, go to Colors, map, Rearrange colormap. Only the first 4 colors are important. The rest can be in any order. However, generally, to make it easier on you, order them in a logical manner. Like from light to dark, or vice versa.

After, you're done, it should look something like this.

FourColors.png

IMPORTANT. MAKE SURE YOU HAVE 16 COLORS. No, not less or more. EXACTLY 16 colors. If you have any blank, press the plus on the colormap on ANY OTHER COLOR OTHER THAN THE TRANSPARENCY COLOR. Should be safer to add a completely different extra color though.

Fixedpalette.png

See the extra light blue at the end?

Anyways, now, what you need to do is make a palette like the original image (only the first 4 rows, not that crazy random colors part... XD)

To do this, click on each color respectively and the plus button to copy the color at the end of the colormap. It's easier done than said. End result should be soomething like this.

FourPalettes.png

And edit them as you would any palettes. IMPORTANT, DO NOT ADD MORE COLORS THAN NEEDED. YOU CANNOT DELETE COLORS ON THE COLORMAP IN GIMP EXCEPT WITH THE UNDO BUTTON.

There's actually a way, but it's even more complicated than this tutorial. Just... don't bother.

You will only be able to see the edits on the first palette on the image, so I suggest you save each as a separate image, and then the "Master Image" that you will use has all the palettes in it.

DoFTemplateBlue.pngDoFTemplateRed.pngDoFTemplateGreen.pngDoFTemplateGray.png

If you look at the "Master image" in GIMP:

DoFTemplateMaster.png

You will see it has all the palettes.

DoFTemplateMasterColormap.png

This is what we're looking for.

Afterwards, be sure to crop the inside of the name box like the "TSA Image we saw".

NameSpace.png

It's a 48 x 16 space inside the box. Be sure to use grids to do it right.

Remove.png

Do the same with where the weapon name would go. Yes, I know the TSA image are uneven for the red and blue. Just trust me.

Follow exactly where I go with it.

RemoveWeapon.png

Final "Master Image":

DoFTemplateMaster-1.png

"Step Three" for the entire tutorial:

Open up Wingrit:

Wingrit.png

Open up the palette viewer and make sure it's right.

WingritPalette.png

If you're good... go find "GBA Export"

GBAExport.png

Copy my options:

WingritOptions.png

Mainly, check "Map" in the box. Make sure reduce, pal, and flips are checked.

Under Image, copy my options. Make sure the bpp is "4". Under Meta/Obj, make sure it's sqr. That's VERY important. On Pal, change the num to 64. That's how many colors you have :p

On File, change it to ".bin" and uncheck the h file.

Press OK.

ExportSucceeded.png

If you have any other message than this, I can't help you. Seriously.

Anyways, you should have 3 new .bin files wherever you opened your image.

NewFiles.png

Delete the *filename*.map.bin. It'll only screw you up if you mess with it.

(Note: I've switched to the DoF ROM, considering I'm actually DOING the custom battle frame edit while I'm making this tutorial)

In the GBA Graphics editor that is still open. Click "Load Raw". Find the *Filename*.img.bin.

If you can't see it, click on the file type and look for "Binary Files" instead of GBA ROMs.

LoadRaw.png

OffsetChanged.png

As for the options, uncheck the "Abort if new graphics are bigger than old" and check "Repoint Graphics pointers".

Change the offset to free space, such as for this example, I expanded the ROM and I know there's at least 0x5000 bytes of free space at 0x1032FC8.

Press OK, and save. SAVE THAT OFFSET you put the graphics at.

Open up the *filename*.pal.bin in a hex editor. Open up your ROM in the same hex editor as well.

Copy it the stuff inside that, and paste it (WRITE, not INSERT. If it changes the file size, not the right kind of paste) on the offset for the palette in the ROM. For FE7, it would be: 0x1D8FA0

Once you're done, open it up in GBA Graphics editor again, this time don't check the "Use TSA".

You SHOULD get something like this:

TileImportSuccess.png

Congratulations if you got this far. The actual hard part is done. Now comes the TEDIOUS part.

Edited by shadowofchaos
Link to comment
Share on other sites

"Step Four" for the entire tutorial:

Open up another GBA Graphics Editor with a clean ROM of the one you're editing.

Put them side by side.

As soon as you enter the TSA and the offset on the ROM you're editing, it will look all wierd. That's normal.

Anyways, your goal is to make it look like the original. The "Tile Index" is the tile you're editing. "Graphics" is the tile number.

Flip checkboxes, do what they do. Palette is the Palette of the tile. "0" is blue, "1" is red. Typically for the battle screen, that's all you use.

TSAEditing.png

After probably at least an hour...

Note, also DO NOT change the number for tile index 15-20, 30-35, 114-119, and 129-134. Those are RESERVED for the name tiles.

Same goes for Tile index 217-223, 232-238, 320-326, and 336-342. Those are RESERVED for the weapon name tiles.

DO NOT, I repeat, DO NOT CHANGE THEM. If there are tiles there, instead of the transparancy tile color (except with a different tile number) THEN YOU WENT OVER THE TILE LIMIT.

If you do, crap like this will happen to you:

Messedupscreen-1.png

ScrewedupFE7custombattleframe.png

That was back when I attempted to insert this (by VincentASM):

CustomBattleframewhatdoesntfit.png

If that's the case, you need to reduce the amount of tiles generated by editing your graphics.

Reminder: FE8 has a more generous tile limit than FE7.

If you were curious how I inserted it, I reduced the "quality" of it drastically. No more curls, no more shading as well. Take a look at the HP box. No more patterns.

1235-FireEmblemU-WithCustomBattleFr.png

To make sure your tiles are accurate. You can take advantage of the "Save as bitmap" option. You can then open it in GIMP, show the grid, zoom in, and compare it with your "Master Image".

Don't be afraid of testing it while you're still working on it. For example:

Test1.png

I think that's significant progress. Time for a test:

ProgressTSA50.png

Left side seems fine. (the names we'll fix later)

To make it easier on yourself when working with the blue side, don't hesitate to change the width to 16.

EasierBluepart.png

And you're done! :D

Doneorareyou.png

.... OR ARE YOU?

"Final Step" for the entire tutorial:

Doneorareyouframe.png

Remember the "old" Master image you cut from?

DoFTemplateMaster.png

Yeah, take those and make tiles out of them.

Recall FE7 had this on the top of the page:

(Name Frames have a width of 6, Weapon Name frames have a width of 7)

Enemy Name Frame: 1D8ABC

Enemy Weapon Name Frame: 1D8B0C

Player Name Frame: 1D8B78

Player Weapon Name Frame: 1D8BC8

Go to the Player name offset "1D8B78". Proper width, etc.

Same palette offset as the frame: 1D8FA0

Save as bitmap. I don't care if it looks all weird. Open it in GIMP. Show your Grids. Remember those tiles I told you not to touch?

Note, also DO NOT change the number for tile index 15-20, 30-35, 114-119, and 129-134. Those are RESERVED for the name tiles.

Same goes for Tile index 217-223, 232-238, 320-326, and 336-342. Those are RESERVED for the weapon name tiles.

That's what these are.

To make it simpler, I'll show you a guide:

This is your image:

NameGuide.png

This is how it's arranged:

NameGuide2.png

So, as a result, you must edit that image you saved like this:

NameGuideFinal.png

Name.png

"Import bitmap". Uncheck "Import Palette" and import the small image you just edited. And you'd be safer to Repoint it into free space.

When I look in the Hex Editor (HxD) I see that the tiles image only takes up a small amount of space, and that there's space again at 0x10331A0

So basically, I would insert the images by "import a bitmap" and repoint them to free space. Then I look at how much space that took up, and look where it ends. Then repoint the next graphic there, etc.

WRITE THESE ALL DOWN, in case you would need to change anything.

The other three work the same way.

I just listed them:

Player Name: 10331A0

Enemy Name: 1033230

DoFnamesFixed.png

Keep on Going...

(Please note, the red and blue weapon tiles are "different" as in they get shifted differently. BE SURE TO PAY ATTENTION which side you're inserting on when copying your "tiles")

Enemy Weapon Name: 10332C0

Player Weapon Name: 1033590

AAAAND....

YAY :D

FINISHED.png

Btw, if you get THIS during the Enemy Phase:

WTFEnemyAttacks.png

That means your tiles don't take ENOUGH space in memory.

To fix this, take the original "Tiles image":

TilesSize.png

And make your Tiles just as big.

TilesSize2.png

Since it's bigger, it'll screw up other stuff... so repoint it... again.

NEW Tile offset: 1033390

Disclaimer: There will be SUPER LIMITED SUPPORT FOR THIS. You are to assume that you are ON YOUR OWN if you can't get it to work. Maybe some little help here and there, but you should ASSUME that people won't be able to help you.

A video to show this isn't all just pictures. Battle frame is actually in game.

Also, Jubby was able to refine the final result in his thread:

Battle Frames Part 2 by Jubby

AWESOMESUCCESS-1.png

Edited by shadowofchaos
Link to comment
Share on other sites

  • 2 years later...
  • 3 years later...

i can't understand the step 2

:(

Disclaimer: There will be SUPER LIMITED SUPPORT FOR THIS. You are to assume that you are ON YOUR OWN if you can't get it to work. Maybe some little help here and there, but you should ASSUME that people won't be able to help you.

Edited by shadowofchaos
Link to comment
Share on other sites

Well, I mean, assuming that he won't be helped doesn't nor shouldn't stop him from asking, no?

And logically best place would be to either ask here or in the questions sub-forum, if he was dead set on keeping it Serenes-bound.

Pointing it out isn't necessary.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...