Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Fire Emblem Ultimate Tutorial.doc
Скачиваний:
1
Добавлен:
01.07.2025
Размер:
7.86 Mб
Скачать

Chapter 42: Portrait Insertion with fEditor Adv

This will be quick and painless, assuming you’ve done everything right so far.

Open up FEditor Adv. Go to Tools-> Portrait Editor.

At the top we see the formatted portrait with its frames. In this case, it’s the ‘dummy’ portrait. Below that we see what it actually looks like. The input index is which portrait you are viewing. You can type in a value from a portrait list to go right to a portrait—for example, the portrait says Lyn’s default portrait is 0x16, so we type in 16 and go to hers.

The ‘max index’ is just how many portrait slots there are.

‘Eyes always closed’ makes it so that the portrait’s eyes start off as closed. You can have this same effect by just using the closed eye frames for the open eye frames, too, if you wanted.

I wouldn’t mess with the palette editor (the colorful boxes).

‘Load from File…’ loads a portrait (I think only BMPs and PNGs work). ‘Revert’ will undo a portrait load. ‘Save’ saves it. ‘Save to file…’ saves a portrait to a file. However, when you save it, you have to add the extension yourself (so to save Lyn’s portrait as a png, type “Lyn.png” or something). ‘Quit’ is kinda obvious…

What we’re going to do is hit “Load from File” to load your formatted 128x112 16-color portrait with proper formatting and saved as a PNG. (Tip: make sure it’s everything I just said, and if your insertion doesn’t work, go back and make sure it’s everything I said again.) If it’s done right, it should show up in place of the current portrait.

Hit “save” to save. Then hit “quit” to exit out of the portrait editor.

Now go File-> Save to save your ROM per usual. Portraits almost never cause a game-breaking crash so I wouldn’t worry about backing up before portrait insertion (as opposed to bigger less foolproof stuff like animation insertion, graphic insertion, or event insertion).

Test it out in VBA and hopefully it looks nice! Enjoy your new portrait! ^_^

Chapter 43: Locating Palettes

Wow, we’re already on chapter 43. I’ve only been working on this for a couple of days...

Well, it’s about time we learn how to find palettes. First of all, re-read the definition in like, the first chapter. Once that’s done, open up your hex editor of choice, mine being HxD, and open up VBA.

Play the game until the palette who you want to find in your hex editor shows up. I’m going to be really simplistic and edit the title screen palette of FE7.

Alright. We’re going to look for the bluish/purplish background’s palette. Go to Tools-> Palette Viewer in VBA.

The palette we want to edit is the one at the bottom left. Palettes are in rows, so it is the bottom row in the “Background” area of palettes. By clicking on a color, we can see it’s Address (where it is in the RAM—RAM is memory, a temporary place for storing data), it’s RGB (Red, Green, and Blue values used to make a color), and value in hex.

The RGB values are on a 0-31 scale. Normally people use a 0-255 scale, but the GBA is sort of limited. That being said, just multiple each value by 8 to get the RGB in “standard terms”. So for the color I have selected in the image above (a transparent green color), I multiply the RGB (16, 20, 16) by 8 to get (128,160,128). Keep this in mind for later.

The value is the hex value of the color. The game uses little endian, so if we want to know its value, we have to reverse the order of the bytes first. So 0x4290 becomes 9042. That’s only one color though, and we can’t find a palette by just one color. So get 3 more colors, so we have the first 4 colors used.

9042 987F 567F 147F

Sometimes doing more than the first 4 colors can be dangerous because of compressed palettes. Compression makes it so that you can’t just search all the colors in a row, because there are other bytes (usually 00s) in between.

Now use a find command (typically ctrl+F) in your hex editor and search for those bytes. (Tip: starting a search from offset ‘0’ is the best because it searches the whole ROM. If you start a search at some random offset, you can often times only search either forward and backward, and will have to do multiple searches, and waste time.)

With that ready, do a search. My hex editor automatically takes me to where it finds those bytes.

This palette is uncompressed. How do I know? Here are some easy tricks to recognize LZ77 compression. Of course, when you don’t recognize it, that means that it’s not there.

Recognizing LZ77 Compression

1) Standard LZ77 compression starts with a ‘10’.

2) After that it has two bytes saying the size of the data. You’ll see common sizes and recognize them quickly through experience.

3) A ‘00’ byte every 4 bytes. (This does not hold true all the time, but usually at the beginning of LZ77 compressed data, you’ll see this pattern.)

That’s all I have, actually, but if #1 and 2 don’t tell you almost instantly, then #3 won’t be too useful either (but it’s a good check to make sure).

Anyway, this makes it easy on us. We’ve now located the palette, and even if it were compressed, we still could have located it because we used a safe method.

One last thing. Sometimes there are multiple instances of a palette. Use a “find next” feature (or just do ctrl+f again from where you are) and you may find another instance of the same palette. There’s only two ways to know which palette is which if the whole palette is the exact same. You can A) just edit both and see what does what or B) debug. The latter is probably not within your skills, especially if you’re reading this tutorial to learn how to edit palettes. (No offense.)

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]