Miscellaneous Forums > Scripting and Reverse Engineering

[FF8] Auto-Potion, Darkside HP loss and more

<< < (3/4) > >>

JWP:
No problem Girl next door :).
ok, this should make a new attack type of 0x25 that behaves exactly like a magic attack except it removes statuses instead of adding them, I have no idea if there's any side effects or anything though :P.

First undo all the changes from before, then make the following changes:


--- Code: ---0x491C19 (0x91C19 in exe)
from: 11
to:   12

0x492010 (0x92010 in exe)
from: E8 7B 00 00
to:   E9 1F 69 6D

0x49208A (0x9208A in exe)
from: 90
to:   00

0x4922D9 (0x922D9 in exe)
from: 24
to:   25

0x492AB8 (0x92AB8 in exe)
from: 90 90 90 90
to:   5E 89 B6 00

0xB68934 (0x768934 in exe)
from:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
to:
80 7C E4 38 12 74 07 E8 50 97 92 FF EB 17 FF 35
34 A2 D2 01 66 A1 3E A2 D2 01 50 55 51 E8 CA 8E
92 FF 83 C4 10 E9 B7 96 92 FF 6A 12 8B 4C 24 30
8B 54 24 28 51 56 52 E8 60 91 92 FF 83 C4 10 8B
F8 E9 58 9C 92 FF



--- End code ---

Callisto:
From the looks of it, this must have been painful to figure out. Much more code than last time :-X

Anyway, looks good so far. The new attack removes exactly the same status effects as the normal Dispel does (just on the entire party), it can not be reflected, does magical damage, can be shelled, does not ignore Spirit, and in the case of Dispel, it now gives me a white "miss" instead of a green one if used on a target not under any positive status.

I can't think of any other possible side effects at the moment. Well done.

JWP:
It's not that bad, I knew where all the stuff was.
The stuff for attack type 0x25 is mostly copied from the standard magic attack except it uses 0x12 instead of 0x00 in a function call.

Basically most magic attacks call a function to do most of the work (the cure attacks call a different one though).
All I did was add a new magic attack type of 0x12 (this is different from the attack type) which follows the same code path as 0x00 (a standard magic attack).

In the magic attack function, there's a call to an inflict status function, I hijacked this function call and made it jump to my code.
My code is then just a basic if statement in ASM:
if (magic_attack_type != 0x12) {
    inflict_status_function(caster_id, target_id, 1) - 1 means it's a magic attack, 0 is for physical attacks
}
else {
    cure_status_function(target_id, spell_power, status_word, status_dword)
}

Girl next door:
Another thing: do you know in wich file can I change the items names ? I mean, not the battle items but all the others.

JWP:
All item names are in kernel.bin, see section 40 listed in this post. More specifically it contains names and descriptions, the pointers to the names are all in section 9.

You have to be careful how you edit it because you can screw all the text offsets up if you're not careful, I'd suggest using Carbuncle if you can (Doomtrain doesn't support text editing at the moment).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version