Jump to content

FE4 Portrait Inserting Tutorial


Lamia
 Share

Recommended Posts

hi folks, I'm gonna teach you how to insert portraits into FE4

so here's a step by step guide, pay attention class


1. First thing you need is a portrait, and the size of Jugdral saga portraits are 48x64. For this tutorial I'll use a picture of my furry kitten OC, Lamia.

MI983sv.png

EDIT: Consult this post later on in this topic about a palette fix required for portraits as a very important first step:

http://serenesforest.net/forums/index.php?showtopic=43520#entry2683698


2. In order to format it correctly for insertion and to make the mouth movement accurate, this is what it needs to look like:

pGjIFrv.png

It's much the same as GBA portrait insertion, although that's automated now

Here's a guideline to where the mouth is replaced:

r125xFU.png

Follow these above examples in order to prepare it for inserting. Once you have it correctly set up, save the portrait as a .BMP image type, as a later step requires it.


3. Download this makeshift ROM file (don't worry it's not an actual game, just a placeholder thing to help portrait setup): https://drive.google.com/open?id=1sRawpsb7M0UJHDd7DjQ5Qs4MI9JTCpo1

The above ROM is set to be just the right size to fit your portrait.

Grab your favorite SNES graphics editor (YY-CHR, Tile Layer Pro, etcetera) and check for the Import Bitmap feature, choosing your portrait. The editor should be set to SNES, 4BPP.

Once it's in, make sure you actually DO have 16 colors, and that the FIRST color in the palette is the background (black in this image). Don't worry about correcting the colors in the editor, since you'll need to adjust the palette of it in the ROM itself.

If all 16 colors are registered but the background is using the wrong color (this happens to me in TLP), save it as an SMC and use YY-CHR's color-swapper tool for a quick fix.

If you have trouble getting all 16 colors in (like, one or two are missing) then convert the BMP to a 16-color format with something like a GIF editor/animator like GIF Movie Gear. It will save BMP files to the minimum amount of colors, while preserving said colors unlike MSPaint.

Once you have it set up, save your portrait as an SMC file (SNES ROM). This will make it ready to compress.


4. Speaking of the compressor, this is what you need: https://drive.google.com/open?id=1oGKii9yT5Y3weA__l-dqPEZS-frGF3wp

Contained within is a compressor for FE4 (and also FE3 but I don't have data on that) along with a readme. You don't need to have your portrait in the same folder as the program.

If you have your SMC file of your portrait ready, all you have to do is drag your portrait's ROM onto the 'old' or 'new' FE4 compressor. I think the only difference really is that the newer one uses slightly less space, but I kept both of them in the zip in case of errors and whatnot.

This will create a yourrom.BIN in the same folder as the file you dragged onto it. This BIN contains your compressed portrait data.


5. Refer to this data I stole from the FE4Binary collection:
https://drive.google.com/open?id=1yFCE-AASWIUxg0zlSO3mQhuRxFjWcZdM

This contains all of the addresses of portrait data in the (headered) ROM. The numbers counting up are the reference, which is then used in the Portrait Pointer Editor in Nightmare. 00 is Sigurd, for example.

The first address is the location of the compressed data. Sigurd's portrait is at A67B5. Now, open your portrait's BIN file in your hex editor of choice and copy all of the data. Find a portrait you want to replace (Sigurd in this guide), make sure you don't overwrite the next portrait, and replace one portrait's data with your own.

Now, save the ROM, and open it up in your emulator to check if it loaded properly.

S81E5ck.png



6. If you're successful, now's the time to change the palette. The second number in the portrait data list is the palette; Sigurd's is at CAA00. With this, all you have to do is figure out what is colored by what, and change it to the appropriate 256-color byte pair. Each single color uses 2 bytes.

I personally use GBA Color Picker in order to match the colors as close as I can. To make a certain color in the palette more visible, I recommend setting one color to FF00, which turns it into a bright red, making it way easier to detect and find out what color it needs to be. Additionally, make sure that when adding your colors, the two bytes are switched around in the ROM.


7. After toiling around with that, along with all the testing and reloading, you should slowly see your portrait come to life within the game itself.


8. Eureka! Enjoy your inserted portrait.

edBxclK.png

Edited by Lamia
Link to comment
Share on other sites

Glad to see you figured this stuff out :) I've been writing down my own suggestions and experiences as I play your hack demo, and one of them was some advice on how to get custom mugs in, but I guess that's a moot point now.

I think the compressor you used also supports FE5, if anyone was interested.

Link to comment
Share on other sites

Glad to see you figured this stuff out :) I've been writing down my own suggestions and experiences as I play your hack demo, and one of them was some advice on how to get custom mugs in, but I guess that's a moot point now.

I think the compressor you used also supports FE5, if anyone was interested.

I think "people interested" just boils down to us three. Still, I'm definitely going to have fun with a few mugs I have in the pipeline.

Link to comment
Share on other sites

  • 2 weeks later...

Yo, I've managed to get stuff inserted. The problem is that I'm getting a few transparent pixels, even when I set every colour in the palette to one colour.

Link to comment
Share on other sites

Usually the transparent color is a specific one in the palette, such as the first entry. So making every entry of the palette the same value probably wouldn't do anything, if the game works in this way.

Unless you're saying that you've made the image one solid and single color entry, and that even after inserting, you still have random transparency pixels. If that's the case, are you drawing your mugs in a different program, and then trying to import them into the SNES game? Or are you using a graphics editor intended for ROM editing, such as YY-CHR or Tile Molester? If the former, you may be getting some artifacting when you "convert" the formats of the image, resulting in stray pixels that you otherwise didn't notice.

Link to comment
Share on other sites

Usually the transparent color is a specific one in the palette, such as the first entry. So making every entry of the palette the same value probably wouldn't do anything, if the game works in this way.

Unless you're saying that you've made the image one solid and single color entry, and that even after inserting, you still have random transparency pixels. If that's the case, are you drawing your mugs in a different program, and then trying to import them into the SNES game? Or are you using a graphics editor intended for ROM editing, such as YY-CHR or Tile Molester? If the former, you may be getting some artifacting when you "convert" the formats of the image, resulting in stray pixels that you otherwise didn't notice.

I had thought initially I'd accidentally set one of my colours as transparent. I'll have a look into it, I'm sure I've probably slipped up somewhere.

Link to comment
Share on other sites

oh wait I think I know the problem, there was something I forgot to mention

in FE4, one of the colors of the palette on statscreens is used as part of the outline, in order to blend into the background better

there was a patch for this, my bad, facepalm. this will fix it

https://drive.google.com/open?id=1xPfW7mfw2D5Yjernw16f3JFZAd3c8ZlS

 

The Readme

顔グラフィックの共通パレットを解除し、15色目(0E)を使用できるようにします。

1-432氏の書き込みより

432 名前:前542 :04/10/02 16:03:55 ID:???
トラ7から聖戦へ顔グラ移植してる人へ

共通パレット(0E部分)の解除方法

9A383: F0        → D0
B8574:9F D7 55 7F  → EA EA EA EA
BD980:8D 5C 02    → EA EA EA
16CCD5:8D FC 01   → EA EA EA
16CD04:8D FC 01   → EA EA EA

これで全ての画面で共通パレットは使用されなくなり
グラフィック個別で0E部分の色指定ができるようになります。
各共通パレットのアドレスを発見された神と掲載してくださった神に感謝します。

as the above description says, those are the addresses that are changed in the patch, you can do it with the patch or just manually if you want to, either way it will have no effect on anything else in the ROM so you can use it on any of them

Edited by Lamia
Link to comment
Share on other sites

  • 1 year later...

I necropost with the permission of the staff.

First of all, thanks for this tutorial Lamia, It is very useful. I was able to insert some new faces.

Noish_zpsf8g2z8ng.png

Sigurd_zpshptxbnjc.png

Captura%20de%20pantalla%202015-08-26%201

Captura%20de%20pantalla%202015-08-26%201

Obviously, now I have to fix the palette, but every time I open the GBA color picker says the following:

Captura%20de%20pantalla%202015-08-27%202

I tried EVERYTHING: moving the program to the System 32 in the windows folder, using CDM... But I can´t.

Someone knows how I can fix this? I really like to insert the new portraits before I release my hack.

Thanks again.

Link to comment
Share on other sites

not sure how to fix that, did you try putting the dll in the actual folder of the program, put it into \windows\syswow64, or change compatibility mode?

either way, that's just my own program of choice; there are other programs you can get to modify 256-color palettes, check around romhacking.net and zophar.net and maybe other places

Edited by Lamia
Link to comment
Share on other sites

not sure how to fix that, did you try putting the dll in the actual folder of the program, put it into \windows\syswow64, or change compatibility mode?

Yes, I already tried that :p

Allright, I´ll check those pages, thanks!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
On 11/6/2017 at 5:54 PM, Fire Emblemier said:

Although I'm pretty sure that I got everything correct, I feel like I did something wrong. I tried redoing the entire process, but it still doesn't seem to work.

I think it might be getting caught on the path name, where there's a dot in your windows username...?

easily remedied if you store your rom/hacking stuff somewhere else

try that, if it doesn't work can try something else

 

On 9/10/2015 at 6:57 AM, hanhnn said:

I have tried this tutorial

The Step 6 and Step 7 you have to do it manually, right? It takes many tries and reloads to get the result.

have to add something to this... a while ago I managed to figure out a potentially easy way to handle it

if you use a GIF editor or something more advanced than MSPaint to save your portrait in the final phase, saving it in 256-color BMP: the order of the colors in the palette list would be the same order that tile editors display them in, which in turn is the same order that the palette data in the ROM would go

uhh hopefully that makes sense

Edited by Lamia
Link to comment
Share on other sites

  • 1 year later...
Quote

The first address is the location of the compressed data. Sigurd's portrait is at A67B5. Now, open your portrait's BIN file in your hex editor of choice and copy all of the data. Find a portrait you want to replace (Sigurd in this guide), make sure you don't overwrite the next portrait, and replace one portrait's data with your own.

This is the first time I'm using the hex editor so I need some help with this step (I'm trying to change Sigurd's portrait). I'm not sure where I'm supposed to paste all the data I copy from the bin folder. Thanks in advance.

Edited by TAS20XX
Link to comment
Share on other sites

On ‎8‎/‎6‎/‎2019 at 4:14 PM, TAS20XX said:

This is the first time I'm using the hex editor so I need some help with this step (I'm trying to change Sigurd's portrait). I'm not sure where I'm supposed to paste all the data I copy from the bin folder. Thanks in advance.

In HxD, goto that address A67B5 and paste what you copied from the BIN file. using Paste Write, not Paste Insert.

Edited by lightcosmo
Link to comment
Share on other sites

  • 2 months later...
On 11/8/2017 at 10:55 PM, Lamia said:

if you use a GIF editor or something more advanced than MSPaint to save your portrait in the final phase, saving it in 256-color BMP: the order of the colors in the palette list would be the same order that tile editors display them in, which in turn is the same order that the palette data in the ROM would go

Could you maybe give more detail what you meant by this exactly. Thanks in advance.

Link to comment
Share on other sites

  • 2 weeks later...
On 8/5/2020 at 3:14 PM, Mustard said:

Could you maybe give more detail what you meant by this exactly. Thanks in advance.

if you use a GIF editor (like I use GIF movie gear) and view the palette, the data for the inserted BMP into say, tile layer pro will have the same palette order. it's just a convenience thing if you manage to get a hang of it

Link to comment
Share on other sites

For some reason the game crashes whenever i change anything at $0A8200. I can't change finn's gen 1 portrait because of this. I have no idea why this is happening can you please help if you can. Another thing is sometimes a portrait will appear entirely in black.

 

 

Edited by Mustard
Link to comment
Share on other sites

  • 2 months later...

Whenever I insert certain character portraits, it completely messes up another portrait, seemingly the character with portrait data right below the one being inserted. I think the reason is that the character I'm trying to replace's portrait data is overwriting the next character's portrait data. For example, whenever I change Scáthach's portrait, it causes Febail's to vanish or just copy someone else's portrait with an incorrect palette (Febail's portrait data is right below Scáthach's). Also, I know for a fact that there is nothing wrong with the .bin files I'm inserting into the game. Can I fix this? (Don't know if this helps or not but the characters that I've tried that aren't working properly are Jamke, Azelle, Lex, Arthur, Scáthach, Febail, Ced, Lester, and Coirpre. For some reason all the female characters work and most of the male characters in gen 2 don't.)

 

Capture50.PNG

Capture51.PNG

Edited by TAS 20XX
Link to comment
Share on other sites

  • 3 weeks later...
On 11/3/2020 at 8:38 PM, TAS 20XX said:

Whenever I insert certain character portraits, it completely messes up another portrait, seemingly the character with portrait data right below the one being inserted. I think the reason is that the character I'm trying to replace's portrait data is overwriting the next character's portrait data. For example, whenever I change Scáthach's portrait, it causes Febail's to vanish or just copy someone else's portrait with an incorrect palette (Febail's portrait data is right below Scáthach's). Also, I know for a fact that there is nothing wrong with the .bin files I'm inserting into the game. Can I fix this? (Don't know if this helps or not but the characters that I've tried that aren't working properly are Jamke, Azelle, Lex, Arthur, Scáthach, Febail, Ced, Lester, and Coirpre. For some reason all the female characters work and most of the male characters in gen 2 don't.)

 

Capture50.PNG

Capture51.PNG

Very late but how big (data wise) is the portrait your trying to insert? Compare it with the size of the original and that'll give you your answer.

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...