How do I edit damage formulas? [FFVIII]

  • Thread starter Thread starter SunnyD
  • Start date Start date
Status
Not open for further replies.
Making progress :D

xAWO32K.jpg



Goodbye Card Mod   :-D

EtOH5jG.jpg

31OpY83.jpg
 
Last edited:
0x0F78 - Junctionable GFs - 16 items - 132 bytes each

Code: [Select]
Code:
0x0F78 - Quetzacotl0x0FFC - Shiva0x1080 - Ifrit0x1104 - Siren0x1188 - Brothers0x120C - Diablos0x1290 - Carbuncle0x1314 - Leviathan0x1398 - Pandemona0x141C - Cerberus0x14A0 - Alexander0x1524 - Doomtrain0x15A8 - Bahamut0x162C - Cactuar0x16B0 - Tonberry0x1734 - Eden

-----------------------------------------------------------------------------------------------------------------------------------------------------------------


Code: [Select]
Code:
2 bytes - Offset to GF attack name2 bytes - Offset to GF attack description2 bytes - Magic ID1 byte - Unknown1 byte - GF Power5 bytes - Unknown1 byte - Element0x00 - Non-elemental0x01 - Fire0x02 - Ice0x04 - Thunder0x08 - Earth0x10 - Poison0x20 - Wind0x40 - Water0x80 - Holy1 byte - status1 byte - status1 byte - status1 byte - status1 byte - status1 byte - Unknown1 byte - GF HP Modifier6 bytes - Unknown1 byte - Status Attack Enabler 0x00 - disabled0xFE - enabled (i need to test other values)2 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability3 bytes - Unknown1 byte - Ability19 bytes - Unknown1 byte - Power Mod (used in damage formula)1 byte - Level Mod (used in damage formula)

Ability Values
Code: [Select]
Code:
0x01 - HP-J0x02 - STR-J0x03 - VIT-J0x04 - MAG-J0x05 - SPR-J0x06 - SPD-J0x07 - EVA-J0x08 - HIT-J0x09 - LUCK-J0x0A - Elem-Atk-J0x0B - ST-Atk-J0x0C - Elem-Def-J0x0C - ST-Def-J0x0E - Elem-Defx20x0F - Elem-Defx40x10 - ST-Def-Jx20x11 - ST-Def-Jx40x12 - Abilityx30x13 - Abilityx40x14 - Magic0x15 - GF0x16 - Draw0x17 - Item0x18 - Empty*0x19 - Card0x1A - Doom0x1B - MadRush0x1C - Treatment0x1D - Defend0x1E - Darkside0x1F - Recover0x20 - Absorb0x21 - Revive0x22 - LVDown0x23 - LVUp0x24 - Kamikaze0x25 - Devour0x26 - MiniMog0x27 - HP+20%0x28 - HP+40%0x29 - HP+80%0x2A - Str+20%0x2B - Str+40%0X2C - Str+60%0X2D - Vit+20%0X2E - Vit+40%0X2F - Vit+60%0X30 - Mag+20%0X31 - Mag+40%0X32 - Mag+60%0X33 - Spr+20%0X34 - Spr+40%0X35 - Spr+60%0X36 - Spd+20%0X37 - Spd+40%0X38 - Eva+30%0X39 - Luck+50%0X3A - Mug0X3B - MedData0X3C - Counter0X3D - Return Damage0X3E - Cover0X3F - Initiative0x40 - Move-HPUp0x41 - HPBonus0x42 - StrBonus0x43 - VitBonus0x44 - MagBonus0x45 - SprBonus0x46 - Auto-Protect0x47 - Auto-Shell0x48 - Auto-Reflect0x49 - Auto-Haste0x4A - Auto Potion0x4B - Expendx2-10x4C - Expendx3-10x4D - Ribbon (requires 1 ap to be learned)0x4E - Alert0x4F - Move-Find0x50 - Enc-Half0x51 - Enc-None0x52 - RareItem0x53 - SumMag+10%0x54 - SumMag+20%0x55 - SumMag+30%0x56 - SumMag+40%0x57 - GFHP+10%0x58 - GFHP+20%0x59 - GFHP+30%0x5A - GFHP+40%0x5B - Boost0x5C - Haggle0x5D - Sell-High0x5E - Familiar0x5F - CallShop0x60 - JunkShop0x61 - T Mag-RF0x62 - IMag-RF0x63 - FMag-RF0x64 - LMag-RF0x65 - TimeMag-RF0x66 - STMag-RF0x67 - SuptMag-RF0x68 - ForbidMag-RF0x69 - RecovMed-RF0x6A - STMed-RF0x6B - Ammo-RF0x6C - Tool-RF0x6D - ForbidMed-RF0x6E - GFRecovMed-RF0x6F - GFAblMed-RF0x70 - Mid Mag-RF0x71 - HighMag-RF0x72 - MedLVUp0x73 - Card Mod*Command Ability that does nothing, if equipped it's an unselectable empty space in battle. Maybe just a placeholder for something they wanted to use.
 
Last edited:
Wow, I'm amazed by how much progress has been made on FF8 in one single week! Finally, being able to edit spells, junction boosts, GF abilities, stat growth etc., that's something I've been eagerly awaiting for ages, glad to see that it's finally possible. One question, though, does anybody plan on making an editor for all this stuff? That would greatly help in making the entire editing process more comfortable. I'd do it myself if only I knew how. Anyway, kudos to all of you who worked on uncovering these things, you rock!
 
I'm currently learning C#, if by the time i'm competent enough with it to make an editor and one is not available yet then i'll do it.
 
I could but I don't think I'd have enough time to reverse engineer stuff and make an editor :(
 
Sorry for being quiet. University deadlines eating up my time. Awesome to see what's been discovered over the past week. And thanks for the answers too :)
 
struct Weapon {
   WORD name_offset;
   BYTE renzokuken_finishers; //0x01 = Rough Divide, 0x02 = Fated Circle, 0x04 = Blasting Zone, 0x08 = Lion Heart
   BYTE unk;
   BYTE character_id;
   BYTE unk;
   BYTE attack_power;
   BYTE hit_bonus;
   BYTE str_bonus;
   BYTE weapon_tier;
   BYTE unk[2];
}
A question about the weapon data: the strength bonus is the increase towards a character's strength stat once the weapon is bought, right? That's what pretty much all websites list as the weapon's attack power. However, here seems to be an additional attack power byte which is the same for every single weapon (just looked in the kernel, and all weapons have a value of 20 for their attack power). What is this byte used for? Is it an additional but invisible strength increase? Or does it serve a different purpose in damage calculation? I'm just confused because all guides around the web always refer to the strength bonus when talking about a weapon's attack power.
 
I'd be willing to offer design help for any potential editor author.
 
A question about the weapon data: the strength bonus is the increase towards a character's strength stat once the weapon is bought, right? That's what pretty much all websites list as the weapon's attack power. However, here seems to be an additional attack power byte which is the same for every single weapon (just looked in the kernel, and all weapons have a value of 20 for their attack power). What is this byte used for? Is it an additional but invisible strength increase? Or does it serve a different purpose in damage calculation? I'm just confused because all guides around the web always refer to the strength bonus when talking about a weapon's attack power.
str_bonus is the value that is added to the strength stat when you buy the weapon.
attack_power is an additional byte that's use in damage calculation, so it would also give a damage increase if higher than the previous weapon.
See section 4.1 of this guide in step 3:
Step 3: Base Damage Calculation

  Damage = AttackerStr^2 / 16 + AttackerStr
  Damage = Damage * (265 - TargetVit) / 256
  Damage = Damage * Power / 16

  Note: A normal attack has a Power value of 20

EDIT: I haven't actually tested changing the byte but I made an educated guess as to what it is.
 
Last edited:
--------DATA SECTION--------
1  - 0x00E4 - Battle commands - 39 items - 8 bytes each
2  - 0x021C - Magic data - 57 items - 60 bytes each
3  - 0x0F78 - Junctionable GFs - 16 items - 132 bytes each
4  - 0x17B8 - Enemy attacks, see: http://gamehacking.org/czardragon/FF8/FF8.TXT
5  - 0x35B8 - Weapons - 33 items - 12 bytes each
6  - 0x3744 - Renzokuken finishers - 4 items - 24 bytes each
7  - 0x37A4 - Characters - 11 items - 36 bytes each
8  - 0x3930 - Battle items - 33 items - 24 bytes each
9  - 0x3C48 - Non-battle item name and description offsets - 166 items - 4 bytes each
10 - 0x3EE0 - Non-junctionable GF attacks - 16 items - 20 bytes each
11 - 0x4020 - Command ability data - 12 items - 16 bytes each
12 - 0x40E0 - Junction abilities - 20 items - 8 bytes each
13 - 0x4180 - Command abilities - 19 items - 8 bytes each
14 - 0x4218 - Stat percentage increasing abilities - 19 items - 8 bytes each
15 - 0x42B0 - Character abilities - 20 items - 8 bytes each
16 - 0x4350 - Party abilities - 5 items - 8 bytes each
17 - 0x4378 - GF abilities - 9 items - 8 bytes each
18 - 0x43C0 - Menu abilities - 24 items - 8 bytes each
19 - 0x4480 - Temporary character limit breaks - 5 items - 24 bytes each
20 - 0x44F8 - Blue magic (Quistis limit break) - 16 items - 16 bytes each
21 - 0x45F8 - ? - 64 items - 8 bytes each
22 - 0x47F8 - Shot (Irvine limit break) - 8 items - 24 bytes each
23 - 0x48B8 - Duel (Zell limit break) - 10 items - 32 bytes each
24 - 0x49F8 - ?
25 - 0x4A5C - Rinoa limit breaks - 2 items - 8 bytes each
26 - 0x4A6C - Rinoa limit breaks - 5 items - 20 bytes each
27 - 0x4AD0 - ?
28 - 0x4B0C - ? - 16 bytes each?
29 - 0x4C0C - Devour - 16 items - 12 bytes each
30 - 0x4CCC - ?
31 - 0x4D08 - Misc text pointers - 128 items - 2 bytes each
I've set my hex editor to 24 bytes so I can have a look at Shot so I can look at Limit damage. But on my kernel.bin it goes from 0x47E8 to 0x4800. No 0x47F8 to be found. Maybe I'm doing something wrong.
 
The actual offset of a byte is the number on the left + the number on the top, the number on the left is the offset of the first byte in the row.
The offset you're looking for isn't on the left in this case due to alignment but that doesn't mean that it doesn't exist.

You're not always going to get data that aligns the way you want it to (first byte of a row being the start of a section) due to all the sections having different sizes that (in your case) aren't multiples of 24.
 
Last edited:
I started to work on an editor, but don't get excited, there is very little code at the moment and it's going to be a very long time before this see the light of day (if ever).
I'm pretty much done with the magic section of the gui and i think i managed to load and save the kernel.bin correctly, now i'm struggling to make the editor actually edit something lol. At the moment i have pretty much no idea how to "connect" all the edit boxes to the bytes of the file, if anyone here knows C# well and is willing to help feel free to send me a PM.

XWizZHL.jpg
 
@JWP: ah, thanks, so the power used in the 3rd formula is referring to the weapon's attack power. That makes sense. I've seen that guide before (some years ago), but I couldn't understand the weapon's role in damage calculation, as it just says "a normal attack has a power o 20". If it said "weapon's power" instead of just power and "all weapons in the game have a power value of 20", then it would have been more clear.

@alexfilth: wow, that's like music to my ears! I can't help but feel excited even though you say it's not a lot at the moment, but I'd say it's a good start. And Doomtrain is a pretty cool name 8).
 
The 20 attack power is for basic attacks mind, other skills that use str e.g. renzokuken use different power values.
 
Just wanting to let you know that things are moving forward with the kernel editor, MaKi is helping with pretty much all the code. An initial release shouldn't be that far away. :)
 
i will make this post in my fav waiting impatiently every second  :-D :D
 
Just wanting to let you know that things are moving forward with the kernel editor, MaKi is helping with pretty much all the code. An initial release shouldn't be that far away. :)
Awesome. Looking forward to it. Would be good to see some progress on VIII modding.
 
Just wanting to let you know that things are moving forward with the kernel editor, MaKi is helping with pretty much all the code. An initial release shouldn't be that far away. :)
This is awesome news, I'm really looking forward to it! :)
 
10 - 0x3EE0 - Non-junctionable GF attacks - 16 items - 20 bytes each

Code: [Select]
Code:
Zantetsuken (Odin)Rebirth Flame (Phoenix)ChocoFire (Boko)ChocoFlare (Boko)ChocoMeteor (Boko)ChocoBocle (Boko)Moogle Dance (MiniMog)Excaliber (Gilgamesh)Excalipoor (Gilgamesh)Masamune (Gilgamesh)Excalibur (Gilgamesh)Zantetsuken (Gilgamesh)Angelo Rush (Angelo)Angelo Recover (Angelo)Angelo Reverse (Angelo)Angelo Search (Angelo)Friendship (Moomba)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------


Code: [Select]
Code:
2 bytes - Offset to attack name2 bytes - Magic ID1 bytes - Unknown1 bytes - Power1 byte - Status Enabler 0x00 - disabled0xFE - enabled (i need to test other values)4 bytes - Unknown1 byte - Element0x00 - Non-elemental0x01 - Fire0x02 - Ice0x04 - Thunder0x08 - Earth0x10 - Poison0x20 - Wind0x40 - Water0x80 - Holy1 byte - status1 byte - status1 byte - status1 byte - status1 byte - status1 byte - Unknown1 byte - Power Mod1 byte - Level Mod
 
0x4218 - Stat percentage increasing abilities - 19 items - 8 bytes each

Code: [Select]
Code:
HP+20%HP+40%HP+80%STR+20%STR+40%STR+60%VIT+20%VIT+40%VIT+60%MAG+20%MAG+40%MAG+60%SPR+20%SPR+40%SPR+60%SPD+20%SPD+40%EVA+30%LUCK+50%

Code: [Select]
Code:
2 bytes - offset to stat percentage name2 bytes - offset to stat percentage description2 bytes - unknown1 byte - increasement value1 byte - unknown

--------------------------------------------------------------------


44 - 0x8000 - Stat percentage increasing abilities text

Code: [Select]
Code:
7 bytes - name5 bytes - unknown7 bytes - description
 
Status
Not open for further replies.
Back
Top