Users browsing this thread: 1 Guest(s)
Steal, GP Rain, and Steal GP as Spells?

#1
Posts: 81
Threads: 12
Thanks Received: 0
Thanks Given: 0
Joined: Feb 2017
Reputation: 3
Status
Brave
So I've been looking into the creating some spells that duplicate what steal and capture do. Steal seems easy. Simply use effect $51 with FF3usME and change the animation with with FF3MDE. The procedure appears to be the same for GP Rain as well. Is this right? Also can Steal GP be used on the enemy and will it actually result in the player gaining extra money after the battle?
  Find
Quote  

#2
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I think you are on the right track. Spell $EE is Battle used by the Fight command ($00). However, script $00F2 does not directly refer to an animation script, it is instead used in the C1/BECD function I think, which look to be responsible of animation among other things. It worth a shot testing what $00F2 would do on a spell cast. Adding effect $51 should logically make the character steal and steal sprite animation is indeed script $007B.

Capture on the other hand does not have a spell related to the command I think and has a different animation function than Fight. The calls are in C1/B775 table and capture animation function is at C1/BBA5. Offering code only affect Fight and Capture commands but Gembox might work.
  Find
Quote  

#3
Posts: 81
Threads: 12
Thanks Received: 0
Thanks Given: 0
Joined: Feb 2017
Reputation: 3
Status
Brave
I revised my original post because I realized that l could simply use Recapture the Glory & the Multi-Steal fix to fully replace Fight with Capture. Will this cause problems with him using Magitek or using Magic in the Fanatic's Tower? Also does Steal GP work correctly if used by the party on the enemy?
  Find
Quote  

#4
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
In the Fanatic Tower, command $02 (Magic) is replaced by nothing ($FF). Coomand $1D is replaced by $02. Here is the code. It is based on command ID, regardless of what the commands do:

Code:
C2/5382: AD BB 3E     LDA $3EBB     (Fanatics' Tower?  must verify this.)
C2/5385: 4A           LSR
C2/5386: 90 12        BCC $539A     (branch if not in the tower)
C2/5388: B5 FC        LDA $FC,X     (get menu slot again)
C2/538A: C9 02        CMP #$02
C2/538C: F0 08        BEQ $5396     (branch if Magic command, emptying slot.)
C2/538E: C9 1D        CMP #$1D      (MagiTek?  actually, this is former Fight or Gau+Rage.)
C2/5390: D0 06        BNE $5398     (branch if not)
C2/5392: A9 02        LDA #$02      
C2/5394: 80 02        BRA $5398     (save Magic as command)
C2/5396: A9 FF        LDA #$FF      (empty command)
C2/5398: 95 FC        STA $FC,X     (update menu slot)
C2/539A: CA           DEX
C2/539B: 10 BD        BPL $535A     (loop for all 4 slots)

Steal GP is only the Steal command branch (C2/3A09) when a monster is using Steal. It cannot work the opposite way unless you code a new command or code yourself GP stealing when a character steal.
  Find
Quote  

#5
Posts: 81
Threads: 12
Thanks Received: 0
Thanks Given: 0
Joined: Feb 2017
Reputation: 3
Status
Brave
(03-31-2017, 10:34 PM)Madsiur Wrote: In the Fanatic Tower, command $02 (Magic) is replaced by nothing ($FF). Coomand $1D is replaced by $02. Here is the code. It is based on command ID, regardless of what the commands do:

Code:
C2/5382: AD BB 3E     LDA $3EBB     (Fanatics' Tower?  must verify this.)
C2/5385: 4A           LSR
C2/5386: 90 12        BCC $539A     (branch if not in the tower)
C2/5388: B5 FC        LDA $FC,X     (get menu slot again)
C2/538A: C9 02        CMP #$02
C2/538C: F0 08        BEQ $5396     (branch if Magic command, emptying slot.)
C2/538E: C9 1D        CMP #$1D      (MagiTek?  actually, this is former Fight or Gau+Rage.)
C2/5390: D0 06        BNE $5398     (branch if not)
C2/5392: A9 02        LDA #$02      
C2/5394: 80 02        BRA $5398     (save Magic as command)
C2/5396: A9 FF        LDA #$FF      (empty command)
C2/5398: 95 FC        STA $FC,X     (update menu slot)
C2/539A: CA           DEX
C2/539B: 10 BD        BPL $535A     (loop for all 4 slots)

Steal GP is only the Steal command branch (C2/3A09) when a monster is using Steal. It cannot work the opposite way unless you code a new command or code yourself GP stealing when a character steal.

At first I thought Steal GP was going to be very interesting, but as I started to think about how it works, it makes sense that it wouldn't work. Honestly, breaking the game's economy only serves to disrupt its difficulty. In other news, I've been staring at this code since you posted it. 

C2/538C: F0 08        BEQ $5396     (branch if Magic command, emptying slot.)
C2/538E: C9 1D        CMP #$1D      (MagiTek?  actually, this is former Fight or Gau+Rage.)

How exactly does it choose Fight & Gau + Rage? Looking at address C2/538C, I know that BEQ is Branch if Equal but I'm not sure what hex F0 08 is referring to or 5396 for that matter. The same is true for C2/538E. I have no idea what C9 means but I can see that it uses the Compare Accumulator opcode and I know that 1D is the hex value for the Magitek command. What I plan to do is give replace Locke's Fight with Capture and use the automatic Rage patch which replaces Gau's Leap with Fight. What I'd like to do is change the code from Gau+Rage to Locke+Capture. Can you help me understand this?
  Find
Quote  

#6
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(04-01-2017, 12:27 AM)Timbo Wrote: How exactly does it choose Fight & Gau + Rage? Looking at address C2/538C, I know that BEQ is Branch if Equal but I'm not sure what hex F0 08 is referring to or 5396 for that matter. The same is true for C2/538E. I have no idea what C9 means but I can see that it uses the Compare Accumulator opcode and I know that 1D is the hex value for the Magitek command. What I plan to do is give replace Locke's Fight with Capture and use the automatic Rage patch which replaces Gau's Leap with Fight. What I'd like to do is change the code from Gau+Rage to Locke+Capture. Can you help me understand this?

The first byte of an instruction is the command (there are 255 different). LDA $60, LDA #$60, LDA $0060 and LDA $C00060,X will each have a different command ID because they all load a value from a different place. Same for all commands. BEQ, BNE, BPL and BMI branch depending on certain flags. BRA is a mandatory branching (will always branch). The second byte of a branching instruction is the number of bytes to jump, forward if between #$01 and #$7F and backward for #$80 to #$FF.

The following code explain the "Gau+Rage" logic. Comments are not from me.

Code:
C2/5364: EB           XBA           (retrieve character index)
C2/5365: C9 0B        CMP #$0B
C2/5367: D0 08        BNE $5371     (branch if not Gau)
C2/5369: EB           XBA           (get command again)
C2/536A: C9 10        CMP #$10
C2/536C: D0 02        BNE $5370     (branch if not Rage)
C2/536E: A9 00        LDA #$00      (load Fight command into A so that Gau's Rage will get replaced
                                     by MagiTek too.  why not just replace "BNE $5370 / LDA #$00"
                                     with "BEQ formerly_$5376" ??  you got me..)
C2/5370: EB           XBA
C2/5371: EB           XBA           (once more, command is in bottom of A, character index in top)
C2/5372: C9 00        CMP #$00      (Fight?)
C2/5374: D0 04        BNE $537A     (branch if not.  if it is Fight, we'll replace it with MagiTek)
C2/5376: A9 1D        LDA #$1D      
C2/5378: 80 06        BRA $5380     (go store MagiTek command in menu slot)
C2/537A: C9 02        CMP #$02
C2/537C: F0 02        BEQ $5380     (if Magic, branch..  which just keeps Magic as command?
                                     rewriting it seems inefficient, unless i'm missing
                                     something.)
            
C2/537E: A9 FF        LDA #$FF      (empty command)
C2/5380: 95 FC        STA $FC,X     (update this menu slot)
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Timbo (04-01-2017)

#7
Posts: 81
Threads: 12
Thanks Received: 0
Thanks Given: 0
Joined: Feb 2017
Reputation: 3
Status
Brave
Oh wow. This makes so much more sense now. I feel both stupid and enlightened at the same time. The four digit hex values are addresses in the same bank. This is awesome.

On a related note, I could have sworn I read about a hack that enables all commands in the tower but I can't seem to find it anywhere.
  Find
Quote  

#8
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(04-01-2017, 10:22 AM)Timbo Wrote: On a related note, I could have sworn I read about a hack that enables all commands in the tower but I can't seem to find it anywhere.

This is what you are looking for: http://slickproductions.org/ff6patch.php...Fanaticism
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Timbo (04-01-2017)

#9
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Or this one by Hatzen: http://www.romhacking.net/hacks/1165/


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • Timbo (04-01-2017)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite