øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=169.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2e19.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=169.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2e19.html.zxÎig^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿȰ,0ûZOKtext/htmlISO-8859-1gzip@øÕûZÿÿÿÿÿÿÿÿTue, 10 Mar 2020 10:36:22 GMT0ó°° ®0®P®€§²ð®Îig^YûZ Print Page - Appearance/Sprite ID offset

Board of Slick

Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Phoenix on December 21, 2007, 03:28:26 AM

Title: Appearance/Sprite ID offset
Post by: Phoenix on December 21, 2007, 03:28:26 AM
Thanks to JCE3000GT for pointing this forum out to me. It'll be a big help, and hopefully I can share some of the information I (will) have.

Currently, I'm searching for what I call the Appearance/Sprite ID offset location. This controls the character class, portrait, magic list within the menu, and maybe a few other things. My goal is creating a character from scratch: I know how to change the initial character name/statistics/equipment/magic, battle sprites, portrait, overworld character sprites, battle commands, magic learning levels, and weapon/armor equipability. However, I need to change the Appearance/Sprite/Class ID to enable choosing magic from the  menu (otherwise you just get a "Cannot Use" message). Does anyone know where this might be located, and it's format if possible?

The other thing I need to decode is the level-up data. I saw that it is located at 7B700, but from my first pass over I couldn't figure out the format. I haven't really played around with it to make sense out of it yet, but if anybody has that information as well, I'd greatly appreciate it.
Title: Re: Appearance/Sprite ID offset
Post by: JCE3000GT on December 21, 2007, 12:34:40 PM
From my doc.

Quote from: Character Data
Consists of 32 bytes:
00: Name, Battle Commands, Equip able hands.
01: Appearance, Unknown
02: Level
03-06: Status Ailments
07-08: Current HP
09-10: Maximum HP
11-12: Current MP
13-14: Maximum MP
15: Strength
16: Agility
17: Vitality
18: Wisdom
19: Will
20-22: Unknown
23-25: Experience
26-28: Unknown
29-31: Experience for next level

Level up data:
Quote
7B700 (address with header):
table of offsets of level data by character id, starting with id 01:
id Name
-- ------
01 Cecil B4FB
02 Kain B62F
03 Rydia B790
04 Tellah B892
05 Edward B9DF
06 Rosa BB13
07 Yang BC47
08 Palom BD7B
09 Porom BEAF
0A Tellah B892
0B Cecil C010
0C Tellah B892
0D Yang BC47
0E Cid C112
0F Kain B62F
10 Rosa BB13
11 Rydia B790
12 Edge C1FB
13 FuSoYa C267
14 Kain B62F
These are offsets into page 0F. To derive a ROM address from this, add the table entry (remembering to reverse the order of the bytes as usual) to hex 70000, plus hex 200 for the header. You then get the address of the level-up data for level 1 going up to level 2. However, characters don't have level-up data stored for levels they have already equalled or surpassed when you get them; for example, Cecil as a Dark Knight lacks level-up data for levels 1-9 since he starts out at level 10 at the beginning of the game. In all cases the game multiplies the character's old level - 1 (IIRC) by 5 and adds it to this address to get the address of the 5 byte long data for that level-up:
byte 0:
bit 7 (MSB) Str
bit 6 Agi
bit 5 Vit
bit 4 Wis
bit 3 WP
bits 0-2
000 +0
001 +1
010 +2
011 +3
100 +4
101 +5
110 +6
111 -1
byte 1: base HP increase
byte 2:
bits 0-4 base MP increase
bits 5-7 are the highest bits of the XP requirement. bytes 3-4 are the rest of the XP requirement.

Title: Re: Appearance/Sprite ID offset
Post by: Phoenix on December 21, 2007, 04:40:00 PM
Thanks for the level-up data, JCE, that'll be handy.

The Appearance/Sprite/Class ID specified for each character, however, I already knew the location of. I want to be able to change its attributes, not switch them between characters. For instance, remove the Engineer class and create an entirely new one. Do you know the location of these attributes? I assume magic is an attribute of a character's class, so really I just need to be able to change class characteristics.
Title: Re: Appearance/Sprite ID offset
Post by: JCE3000GT on December 21, 2007, 05:08:13 PM
For instance, remove the Engineer class and create an entirely new one. Do you know the location of these attributes? I assume magic is an attribute of a character's class, so really I just need to be able to change class characteristics.

I don't know if I've ever documented that data or not. 
Title: Re: Appearance/Sprite ID offset
Post by: Phoenix on December 24, 2007, 01:20:34 AM
Thanks for the help anyway. I'll keep looking. If anyone else happens to know, though . . .

And, next time I'll post this in the request thread, JCE.  :finger:
Title: Re: Appearance/Sprite ID offset
Post by: Phoenix on December 27, 2007, 07:12:29 PM
Found it. I actually found it the day after I last posted, but haven't had time to post yet. The information is here (ROM with header):

A81A2-A81CB   Magic List # to Menu Item Link (3 bytes per character: top list, mid list, bottom list)

The top list name defaults to "White", the middle to "Black", and the bottom to "Call". (I don't know where the information is that changes Edge's to "Ninja".) So, for example, Dark Knight Cecil's 3 bytes are FF FF FF, since he doesn't use magic. If you wanted to map magic list 01 to Black magic for Cecil, you would change his list to FF 01 FF.

Ah, success!  :cycle:
Title: Re: Appearance/Sprite ID offset
Post by: JCE3000GT on December 27, 2007, 08:14:31 PM
Does it actually work?  If so, then that's an awsome find.
Title: Re: Appearance/Sprite ID offset
Post by: Phoenix on December 29, 2007, 10:09:19 AM
Yes, it does. By changing that information, the level at which spells are added to lists, and the battle commands, I successfully gave Cecil Black magic that he could access in battle and in the menu. I'm on my way to creating new characters . . .  :finger:
Title: Re: Appearance/Sprite ID offset
Post by: Dragonsbrethren on January 01, 2008, 03:21:26 PM
 :omghax:

Awesome. Truly awesome.
Title: Re: Appearance/Sprite ID offset
Post by: Pinkpuff on March 21, 2008, 07:17:16 AM
Quote
By changing that information, the level at which spells are added to lists, and the battle commands, I successfully gave Cecil Black magic that he could access in battle and in the menu.

It doesn't work for me.

Here's what happened:

I changed DK-Cecil's magic menu as described above to "FF00FF". At that point, "Black" successfully appeared in his menu and he had the spell "Cure1" in his list (which would be expected since I didn't change the spell lists, and spell list 00 starts with Cure1). Next, I changed his battle menu to "Fight/DarkWave/Black/Item". When I tested it, his battle menu appeared correctly, but when I went into the "Black" sub-menu, no spells appeared.

Did I miss something?
Title: Re: Appearance/Sprite ID offset
Post by: Phoenix on March 21, 2008, 07:55:38 AM
Sorry, I should have updated my post. There's actually two magic list links, one to the battle menu and one to the main menu.

9FFDD-A000C   Magic List # to Battle Command/Learning Link
A81A2-A81CB   Magic List # to Menu Item Link

They both follow the same format (top list, mid list, bottom list).
Title: Re: Appearance/Sprite ID offset
Post by: Pinkpuff on March 21, 2008, 01:40:16 PM
It works now! Thank you so much!
Title: Re: Appearance/Sprite ID offset
Post by: Phoenix on March 21, 2008, 06:40:57 PM
You're welcome. Glad to be of help.  :happy:
Title: Re: Appearance/Sprite ID offset
Post by: Pinkpuff on March 28, 2008, 06:48:21 AM
Concerning the level-up data...

It seems as though for each character, after around level 70 or so, their level-up data bleeds into the data for the next character, causing the level-ups to go wonkee after that point. Now, I know from having played the game that around level 70 or so your level-ups start to become strange and you start losing stats and things, but they didn't seem this strange...

I guess my question is, is there somewhere else where the rom stores information for what happens after level 70? Or is the game actually using this screwed up data for those levels?
Title: Re: Appearance/Sprite ID offset
Post by: Deathlike2 on March 28, 2008, 07:58:11 AM
Look for what you seek here:
http://slickproductions.org/forum/index.php?topic=320.0
Title: Re: Appearance/Sprite ID offset
Post by: HHIPDragonFox on January 26, 2009, 01:09:22 AM
Sorry, I should have updated my post. There's actually two magic list links, one to the battle menu and one to the main menu.

9FFDD-A000C   Magic List # to Battle Command/Learning Link
A81A2-A81CB   Magic List # to Menu Item Link

They both follow the same format (top list, mid list, bottom list).

Do these Lists include Setting up Magic Command in Main Menu as well?
If I didn't see where you posted it yet, please let me know, thanks.

Edit:
  Found the previous posts.
  I'm attempting to check in my rom for what works for me....

Edit:
  Done. and Thanks
Title: Re: Appearance/Sprite ID offset
Post by: fedorajoe on May 14, 2011, 10:29:57 PM
Found it. I actually found it the day after I last posted, but haven't had time to post yet. The information is here (ROM with header):

A81A2-A81CB   Magic List # to Menu Item Link (3 bytes per character: top list, mid list, bottom list)

The top list name defaults to "White", the middle to "Black", and the bottom to "Call". (I don't know where the information is that changes Edge's to "Ninja".) So, for example, Dark Knight Cecil's 3 bytes are FF FF FF, since he doesn't use magic. If you wanted to map magic list 01 to Black magic for Cecil, you would change his list to FF 01 FF.

Ah, success!  :cycle:

I hope thread necromancy is allowed here.  I just found something pertinent to this thread, which has been very helpful to me.

You can change Edge's "Ninja" command to "Black" by editing this hex data.  At location B405, change the string "4F 64 69 65 5C" to "43 67 5C 5E 66."

There may be a more elegant solution, but I found this to work well.
Title: Re: Appearance/Sprite ID offset
Post by: Zozma on May 15, 2011, 02:53:12 PM
I hex edited that to use blanks and removed edge's magic totally and used his spells for ultimate elemental attacks for other black magic users. he was totally useless with magic anyway.

otherwise if you remove his assigned menu magic, it still shows this "ninja" text there, greyed out. so that just looked odd. too bad i cant reserve icebomb/firebomb/boltbomb as "throwing" items to make him more like shadow... or can i?
Title: Re: Appearance/Sprite ID offset
Post by: Deathlike2 on May 15, 2011, 05:32:46 PM
I believe the item list sections off stuff (items, weapons, armor are in their own areas), but it couldn't hurt to try I guess.

I don't think you can make items that are not weapons to "throw" w/o doing some ASM hacking. You could do either one of the following...

1) Hack the item command to be usable for particular characters, so that they can use specific items like Paladin Cecil and the Crystal.

2) Hack the throw command to be able to "throw" special items that execute a magic effect. This may be tricky, but remember that "throwing" weapons that are equipped has the same effect as using the item-weapon behavior (it shares the item command after all). Perhaps this may give you some ideas to work with.
Title: Re: Appearance/Sprite ID offset
Post by: Zozma on May 15, 2011, 05:39:28 PM
as far as being complicated 2 would be ideal, but 1 looks like it would be more doable... if only i knew how to make the game say only character bla bla bla can use these 3 items.

i would be willinig to sacrifice 3 weapons for this purpose tho (probably arrow slots) but would i actually be able to make them look like those effects when thrown? thats where its complicated...
Title: Re: Appearance/Sprite ID offset
Post by: Deathlike2 on May 15, 2011, 05:46:46 PM
The weapon part is "easy". Setting the properties of a weapon to display X magic for Y spell has been documented. The hard part is actually hacking the throw command to produce the correct visual... probably based on the item slot #. If it doesn't have a throw graphic (and audio), it won't look correct. I know there's a thread on throw graphics... but that would be a more complicated process I'd bet.

I'm sure if you could find the Crystal's item # relatively close to Cecil's character ID # reference, that would make it significantly easier for you.....
Title: Re: Appearance/Sprite ID offset
Post by: Zozma on May 15, 2011, 05:54:13 PM
yes, that sounds like the best bet, making the bombs simply a ninja only item.

you know i just thought of something, but it would only work for one item. Edward's Salve command could be turned into this. it does exactly what i need it to. consumes the item and uses a visual... hmm too bad theres not more like this.

edward has white magic in my patch nobody else would need it.
Title: Re: Appearance/Sprite ID offset
Post by: Deathlike2 on May 15, 2011, 06:04:11 PM
Phoenix has a hack that dealt with modifying the Medicine command... determining what item it consumed and I "think" the spell power of the item that was used. I believe it also documented the graphics... but I'm unsure. That would be a quick fix but it would only be useful for only one item.

http://www.romhacking.net/hacks/386/

However, there are obvious limitations, such as no versatility and no scaling (items have limited scaling unless you are using an HP based attack).
Title: Re: Appearance/Sprite ID offset
Post by: Zozma on May 15, 2011, 07:28:17 PM
yeah it was that exact information that makes me know i can do it with "Salve" :) thanks for leading me to it incase i need it

in such case i suppose i could make it a non elemental bomb of some sort that does caster hp damage.
i did this for palom and poroms comet and pyro spells, (they now suck when you first get them, but their twin makes more sense in later levels) its a shame i cant make it do 2x caster hp... but oh well
Title: Re: Appearance/Sprite ID offset
Post by: Deathlike2 on May 15, 2011, 08:00:18 PM
Well, IIRC a while ago, Pinkpuff was trying to hack some sort of spell multiplier for a particular HP based spell. I'm sure if you search the board, you could try to find the thread. The problem had something to do with the game not actually doing anything with the parameter...
Title: Re: Appearance/Sprite ID offset
Post by: Zozma on May 15, 2011, 08:21:47 PM
oh that's a shame. well im trying very hard not to dig too deeply as the project is just for fun. if it gets complicated im not likely to finish lol