+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  FF3US/FFVI Hex Edit Battle Commands?
Pages: [1]
Author Topic: FF3US/FFVI Hex Edit Battle Commands?  (Read 310 times)
H2O
Guest
« on: November 22, 2006, 11:06:01 pm »

Hello,

I was just doing a rewrite of FFVI Rom for SNES. Along the way I decided to change some moves for certain new characters that I have put in during the rewrite. I am only using a Hex Editer to do this so I really know nothing about major hacking etc.

Based on some tutorials that I've found online, I was able to change a few of the battle commands, more sepcifically the "Magic" command is now altered to cast different spells, same thing with Lore. I've also found that the battle command "Shock", is pretty much the spell "Megahit", thus altering Megahit will change the "Shock" battle command.

I was just wondering if there was any way to change Coin Toss and Possess, in the same manner is changing Shock. Is there an offset that I can just look up and alter the hex values? I'm not too sure of exactly what is going on when I hex edit the rom, but it seems to me like I'm just resetting some pointers to different data. If that is the case, is there a way to Hex edit the "Rage" and "Leap" commands into a basic battle command like "Shock"?

One last question about Hex Editing FFVI; for the jump command animation, is there a way that I can add a "claw slash" effect when the character lands and hits the enemy? Something like the double slash graphics used in Shadow's desperation attack.

Apologies if my requests/questions are absurd and impossible. Thanks for the time, and please keep in mind that I am asking about hex editing.

Thanks again.
Lenophis
Guest
« Reply #1 on: November 22, 2006, 11:29:46 pm »

The disassembly regarding those commands.

Code:
Rage

C2/1560: B9 A8 33     LDA $33A8,Y   (get monster #)
C2/1563: 1A           INC
C2/1564: D0 13        BNE $1579     (branch if it's already defined)
C2/1566: AE 93 3A     LDX $3A93     (if it's undefined [like with Mimic], get the
                                     index of another Rager, so we can copy their
                                     monster #)
C2/1569: E0 14        CPX #$14
C2/156B: 90 02        BCC $156F     (if the Rager index corresponds to a character
                                     [0, 2, 4, 6] or an enemy [8, 10, 12, 14, 16, 18],
                                     consider it valid and branch.)
C2/156D: A2 00        LDX #$00      (if not, default to looking at character #1)
C2/156F: BD A8 33     LDA $33A8,X   (get that other Rager's monster)
C2/1572: 99 A8 33     STA $33A8,Y   (save it as our current Rager's monster)
C2/1575: 7B           TDC
C2/1576: 99 A9 33     STA $33A9,Y
C2/1579: 8C 93 3A     STY $3A93     (save the index of our current Rager)
C2/157C: B9 F9 3E     LDA $3EF9,Y
C2/157F: 09 01        ORA #$01
C2/1581: 99 F9 3E     STA $3EF9,Y  (Set Rage status)
C2/1584: 20 10 06     JSR $0610    (Load monster Battle and Special graphics, its special
                                    attack, elemental properties, status immunities, startup
                                    statuses [to be set later], and special properties)
C2/1587: BB           TYX
C2/1588: 20 50 26     JSR $2650    (deal with Instant Death protection, and Poison elemental
                                    nullification giving immunity to Poison status)
C2/158B: 20 54 15     JSR $1554    (Commands code.
                                    note that the attack's "Update Status" function will also
                                    be used to give the monster's statuses to the Rager.)
C2/158E: 4C 75 26     JMP $2675    (make some monster statuses permanent by setting immunity
                                    to them.  also handle immunity to "mutually exclusive"
                                    statuses.)

Possess

C2/17E5: BB           TYX
C2/17E6: 20 C1 19     JSR $19C1
C2/17E9: A9 20        LDA #$20
C2/17EB: 0C A4 11     TSB $11A4   (Set can't be dodged)
C2/17EE: A9 A0        LDA #$A0
C2/17F0: 8D A9 11     STA $11A9   (Stores Possess in special effect)
C2/17F3: 4C 7B 31     JMP $317B


Jump

C2/17F6: BB           TYX
C2/17F7: 20 C1 19     JSR $19C1   (load command data)
C2/17FA: BD 69 3B     LDA $3B69,X (Battle Power - left hand)
C2/17FD: F0 09        BEQ $1808   (if no battle power, call subfunction with carry unset
                                   to indicate right hand)
C2/17FF: 38           SEC         (set carry to indicate left hand)
C2/1800: BD 68 3B     LDA $3B68,X (Battle Power - right hand)
C2/1803: F0 03        BEQ $1808   (if no bat pwr, call subfunction with carry set)
C2/1805: 20 53 4B     JSR $4B53   (0 or 1 RNG - if both hands have weapon, carry flag
                                   will select hand used)

C2/1808: 20 9F 29     JSR $299F   (Load weapon data into attack data.
                                   Plus Sniper Sight, Offering and more)
C2/180B: A9 20        LDA #$20
C2/180D: 8D A4 11     STA $11A4   (Set can't be dodged only)
C2/1810: 04 B3        TSB $B3     (Set ignore attacker row)
C2/1812: E6 BD        INC $BD     (Increment damage.  since $BD is zeroed right before
                                   this in function C2/13D3, it should be 1 now.)
C2/1814: BD A8 3C     LDA $3CA8,X (Weapon in right hand)
C2/1817: 20 12 15     JSR $1512   (Set $BD to 2 if spear)
C2/181A: BD A9 3C     LDA $3CA9,X (Weapon in left hand)
C2/181D: 20 12 15     JSR $1512   (Set $BD to 2 if spear)
C2/1820: BD 44 3C     LDA $3C44,X
C2/1823: 10 17        BPL $183C   (Branch if not jump continously [Dragon Horn])
C2/1825: CE 8E 3A     DEC $3A8E   (make a variable FFh to indicate the attack is
                                   a continuous jump)
C2/1828: 20 5A 4B     JSR $4B5A   (0 to 255)
C2/182B: EE 70 3A     INC $3A70   (Add 1 attack)
C2/182E: C9 40        CMP #$40
C2/1830: B0 0A        BCS $183C   (75% chance branch)
C2/1832: EE 70 3A     INC $3A70   (Add 1 attack)
C2/1835: C9 10        CMP #$10
C2/1837: B0 03        BCS $183C   (25% chance branch - so there's a 1/16 overall
                                   chance of 4 attacks)
C2/1839: EE 70 3A     INC $3A70   (Add 1 attack)
C2/183C: BD F9 3E     LDA $3EF9,X
C2/183F: 29 DF        AND #$DF
C2/1841: 9D F9 3E     STA $3EF9,X (Clear Hide status)
C2/1844: 4C 7B 31     JMP $317B

GP Rain

C2/1907: BB           TYX
C2/1908: 20 8A 29     JSR $298A   (Clear special effect, magic power, etc.)
C2/190B: EE A6 11     INC $11A6   (Set spell power to 1)
C2/190E: A9 60        LDA #$60
C2/1910: 0C A2 11     TSB $11A2   (Set ignore defense, no split damage)
C2/1913: 9C 14 34     STZ $3414   (Skip damage modification)
C2/1916: E0 08        CPX #$08
C2/1918: 90 05        BCC $191F
C2/191A: A9 05        LDA #$05
C2/191C: 8D 12 34     STA $3412
C2/191F: A9 A2        LDA #$A2
C2/1921: 8D A9 11     STA $11A9   (Store GP Rain in special effect)
C2/1924: 4C 7B 31     JMP $317B

Leap

C2/199D: BB           TYX
C2/199E: 20 8A 29     JSR $298A   (Clear special effect, magic power, etc.)
C2/19A1: A9 A8        LDA #$A8
C2/19A3: 8D A9 11     STA $11A9   (Store Leap in special effect)
C2/19A6: A9 01        LDA #$01
C2/19A8: 1C A2 11     TRB $11A2   (Sets to magical damage)
C2/19AB: A9 40        LDA #$40
C2/19AD: 85 BB        STA $BB     (Sets to Cursor start on enemy only)
C2/19AF: 4C 7B 31     JMP $317B

Can't say I can help you beyond this, I haven't been successful in changing commands effects.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC