This tutorial assumes that you have a general knowledge of how to use EA and make buildfiles with it
Inserting A Palette
Inserting a character/generic class palette this can be done by using #incbin on a compressed palette hex dump
Insert with compressed hex dump
The next step is to use marcos to set your to the palette table
Here is the Definitions File
// Palette Definitions.txt
// Character & Gereric Class Palette Definitions File
#define PaletteTable 0x7FC004
#define PaletteTable 0xFD8004
#define PaletteTable 0xEF8004
#define BattleSpriteTable 0x6A0008
#define BattleSpriteTable 0xE00008
#define BattleSpriteTable 0xC00008
#define setPalette(index, palette) "PUSH; ORG (PaletteTable + index * 0x10); POIN palette; POP"
//set the generic palette to a class animation
#define setGenericPalette(index, genpal) "PUSH; ORG ((BattleSpriteTable - 0x4) + (index * 0x20)); POIN genpal; POP"
//For FE8 palette Association
#define CharClassTable $95E0A4
#define CharPaletteTable $95EEA4
//Set the palettes for the classes that with the same label in setCharPalette
#define setCharPalette(char_id, trainee, base1, base2, promo1, promo2, promo3, promo4) "PUSH; ORG (CharPaletteTable + (char_id -1) * 7); BYTE trainee base1 base2; BYTE promo1 promo2 promo3 promo4; POP"
//Set the classes for a character that will have character palettes, if in a class outside of this list, the generic palette will be used
#define setCharClass(char_id, trainee, base1, base2, promo1, promo2, promo3, promo4) "PUSH; ORG (CharClassTable + (char_id - 1) * 7); BYTE trainee base1 base2; BYTE promo1 promo2 promo3 promo4; POP"
Setting a Generic Palette for a class animation
~ To be added later ~
Setting a Character Palette
After inserting the palette as described above the next thing to do is put a pointer to the palette in the character palette table. This can be done with the macro
PersonPalette: //label to mark where the palette is inserted
#incbin "charpalette1.dmp" //insert palette
setPalette(0x1, PersonPalette) //put the pointer to PersonPalette into the palette table at entry 0x1
please note that the "index" is the number of the entry in the palette table reference. This number is used to tell the game which palette to use.
The next part is slightly different if you're using FE8
For FE7 and FE6 the character palette is set in the character data table
Each character gets 2 palettes, one for promoted classes and the other for unpromoted classes. If you change these numbers you change which palette is being used.
FE8 uses a different system for character palettes than the other two games. Each character gets 7 classes for which to use specific palettes.
To set a character to have a character palette with a class, you set the class in one table and the palette in the other table at the same location. For example, look at the image above; Seth has paladin for his "first promotion" class and his paladin character palette for his "first promotion" palette. Through this you can see that you set the class and its matching palette for it to display in the game.
setCharClass are the buildfile versions of these tables. If you were to translate the image above into these macros it would be
//Seth's Palette Association Info
setCharClass(0x2, 0x0, 0x0, 0x0, 0x07, 0x0, 0x0, 0x0)
setCharPalette(0x2, 0x0, 0x0, 0x0, 0x3C, 0x0, 0x0, 0x0)
Please note that the generic palette for the class will be used if either of these conditions are met
- if the palette for the class is set to 0x0
- if the class the character is in is not one of the classes in the table