Author Topic: help a noob w/ text editing weapon stats  (Read 13776 times)

Deathblow

  • *
  • Posts: 32
    • View Profile
help a noob w/ text editing weapon stats
« on: 2008-09-21 23:47:58 »
ive just learned how to decompress kernel.bin by using ff7gzip, but i cant seem to find faqs or wiki on hex editing the files and what i have found is pretty vague and prolly meant for experienced persons, but i was able to use one member's advice:
"You should be able to find most of the information you'll need for these by searching google and the qhimm forum and wiki for things like kernel.bin, gzip and "hex editor". If, for example, you change kernel.bin5 from 60 to 64 or ff at 0x08 the Buster Sword will have 100 or 255 accuracy.
" -Leighos Kudistos Megistos
and give the buster sword 255 accuracy, but how did he know what "cell" controlled the buster sword's accuracy, the kernel.bin wiki said something completely different, it said weapon data was in kernel.bin6 and that it contained weap accuracy but i couldnt find anything that looked like what was in the wiki, so what i did was open kernel.bin5 and the first row looks like 00000000 and the 9th column down is titled 08 (so i figured that was what was meant by 0x08 since i didnt see any Xes anywhere in the hex editors ive used under different view settings) and by chance it did have a 60 under the 08 column so i changed it to ff and it worked, and the buster sword now has 255 acc. so im guessing the kernel.bin wiki is wrong or i dont know how to read it.
either way what i want to do now is edit the buster sword further so it has the conformer special ability to equal normal damage when using morph; and to make barret's assault rifle power up when near death and have 2 pairs of linked slots for a total of 4 instead of the original 2 and its accuracy from 98 to 100. the reason being that these are the only weapons i use throughout the whole game. i would appreciate either explicit instructions on how to do the above mentioned things in a way that a person with attention deficit disorder will understand (kinda how Leighos Kistos Megistos said)or a link to a faq on hex editing so i could edit gjoerulv's kernel.bin which i havent tried his mod yet but he said it was okay with him to edit his scene.bin and the kernel.bin.

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #1 on: 2008-09-22 00:09:20 »
Hello again. When you decompress the kernel.bin file, the first section gets called kernel.bin0 rather than kernel.bin1; kernel.bin1 is the second section, and so on. That's why the numbers don't match on the wiki, which has most of the information you need regarding weapon data.

Also, when you are a beginner you should try to look for patterns; if you see 23 ff 11 in that section, it is the start of the data for a short range weapon (indicated by 23) with a normal kind of attack (indicated by 11), 06 07 00 00 00 00 00 00 is the materia slot data for a weapon with one pair of linked slots: 06 07 06 07 00 00 00 00 gives a weapon two pairs of linked slots, et cetera.
« Last Edit: 2008-09-22 00:24:36 by Leighos Kudistos Megistos »

Deathblow

  • *
  • Posts: 32
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #2 on: 2008-09-22 00:40:02 »
thanks, you've been the most helpful so far, so if im getting this right there are no Xes in the hex editor, but i only see entries with 2 digits, what about when the wiki says something like 0x2000, how do i find that? and am i to beleive that the first row is cloud's buster sword? and is barret's assault rifle start at row labeled 00000589? if not which one?

edit: in kernel.bin5 which supposedly is weapon data there are only 3 rows that have a 02 (barret equipable) under column 0e (equip mask) and the first column "00" (range) the values are neither 03-long range or 23 short range. this is the kind of stuff that throws me off. plus theres 26 bin files and the wiki only goes up to 9? thats what i mean by vague instructions.
« Last Edit: 2008-09-22 01:00:02 by Deathblow »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #3 on: 2008-09-22 02:08:06 »
The first weapon is the buster sword, and the assault rifle data begins at 00000580. Unfortunately, the data for each weapon doesn't fit into one row, which is why there only only two Barret flags under 0e; the two bytes which determine which character can equip a weapon are always the 15th and 16th bytes from the start of the weapon data.

The buster sword starts at 0x00, the second weapon begins at 0x2c, the third at 0x58 etc. If we can find a hex editor that can show 44 bytes per line our job will be much easier. The one I use can only show 32.

When the wiki says things like 0x2000 it means that the data is in two bytes (each bite has two digits), which (and I don't know why they do this, but there is probably a good reason) is 00 20 in the editor; the first and the second byte get swapped around, so even though Barret's equip flag is 0x0002 you will see 02 00 in the editor.

The 10th to 27th sections of kernel.bin are text files which contain things like attack names and weapon descriptions and are also in kernel2.bin. You can edit this data with a program called Teioh, which has a thread:

http://forums.qhimm.com/index.php?topic=6385.0

By the way, the 0x... is hex editing notation which I hope I am using correctly.

Deathblow

  • *
  • Posts: 32
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #4 on: 2008-09-22 02:16:38 »
you are off tha chains... im using hex editor neo and i was setting column view settings to 64 but when i set it to 44 after reading your post every row under column 00 was 03 or 23 and under 0e it was 01 down 16 rows and then 02 etc, made everything real easy for me. i dont think ill have any more questions for a while (knock on wood)

edit: scratch that, under  "0x05" - Status Attack (index of status bit) what the hell does that mean? what are the values for poison(i want red xiii to have a poison attack) and death(might give it to cloud, that is a big ass sword)
« Last Edit: 2008-09-22 02:37:50 by Deathblow »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #5 on: 2008-09-22 02:58:15 »
Thanks :-)

Unfortunately I don't know anything about the status attack; in attack data there are four bytes for status changes, so this must work differently (and it seems that none of the weapons use it). Maybe you could experiment with it and see what happens. There are 31 statuses in the game, so you could try putting in values from 00 to 1e and seeing what happens: maybe something, maybe nothing.

Deathblow

  • *
  • Posts: 32
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #6 on: 2008-09-22 18:08:27 »
i might try that, in the meantime i have a question about the special weapon properties, specifically a7 :10 + ([player's kills/128]) /16, i know thats "death penalty" for vincent but does it calculate the equipped character's kills or just vincent's?

gjoerulv

  • *
  • Posts: 1225
  • me
    • View Profile
    • My Youtube
Re: help a noob w/ text editing weapon stats
« Reply #7 on: 2008-09-22 18:27:05 »
The equipped character. I tested it on Cloud. To be honest this is by far the best damage modifier. This, Yuffie's and Barret's are Superior. They can't be weakened once they're strong (Yuffies takes no effort at all but has a limit: lvl 99 enemies). Those based on HP, MP and limit can't get stronger no matter how much of the stat you have. And they can be weakened as well. Tifa's Premium Heart is the weakest imo. Cause relying on the limit bar is too random and tedious to control. You should only equip it with her when her limit is high.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #8 on: 2008-09-24 08:33:18 »
Thanks :-)

Unfortunately I don't know anything about the status attack; in attack data there are four bytes for status changes, so this must work differently (and it seems that none of the weapons use it). Maybe you could experiment with it and see what happens. There are 31 statuses in the game, so you could try putting in values from 00 to 1e and seeing what happens: maybe something, maybe nothing.

Yeah, I already tested them and made a quick video based on my discoveries.

status bits in the weapon data :

00: Death
01: Near Death
02: Sleep
03: Poison
04: Sadness
05: Fury
06: Confu
07: Silence
08: Haste
09: Slow
0A: Stop
0B: Frog
0C: Small
0D: Slow Numb
0E: Petrify
0F: Regen
10: Barrier
11: M.Barrier

It looks like the other status effects don't work, though.
« Last Edit: 2008-09-24 13:28:37 by Armorvil »

gjoerulv

  • *
  • Posts: 1225
  • me
    • View Profile
    • My Youtube
Re: help a noob w/ text editing weapon stats
« Reply #9 on: 2008-09-24 10:05:57 »
I see. Both 00h and 02h are sleep? I thought 00h was death, but I haven't tested it.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #10 on: 2008-09-24 13:29:14 »
I see. Both 00h and 02h are sleep? I thought 00h was death, but I haven't tested it.

Urgh, it was a typo  :-P
00h indeed is death.

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #11 on: 2008-09-24 14:32:47 »
Good, good. I think this is exactly the kind of work that needs to be done. I am working on editing kernel.bin5 so that the weapons are more unique. In vanilla FF7, most towns sell weapons that are just upgrades of the ones the player bought an hour ago, with higher att. and att%, an extra materia slot, and a hidden stat bonus, making most weapons obsolete quite quickly and missing an easy opportunity for making the player think about what weapon a a character should use.

Perhaps there should be an inverse correlation between attack power and number of materia slots, or a choice between a strong weapon with no added effects and one with slightly less power which has an elemental attack, or a status effect like poison. Each weapon would then have its own strengths and weaknesses and would be useful for the whole game. I have started off by making the buster sword a powerful warrior weapon whose weight gives it a higher chance of missing but also a higher chance of making a critical hit. Cloud's iconic weapon now does not become useless as soon as one reaches Kalm; it can be a perfectly reasonable choice of weapon even on disc three.

EDIT:

The wiki says that the effects of the two bytes at 0x28 are unknown. After trying them out, I have found that they correspond to the last two bytes of attack data:

Quote from: gjoerulv
0x0001 Attack MP instead of HP
    0x0002 ?
    0x0004 ?
    0x0008 ?
   0x0010 Drain Damage Dealt
   0x0020 Drain HP/MP
   0x0040 Blade Beam
    0x0080 Ignore Status
    0x0100 Miss if Not in “Death” Status
    0x0200 Reflectable
    0x0400 Piercing (Unblockable)
    0x0800 Angel Whisper/Pulse of Life
    0x1000 ?
    0x2000 Critical Hits
    0x4000 ?
    0x8000 ?
« Last Edit: 2008-09-25 00:02:06 by Leighos Kudistos Megistos »

gjoerulv

  • *
  • Posts: 1225
  • me
    • View Profile
    • My Youtube
Re: help a noob w/ text editing weapon stats
« Reply #12 on: 2008-09-25 11:15:22 »
Ey, nice find! I'm actually considering making a "start at lvl 50, with all items materia and sh*t available", and was planing on making every spell, weapon, armor etc usable in stead of just the standard sh*t.

This certainly helps!

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #13 on: 2008-09-25 11:19:51 »
Well, I tested this and aside from 0x0001 that does make the weapon target MP instead of HP, the others do not work. All I get are missed (critical) attacks.

Still, it's a nice find, indeed :-)
« Last Edit: 2008-09-25 11:35:50 by Armorvil »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #14 on: 2008-09-25 14:46:51 »
Some of them work, some of them don't: I managed to get the ignore defence one to work as well, and I'll try a few of the others today.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #15 on: 2008-09-25 17:43:54 »
Cool ! All I tested was the absorb HP/MP one (doesn't work).

I ran quite a lot of tests today, regarding the byte at 0x02 for the type of damage / attack modifier.

Here is a quick recap of what we already know, and what I've discovered. All of these work :

00h: Inflict the weapon's status on characters without doing damage. Miss enemies.
11h: Deals physical damage
22h: Deals magical damage
23h: Deals %damage based on the target's CurrHP. I think Weapon Attack is the percentage (10h=50%, 20h=100%, etc)
24h: Deals %damage based on the target's MaxHP.
26h: Deals constant damage (Magic Hammer, 1000 Needles, ...). 01h = 20 HP/MP.
28h: Fully recovers the target's HP/MP (Mog Dance).
29h: Always deals 1 damage (?).
60h: Damage = attacker's current HP (White Wind)
61h: Damage = MaxHP - CurrHP (the ???? enemy skill)
68h: Random Damage (Dice)
69h: Damage = number of times the party escaped (Chocobuckle).
6Bh: Damage = (hours played * 100) + minutes played (Time Damage)
6Dh: It's Aire Tam Storm's damage calculation method, meaning that it always deals 0 damage since enemies can't equip materias  :-P
96h: Damage = approx. 1/2 attacker's current HP

...And one I'm not sure about :

6Ch: It's Everyone's Grudge damage calculation method, but it doesn't seem to work, as even after killing some enemies, your weapon still deals 0 damage. I didn't check if it takes into account the number of deaths in the player's party, though. Thanks to anyone who can test this.

Most of the others don't seem to work or to be interesting. I'm too lazy to list the Ultimate Weapons' special effects ; they're in the wiki anyways.
« Last Edit: 2008-09-25 17:53:08 by Armorvil »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #16 on: 2008-09-25 18:49:59 »
I think that the "Everyone's Grudge" attack doesn't work because it is based on the target's number of kills, not the user's number of kills. Since none of the enemies have any kills under their belt, it will always deal 0 damage. It fails for much the same reason as the Aire Tam Storm attack fails. Try attacking one of you allies with this.
« Last Edit: 2008-09-25 18:56:19 by Leighos Kudistos Megistos »

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #17 on: 2008-09-25 19:04:14 »
I think that the "Everyone's Grudge" attack doesn't work because it is based on the target's number of kills, not the user's number of kills. Since none of the enemies have any kills under their belt, it will always deal 0 damage. It fails for much the same reason as the Aire Tam Storm attack fails. Try attacking one of you allies with this.

Ahhh, I'm too lazy to test this right now, but I bet you're right. It's logical.

Deathblow

  • *
  • Posts: 32
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #18 on: 2008-09-25 20:46:18 »
on a side note, before the status effect list was posted, i used 20 for death instead of 00 because i saw it listed in hojo after death in the elements drop down list. and it worked, some enemies would drop before enough damage was done to kill them. im gonna use the 00 one and see if theres any difference.

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #19 on: 2008-09-25 21:15:58 »
Quote from: Armorvil
23h: Deals %damage based on the target's CurrHP. I think Weapon Attack is the percentage (10h=50%, 20h=100%, etc)
24h: Deals %damage based on the target's MaxHP.

For these attacks, each 1h represents 1/32 of the current/total HP, so 1Eh would, like Supernova, take off 15/16 of the HP; 1Fh would, like Sephiroth's "cut" attack in the final battle, take off 31/32 of the HP.
« Last Edit: 2008-09-25 21:17:31 by Leighos Kudistos Megistos »

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #20 on: 2008-09-25 21:46:10 »
Quote
on a side note, before the status effect list was posted, i used 20 for death instead of 00 because i saw it listed in hojo after death in the elements drop down list. and it worked, some enemies would drop before enough damage was done to kill them. im gonna use the 00 one and see if theres any difference.

I noticed that 10h and 20h also work for Death, while testing. 06h and 16h will also have the same effect than 26h, for example.

Quote from: Armorvil
23h: Deals %damage based on the target's CurrHP. I think Weapon Attack is the percentage (10h=50%, 20h=100%, etc)
24h: Deals %damage based on the target's MaxHP.

For these attacks, each 1h represents 1/32 of the current/total HP, so 1Eh would, like Supernova, take off 15/16 of the HP; 1Fh would, like Sephiroth's "cut" attack in the final battle, take off 31/32 of the HP.

Thanks for expanding on this :-)
By the way, if you find a way to make a weapon restore HP or MP, please let me know! ^^

Deathblow

  • *
  • Posts: 32
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #21 on: 2008-09-26 02:12:42 »
in the kernel.bin wiki it says for the special weapon 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 "
Does that mean even if I equip it on a weapon for someone else that it will only activate if Tifa has an ailment?
« Last Edit: 2008-09-26 15:39:49 by Deathblow »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #22 on: 2008-09-27 02:34:58 »
I have found some more things out about weapon data: 0x24 is the sound a weapon makes when it hits normally, 0x25 is the sound it makes when it makes a critical hit and 0x26 is the sound a weapon makes when it misses.

Deathblow

  • *
  • Posts: 32
    • View Profile
Re: help a noob w/ text editing weapon stats
« Reply #23 on: 2008-09-28 21:01:14 »
Thanks :-)

Unfortunately I don't know anything about the status attack; in attack data there are four bytes for status changes, so this must work differently (and it seems that none of the weapons use it). Maybe you could experiment with it and see what happens. There are 31 statuses in the game, so you could try putting in values from 00 to 1e and seeing what happens: maybe something, maybe nothing.

Yeah, I already tested them and made a quick video based on my discoveries.

status bits in the weapon data :

00: Death
01: Near Death
02: Sleep
03: Poison
04: Sadness
05: Fury
06: Confu
07: Silence
08: Haste
09: Slow
0A: Stop
0B: Frog
0C: Small
0D: Slow Numb
0E: Petrify
0F: Regen
10: Barrier
11: M.Barrier

It looks like the other status effects don't work, though.

Do you know what the values are for the other status effects? Mebbe they dont work on weapons but might work on armor? Im mainly interested in paralyzed since im playing gjoerulv's mod and im at the part with aeris and the barrels and when cloud fights against hedgehog pies their attack seems to inflict poison, silence and what i thought was stop but is probably paralyze since i edited the titan bangle to protect against stop and he still stands there doing nothing while the hedgehogs take their time finishing him off and game over. im just gonna edit in a ribbon to get past this. Off subject: what is the "peerless" effect?


gjoerulv

  • *
  • Posts: 1225
  • me
    • View Profile
    • My Youtube
Re: help a noob w/ text editing weapon stats
« Reply #24 on: 2008-09-28 21:11:33 »
@Deathblow: You have trouble with the pies? Hmmm... I was hit by them many times, but only in rare occasions did they actually give the effect. You're just not lucky I guess. Peerles is the "ultimate good" status effect. It makes you immune to everything. Aeris limit, planet protector, gives that effect.