Users browsing this thread: 2 Guest(s)
Excluding Weapons from Use With Genji Glove
08-22-2018, 11:48 PM
(This post was last modified: 08-23-2018, 04:16 PM by PowerPanda.)
I'm starting on the equip screen with this, and worrying about Battle Equipment Changes and Optimize later. I have the code partially working, but I need some advice. Right now, it's correctly checking if the EQUIPPED weapon is compatible with Dual Wielding. However, it's not checking the list of items for compatibility. Let me illustrate with an example.
Example:
Weapon 1: Dirk - Compatible
Weapon 2: Imp Halberd - NOT Compatible
(Character has Genji Glove Equipped)
Scenario 1: Both hands empty, or one with a shield
Result: All weapons available. CORRECT
Scenario 2: One hand holds Imp Halberd
Result: Cannot equip another weapon. CORRECT
Scenario 3: One hand holds Dirk
Result: All weapons available. INCORRECT. This needs to only make weapons compatible with Dual Wielding available.
Any ideas on how to check the list of equippable weapons for their properties? Here is the code I have so far. I have plenty of free space thanks to Novalia's optimization. (http://www.romhacking.net/documents/736/)
Example:
Weapon 1: Dirk - Compatible
Weapon 2: Imp Halberd - NOT Compatible
(Character has Genji Glove Equipped)
Scenario 1: Both hands empty, or one with a shield
Result: All weapons available. CORRECT
Scenario 2: One hand holds Imp Halberd
Result: Cannot equip another weapon. CORRECT
Scenario 3: One hand holds Dirk
Result: All weapons available. INCORRECT. This needs to only make weapons compatible with Dual Wielding available.
Any ideas on how to check the list of equippable weapons for their properties? Here is the code I have so far. I have plenty of free space thanks to Novalia's optimization. (http://www.romhacking.net/documents/736/)
Code:
;Determine if gear list entry is disabled
C3/9A6F: A5 5F LDA $5F Check Slot
C3/9A71: C9 02 CMP #$02 Head or Body?
C3/9A73: B0 3B BCS $9AB1 If so, jump to 9AB1
C3/9A75: C9 01 CMP #$01 L-Hand/Relic 2?
C3/9A77: F0 05 BEQ $C39A7E if no, branch to R-Hand
;Fork: For L-Hand
C3/9A79: B9 20 00 LDA $0020,Y Check Left Hand's Item
C3/9A7C: 80 03 BRA $C39A81 skip next line
;Fork: For R-Hand
C3/9A7E: B9 1E 00 LDA $001E,Y Check Right Hand's Item
C3/9A81: C9 FF CMP #$FF is it empty?
C3/9A83: F0 1F BEQ $9AA4 if so, enable
C3/9A85: 20 21 83 JSR $8321 compute index
C3/9A88: AE 34 21 LDX $2134 load it
C3/9A8B: BF 00 50 D8 LDA $D85000,X Check properties
C3/9A8F: 29 07 AND #$07 Get Class
C3/9A91: C9 03 CMP #$03 Is it a Shield?
C3/9A93: F0 11 BEQ $9AA6 if so, jump to duplicate item check
C3/9A95: AD D8 11 LDA $11D8 Check character properties
C3/9A98: 29 10 AND #$10 check for "allow weapon in each hand"
C3/9A9A: F0 0A BEQ $9A99 If not, branch to duplicate check
C3/9A9C: BF 13 50 D8 LDA $D85013,X Check Weapon Properties
C3/9AA0: 29 04 AND #$04 Is Dual Wield enabled?
C3/9AA2: F0 02 BEQ $C39AA6 If not, branch to duplicate check
C3/9AA4: 38 SEC
C3/9AA5: 60 RTS
;Fork: Duplicate Check
C3/9AA6: BF 00 50 D8 LDA $D85000,X (Load item type X)
C3/9AAA: 29 07 AND #$07 zero out upper nibble
C3/9AAC: C5 F6 CMP $F6 ????
C3/9AAE: F0 2E BEQ $9AD1 if the above line is true, exit function
C3/9AB0: 38 SEC
C3/9AB1: 60 RTS
C3/9AB2-C3/9AD0 EA... NOPed Out
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)