FFIX - A question about locating data for weapons and abilities

  • Thread starter Thread starter LandonRayW
  • Start date Start date
Status
Not open for further replies.
L

LandonRayW

Guest
I recently started working on FFIX.  I was able to locate and figure out how to alter enemy stats.  Second, I began working on the Directory, which I botched a bit at first.  However, thanks to some very informative posts by Tonberry, Cyberman, Zidane, and Zande, I was able to figure out what I was doing wrong.  I moved on to looking for statistical data for weapons and abilities (attack power, etc.).  This is where I ran into some major problems.  I assumed the data would be stored in the kernel.  I assumed the kernel would be store in Directory 00.  I've looked threw most of Directory 00 and have not found anything resembling a kernel.  If anyone has any information about where or how this data is stored, I would greatly appreciate assistance.
 
Last edited:
It's most certainly in directory 8, the one with the weapon models, each weapon chunk has 2 files (types 8 and 20) that don't contain graphical data. Would make sense since stuff like monster stats also isn't in the kernel but in the monster directories.
 
I'll give you some general hints;
FF9 splits the user memory into four main parts: two parts for the main execute (SLPS_020.00/SLES-02965 or whatever version/disc), one part that acts like a code segment and one that acts as a data segment, these two parts are always avalible. The other two parts may be switched at any time, the first part is larger and acts as engines or whatnot, the last part is a smaller and may be seen as sub to the engines (though they are independant) and they are all (but one) menu based.
The enigne and submodule parts are what's stored in Directory 0, and this is what they contain:
Code: [Select]
Code:
Engines: 0 = Dummy 1 = Field 2 = Battle 3 = Worldmap 4 = Tetra Master 5 = Title 6 = BlackjackSubmodules/Menusystem: 7 = Chocobo Hot & Cold 8 = Equip & Abilities 9 = Config10 = Card11 = Item12 = Status13 = Save & Load14 = Name Input15 = Party Select16 = Shop17 = Dummy18 = Disc Change19 = *Movie Module20 = Victory
Now to go back to the original question. Things like attack power values for all weapons are used by several engine/modules (like battle, shop, equip etc.) so therefore they are usually stored in the main execute so it's always avalible. Though this isn't always the case, the data in FF9 is abit of a mess and sometimes stored in strange ways. Like the enemy data, it's not stored per enemy, but per formation (so changing the values for one enemy doesn't change all occurences of that enemy, only within that particular encounter formation). Also there are other things, like images and strings, that are duplicated several times, like the small character portraits are stored in several submodules (like in the save/load, name input, shop modules).
I'm not sure if I have a pointer for the attack power values in the execute, but even if do have it'd be from the japanese version and different from what version you use probably...
 
Last edited:
Thank you for the information!  Given problems re-imaging the disc I've been working with the image directly instead of extracting FF9.IMG (930h sectors instead of 800h).  I've noticed that SLUS xxx.xx (whatever it is) is stored before the Root Directory.  I've also noticed that it holds the names for weapons around hexadecimal address 75000.  Ability names seem to be stored at various places in Directory 00.  The first place is in the Battle Module, the second and third are under the Equipment and Abilities section, the fourth seems to be in the Status section, the fifth is some of the last data stored in Directory 00.  These are for Quina's abilities, I haven't check the other character's abilities yet.  So, I am assuming weapon data like attack power is held in the SLUS file.  Where would you think spell power or similar data is stored?  SLUS file or in multiple modules?  Given that the names are held in multiple modules, I'd assume that spell power and the like is also held in multiple modules.
 
Last edited:
Where would you think spell power or similar data is stored?  SLUS file or in multiple modules?
For PC's, in the SLUS file I would assume, yes. For enemies it's stored within the enemy formation data (directory 5 I think it is).
 
Yeah, for enemies it is in Directory 05.  Directory 05 works in a similar manner to FFVII's Scene File.  As for PC's, why would ability names be held in multiple modules instead of SLUS file, if the rest of the ability data (except graphical data) was held in the SLUS file?  Then again, Square does like to confuse us.  I guess I might have just answered my own question.
 
Last edited:
Beats me, though I think ability names are also stored in the SLUS file?
It's abit strange like that, the prices for items are stored in the execute aswell, but the synthesis data and shop inventories are stored in the shop module.
 
Wow, I guess I've got my work cut out for me.  Thanks again for all the information.  This is going to be a huge help!
 
In the japanese execute (SLPS_020.00) there's a collection of data for all weapons stored from address 0x5E38C. There's 12 bytes for each weapon, and the 6th byte is the attack power value (I don't know what the other values are for, I tried messing around with them alittle, but I didn't notice any changes yet, oh well). The pointer is most likely not the same for the US version (but probably close) and I don't have a copy of so I can't check, but I'll provide the value for the first weapons, should be able to find it by searching for the values...

Code: [Select]
Code:
weapon 0 (Cinna's Hammer) = 01 00 25 00 05 0C 00 00 00 00 00 00weapon 1 (Dagger)         = 05 00 DC 01 01 0C 00 00 11 00 C8 00
 
Last edited:
Thank you, that's wonderful!  You know what's funny?  I was in the process of altering some enemies, when I noticed that occasionally some of the enemy data is store in the SLUS and Directory 00.  Not much data, just names from what I can tell, and so far only for character based enemies like Steiner and Baku.

Edit: Excellent!  The data is right around 7A600 (around 5E900 in the SLUS file).  Now all that's left is Ability data.  I'm particularly interested in Dragon's Crest, Thievery, Shock, Spare Change, and Frog Drop.  I should be able to track it down, but if you're up to it, I'm sure you could locate it much faster.
 
Last edited:
Here's next piece of junk/chunk... At 0x5CDCC starts a block of 768 bytes which holds all the AP needed for all action & support abilities. Each ability uses 2 bytes, the second byte is the number of AP needed to master/learn, the first one I think is ID for the ability. Every class (I rather call it, as opposed to character) have 48 abilities each and there are 8 classes stored in this order: Theif, Black Mage, Summoner/White Mage, Knight, Dragon Knight, Blue Mage, White Mage/Summoner, Monk/Ninja.
The 16 first byte of this block (and the data for Zidane's first 8 abilities), looks like this:

Code: [Select]
Code:
65 28 66 28 67 28 68 23 69 32 6A 37 6B 55 6C 64
Edit: This block of data may actually be larger, and include temporary/guest character classes, I don't know yet but the other is still correct.

Another Edit: So I tried to use the code form the ability screen to get the MP cost for abilities, and allthough I found them, the MP cost display under the ability screen are stored locally within the ability/equip module, and the MP cost actually used in battle is most likely read from somewhere else... -_-
But I think I've pretty much managed to track down where the battle data is stored aswell...


Ok, so the data for abilities when they are used in battle are read from file 22 in directory 1, @0xBB2B. Each ability uses 16 bytes and there's 192 abilities listed, for a total of 3072 bytes. An identical copy of this data is also stored in the ability/equip module ( 8 ) in directory 0.
The things I found so far:
Code: [Select]
Code:
; Target (Bits ???); Sub-Dialog (Bits 6-8); 0 = None; 1 = HP MAX; 2 = MP MAX; 3 = Status Bad; 4 = Status Good; 5 = (illegal); 6 = (illegal); 7 = (illegal)0x0000: byte    Target/Sub-Dialog0x0004: byte    Command ID0x0005: byte    Coefficient0x000A: byte    MP Cost0x000C: word    Animation Pointer0x000E: word    String Pointer
The data for the first two abilities looks like this:

Code: [Select]
Code:
Ability 0 (Void) 00 00 00 00 00 00 00 00 00 00 00 00 0A 00 00 00Ability 1 (Cure) 33 09 00 20 0A 10 00 00 47 00 06 01 08 00 03 00
 
Last edited:
Alright, found it.  Mine's not the exact same, but it is pretty close.  I'll play around with it a bit tonight.  Thank You!

Edit:  A couple more things I need to find, enemy resistances (elements and status) and armor data (defense and elemental resistance).  Armor data should be in the SLxx file after weapons, and enemy resists should be in directory 05.  I haven't spent too much time looking for them yet.
 
Last edited:
I found some basic data for items, not really what you were looking for but you may be interested in it anyway... This block contains 18 bytes for each item, and this data is for all 256 items, for a total of 4608 bytes.
The data layout is something like this:
Code: [Select]
Code:
word Name Pointerword Description Pointerbyte ?byte ?byte ?byte ?byte Icon ID (0-35 only)byte Icon Palette ID (0-15 only)byte ?byte Base Stat Increase Flags?byte Ability 1 (0 = None)byte Ability 2 (0 = None)byte Ability 3 (0 = None)byte Flags {  Bit 1 = Useable  Bit 4 = Equipable (Add-on)  Bit 5 = Equipable (Armour)  Bit 6 = Equipable (Head gear)  Bit 7 = Equipable (Arm gear)  Bit 8 = Equipable (Weapon)}byte ?byte ?
The first two items have this data:
Code: [Select]
Code:
00 00 00 00 FA 00 08 00 00 00 01 00 00 00 00 80 15 0005 00 0F 00 40 01 00 08 01 00 01 00 65 00 00 80 16 00
The physical defence/evade and magical defence/evade for equpiment I know pretty much where it's stored but I have to look at it abit more... Atleast it's stored using 4 bytes for each item: physical defence, physical evade, magical defence, magical evade. You may be able to find where it's stored anyway if you know these four values for an item...

The elemental flags for equipment is abit tricky, it may be stored near the defence/evade data, but it's only ever used when in combat I think. It doesn't seems to be stored in the character data nor can you somewhere see if your characters absorbs or nullifies certain elements (except for the static description for items, but is just a text anyway), kinda stange.
 
Last edited:
Actually, that information is very useful, I'm definitively interested.  I ran some four byte checks for armor, but haven't found anything yet.  Armor stats and elemental resistances would be nice, but locating them isn't really necessary.

Edit:  I'm a bit dumbfounded at my inability to find enemy elemental and status defenses.  The Scene Blocks really aren't that big.  I'm probably staring straight at it, but for some reason I just don't see it.
 
Last edited:
I never spent too much time with the enemy data, but the actual enemy chunk looks something like this:

Code: [Select]
Code:
0x0010: word    HP0x0012: word    MP0x0014: word    Gil0x0016: word    Experience0x0018: byte    Drop Item (Slot 1)0x0019: byte    Drop Item (Slot 2)0x001A: byte    Drop Item (Slot 3)0x001B: byte    Drop Item (Slot 4)0x001C: byte    Steal Item (Slot 1)0x001D: byte    Steal Item (Slot 2)0x001E: byte    Steal Item (Slot 3)0x001F: byte    Steal Item (Slot 4)0x0022: word    Model ID0x0024: word    Animation ID 10x0026: word    Animation ID 20x0028: word    Animation ID 30x002A: word    Animation ID 40x002C: word    Animation ID 50x002E: word    Animation ID 60x0036: word    Attack Power0x0038: byte    Speed0x0039: byte    Strength0x003A: byte    Magic0x003B: byte    Spirit0x0040: byte    Elemental Guard0x0041: byte    Elemental Absorb0x0042: byte    Elemental Half0x0043: byte    Elemental Weakness0x0044: byte    Level0x0045: byte    Class0x0047: byte    Physical Defence0x0048: byte    Physical Evade0x0049: byte    Magical Defence0x004A: byte    Magical Evade0x004B: byte    Blue Magic (0x4D-0x64, or 0x00 for none)Elemental Flags:Bit 1 = FireBit 2 = IceBit 3 = ThunderBit 4 = EarthBit 5 = WaterBit 6 = WindBit 7 = HolyBit 8 = ShadowClass Flags:Bit 1 = HumanoidBit 2 = BeastBit 3 = DemonBit 4 = DragonBit 5 = UndeadBit 6 = StoneBit 7 = InsectBit 8 = Aerial
 
Last edited:
Excellent!  I didn't have Class, Drops, Steals, Blue Magic, or Elemental Defense.  Thanks, again.
 
Status
Not open for further replies.
Back
Top