Users browsing this thread: 1 Guest(s)
Normalised Item Magic
04-28-2016, 09:14 AM
(This post was last modified: 07-28-2017, 10:21 PM by madsiur.
Edit Reason: changed patch link
)
Title: Normalised Item Magic
Author: Seibaby
Version: 0.2
Release date: 30/04/2016
Applies to: FF3us 1.0 (MD5:E986575B98300F721CE27C180264D890)
Tested on: FF3us 1.0 (may or may not work on other versions; untested)
Download
Introduction:
Item Magic, aka breaking Rods (and Shields), normally produces unblockable, defense-ignoring spells that always do max damage, punch right through Reflect and doesn't even have the goddamn common courtesy of wiping off Clear status after they're done. While it is apparent that Square wanted Item Magic to never miss, it seems to me like a result of lazy programming that Rods and Shields became the unholy instruments of inescapable death and destruction that they are.
In the interest of improved game balance, this patch makes spells cast via an item consider all the steps of damage modification (Mdef, Shell, Morph, self damage, and random variance). Such spells will now remove Clear, but remain Unblockable and will still bypass Reflect.
The alternate version of this patch does not preserve the Unblockable and Non-reflectable attributes. Spells cast via items will bounce off Reflect, and may miss their targets. In other words, it makes spells cast via Item behave exactly like spells cast via the Magic command.
BONUS: Check the included assembly for some optional modifications that increase damage instead of bypassing Reflect and Mblock.
Testing:
I have tested this only briefly. If you encounter problems with this patch, please send feedback to me in this thread or in a PM.
Version history:
0.2 Optimized code and reimplemented some original functionality.
0.1 The first version (the alternative version in this release).
Credits and Thanks:
Gi Nattak for requesting the original version of this patch, and
initiating a discussion leading to its release.
Kugawattan for providing a trail of thought that led me to develop
the second version of this patch.
Madsiur for encouraging the release of this patch and offering to
host it on FF6hacking.com.
Assassin for his invaluable commented disassembly of bank C2.
Assembly code
Disassembly and commentary
Author: Seibaby
Version: 0.2
Release date: 30/04/2016
Applies to: FF3us 1.0 (MD5:E986575B98300F721CE27C180264D890)
Tested on: FF3us 1.0 (may or may not work on other versions; untested)
Download
Code:
Files included in this archive:
readme.txt - You're reading it
rod-mod-H.ips - The patch, for headered ROM
rod-mod-N.ips - The patch, for unheadered ROM
rod-mod-alt-H.ips - The alternate version, for headered ROM
rod-mod-alt-N.ips - The alternate version, for unheadered ROM
anti-rod-mod-H.ips - Anti-patch (both versions), for headered ROM
anti-rod-mod-N.ips - Anti patch (both versions), for unheadered ROM
(The anti-patches remove this patch and restore
original functionality)
rod-mod.asm - Assembly code for the patch
rod-mod-alt.asm - Assembly code for the alternate version
rod-mod.txt - Commented disassembly and commentary
Offsets affected:
C2/18F3-C2/18FC
Additional original functions used:
C2/382D - C2/3837 - Part of the weapon addition magic code
(C2/151A - C2/151E) - (Part of the Spear damage bonus for Jump. Not used by
the main patch, only by one of the bonus options)
Introduction:
Item Magic, aka breaking Rods (and Shields), normally produces unblockable, defense-ignoring spells that always do max damage, punch right through Reflect and doesn't even have the goddamn common courtesy of wiping off Clear status after they're done. While it is apparent that Square wanted Item Magic to never miss, it seems to me like a result of lazy programming that Rods and Shields became the unholy instruments of inescapable death and destruction that they are.
In the interest of improved game balance, this patch makes spells cast via an item consider all the steps of damage modification (Mdef, Shell, Morph, self damage, and random variance). Such spells will now remove Clear, but remain Unblockable and will still bypass Reflect.
The alternate version of this patch does not preserve the Unblockable and Non-reflectable attributes. Spells cast via items will bounce off Reflect, and may miss their targets. In other words, it makes spells cast via Item behave exactly like spells cast via the Magic command.
BONUS: Check the included assembly for some optional modifications that increase damage instead of bypassing Reflect and Mblock.
Testing:
I have tested this only briefly. If you encounter problems with this patch, please send feedback to me in this thread or in a PM.
Version history:
0.2 Optimized code and reimplemented some original functionality.
0.1 The first version (the alternative version in this release).
Credits and Thanks:
Gi Nattak for requesting the original version of this patch, and
initiating a discussion leading to its release.
Kugawattan for providing a trail of thought that led me to develop
the second version of this patch.
Madsiur for encouraging the release of this patch and offering to
host it on FF6hacking.com.
Assassin for his invaluable commented disassembly of bank C2.
Assembly code
Code:
;Item magic removes Clear and doesn't ignore defense
hirom ;don't change this
;header ;uncomment this if your ROM has a header
org $C2382D
set_unblockable:
org $C218F3
JSR set_unblockable ;(Set Not reflectable and Unblockable)
LDA #$80
TSB $B3 ;(Clear ignore Clear)
DEC $3414 ;(Clear ignore damage modification)
Code:
;Alternate version - Item magic works like normal Magic
hirom ;don't change this
;header ;uncomment this if your ROM has a header
org $C218F3
LDA #$80
TSB $B3 ;(Clear Ignore Clear)
DEC $3414 ;(Clear ignore damage modification))
;-option 1---------------------------------------------------------------------
;JSR doubledmg ;(Increase damage by 100%)
;org $C2151A
;doubledmg:
;-option 2---------------------------------------------------------------------
;INC $BD ;(Increase damage by 50%)
;NOP
;-option 3---------------------------------------------------------------------
NOP #3 ;(Do nothing)
Disassembly and commentary
Code:
Original code:
C2/1897: 9C 14 34 STZ $3414 (Set ignore damage modification)
C2/189A: A9 80 LDA #$80
C2/189C: 14 B3 TRB $B3 (Set Ignore Clear)
This is the start of the code for the Item command. These instructions are necessary to let Potions etc. do fixed healing and not mess with Clear.
C2/18F3: A9 02 LDA #$02
C2/18F5: 0C A3 11 TSB $11A3 (Set Not reflectable)
C2/18F8: A9 20 LDA #$20
C2/18FA: 0C A4 11 TSB $11A4 (Set unblockable)
This is where Item Magic gets its special properties. Looking at this code, it was obviously intentional to let Item Magic bypass Reflect and Mblock.
I believe it was Square's intention that, since you're sacrificing an item, the resulting spell should at least always hit its target.
The code for weapon addition magic at C2/382D does the same thing, so we can call it instead, and free up some space for the function of this patch:
Modified code:
C2/18F3: 20 2D 38 JSR $382D (Set Not reflectable, Set unblockable)
C2/18F5: A9 80 LDA #$80
C2/18F8: 04 B3 TSB $B3 (Clear ignore Clear)
C2/18FA: CE 14 34 DEC $3414 (Clear ignore damage modification)
(Alternate version - this version makes Item Magic behave like normal Magic)
Modified code:
C2/18F3: A9 80 LDA #$80
C2/18F5: 04 B3 TSB $B3 (Clear Ignore Clear)
C2/18F7: CE 14 34 DEC $3414 (Clear ignore damage modification)
(BONUS: Provided are two options for making use of the unused three bytes, note
that the attached .ips files apply the third option: nothing)
C2/18FA: 20 1A 15 JSR $151A (Increase damage by 100%)
-or----------------------------------------------------------------------------
C2/18FA: E6 BD INC $BD (Increase damage by 50%)
C2/18FC: EA NOP
-or----------------------------------------------------------------------------
C2/18FA: EA EA EA NOP #3 (Do nothing)
The following 3 users say Thank You to seibaby for this post:
• Gi Nattak (04-28-2016), madsiur (04-29-2016), Robo Jesus (10-16-2016)
• Gi Nattak (04-28-2016), madsiur (04-29-2016), Robo Jesus (10-16-2016)
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)