Users browsing this thread: 1 Guest(s)
Magic Order
Español Spanish
Pienso reorganizar el orden de las magias pero el problema ponemos
por ejemplo (White)Holy (Black) Toad/Imp (Time)Meteor no se ordena y pienso hacerlo de esta manera
Nota: si el que solucione que intente que el codigo se pueda parchear con SNEStuff para que lo pueda usar hasta los que casi no saben editar en hexadecimal
Inglés English
I plan to reorganize the order of magic but we put the problem
for example (White) Holy (Black) Toad/Imp (Time) Meteor is not ordered and I plan to do it this way
Note: if the one that solves that tries that the code can be patched with SNEStuff so that it can use it until those who almost do not know how to edit in hexadecimal
Pienso reorganizar el orden de las magias pero el problema ponemos
por ejemplo (White)Holy (Black) Toad/Imp (Time)Meteor no se ordena y pienso hacerlo de esta manera
Nota: si el que solucione que intente que el codigo se pueda parchear con SNEStuff para que lo pueda usar hasta los que casi no saben editar en hexadecimal
Inglés English
I plan to reorganize the order of magic but we put the problem
for example (White) Holy (Black) Toad/Imp (Time) Meteor is not ordered and I plan to do it this way
Note: if the one that solves that tries that the code can be patched with SNEStuff so that it can use it until those who almost do not know how to edit in hexadecimal
09-18-2019, 04:41 PM
(This post was last modified: 09-18-2019, 04:42 PM by Blunderpuggs.)
Not sure if your issue is the same as the one on this thread, but I'm gonna link it just in case.
https://www.ff6hacking.com/forums/thread-3576.html
https://www.ff6hacking.com/forums/thread-3576.html
Español Spanish
Texto:Oculto
English Inglés
Text: Hidden
Black
Hidden
Time
Hidden
White
Hidden
Texto:Oculto
English Inglés
Text: Hidden
Black
Hidden
Time
Hidden
White
Hidden
09-21-2019, 01:08 PM
Changing the order spells are listed in is actually quite involved.
1) You need to manually re-order the spells in FF3USME by recreating all of their components in the desired spot (setting spell power, all the flags, special properties, and animations). The best way to do this is to open FF3USME twice, once with the file you are changing and once with a vanilla file so that you can compare the spell data.
2) You need to find the hex address of Doom's new slot and adjust values in the C2 bank so that Roulette and Condemn work properly. You need to find the hex address of Shell's and Protect's new slots and adjust values in the C2 bank so that "Near Fatal->Shell" and "Near Fatal->Safe" work properly.
3) You need to rearrange all of the Esper learning, since moving the spells won't move their indices and the Espers will still point to the old slots.
4) You need to adjust all of the items that cast spells on hit and spells on use, since moving the spells won't move their indices and they'll point to the wrong places.
5) You need to adjust _every_ enemy's control, sketch, and rage list, as well as their battle scripts, for the reasons stated in 3 and 4.
6) You need to make Hex value adjustments in the menu block (C3 bank if I recall correctly) so that moved white-magic spells can be cast correctly. Spells affected are Purify, Remedy, Cure1-3, Life1, Life2, and Warp.
7) You need to make Hex value adjustments in the C0, C1, and C3 blocks so that the game knows how to sort the magic correctly; it does this by identifying which index number is the start of a spell type, starting with Black magic.
8) Likewise, you need to change values to indicate which spell index corresponds to the start of a spell intro. This decides which animation to play when casting a spell; if unmoved then some of your extra black magic spells will play the white magic intro.
You're going to have to sink your teeth into the ROM disassemblies to be able to do all that. You can find them on the wiki for this site: https://www.ff6hacking.com/wiki/doku.php...s:doc:game
1) You need to manually re-order the spells in FF3USME by recreating all of their components in the desired spot (setting spell power, all the flags, special properties, and animations). The best way to do this is to open FF3USME twice, once with the file you are changing and once with a vanilla file so that you can compare the spell data.
2) You need to find the hex address of Doom's new slot and adjust values in the C2 bank so that Roulette and Condemn work properly. You need to find the hex address of Shell's and Protect's new slots and adjust values in the C2 bank so that "Near Fatal->Shell" and "Near Fatal->Safe" work properly.
3) You need to rearrange all of the Esper learning, since moving the spells won't move their indices and the Espers will still point to the old slots.
4) You need to adjust all of the items that cast spells on hit and spells on use, since moving the spells won't move their indices and they'll point to the wrong places.
5) You need to adjust _every_ enemy's control, sketch, and rage list, as well as their battle scripts, for the reasons stated in 3 and 4.
6) You need to make Hex value adjustments in the menu block (C3 bank if I recall correctly) so that moved white-magic spells can be cast correctly. Spells affected are Purify, Remedy, Cure1-3, Life1, Life2, and Warp.
7) You need to make Hex value adjustments in the C0, C1, and C3 blocks so that the game knows how to sort the magic correctly; it does this by identifying which index number is the start of a spell type, starting with Black magic.
8) Likewise, you need to change values to indicate which spell index corresponds to the start of a spell intro. This decides which animation to play when casting a spell; if unmoved then some of your extra black magic spells will play the white magic intro.
You're going to have to sink your teeth into the ROM disassemblies to be able to do all that. You can find them on the wiki for this site: https://www.ff6hacking.com/wiki/doku.php...s:doc:game
09-21-2019, 02:39 PM
This will be very helpful.
09-06-2024, 03:26 PM
I'm so glad I found this thread. I am also doing a Magic Re-Order and Lore Overhaul myself.
All of the things that pertain to using an editor such as moving the spells and animations into the new slots, adjusting the rages, sketches, espers, weapons, etc. and monster AI is easy enough for me.
The worry I had was moving a certain spell or ability and it not working properly due to hex issues. So this thread confirms that.
So this is what I'm looking to do.
---New List & Order--- # CUT Demi; Tornado; Quartr; Antdot; Haste; Slow | 48 SPELLS Using USme:
45 CURE 46 Life \
47 Cure-2 48 Life-2 \
49 Cure-3 50 Life-3 \
51 ESUNA 52 REGEN \
53 Imp 0 Protct / WHITE MAGIC (PAGE 1)
1 Float 2 Shell / (All menu spells moved to the top page. Imp, Float, Warp.
3 Warp 4 Reflct / Dispel I guess, I don't know what it does in menu.)
5 Dispel 6 Holy /
7 Bolt 8 Ice \
9 Bolt-2 10 Ice-2 \
11 BOLT-3 12 Ice-3 \
13 Fire 14 Drain \
15 Fire-2 16 Poison / BLACK MAGIC (PAGE 2)
17 Fire-3 18 Bio /
19 Melton 20 Flare /
21 QUAKE 22 Ultima /
23 Scan 24 Osmose \
25 Vanish 26 RASP \
27 MUTE 28 Brserk \
29 SLEEP 30 MUDDLE \
31 Death 32 Break / GREY MAGIC (PAGE 3)
33 X-Zone 34 Meteor / (The logic for Death, Break, X-Zone, and Meteor (Functions like Tornado) is they don't do damage based on
35 Slow(2) 36 Stop / the magic stat, but are a % chance.)
37 Haste(2)38 Quick /
16 spells per school, exactly 1 page each, nice. The SPELLS in ALL CAPS do not have to be moved in USme, thankfully.
Still in the game and used by enemies / no longer learned; Will be blank slots at the bottom of the menu.
39 Antdot 40 Demi
41 Slow 42 Quartr
43 Haste 44 Tornado
[REMOVE] The empty space at the bottom of the magic menu. The 3 lines / 6 blanks.
How to do this? Or is it better to just leave it?
[DELETE] Mag.Order options, or Remove options (1-6) from the Config Menu? As the list is built around the default order, so this option is not needed. Nor do I want to create more work for myself so it functions properly. The option just simply isn't needed.
New Alphabetical Lore List:
139 Absolute 0
140 Acid Rain
141 Aero
142 AQUA RAKE
143 Bad Breath
144 Big Guard
145 Blaze
146 Blowfish
147 Comet (Meteo)
148 Dischord
149 Gigavolt
150 Gran Train
151 Lv.3 Death
152 Lv.4 Flare
153 Lv.? Holy
154 Magnitude8
155 Quasar
156 Rainstorm (Flash Rain)
157 Star Cross (S.Cross)
158 Step Mine
159 STONE TOSS
160 Tsunami
161 Typhoon (Cyclonic)
162 White Wind
169 Doom (moved to Acid Rain slot)
178 Roulette (moved to Cyclonic/Typhoon slot)
185 Revenge (moved to Gigavolt slot)
187 L.2 Muddle (moved to Absolute 0 slot)
188 Reflect??? (moved to Magnitude8 slot)
190 Forcefield (moved to Flash Rain/Rainstorm slot)
204 Pep Up (moved to S.Cross/Star Cross slot)
223 Rippler (Will probably delete out of the game entirely, but Meteo slot)
228 Exploder (moved to Blaze slot)
Will I run into any problems (hex wise, not editing wise) by moving-swapping these Lores and Enemy Abilities around?
I did an 18 Lore version in one of my earlier builds and had no problems, I think. Now I want to expand to 24, but seeing there is issues moving magic around, I dunno.
From C-Dude's post, in terms of Hex editing, I will need to:
1) Hex value adjustments in the menu block to get the moved Magic working in the Menu. Cure-2, Cure-3, Life, Life-2, Imp, Float, Warp, Dispel.
2) Find the hex address for the new slots in the C2 Bank for Death, so Condemned and Roulette function properly. Also for SOS Protct & Shell.
3) Change corresponding values for some of the moved magic to display the correct spell intro for White, Black, and Grey magic.
4) -DELETE-or-Make the Mag.Order non-functional in the Config Menu. Default is all I want or need.
5) -REMOVE-the empty space created at the bottom of the magic menu from 3 lines/6 Blanks no longer being learned.
Will any other spells not work properly due to hex issues? And anything else am I missing?
All of the things that pertain to using an editor such as moving the spells and animations into the new slots, adjusting the rages, sketches, espers, weapons, etc. and monster AI is easy enough for me.
The worry I had was moving a certain spell or ability and it not working properly due to hex issues. So this thread confirms that.
So this is what I'm looking to do.
---New List & Order--- # CUT Demi; Tornado; Quartr; Antdot; Haste; Slow | 48 SPELLS Using USme:
45 CURE 46 Life \
47 Cure-2 48 Life-2 \
49 Cure-3 50 Life-3 \
51 ESUNA 52 REGEN \
53 Imp 0 Protct / WHITE MAGIC (PAGE 1)
1 Float 2 Shell / (All menu spells moved to the top page. Imp, Float, Warp.
3 Warp 4 Reflct / Dispel I guess, I don't know what it does in menu.)
5 Dispel 6 Holy /
7 Bolt 8 Ice \
9 Bolt-2 10 Ice-2 \
11 BOLT-3 12 Ice-3 \
13 Fire 14 Drain \
15 Fire-2 16 Poison / BLACK MAGIC (PAGE 2)
17 Fire-3 18 Bio /
19 Melton 20 Flare /
21 QUAKE 22 Ultima /
23 Scan 24 Osmose \
25 Vanish 26 RASP \
27 MUTE 28 Brserk \
29 SLEEP 30 MUDDLE \
31 Death 32 Break / GREY MAGIC (PAGE 3)
33 X-Zone 34 Meteor / (The logic for Death, Break, X-Zone, and Meteor (Functions like Tornado) is they don't do damage based on
35 Slow(2) 36 Stop / the magic stat, but are a % chance.)
37 Haste(2)38 Quick /
16 spells per school, exactly 1 page each, nice. The SPELLS in ALL CAPS do not have to be moved in USme, thankfully.
Still in the game and used by enemies / no longer learned; Will be blank slots at the bottom of the menu.
39 Antdot 40 Demi
41 Slow 42 Quartr
43 Haste 44 Tornado
[REMOVE] The empty space at the bottom of the magic menu. The 3 lines / 6 blanks.
How to do this? Or is it better to just leave it?
[DELETE] Mag.Order options, or Remove options (1-6) from the Config Menu? As the list is built around the default order, so this option is not needed. Nor do I want to create more work for myself so it functions properly. The option just simply isn't needed.
New Alphabetical Lore List:
139 Absolute 0
140 Acid Rain
141 Aero
142 AQUA RAKE
143 Bad Breath
144 Big Guard
145 Blaze
146 Blowfish
147 Comet (Meteo)
148 Dischord
149 Gigavolt
150 Gran Train
151 Lv.3 Death
152 Lv.4 Flare
153 Lv.? Holy
154 Magnitude8
155 Quasar
156 Rainstorm (Flash Rain)
157 Star Cross (S.Cross)
158 Step Mine
159 STONE TOSS
160 Tsunami
161 Typhoon (Cyclonic)
162 White Wind
169 Doom (moved to Acid Rain slot)
178 Roulette (moved to Cyclonic/Typhoon slot)
185 Revenge (moved to Gigavolt slot)
187 L.2 Muddle (moved to Absolute 0 slot)
188 Reflect??? (moved to Magnitude8 slot)
190 Forcefield (moved to Flash Rain/Rainstorm slot)
204 Pep Up (moved to S.Cross/Star Cross slot)
223 Rippler (Will probably delete out of the game entirely, but Meteo slot)
228 Exploder (moved to Blaze slot)
Will I run into any problems (hex wise, not editing wise) by moving-swapping these Lores and Enemy Abilities around?
I did an 18 Lore version in one of my earlier builds and had no problems, I think. Now I want to expand to 24, but seeing there is issues moving magic around, I dunno.
From C-Dude's post, in terms of Hex editing, I will need to:
1) Hex value adjustments in the menu block to get the moved Magic working in the Menu. Cure-2, Cure-3, Life, Life-2, Imp, Float, Warp, Dispel.
2) Find the hex address for the new slots in the C2 Bank for Death, so Condemned and Roulette function properly. Also for SOS Protct & Shell.
3) Change corresponding values for some of the moved magic to display the correct spell intro for White, Black, and Grey magic.
4) -DELETE-or-Make the Mag.Order non-functional in the Config Menu. Default is all I want or need.
5) -REMOVE-the empty space created at the bottom of the magic menu from 3 lines/6 Blanks no longer being learned.
Will any other spells not work properly due to hex issues? And anything else am I missing?
09-06-2024, 03:54 PM
These are my notes from when I undertook a similar endeavor, as described in the earlier post. I recommend that if you don't need the six extra spells, that you intersperse the blanks as spacers at the end of each category (so Healing Magic would have two blanks at the end of its list, Effect Magic would have two blanks at the end of ITS list, and Attack Magic would have two blanks at the end of ITS list). If you need those spell slots for something else like monster attacks, just make sure you don't put them on any espers or learn lists. If you use the blanks in this way, you won't have to worry about clearing away empty lines at the end of the list (it'll only be one line at the bottom) and you'll still be able to use the config sorting.
The addresses in these notes could be subject to change if you have other patches in play, such as C.V. Reynold's bugfix compilation.
From reading your post, the only other spot you overlooked is Life 3; it calls the Life 1 spell when it triggers and it'll call something else if you don't update the value. Which spell it calls is defined at C2/07A4, which you'll find in the notes below. Also, if you want Effect and Healing to share the same spell intro as in Vanilla with new spell indices, you'll want to skip the second and third change in the C1 bank. I can answer more questions as you encounter them, good luck with your endeavor!
The addresses in these notes could be subject to change if you have other patches in play, such as C.V. Reynold's bugfix compilation.
From reading your post, the only other spot you overlooked is Life 3; it calls the Life 1 spell when it triggers and it'll call something else if you don't update the value. Which spell it calls is defined at C2/07A4, which you'll find in the notes below. Also, if you want Effect and Healing to share the same spell intro as in Vanilla with new spell indices, you'll want to skip the second and third change in the C1 bank. I can answer more questions as you encounter them, good luck with your endeavor!
Code:
===============================
SPELL18 Hex Changes
===============================
What follows are in-line changes made to various locations in
C1, C2, and C3 to change spell indices and alter how they are sorted.
The goal of these changes (which was successfully attained) was to
recategorize FF6 magic so that Attack, Effect, and Healing magic
had equal spell counts.
This does NOT include the hex for spell changes made in the editor FF3USME.
Unlike the other disassembly which was made on continuous blocks of hex, this is scattershot
and probably not very useful. I've included it anyway for completion's sake.
CHANGES:
[C1 Bank]
[Magic Intro animation]
[Changes make Effect magic use the White Intro, Healing magic use the Summon Intro, and Espers use no intro]
<CHANGE> C1/ABA6: C9 18 ====> C9 12 CMP #$18 ====> CMP #$12
[Changed from h18 to h12, for the first 18 spells instead of the first 24]
C1/ABA8: 90 11 BCC $ABBB [branch if black magic (X = 0)]
...
<CHANGE> C1/ABAC: C9 36 ====> C9 24 CMP #$36 ====> CMP #$24
[Change from h36 to h24, for spells up to 36 instead of up to 54]
C1/ABAE: 90 0B BCC $ABBB [The check above now branches if effect magic (X = 2)]
...
<CHANGE> C1/ABB2: C9 51 ====> C9 36 CMP #$51 ====> CMP #$36
[Change from h51 to h36, for spells up to 54 instead of up to 81]
C1/ABB4: 90 05 BCC $ABBB [The check above now branches if white magic (X = 4), excluding espers]
[C2 Bank]
[Main Battle Loop]
[Changes made to accomodate the new spell index for Life1, which is called by the Life3 status]
C2/079B: 9D F9 3E STA $3EF9,X (clear Life 3 status)
C2/079E: BD 19 30 LDA $3019,X
C2/07A1: 1C 2F 2F TRB $2F2F (remove from bitfield of remaining enemies?)
<CHANGE> C2/07A4: A9 30 ====> A9 2D LDA #$30 ====> LDA #$2D
[Life spell ID was formerly h30, but is h2D in SPELL18]
C2/07A6: 85 B8 STA $B8
C2/07A8: A9 26 LDA #$26 (command #$26)
C2/07AA: 4C 91 4E JMP $4E91 (queue it, in global Special Action queue)
...
[Changes made to accomodate the new spell index for Shell, Safe, and Reflect, called by various Near Fatal relics]
C2/0A56: F0 38 BEQ $0A90 (Branch if not Near Fatal)
C2/0A58: 3C 05 32 BIT $3205,X (is bit 1 set?)
C2/0A5B: F0 33 BEQ $0A90 (exit if not, meaning we've already activated
a spell on low HP this battle)
C2/0A5D: 5D 05 32 EOR $3205,X
C2/0A60: 9D 05 32 STA $3205,X (toggle off bit 1)
C2/0A63: BD 59 3C LDA $3C59,X
C2/0A66: 4A LSR
C2/0A67: 90 0B BCC $0A74 (Branch if not Shell when low HP)
C2/0A69: 48 PHA
<CHANGE> C2/0A6A: A9 25 ====> A9 2B LDA #$25 ====> LDA #$2B
[Shell was formerly h25, but is h2B in SPELL18]
C2/0A6C: 85 B8 STA $B8 (Shell spell ID)
C2/0A6E: A9 26 LDA #$26
C2/0A70: 20 91 4E JSR $4E91 (queue Command #$26, in global Special Action queue)
C2/0A73: 68 PLA
C2/0A74: 4A LSR
C2/0A75: 90 0B BCC $0A82 (branch if not Safe when low HP)
C2/0A77: 48 PHA
<CHANGE> C2/0A78: A9 1C ====> A9 2A LDA #$1C ====> LDA #$2A
[Safe was formerly h1C, but is h2A in SPELL18]
C2/0A7A: 85 B8 STA $B8 (Safe spell ID)
C2/0A7C: A9 26 LDA #$26
C2/0A7E: 20 91 4E JSR $4E91 (queue Command #$26, in global Special Action queue)
C2/0A81: 68 PLA
C2/0A82: 4A LSR
C2/0A83: 90 0B BCC $0A90 (branch if not Reflect when low HP [no item
in game has this feature, but it's possible])
C2/0A85: 48 PHA
<CHANGE> C2/0A86: A9 24 ====> A9 2C LDA #$24 ====> LDA #$2C
[Reflect was formerly h24, but is h2C in SPELL18]
C2/0A88: 85 B8 STA $B8 (Rflect spell ID)
C2/0A8A: A9 26 LDA #$26
C2/0A8C: 20 91 4E JSR $4E91 (queue Command #$26, in global Special Action queue)
C2/0A8F: 68 PLA
C2/0A90: 60 RTS
...
[Changes made to make Health [Pray] work with the new spell indices]
<CHANGE> C2/171E: A9 2E ====> A9 32 LDA #$2E ====> LDA #$32
[Cure2 was formerly h2E, but I changed it to Regen {h32} in SPELL18]
C2/1720: 85 B6 STA $B6
C2/1722: A9 05 LDA #$05
C2/1724: 80 3F BRA $1765
...
[Changes made to accomodate the new spell index for Imp, which is specifically checked while casting as an Imp]
C2/3210: 89 20 BIT #$20 (Check for Imp status)
C2/3212: F0 11 BEQ $3225 (Branch if not ^)
C2/3214: AD 10 34 LDA $3410
<CHANGE> C2/3217: C9 23 ====> C9 17 CMP #$23 ====> CMP #$17
[Imp spell ID was formerly h23, but Moogle is h17 in SPELL18]
C2/3219: F0 0A BEQ $3225 (Branch if spell is Imp)
[Magic and Lore menu construction]
[These changes don't appear to do anything on their own, but are included just in case]
[They correspond to changes in C3]
(Generate Lore menus based on known Lores, and generate Magic menus based on spells
known by ANY character. C2/568D will eliminate unknown spells and modify costs as
needed, on a per character basis.)
...
Command #$26 - Doom cast when Condemned countdown reaches 0; Safe, Shell, or Reflect*
cast when character enters Near Fatal (* no items actually do this,
but it's supported); or revival due to Life 3.
C2/4F5F: A5 B8 LDA $B8 (get spell ID?)
C2/4F61: A6 B6 LDX $B6 (get target?)
C2/4F63: 85 B6 STA $B6 (save spell ID)
<CHANGE> C2/4F65: C9 0D ====> C9 A2 CMP #$0D ====> CMP #$A2
[Doom spell was formerly h0D, but is now Exploder {hA2} in SPELL18]
C2/4F67: D0 0F BNE $4F78 (branch if we're not casting Doom)
C2/4F69: BD 04 32 LDA $3204,X
C2/4F6C: 09 10 ORA #$10
C2/4F6E: 9D 04 32 STA $3204,X (set flag to zero and disable the Condemned counter
after turn. this is done in case instant death is
thwarted, and thus Condemned status isn't removed
and C2/4644 never executes.)
C2/4F71: AD 77 3A LDA $3A77
C2/4F74: F0 69 BEQ $4FDF (Exit function if no monsters are present and alive)
<CHANGE> C2/4F76: A9 0D ====> A9 A2 LDA #$0D ====> LDA #$A2 (Set spell to Doom again. it's easier than PHA/PLA)
[Doom spell was formerly h0D, but is now Exploder <hA2> in SPELL18]
C2/4F78: EB XBA
C2/4F79: A9 02 LDA #$02
C2/4F7B: 85 B5 STA $B5 (Set command to Magic)
C2/4F7D: 20 D3 26 JSR $26D3 (Load data for command and attack/sub-command, held
in A.bottom and A.top)
C2/4F80: 20 51 29 JSR $2951 (Load Magic Power / Vigor and Level)
C2/4F83: A9 10 LDA #$10
C2/4F85: 14 B0 TRB $B0 (Prevents characters from stepping forward and
getting circular or triangular pattern around
them when casting Magic or Lores.)
C2/4F87: A9 02 LDA #$02
C2/4F89: 8D A3 11 STA $11A3 (Set attack to only not reflectable)
C2/4F8C: A9 20 LDA #$20
C2/4F8E: 0C A4 11 TSB $11A4 (Set can't be dodged)
C2/4F91: 9C A5 11 STZ $11A5 (Set to 0 MP cost)
C2/4F94: 4C 67 31 JMP $3167 (Entity executes one largely unblockable hit on
self)
...
C2/55B2: AD 54 1D LDA $1D54 (info from Config screen)
(Bit 7 = Controller: 0 = Single, 1 = Multiple
Bit 6 = ???
Bits 3-5 = Window Color adjustment cursor:
000b = Font, 001b = 1st Window component,
010b = 2nd Window component, 011b = 3rd ' ' ,
100b = 4th ' ' , 101b = 5th ' ' ,
110b = 6th ' ' , 111b = 6th ' '
Bits 0-2 = Magic Order:
000b = Healing, Attack, Effect (HAE) ,
001b = HEA , 010b = AEH, 011b = AHE ,
100b = EHA , 101b = EAH )
C2/55B5: 29 07 AND #$07 (isolate Magic Order)
C2/55B7: AA TAX
C2/55B8: A0 35 LDY #$35
C2/55BA: B9 34 30 LDA $3034,Y (get original zero-based position of spell)
<CHANGE> C2/55BD: C9 18 ====> C9 12 CMP #$18 ====> CMP #$12
[Changed from h18 to h12. Checks spells 0-17, the Attack spell indices]
C2/55BF: B0 06 BCS $55C7 [now branches if it's index 18 or higher]
C2/55C1: 7F 4B 57 C2 ADC $C2574B,X (add spell position to amount to adjust Attack
spells' positioning based on current
Magic Order)
C2/55C5: 80 12 BRA $55D9
<CHANGE> C2/55C7: C9 2D ====> C9 24 CMP #$2D ====> CMP #$24
[Changed from h2D to h24. Check spells 18-35, the Effect spell indices]
C2/55C9: B0 06 BCS $55D1 [now branches if it's 36 or higher]
C2/55CB: 7F 51 57 C2 ADC $C25751,X (add spell position to amount to adjust Effect
spells' positioning based on current
Magic Order)
C2/55CF: 80 08 BRA $55D9
C2/55D1: C9 36 CMP #$36
[Unchanged. Checks spells 36-53, the Healing spell indices]
C2/55D3: B0 0B BCS $55E0 (branch if it's 54 or higher, which means it's
not learned, or not a Magic spell at all.)
C2/55D5: 7F 57 57 C2 ADC $C25757,X (add spell position to amount to adjust Healing
spells' positioning based on current
Magic Order)
...
[Magic Sorting Menu Shift Table]
[For Attack/Black spells, sets offset]
[Signed, hFF is -1 and h81 is -127]
[Formerly spells 0-23, now spells 0-17 {Black, Attack}]
<CHANGE> C2/574B: 09 ====> 12
[Healing, Attack, Effect (HAE), Attack spells move h12 forward, or 18 spells]
<CHANGE> C2/574C: 1E ====> 24
[Healing, Effect, Attack (HEA), Attack spells move h24 forward, or 36 spells]
C2/574D: 00 [Attack, Effect, Healing (AEH), no change]
C2/574E: 00 [Attack, Healing, Effect (AHE), no change]
<CHANGE> C2/574F: 1E ====> 24
[Effect, Healing, Attack (EHA), Attack spells move h24 forward, or 36 spells]
<CHANGE> C2/5750: 15 ====> 12
[Effect, Attack, Healing (EAH), Attack spells move h12 forward, or 18 spells]
[Formerly spells 24-44, now spells 18-35 {Gray, Effect}]
<CHANGE> C2/5751: 09 ====> 12
[Healing, Attack, Effect (HAE), Effect spells move h12 forward, or 18 spells]
<CHANGE> C2/5752: F1 ====> 00
[Healing, Effect, Attack (HEA), formerly a subtraction, no longer needed]
C2/5753: 00 [Attack, Effect, Healing (AEH), no change]
<CHANGE> C2/5754: 09 ====> 12
[Attack, Healing, Effect (AHE), Effect spells move h12 forward, or 18 spells]
<CHANGE> C2/5755: E8 ====> EE
[Effect, Healing, Attack (EHA), Effect spells move hEE, or rather h12 backward. 18 spells]
<CHANGE> C2/5756: E8 ====> EE
[Effect, Attack, Healing (EAH), Effect spells move hEE, or rather h12 backward. 18 spells]
[Formerly spells 45-53, now spells 36-53 {White, Healing}]
<CHANGE> C2/5757: D3 ====> DC
[Healing, Attack, Effect (HAE), Healing spells move hDC, or rather h24 backward. 36 spells]
<CHANGE> C2/5758: D3 ====> DC
[Healing, Effect, Attack (HEA), Healing spells move hDC, or rather h24 backward. 36 spells]
C2/5759: 00 [Attack, Effect, Healing (AEH), no change]
<CHANGE> C2/575A: EB ====> EE
[Attack, Healing, Effect (AHE), Healing spells move hEE, or rather h12 backward. 18 spells]
<CHANGE> C2/575B: E8 ====> EE
[Effect, Healing, Attack (EHA), Healing spells move hEE, or rather h12 backward. 18 spells]
C2/575C: 00 [Effect, Attack, Healing (EAH), no change]
...
[And another Imp spell index fix. This one is for leaving it enabled in the spell menu while imped]
(Set Carry if spell should be disabled due to unavailability, or because
caster is an Imp and the spell isn't Imp. If none of these factors
disable the spell, check the MP cost.)
C2/57AA: BD 00 00 LDA $0000,X (get spell # from menu)
C2/57AD: 30 0A BMI $57B9 (branch if undefined)
C2/57AF: EB XBA
C2/57B0: A5 EF LDA $EF
C2/57B2: 10 07 BPL $57BB (branch if character not an Imp)
C2/57B4: EB XBA
<CHANGE> C2/57B5: C9 23 ====> C9 17 CMP #$23 ====> CMP #$17
[Imp spell was formerly index h23, but is h17 in SPELL18]
C2/57B7: F0 02 BEQ $57BB (branch if spell is Imp)
C2/57B9: 38 SEC (spell will be unavailable)
C2/57BA: 60 RTS
...
[Enemy Roulette completion]
C2/5BB2: AD 43 2F LDA $2F43 (top byte of Enemy Roulette target bitfield, which
is set at C1/B41A when the cursor winds down.)
C2/5BB5: 30 97 BMI $5B4E (Exit if no targets are defined)
C2/5BB7: C2 20 REP #$20 (Set 16-bit A)
C2/5BB9: AD 42 2F LDA $2F42 (get our chosen target)
C2/5BBC: 20 F9 51 JSR $51F9 (Y = bit number of highest bit set in A (0 for bit 0,
2 for bit 1, 4 for bit 2, etc.))
C2/5BBF: 7B TDC
C2/5BC0: 3A DEC (A = #$FFFF)
C2/5BC1: 8D 42 2F STA $2F42 (Set Enemy Roulette targets in $2F42 to null)
C2/5BC4: E2 20 SEP #$20 (Set 8-bit A)
C2/5BC6: BB TYX
<CHANGE> C2/5BC7: A9 0D ====> A9 A2 LDA #$0D ====> LDA #$A2 (Condemned expiration enters here)
[Doom used to be spell h0D, but I'm using Exploder now, which is spell hA2]
****************THIS IS AT A DIFFERENT ADDRESS IN THE CV BUGFIX COMPILATION******************
C2/5BC9: 85 B8 STA $B8 (spell = Doom [Now Exploder])
C2/5BCB: A9 26 LDA #$26
C2/5BCD: 4C 91 4E JMP $4E91 (queue the reaper, in global Special Action queue)
[C3 Bank]
[Getting Biggs to be a Polymage]
C3/0D39: A667 LDX $67 (Actor's address)
C3/0D3B: 7B TDC
C3/0D3C: BD0000 LDA $0000,X (Actor)
<CHANGE> C3/0D3F: C90C ====> C90D CMP #$0C ====> CMP #$0D (Gogo changed to Umaro)
C3/0D41: F020 BEQ $0D63
C3/0D43: B01C BCS $0D61 (Deny magic to guest)
...
[Removing Ability select from Gogo, so that 'Skills' will Bzzt]
C3/1C62: B46D LDY $6D,X (Actor's address)
C3/1C64: B90000 LDA $0000,Y (Actor)
<CHANGE> C3/1C67: C90C ====> C9EA CMP #$0C ====> CMP #$EA (Gogo changed to actor 234, who is hopefully never called)
C3/1C69: D00D BNE $1C78
C3/1C6B: 20FF36 JSR $36FF (Load navig data) (This should never be called with this change)
...
[Remove 'Handle Gogo' scenarios from menus]
C3/2259: B46D LDY $6D,X (Actor's address)
C3/225B: B90000 LDA $0000,Y (Actor)
<CHANGE> C3/225E: C90C ====> C9EA CMP #$0C ====> CMP #$EA (Gogo changed to actor 234, who is hopefully never called)
C3/2260: D051 BNE $22B3
C3/2262: 200537 JSR $3705 (Handle D-Pad) (This should never be called with this change)
...
[Field call for Warp by spell index. Must be updated to Warp's new index]
<CHANGE> C3/284A: C9 2A ====> C9 19 CMP #$2A ====> CMP #$19
[Warp's spell id was h2A, but is h19 in SPELL18]
C3/284C: F026 BEQ $2874 (Branch if so)
...
[Menu check to establish whether spell target is valid]
C3/2C14: B9 14 00 LDA $0014,Y (Status)
C3/2C17: 29 80 AND #$80 (Wound?)
C3/2C19: D0 25 BNE $2C40 (Branch if so)
C3/2C1B: 20 13 2D JSR $2D13 (Spell)
<CHANGE> C3/2C1E: C9 2D ====> C9 24 CMP #$2D ====> CMP #$24
[Cure's spell id was h2D, but is h24 in SPELL18]
C3/2C20: F0 54 BEQ $2C76 (Branch if so)
<CHANGE> C3/2C22: C9 2E ====> C9 25 CMP #$2E ====> CMP #$25
[Cure2's spell id was h2E, but is h25 in SPELL18]
C3/2C24: F0 50 BEQ $2C76 (Branch if so)
<CHANGE> C3/2C26: C9 2F ====> C9 26 CMP #$2F ====> CMP #$26
[Cure3's spell id was h2F, but is h26 in SPELL18]
C3/2C28: F0 4C BEQ $2C76 (Branch if so)
<CHANGE> C3/2C2A: C9 32 ====> C9 27 CMP #$32 ====> CMP #$27
[Antidote's spell id was h32, but Purify is h27 in SPELL18]
C3/2C2C: F0 3F BEQ $2C6D (Branch if so)
<CHANGE> C3/2C2E: C9 33 ====> C9 28 CMP #$33 ====> CMP #$28
[Remedy's spell id was h33, but Soothe is h28 in SPELL18]
C3/2C30: F0 32 BEQ $2C64 (Branch if so)
<CHANGE> C3/2C32: C9 22 ====> C9 20 CMP #$22 ====> CMP #$22
[Float's spell id was h22, but is h20 in SPELL18]
C3/2C34: F0 17 BEQ $2C4D (Branch if so)
<CHANGE> C3/2C36: C9 23 ====> C9 17 CMP #$23 ====> CMP #$17
[Imp was spell h23, but is h17 in SPELL18]
C3/2C38: F0 4A BEQ $2C84 (Succeed if so)
<CHANGE> C3/2C3A: C9 2C ====> C9 29 CMP #$2C ====> CMP #$29
[Dispel was spell h2C, but is h29 in SPELL18]
C3/2C3C: F0 18 BEQ $2C56 (Branch if so)
C3/2C3E: 80 42 BRA $2C82 (Make spell fail)
[Fork: Wound]
C3/2C40: 20 13 2D JSR $2D13 (Spell)
<CHANGE> C3/2C43: C9 30 ====> C9 2D CMP #$30 ====> CMP #$2D
[Life was spell h30, but is h2D in SPELL18]
C3/2C45: F0 3D BEQ $2C84 (Succeed if so)
<CHANGE> C3/2C47: C9 31 ====> C9 2E CMP #$31 ====> CMP #$2E
[Life2 was spell h31, but is h2E in SPELL18]
C3/2C49: F0 39 BEQ $2C84 (Succeed if so)
C3/2C4B: 80 35 BRA $2C82 (Make spell fail)
[Fork: Float]
C3/2C4D: B9 15 00 LDA $0015,Y (Status)
C3/2C50: 29 80 AND #$80 (Float?)
C3/2C52: D0 2E BNE $2C82 (Fail if so)
C3/2C54: 80 2E BRA $2C84 (Make spell work)
[Fork: Dispel]
C3/2C56: B9 14 00 LDA $0014,Y (Status LB)
C3/2C59: 29 7F AND #$7F (Ignore Wound...)
C3/2C5B: 19 15 00 ORA $0015,Y (Add high byte)
C3/2C5E: 29 90 AND #$90 (Clear or Float?)
C3/2C60: F0 20 BEQ $2C82 (Fail if neither)
C3/2C62: 80 20 BRA $2C84 (Make spell work)
[Fork: Remedy]
C3/2C64: B9 14 00 LDA $0014,Y (Status)
<CHANGE> C3/2C67: 29 45 ====> 29 00 AND #$45 ====> AND #$00
[Changed from h45 {Check for all ailments} to h00 {Check for no ailments},
since SPELL18's Soothe would do nothing out of battle. It's menu use is disabled anyway]
C3/2C69: F0 17 BEQ $2C82 (Fail if none)
C3/2C6B: 80 17 BRA $2C84 (Make spell work)
[Fork: Antdot]
C3/2C6D: B9 14 00 LDA $0014,Y (Status)
<CHANGE> C3/2C70: 29 04 ====> 29 47 AND #$04 ====> AND #$47
[Changed from h04 to h47, so it checks for all removable ailments instead of just poison]
C3/2C72: F0 0E BEQ $2C82 (Fail if not)
C3/2C74: 80 0E BRA $2C84 (Make spell work)
...
[Disable Espers for Biggs]
<CHANGE> C3/4D6F: C90C ====> C90D CMP #$0C ====> CMP #$0D ; Gogo? ====> Umaro?
C3/4D71: D004 BNE $4D77 ; Exit if not
C3/4D73: A924 LDA #$24 ; Gray palette
C3/4D75: 8579 STA $79 ; Disable Espers
...
[Table of "First Spell" for each type of magic]
[Starting spell for each Magic type, sorted based on Mag.Order]
<CHANGE> C3/4F49: 2D 00 18 FF ====> 24 00 12 FF (1: Cure, Fire, Scan)
<CHANGE> C3/4F4D: 2D 18 00 FF ====> 24 12 00 FF (2: Cure, Scan, Fire)
<CHANGE> C3/4F51: 00 18 2D FF ====> 00 12 24 FF (3: Fire, Scan, Cure)
<CHANGE> C3/4F55: 00 2D 18 FF ====> 00 24 12 FF (4: Fire, Cure, Scan)
<CHANGE> C3/4F59: 18 2D 00 FF ====> 12 24 00 FF (5: Scan, Cure, Fire)
<CHANGE> C3/4F5D: 18 00 2D FF ====> 12 00 24 FF (6: Scan, Fire, Cure)
[Add spells of given type to Magic list based on starting spell]
C3/4F61: C9 00 CMP #$00 (Fire?)
C3/4F63: F0 09 BEQ $4F6E (Branch if so)
<CHANGE> C3/4F65: C9 2D ====> C9 24 CMP #$2D ====> CMP #$24 (Cure?)
C3/4F67: F0 0A BEQ $4F73 (Branch if so)
<CHANGE> C3/4F69: A2 15 00 ====> A2 12 00 LDX #$0015 ====> LDX #$0012
[Changed from h15 to h12 to count 18 spells instead of 21]
C3/4F6C: 80 0A BRA $4F78 (Build list)
[Fork: Black magic]
<CHANGE> C3/4F6E: A2 18 00 ====> A2 12 00 LDX #$0018 ====> LDX #$0012
[Changed from h18 to h12 to count 18 spells instead of 24]
C3/4F71: 80 05 BRA $4F78 (Build list)
[Fork: White magic]
<CHANGE> C3/4F73: A2 09 00 ====> A2 12 00 LDX #$0009 ====> LDX #$0012
[Changed from h09 to h12 to count 18 spells instead of 9]
...
[Enable or disable spell in Magic menu]
<CHANGE> C3/514D: C9 2A ====> C9 19 CMP #$2A ====> CMP #$19 (Warp?)
[Warp's spell h19 now. Changed from h2A to h19]
C3/514F: F0 2A BEQ $517B (Branch if so)
....
[Fork: Test Imp]
C3/5188: 86 E2 STX $E2 (Save MP cost)
C3/518A: 20 DD 4E JSR $4EDD (Define Y)
C3/518D: B9 14 00 LDA $0014,Y (Actor's status)
C3/5190: 29 20 AND #$20 (Imp Status?)
C3/5192: F0 07 BEQ $519B (Branch if not)
C3/5194: 20 EC 50 JSR $50EC (Spell)
<CHANGE> C3/5197: C9 23 ====> C9 17 CMP #$23 ====> CMP #$17 (Imp?)
[Imp is now spell h17. Changed from h23 to h17]
C3/5199: D0 1E BNE $51B9 (Disable if not)
09-06-2024, 06:12 PM
Thanks, C-Dude! You always come through for me!
-Life-3 Added to the list.
My original draft planned to have spacers between each school. But when I was fiddling around in the Magic Menu--attempting to visualize how it would look. I found that tapping the ® Button takes me to the next page. It would be so clean to have all 16 spells of a school on 1 page w/out having to scroll. Adding spacers would then force having to tap ® and scroll down a little bit each time. Vs. Just 2 taps of ® to see all magic.
Also in Battle--Magic is displayed 4 x 2, so it just lines up perfectly. (Half of a school at a time.) With just a little bit of leftover space at the very bottom.
Before I dig into your notes, I just want to confirm, am I all good on the Lores / Enemy Magic as well?
Thanks, again!
-Life-3 Added to the list.
My original draft planned to have spacers between each school. But when I was fiddling around in the Magic Menu--attempting to visualize how it would look. I found that tapping the ® Button takes me to the next page. It would be so clean to have all 16 spells of a school on 1 page w/out having to scroll. Adding spacers would then force having to tap ® and scroll down a little bit each time. Vs. Just 2 taps of ® to see all magic.
Also in Battle--Magic is displayed 4 x 2, so it just lines up perfectly. (Half of a school at a time.) With just a little bit of leftover space at the very bottom.
Before I dig into your notes, I just want to confirm, am I all good on the Lores / Enemy Magic as well?
Thanks, again!
09-06-2024, 07:12 PM
There's code to change the Roulette command to Enemy Roulette which I never had to fiddle with (because I removed Enemy Roulette).
You're going to need to change the low bytes (which are 0x8C in Vanilla) to whatever hex index your new roulette spell is on, otherwise the Lore that was originally Roulette will still cast Enemy Roulette when an enemy calls it.
There's also L.5 Doom (well, L.3 Doom in your case) which gets called by slots when Joker Doom is triggered. It's got a few spots that need to have the spell value adjusted.
That should cover all the cases where spell number shifting has an impact on what the game does, as far as I am aware.
Code:
(Swap Roulette to Enemy Roulette)
C2/03B9: 08 PHP
C2/03BA: C2 20 REP #$20 [Set 16-bit A]
C2/03BC: C9 0C 8C CMP #$8C0C (is the command Lore and the attack Roulette?)
C2/03BF: D0 03 BNE $03C4 (branch if not)
C2/03C1: A9 1E 8C LDA #$8C1E (set command to Enemy Roulette, keep attack as
Roulette)
C2/03C4: 28 PLP
C2/03C5: 60 RTS
There's also L.5 Doom (well, L.3 Doom in your case) which gets called by slots when Joker Doom is triggered. It's got a few spots that need to have the spell value adjusted.
Code:
C2/172C: C9 94 CMP #$94
C2/172E: D0 04 BNE $1734 (branch if not L.5 Doom [i.e. one of the Joker Dooms])
with the 0x94 changed to your new value,
and
C2/4E4A: 94 (L.5 Doom -- used by Joker Doom [7-7-Bar])
C2/4E4B: 94 (L.5 Doom -- used by Joker Doom [7-7-7])
with that same number
That should cover all the cases where spell number shifting has an impact on what the game does, as far as I am aware.
09-06-2024, 07:23 PM
Okay. Now I have the info necessary to do this!
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)