05-11-2017, 12:05 PM
(This post was last modified: 05-11-2017, 12:10 PM by Kugawattan.)
Hi. I had an idea of one of my characters in my hack, who is supposed to learn his teammates' techniques as they use them. In order to do this, my idea was to give him the Lore command, and therefore turning the teammates' skills (Blitzes, Swdteches, Dances, etc) into learnable Lores.
In order to do this, my first thought was to make Blitz commands point to Lores instead, so that Left Right Left, instead of Pummel, it calls for Doom (the first learnable Lore). I took a look at the C2 Bank to see where are Blitzes' spell indexes stored so I could change them...unfortunately, I found nothing my weak mind could understand.
I found a few instances of the commands starting the Blitz index at 5D (which is the spell index for Pummel). I changed all instances of 5D into 8B (which is the spell index for Doom), but...it either makes the command input always fail (my current Pummel input is Right Right, and it does nothing. the original Left Right Left input does nothing either), or it changes the animation (makes the character run away) but without actually changing the spell effects.
These are all instances of the Blitz list starting at 93 (5D in hex).
Can someone help?
In order to do this, my first thought was to make Blitz commands point to Lores instead, so that Left Right Left, instead of Pummel, it calls for Doom (the first learnable Lore). I took a look at the C2 Bank to see where are Blitzes' spell indexes stored so I could change them...unfortunately, I found nothing my weak mind could understand.
I found a few instances of the commands starting the Blitz index at 5D (which is the spell index for Pummel). I changed all instances of 5D into 8B (which is the spell index for Doom), but...it either makes the command input always fail (my current Pummel input is Right Right, and it does nothing. the original Left Right Left input does nothing either), or it changes the animation (makes the character run away) but without actually changing the spell effects.
Code:
(Data - first spell # for each of above commands)
C2/4E41: 36 (Espers)
C2/4E42: 8B (Lores)
C2/4E43: 83 (Magitek commands)
C2/4E44: 5D (Blitzes)
C2/4E45: 55 (Swdtech)
Code:
(Data - used to delimit which spell #s are which command)
C2/1DD8: 36 (Esper)
C2/1DD9: 51 (Skean)
C2/1DDA: 55 (Swdtech)
C2/1DDB: 5D (Blitz)
C2/1DDC: 65 (Dance Move)
C2/1DDD: 7D (Slot Move, or Tools??)
C2/1DDE: 82 (Shock)
C2/1DDF: 83 (Magitek)
C2/1DE0: 8B (Enemy Attack / Lore)
C2/1DE1: EE (Battle, Special)
C2/1DE2: F0 (Desperation Attack, Interceptor)
Code:
Blitz
C2/159D: A5 B6 LDA $B6
C2/159F: 10 0F BPL $15B0 (branch if the spell # indicates a Blitz)
C2/15A1: A9 01 LDA #$01
C2/15A3: 14 B3 TRB $B3 (this will clear targets for a failed Blitz input)
C2/15A5: A9 43 LDA #$43
C2/15A7: 8D 01 34 STA $3401 (Set to display Text $43 - "Incorrect Blitz input!")
C2/15AA: A9 5D LDA #$5D
C2/15AC: 85 B6 STA $B6 (store Pummel's spell number)
C2/15AE: 80 05 BRA $15B5
C2/15B0: A9 08 LDA #$08
C2/15B2: 8D 12 34 STA $3412 (will display a Blitz name atop screen)
C2/15B5: A5 B6 LDA $B6
C2/15B7: 48 PHA
C2/15B8: 38 SEC
C2/15B9: E9 5D SBC #$5D (subtract Pummel's spell index from our spell #)
C2/15BB: 85 B6 STA $B6 (save our 0 thru 7 "Blitz index", likely used for
animation)
C2/15BD: 68 PLA (but use our original spell # for loading spell data)
C2/15BE: BB TYX
C2/15BF: 20 C1 19 JSR $19C1
C2/15C2: 20 51 29 JSR $2951 (Load Magic Power / Vigor and Level)
C2/15C5: 4C 7B 31 JMP $317B (entity executes one hit)
Code:
(Randomly chosen command failed, for whatever reason)
(Blitz)
C2/0575: 7B TDC
C2/0576: AD 28 1D LDA $1D28 (Known Blitzes)
C2/0579: 20 2A 52 JSR $522A (Pick a random bit that is set)
C2/057C: 20 F0 51 JSR $51F0 (Get which bit is picked)
C2/057F: 8A TXA
C2/0580: 18 CLC
C2/0581: 69 5D ADC #$5D (first Blitz is #93, Pummel)
C2/0583: 60 RTS
These are all instances of the Blitz list starting at 93 (5D in hex).
Can someone help?
Step forward, spriters! We are also responsible to make hacks look new and fresh, we are no less important than code or ASM hackers! CHARGE!!