Author Topic: FF7 item data  (Read 7408 times)

corruptpanda

  • Guest
FF7 item data
« on: 2004-11-14 06:15:57 »
Hey there. First post. (yay)

First of all, amazing work, all of you. The amount of reverse engineering here could fill volumes (and in fact, it seems you're working towards that goal).

So, I mean to ask: I want to edit the item data (specifically weapons and armors). From what I've read, it's in kernel.bin, which I've dutifully taken apart, and have 27 gzip archives, and 27 ungzipped directories with 1 file in each. I've been looking through them with Hex Workshop, but does anyone have any input on how the first few files (which I assume have the data, with 10-27 holding the text) are constructed?

Any help would be appreciated.

UPDATE: Made some progress, in that I think I know where the data is. File 6 contains data which matches Cloud's weapon data, and I'm trying to figure out the exact format now. Upon first inspection, if we can get the edited file back into kernel.bin we should be able to edit attack, hit%, slots, growth, etc. Basically, it's all in there.

Anyone know how to put these files back into kernel.bin? I can't find the right gzip format to use. Something proprietary?

UPDATE: It's gzip compression level 8 (pretty sure this is cross-platform), without storing the filename. I ran it as such:

Code: [Select]
cat 6.new | gzip -n -8 - >6.new.gz

where 6.new is the new 6th segment. However, there seems to be a 6-byte header on each file portion, with unknown data. The last two bytes seem to count which file it is, until it reaches 9, where it doesn't count up any more. The other 4 bytes don't appear to be a checksum, at least not in any format I know. The header for file 6 seems to be:

Code: [Select]
B0 06 00 16 05 00

Any ideas?

UPDATE: Alright, successfully re-inserted a modified 6th file into kernel.bin, which the game recognizes, leading to the picture in the post below. I think the 255 ATK was crashing the game, but either way, a Buster Sword where I just changed the slots / growth rate seems to have worked. However, the previous version had a different file length, which I accounted for in the 6-byte header. Anyway, I'll keep messing around.

By the way, the only part of the 6-byte header you have to change to re-insert into kernel.bin is the first two bytes: they contain the length of the following gzipped segment. The next two are a complete mystery, and the final two count up from 00 00 to 09 00. Whoopee.

Also, I rather recently realized through some deeper forum-diving that this kind of work has been started before, but I haven't seen any end results? Am I just being stupid here and re-inventing the wheel?

corruptpanda

  • Guest
FF7 item data
« Reply #1 on: 2004-11-14 19:22:10 »


EDIT: Just removing the old text, since it no longer applies.

James Pond

  • *
  • Posts: 880
  • Forums Grumpy Bastard....At The Best Of Times.
    • View Profile
FF7 item data
« Reply #2 on: 2004-11-15 07:33:03 »
Woah....Nice work!!

This is one step to making a "hard" difficulty setting  :wicked:

Is it possible to edit the potion data too, so instead of healing 100, it heals 50, or 75?

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
FF7 item data
« Reply #3 on: 2004-11-15 07:43:49 »
Have you looked into Gears document ? Halkun gathered quite alot of ff7 information in it
http://the-afterm.ath.cx/gears/

corruptpanda

  • Guest
FF7 item data
« Reply #4 on: 2004-11-15 17:01:57 »
Mirex - Yeah, I've read Gears thoroughly, so unless something's changed in the past two days, it doesn't contain any info on what is in files 1-9 of kernel.bin, nor what format it is, and actually incorrectly states that there is only one 6-byte header (instead of one per file, totalling 27 headers).

I'll post the weapon file format as I learn it. So far I've got some basic data down, but I think there is a bitfield or two in there which I have to figure out. I'll get it eventually.

Thanks for the replies and support.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
FF7 item data
« Reply #5 on: 2004-11-16 02:07:03 »
I already posted what those files are.

Hold on…

Let me get my notes again.














Finally found them.  Gah, my coworkers draw all over my notes while they are at my desk.


1: Commands (Confirmed, and follows a similar format to attacks)
2: Attacks
3: Unknown (Confirmed.  I don’t know what this file is and I’m sure of it!)
4: Starting Stats for Characters
5: Items
6: Weapons
7: Armors
8: Accessories
9: Materia





I am not going to post all the formats for all the things.
You want weapons?

This is the format for weapons but I will only post Cloud’s weapons (for space concerns).




Code: [Select]
FF7 Weapon Block Dump
---------------------
This list has been compiled by The SaiNt.
Original idea "stolen" from Qhimm :) Honestly thanks, Qhimm!
Recently added stuff from Terence's Guide.

Legend
------

WR  Weapon Range
----------------
03 Long Range
23 Normal

SO  Special Options
-------------------
A0 1 + Number of Status Effects Tifa has out of following: Near-death, Poison, Sadness, Silence, Slow, Darkness
+ 2 * Number of Status Effects Tifa has out of following: Death-sentence, Slow-numb
A1 Power up when (Near death)
A2 (1 + Number of Allies in Death Status)
A3 (Target's Level / 16)
When used against allies, the Conformer will act like a physical hit, but
will cause no damage (not even a Miss or a 0)
The Conformer has no Morph modifier; it does the same damage with or without Morph
A4 (1 + [48 * Player's HP / Player's Max HP]) / 16
A5 (1 + [48 * Player's MP / Player's Max MP]) / 16
A6 (1 + [Total AP on Weapon / 10000]) / 16
A7 (10 + [Player's Kills / 128]) / 16
A8 (1 + [Player's Limit Level * Player's Limit Units / 16]) / 16

WA  Weapon Attack
MG  Materia Growth Rate
A%  Weapon Attack %

WM Weapon Model
---------------
For example, if I change the value of Cloud's Buster Sword to
0F FF F8, in battle, Cloud's weapon will use the Ultima Weapon's 3D Model.

EM Equip Mask
-------------
01 Equipable on Cloud
02 Equipable on Barret
04 Equipable on Tifa
08 Equipable on Aeris
10 Equipable on Red XIII
20 Equipable on Yuffie
40 Equipable on Cait Sith
80 Equipable on Vincent
100 Equipable on Cid
200 Equipable on Young Cloud
400 Equipable on Sephiroth

To enable multiple equip masks, just add the numbers of the respective characters.
For example:- For Cloud & Young Cloud, 01 + 200 = 201
Note that in the chart, the reverse order is seen.
That's the way memory works ;)

AT  Attack Type
---------------
4 Cut
8 Hit
10 Punch
20 Hit

IT  Increase Stat Type
--------------------------
FF None
00 Strength
01 Vitality
02 Magic
03 Spirit
04 Dexterity
05 Luck

AM  Stat Amount Increased(Based on IT)


MS  Materia Slots
-----------------
05 Unlinked Slot
06 Right-linked slot
07 Left-linked slot
05 05 Two single unlinked slots after each other
07 06 A right-linked slot followed by a left-linked slot

TE Texture Explosion

RM  Restriction Mask
--------------------
FF Appears in Item Menu. Does not appear in Battle Menu (Not usable at all)
FE Appears in Battle Menu & Item Menu (Not usable at all)
FD Appears in Item Menu. Does not appear in Battle Menu (Usable in Battle Menu)
FC Appears in Battle Menu & Item Menu (Usable in Battle Menu)
FB Appears in Item Menu. Does not appear in Battle Menu (Usable in Item Menu)
FA Appears in Battle Menu & Item Menu (Usable in Item Menu)
F9 Appears in Item Menu. Does not appear in Battle Menu (Usable in Item Menu & Battle Menu)
F8 Appears in Battle Menu & Item Menu (Usable in Item Menu & Battle Menu)
F7 Appears in Item Menu. Does not appear in Battle Menu (Usable in Battle Menu)
F6 Appears in Battle Menu & Item Menu (Usable in Battle Menu)

       WR    SO    WA    MG    A% WM-----+       EM--+ AT--+       IT--------+ AM--------+ MS--------------------+          TE       RM
00DAFD18  23 FF 11 FF 12 FF 01 00 60 00 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 02 FF FF FF 06 07 00 00 00 00 00 00 12 1B 05 09 FF FF FF FF Buster Sword
00DAFD44  23 FF 11 FF 17 FF 01 00 62 01 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 04 FF FF FF 06 07 05 00 00 00 00 00 12 1B 05 00 FF FF F6 FF Mythril Saber
00DAFD70  23 FF 11 FF 20 FF 01 00 62 02 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 06 FF FF FF 06 07 05 05 00 00 00 00 12 1B 05 0A FF FF F6 FF Hardedge
00DAFD9C  23 FF 11 FF 27 FF 01 00 64 03 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 08 FF FF FF 06 07 06 07 00 00 00 00 12 1B 05 09 FF FF F6 FF Butterfly Edge
00DAFDC8  23 FF 11 FF 2B FF 01 00 6B 04 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 10 FF FF FF 06 07 06 07 06 07 06 07 12 1B 05 0A FF FF F6 FF Enhance Sword
00DAFDF4  23 FF 11 FF 3E FF 01 00 67 05 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 0F FF FF FF 06 07 06 07 05 05 00 00 12 1B 05 0C FF FF F6 FF Organics
00DAFE20  23 FF 11 FF 4C FF 01 00 69 06 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 13 FF FF FF 06 07 06 07 06 07 00 00 12 1B 05 01 FF FF F6 FF Crystal Sword
00DAFE4C  23 FF 11 FF 24 FF 02 00 64 07 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 07 FF FF FF 05 05 05 00 00 00 00 00 12 1B 05 0D FF FF F6 FF Force Stealer
00DAFE78  23 FF 11 FF 28 FF 02 00 6C 08 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 09 FF FF FF 05 05 05 05 00 00 00 00 12 1B 05 0B FF FF F6 FF Rune Blade
00DAFEA4  23 FF 11 FF 33 FF 01 00 64 09 FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 0C FF FF FF 06 07 06 07 05 00 00 00 12 1B 05 01 FF FF F6 FF Murasame
00DAFED0  23 FF 11 FF 46 FF 00 04 64 0A FF F8 FF FF 01 02 00 04 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 12 1B 05 10 FF FF F6 FF Nail Bat
00DAFEFC  23 FF A2 FF 38 FF 01 00 64 0B FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 09 FF FF FF 05 05 00 00 00 00 00 00 12 1B 05 03 FF FF F6 FF Yoshiyuki
00DAFF28  23 FF 11 FF 58 FF 03 00 6E 0C FF F8 FF FF 01 02 00 04 FF FF 02 03 FF FF 2B 10 FF FF 05 05 05 00 00 00 00 00 12 1B 05 13 FF FF F6 FF Apocalypse
00DAFF54  23 FF 11 FF 5D FF 01 00 64 0D FF F8 FF FF 01 02 00 04 FF FF 02 FF FF FF 1F FF FF FF 05 05 05 05 05 05 00 00 12 1B 05 0A FF FF F6 FF Heaven's Cloud
00DAFF80  23 FF 11 FF 61 FF 01 00 69 0E FF F8 FF FF 01 02 00 04 FF FF 02 03 FF FF 2B 23 FF FF 06 07 06 07 06 07 00 00 12 1B 05 0D FF FF F6 FF Ragnarok
00DAFFAC  23 FF A4 FF 64 FF 00 00 6E 0F FF F8 FF FF 01 02 00 04 FF FF 02 03 FF FF 33 18 FF FF 02 03 02 03 02 03 02 03 12 1B 05 0B FF FF F6 FF Ultima Weapon




To get things to align correctly you will have to copy it into Notepad.


L. Spiro

corruptpanda

  • Guest
FF7 item data
« Reply #6 on: 2004-11-16 03:55:51 »
Aha. Well then sorry to repost. I couldn't find this on the boards -- do you have all the item info posted somewhere? For download, maybe?

Thanks for all the hard work!

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
FF7 item data
« Reply #7 on: 2004-11-16 10:36:25 »
I got these so long ago I don’t remember where exactly.

Either ficedula’s page or Sephiroth 3D’s page or somewhere.

Terence Fergusson has the most complete and recent records of the item/attack data (they are together because they are of the same format).
And I lost my notes some time ago.


L. Spiro

pbuckman258

  • *
  • Posts: 16
    • View Profile
FF7 item data
« Reply #8 on: 2005-04-23 15:19:51 »
how do you extract the files from your kernal.bin everytime i try to do it, it says suffix unknown when using gzip or gunzip. can you walk me through getting these files from kernel.bin it would be a big help

Pandalicious

  • Guest
FF7 item data
« Reply #9 on: 2005-04-30 17:41:10 »
i also dunno how to extract the kernel.bin and would love to know.

Cyberman

  • *
  • Posts: 1572
    • View Profile
FF7 item data
« Reply #10 on: 2005-05-01 01:04:50 »
1) old topic resurection is bad especially when it's off the original topic.
2) Search is your friend. Please use forum search on kernel.bin. Trust me the answer to your question has already been discused in detail.

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
FF7 item data
« Reply #11 on: 2005-05-01 05:52:36 »
I already let him know...