Author Topic: FF VIII: How to modify damage formulas?  (Read 6625 times)

Callisto

  • *
  • Posts: 303
    • View Profile
FF VIII: How to modify damage formulas?
« on: 2016-01-13 22:54:07 »
Hello everyone.

I have recently started to work on a balancing mod for FF VIII. Adjusting things such as spell power, junction effects or Refine results was no big problem with some changes made to kernel.bin and mngrp.bin. However, finding the relevant data for damage formulas gives me trouble, as they seem to be stored in other files. Does anyone know about the files in question, and the respective offsets? To be more precise, this is what I'm looking for:

1. Magic damage formula for enemies (would like it to be the same as for the characters, by basically swapping a certain divisor in the formula (8 -> 4)
2. Damage formulas for Kamikaze and Darkside abilities
3. Angel Wing damage multiplier
4. Normal Item drop and Rare Item probabilities for each slot
5. Vit0 immunity for enemies (there is an unused status immunity check for Percent. Would it be somehow possible to link Vit0 to this one instead?)
6. Changing character base stats and starting level, also giving Squall, Zell and Quistis some default spells at the beginning of the game

Any help would be much appreciated.
« Last Edit: 2016-06-01 18:27:11 by Callisto »

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #1 on: 2016-01-14 00:10:41 »
If you're adjusting junction effects and refinement results then this project sounds really promising. If this game is anything like FF7, then a lot of what you're looking for is likely stored in the .EXE. I don't know how well FF8's .EXE has been mapped, though, or if anyone is actively working with it right now.

The people working with FF8's battle scenes/world map might be able to help with tracking addresses down. This thread should be in the scripting/reverse-engineering section as well, it'll be more likely to be seen by the kind of people you're looking for.

Callisto

  • *
  • Posts: 303
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #2 on: 2016-01-15 19:52:00 »
Thank you. I had a closer look at the .exe and it looks like the variable that controls the enemies' magical damage output can be found there indeed:

http://i.imgur.com/TloXdVQ.png

Raising the value within the red box from 3 to 4 seems to do the trick. Enemies are now equal to the party when it comes to magical damage output, which I think is very important. No more measly 2000 HP (or even less) damage from spells like Holy or Flare... :roll:

Well, I'm ok with the thread being moved to the scripting/reverse engineering section. Getting some help regarding the other points would be great, as finding the correct value from above alone took me quite some time.


Kefka

  • *
  • Posts: 202
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #3 on: 2016-06-12 05:46:14 »
Thank you. I had a closer look at the .exe and it looks like the variable that controls the enemies' magical damage output can be found there indeed:

http://i.imgur.com/TloXdVQ.png

Raising the value within the red box from 3 to 4 seems to do the trick. Enemies are now equal to the party when it comes to magical damage output, which I think is very important. No more measly 2000 HP (or even less) damage from spells like Holy or Flare... :roll:

Well, I'm ok with the thread being moved to the scripting/reverse engineering section. Getting some help regarding the other points would be great, as finding the correct value from above alone took me quite some time.

I tried your change Callisto, and while it seemed to work at first, I did encounter one weird problem when fighting multiple enemies: the magic damage boost from that variable seems to only cover the first enemy in battle, and not any others. So when multiple enemies are present in a battle, only the enemy in slot 1 will deal increased magical damage, the remaining enemies seem to be unaffected by that variable change. I've tested this in various battles, e.g:

In the Dollet boss fight, only Biggs gets the damage boost, but Wedge and Elvoret do not.

In the last battle on disc 2, Seifer got the damage boost, but Edea did not.

In the boss battle with the Oilboyles, only one of them deals increased damage with Sonic Wave, even though both were at the same level.

Do you have any idea what might be responsible for this? Or am I missing something?

JWP

  • *
  • Posts: 194
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #4 on: 2016-06-12 11:25:04 »
The reason that happens is because he's changing the test on the battle id.
For player characters this is 0-2 and for monsters this is 3+. The way he's changed the test means that anything with an ID of 4+ still gets the damage divided - so any monster other than the first.
I would change 0x491CC7 to an unconditional jump (JMP).
This would be changing 0x491CC7 (or 0x91CC7 in the exe):

Code: [Select]
From: 7C
To:   EB
« Last Edit: 2016-06-12 11:26:46 by JWP »

Kefka

  • *
  • Posts: 202
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #5 on: 2016-06-12 11:34:50 »
Ah, interesting. Thanks for the tip, I'll try that. Just out of curiosity, does this mean that the same result could be obtained by increasing the byte that Callisto discovered to 5, 6, 7, or higher to cover more/all enemies?

JWP

  • *
  • Posts: 194
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #6 on: 2016-06-12 11:42:38 »
That is correct but I'm still not sure where it ends. You could just change it to something like 100 and it'd probably work.
Replacing the division (the "sar esi, 1" line) with NOPs would also work.
« Last Edit: 2016-06-12 12:14:15 by JWP »

Callisto

  • *
  • Posts: 303
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #7 on: 2016-06-19 23:35:39 »
Oh, totally missed there has been some activity here. Sorry for not answering earlier, Kefka.

In case it still matters: I have the value set to 6 and that way the damage boost seems to apply to all enemies, including final bosses.

Haven't tried the JMP thing yet. Interesting.



JWP

  • *
  • Posts: 194
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #8 on: 2016-06-20 00:03:31 »
Surely the damage boost wouldn't apply for one of the monsters in the Granaldo boss battle in that case?
Since you'd have IDs up to 6 with 4 monsters and the less than check would fail for the monster with ID 6.

Callisto

  • *
  • Posts: 303
    • View Profile
Re: FF VIII: How to modify damage formulas?
« Reply #9 on: 2016-06-20 00:15:36 »
Hm, that would be hard to check, as Raldos naturally don't use any magical attacks.

Anyway, might be better to just go for your JMP code change to be on the safe side. Or setting that byte to 100 or more, as you said. Good that you looked into this a bit more closely.