The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 1 Guest(s)
Ignore Imp check on a specific character

#1
Posts: 617
Threads: 49
Thanks Received: 0
Thanks Given: 5
Joined: Feb 2017
Reputation: 25
Status
None
I am posting this in regards to finshing off Divergent Paths. As you can see from my posts recently, I've been on a bit of a roll with the small tasks that are needed to finish it up. However, there is one piece that I'm hitting a wall on, and I'm hoping someone can help. After integrating Kappa as my 16th character, I had her set up to use existing code for interesting effect. She is a strong fighter and a strong mage, but she has to use the imp spell to switch between them. This works technically, but it's not as fun as I originally envisioned it being. I would instead like her to just skip the imp check on equipment, and get the attack/defense regardless of whether she has the imp status or not.

I've identified the code that I need to edit, which is this:
Code:
Fork: Define item's Bat.Pwr or Defense
C2/1016:    E220        SEP #$20       ; 8-bit A
C2/1018:    BF1450D8    LDA $D85014,X  ; Item's power
C2/101C:    EB          XBA            ; Put it in B
C2/101D:    BF0250D8    LDA $D85002,X  ; Compatibility
C2/1021:    0A          ASL A          ; Shift bits
C2/1022:    0A          ASL A          ; Helps Imps?
C2/1023:    A5FE        LDA $FE        ; Status LB
C2/1025:    B002        BCS $1029      ; Branch if so
C2/1027:    4920        EOR #$20       ; Toggle Imp
C2/1029:    8920        BIT #$20       ; Imp's set now?
C2/102B:    D003        BNE $1030      ; Branch if so
C2/102D:    A901        LDA #$01       ; Power: 1
C2/102F:    EB          XBA            ; Replace item's
C2/1030:    EB          XBA            ; Item's power
C2/1031:    85FD        STA $FD        ; Memorize it

I have relocated that code to free space in C2 (C2/6469, if it become relevant later). In it's place, I've tried to put in the following code:
Code:
BD D8 3E     LDA $3ED8,X  (Which character is it?)
C9 0E        CMP #$0E     (Is it Kappa?)
D0 0A        BNE ??       (If it's anyone else, branch to JSR $6469)
E2 20        SEP #$20     (8-Bit A)
BF 14 50 D8  LDA $DB5014,X (Get Item's Power)
85 FD        STA $FD      (Memorize it)
80 0C        BRA ??       (Skip to the end of the NOPs)
20 69 64     JSR $6469    (All other characters jump here, and load the subroutine that contains the original code)
80 07        BRA ??       (Skip to the end of the NOPs)
EA EA        NOP
EA EA        NOP
EA EA EA     NOP
The problem with this code is that the character check doesn't seem to be working. What's happened is that I've successfully removed the imp check, but for all characters. It's something to do with the LDA $3ED8,X. For some reason, I'm not able to check which character it is at this point in the code. I've tried loading it to Y instead of X, but that's not doing it either. Any other ideas on how I can check which character it is at this point in the code?


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  



Messages In This Thread
Ignore Imp check on a specific character - by PowerPanda - 04-04-2021, 11:50 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite