øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1283.msg12957e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index7f6d.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=6;area=showposts;start=990e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index7f6d.html.zxœŸh^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0P.UOKtext/htmlISO-8859-1gzip8:ÖUÿÿÿÿÿÿÿÿWed, 11 Mar 2020 08:38:12 GMT0ó°° ®0®P®€§²ð®›Ÿh^ÿÿÿÿÿÿÿÿ0U Using Lore & Summon in the Fanatics Tower

Author Topic: Using Lore & Summon in the Fanatics Tower  (Read 4104 times)

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Using Lore & Summon in the Fanatics Tower
« on: December 13, 2009, 07:01:00 AM »
Hey guys I was wondering if you guys can make a patch where the Lore Summon commands can be used in the Fanatics tower

if not @ least point me in the right direction so I can ASM hack it myself

thnx guys :)
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

Deathlike2

  • FF4 R&D Master
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Using Lore & Summon in the Fanatics Tower
« Reply #1 on: December 13, 2009, 08:46:56 AM »
Summons are already available via the Magic Command (except via X-Magic by design).
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Using Lore & Summon in the Fanatics Tower
« Reply #2 on: December 13, 2009, 12:06:58 PM »
no no I meant the actual summon command that allows you to summon the Espers more the one time per battle
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

Deathlike2

  • FF4 R&D Master
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Using Lore & Summon in the Fanatics Tower
« Reply #3 on: December 13, 2009, 12:18:02 PM »
Ah, yes, now I understand.

I think Leno or DB has modded that aspect, but I'm not sure.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Using Lore & Summon in the Fanatics Tower
« Reply #4 on: December 13, 2009, 12:34:17 PM »
well yeah they modded it in their Pandora's Box project but I was wondering if they could make a patch for it or @ least give a guide as to where to go to fix it
« Last Edit: December 16, 2009, 02:54:00 AM by Lenophis »
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Using Lore & Summon in the Fanatics Tower
« Reply #5 on: December 16, 2009, 02:55:18 AM »
Oops, clicked on "modify" instead of "reply." :isuck:

Anyway, we didn't touch Summon for Pandora's Box. I made a stand-alone patch for it, which is here.

Quote
if not @ least point me in the right direction so I can ASM hack it myself
Code: [Select]
(Change character commands when wearing MagiTek armor or visiting Fanatics' Tower.
 Change commands based on relics, such as Fight becoming Jump, or Steal becoming Capture.
 Blank or retain certain commands, depending on whether they should be available -- e.g.
   no known dances means no Dance command.)
 Zero character MP if they have no Lore command, no Magic/X-Magic with at least one spell
   learned, and no Magic/X-Magic with an Esper equipped.)

C2/532C: DA           PHX
C2/532D: 08           PHP
C2/532E: C2 30        REP #$30       (Set 16-bit A, X, and Y)
C2/5330: BC 10 30     LDY $3010,X    (get offset to character info block)
C2/5333: BF 4A 54 C2  LDA $C2544A,X  (get address of character's menu)
C2/5337: 8F 81 21 00  STA $002181    (this means that future writes to $00218n in this function
                                      will modify that character's menu?)
C2/533B: B9 16 16     LDA $1616,Y   (1st and 2nd menu slots)
C2/533E: 85 FC        STA $FC
C2/5340: B9 18 16     LDA $1618,Y   (3rd and 4th menu slots)
C2/5343: 85 FE        STA $FE
C2/5345: B9 14 16     LDA $1614,Y   (out of battle Status Bytes 1 and 2; correspond
                                     to in-battle Status Bytes 1 and 4)
C2/5348: E2 30        SEP #$30      (Set 8-bit A, X, and Y)
C2/534A: 89 08        BIT #$08      (does character have MagiTek?)
C2/534C: D0 06        BNE $5354     (branch if so)
C2/534E: AD BB 3E     LDA $3EBB     (Fanatics' Tower?  must verify this.)
C2/5351: 4A           LSR
C2/5352: 90 49        BCC $539D     (branch if neither MagiTek nor Fanatics' Tower)
C2/5354: BD D8 3E     LDA $3ED8,X   (get character index)
C2/5357: EB           XBA
C2/5358: A2 03        LDX #$03      (point to 4th menu slot)
C2/535A: B5 FC        LDA $FC,X     (get command in menu slot)
C2/535C: C9 01        CMP #$01
C2/535E: F0 3A        BEQ $539A     (if Item, skip to next slot)
C2/5360: C9 12        CMP #$12
C2/5362: F0 36        BEQ $539A     (if Mimic, skip to next slot)
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)
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)

C2/539D: 7B           TDC           (clear 16-bit A)
C2/539E: 85 F8        STA $F8
C2/53A0: 8F 83 21 00  STA $002183
C2/53A4: A8           TAY           (Y = 0)

C2/53A5: B9 FC 00     LDA $00FC,Y   (get command from menu slot)
C2/53A8: A2 04        LDX #$04
C2/53AA: 48           PHA
C2/53AB: A9 04        LDA #$04
C2/53AD: 85 EE        STA $EE        (start checking Bit 2 of variable $11D6)
C2/53AF: BF 52 54 C2  LDA $C25452,X  (commands that can be changed FROM)
C2/53B3: C3 01        CMP $01,S      (is current command one of those commands?)
C2/53B5: D0 0D        BNE $53C4      (branch if not)
C2/53B7: AD D6 11     LDA $11D6     (check Battle Effects 1 byte.
                                     Bit 2 = Fight -> Jump, Bit 3 = Magic -> X-Magic,
                                     Bit 4 = Sketch -> Control, Bit 5 = Slot -> GP Rain,
                                     Bit 6 = Steal -> Capture)
                 
C2/53BA: 24 EE        BIT $EE
C2/53BC: F0 06        BEQ $53C4
C2/53BE: BF 57 54 C2  LDA $C25457,X   (commands to change TO)
C2/53C2: 83 01        STA $01,S       (replace command on stack)
C2/53C4: 06 EE        ASL $EE         (will check the next highest bit of $11D6
                                       in our next iteration)
C2/53C6: CA           DEX
C2/53C7: 10 E6        BPL $53AF       (loop for all 5 possible commands that can be
                                       converted)

I think that's the right code... :sleep:

119 bugs fixed and counting.

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Using Lore & Summon in the Fanatics Tower
« Reply #6 on: December 16, 2009, 03:39:27 AM »
thnx man I'll look into it :)
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

angelo26

  • Guard Leader
  • *
  • Posts: 44
    • View Profile
Re: Using Lore & Summon in the Fanatics Tower
« Reply #7 on: May 01, 2011, 07:24:53 PM »
Oops, clicked on "modify" instead of "reply." :isuck:

Anyway, we didn't touch Summon for Pandora's Box. I made a stand-alone patch for it, which is here.

Quote
if not @ least point me in the right direction so I can ASM hack it myself
Code: [Select]
(Change character commands when wearing MagiTek armor or visiting Fanatics' Tower.
 Change commands based on relics, such as Fight becoming Jump, or Steal becoming Capture.
 Blank or retain certain commands, depending on whether they should be available -- e.g.
   no known dances means no Dance command.)
 Zero character MP if they have no Lore command, no Magic/X-Magic with at least one spell
   learned, and no Magic/X-Magic with an Esper equipped.)

C2/532C: DA           PHX
C2/532D: 08           PHP
C2/532E: C2 30        REP #$30       (Set 16-bit A, X, and Y)
C2/5330: BC 10 30     LDY $3010,X    (get offset to character info block)
C2/5333: BF 4A 54 C2  LDA $C2544A,X  (get address of character's menu)
C2/5337: 8F 81 21 00  STA $002181    (this means that future writes to $00218n in this function
                                      will modify that character's menu?)
C2/533B: B9 16 16     LDA $1616,Y   (1st and 2nd menu slots)
C2/533E: 85 FC        STA $FC
C2/5340: B9 18 16     LDA $1618,Y   (3rd and 4th menu slots)
C2/5343: 85 FE        STA $FE
C2/5345: B9 14 16     LDA $1614,Y   (out of battle Status Bytes 1 and 2; correspond
                                     to in-battle Status Bytes 1 and 4)
C2/5348: E2 30        SEP #$30      (Set 8-bit A, X, and Y)
C2/534A: 89 08        BIT #$08      (does character have MagiTek?)
C2/534C: D0 06        BNE $5354     (branch if so)
C2/534E: AD BB 3E     LDA $3EBB     (Fanatics' Tower?  must verify this.)
C2/5351: 4A           LSR
C2/5352: 90 49        BCC $539D     (branch if neither MagiTek nor Fanatics' Tower)
C2/5354: BD D8 3E     LDA $3ED8,X   (get character index)
C2/5357: EB           XBA
C2/5358: A2 03        LDX #$03      (point to 4th menu slot)
C2/535A: B5 FC        LDA $FC,X     (get command in menu slot)
C2/535C: C9 01        CMP #$01
C2/535E: F0 3A        BEQ $539A     (if Item, skip to next slot)
C2/5360: C9 12        CMP #$12
C2/5362: F0 36        BEQ $539A     (if Mimic, skip to next slot)
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)
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)

C2/539D: 7B           TDC           (clear 16-bit A)
C2/539E: 85 F8        STA $F8
C2/53A0: 8F 83 21 00  STA $002183
C2/53A4: A8           TAY           (Y = 0)

C2/53A5: B9 FC 00     LDA $00FC,Y   (get command from menu slot)
C2/53A8: A2 04        LDX #$04
C2/53AA: 48           PHA
C2/53AB: A9 04        LDA #$04
C2/53AD: 85 EE        STA $EE        (start checking Bit 2 of variable $11D6)
C2/53AF: BF 52 54 C2  LDA $C25452,X  (commands that can be changed FROM)
C2/53B3: C3 01        CMP $01,S      (is current command one of those commands?)
C2/53B5: D0 0D        BNE $53C4      (branch if not)
C2/53B7: AD D6 11     LDA $11D6     (check Battle Effects 1 byte.
                                     Bit 2 = Fight -> Jump, Bit 3 = Magic -> X-Magic,
                                     Bit 4 = Sketch -> Control, Bit 5 = Slot -> GP Rain,
                                     Bit 6 = Steal -> Capture)
                 
C2/53BA: 24 EE        BIT $EE
C2/53BC: F0 06        BEQ $53C4
C2/53BE: BF 57 54 C2  LDA $C25457,X   (commands to change TO)
C2/53C2: 83 01        STA $01,S       (replace command on stack)
C2/53C4: 06 EE        ASL $EE         (will check the next highest bit of $11D6
                                       in our next iteration)
C2/53C6: CA           DEX
C2/53C7: 10 E6        BPL $53AF       (loop for all 5 possible commands that can be
                                       converted)

I think that's the right code... :sleep:

I have an idea on how to work this out, which brings me to a question with the BEQ.

If, at address C2/5388, I use a BEQ, it means that the branch will look for the address specified only in the 53 range? It will not look for code close to C2/5488 or C2/5A88, right?

If that is right, then the whole code for the commands of magitek and the tower of fanatics needs to be moved to a block of free space to be able to do this correctly?

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Using Lore & Summon in the Fanatics Tower
« Reply #8 on: June 06, 2011, 10:36:04 PM »
Maybe to do this the "right way" you do have to move it to an unused space... but I did the following tonight and it seems to work:

My basic strategy here was to buy space by eliminating the need for certain blocks of code, namely the ones I called "CheckFight" ($5372) and "CheckMagic" ($537A)... as well as getting rid of the need for all those XBAs by eliminating the need to check to see if this is "Gau"... which would "break" this code if anyone hacked a non-Gau to have Rage... so in addition to saving space I killed a "bug" (that granted can only be found by hacking but still ^_^ )

Then with the roughly 12 bytes I saved by reordering logic checks, I can look for commands I want to keep. I saved a further 4 bytes by adjusting to a Branch if greater than and branch if less than to define a range of commands I wanted to be blanked out... (which was Steal, Capture, SwdTech, Throw, Tools and Blitz).... And since Item is occluded here, all characters should have at least one command avoiding any hang ups that occur if a character has no menu options available (unless someone hacked out Item, tsk tsk...)

I also made a more limited version that preserves only Lore, Sketch (seems like magic to me! ... and I had space and didn't want to use no ops so...), and Summon....

Again if anyone wants to code review this, please do as ...  :isuck:

I will probably submit this to be added to the patches on the site since it seems like something people might want; unless Leno / etc wants to throw their version up stand alone ... ?

Broad version:

Code: [Select]
hirom   ; don't change this
header  ; comment out if your rom has no header

org $C2535A  ; location in both SNES versions

MenuLoop:
LDA $FC,X      ; Load menu item
CMP #$10       ;CMP #$01
BEQ SetMagi    ; If this is Rage, replace with MagiTek; BEQ NextSlot ; skip to next slot if Item
; If someone hacked Gau to have both Fight and Rage, this implies he will have duplicate
; commands of either Magic or MagiTek whichever is event appropriate...
CMP #$00       ;CMP #$12
BEQ SetMagi   ; If this is Fight, replace with MagiTek ; BEQ NextSlot   ; skip to next slot if Mimic
CMP #$02       ;XBA      ; get character index
BEQ CheckFanatic   ; If this is Magic, determine what to do ;CMP #$0B

CMP #$18
BEQ ClearCommand   ; If they hacked in GPRain somewhere, clear it out

CMP #$16
BEQ SetMagi ; If they hacked in Jump, then we should treat it like fight
; The problem with this though is that if they have both Fight and Jump,
; then duplicate commands are likely...

CMP #$0A       ;BNE LoadCom ; don't check rage if not Gau
BCC NextSlot   ; see below ;XBA      ; get command
; If this is NOT Fight, Item, Magic, Morph, Revert, Steal, Capture, SwdTech
;   Throw, Tools, or Blitz... skip to the next slot
CMP #$05       ;CMP #$10
BCS NextSlot   ; see below ;BNE LoadChar ; don't load fight if not rage
; If this is NOT Steal, Capture, SwdTech
;   Throw, Tools, or Blitz... skip to the next slot

BRA ClearCommand ; empty the command out

LoadFight:
; LDA #$00 ; load fight over rage

LoadChar:
; XBA     

LoadCom:
; XBA

CheckFight:
;CMP #$00
;BNE CheckMagic ; if this is fight, do next lines to replace it w/ Magitech

SetMagi:
LDA #$1D ; Load MagiTech
BRA StoreCommand ; go store MagiTech in menu slot

CheckMagic:
;CMP #$02
;BEQ StoreCommand ; if this is Magic, go clear it if fanatic, keep if not

EmptyCommand:
LDA #$FF ; Load Empty Command

StoreCommand:
STA $FC,X ;update this menu slot

CheckFanatic:
LDA $3EBB ; load Fanatic flag
LSR       ; always done prior to checking Fanatic flag
BCC NextSlot ; skip if not in Fanatics tower
LDA $FC,X ; load menu slot again
CMP #$02
BEQ ClearCommand ; branch if Magic so we can empty slot
CMP #$1D 
BNE SaveCommand ; branch if this isn't Fight / Rage

StoreMagic:
LDA #$02
BRA SaveCommand ; branch to save Magic as command

ClearCommand:
LDA #$FF

SaveCommand:
STA $FC,X

NextSlot:
DEX
BPL MenuLoop   ;loop over menu slots until done

Limited Version (only the near beginning is different from above) :

Code: [Select]
hirom   ; don't change this
header  ; comment out if your rom has no header

org $C2535A  ; location in both SNES versions

MenuLoop:
LDA $FC,X      ; Load menu item
CMP #$10       ;CMP #$01
BEQ SetMagi    ; If this is Rage, replace with MagiTek; BEQ NextSlot ; skip to next slot if Item
; If someone hacked Gau to have both Fight and Rage, this implies he will have duplicate
; commands of either Magic or MagiTek whichever is event appropriate...
CMP #$00       ;CMP #$12
BEQ SetMagi   ; If this is Fight, replace with MagiTek ; BEQ NextSlot   ; skip to next slot if Mimic
CMP #$02       ;XBA      ; get character index
BEQ CheckFanatic   ; If this is Magic, determine what to do ;CMP #$0B

CMP #$19
BEQ NextSlot   ; Leave Summon Alone

CMP #$0C
BEQ NextSlot ; Leave Lore Alone

CMP #$01       
BEQ NextSlot   ; Leave Item Alone

CMP #$0D       
BEQ NextSlot   ; Leave Sketch Alone

BRA ClearCommand ; empty the command out

SetMagi:
LDA #$1D ; Load MagiTech
BRA StoreCommand ; go store MagiTech in menu slot

EmptyCommand:
LDA #$FF ; Load Empty Command

StoreCommand:
STA $FC,X ;update this menu slot

CheckFanatic:
LDA $3EBB ; load Fanatic flag
LSR       ; always done prior to checking Fanatic flag
BCC NextSlot ; skip if not in Fanatics tower
LDA $FC,X ; load menu slot again
CMP #$02
BEQ ClearCommand ; branch if Magic so we can empty slot
CMP #$1D 
BNE SaveCommand ; branch if this isn't Fight / Rage

StoreMagic:
LDA #$02
BRA SaveCommand ; branch to save Magic as command

ClearCommand:
LDA #$FF

SaveCommand:
STA $FC,X

NextSlot:
DEX
BPL MenuLoop   ;loop over menu slots until done

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Using Lore & Summon in the Fanatics Tower
« Reply #9 on: June 06, 2011, 11:08:45 PM »
Ahh, glad someone can understand the spaghetti known as my comments. :happy: Taking a quick peek, I'm not sure I see an issue, but it obviously requires some extensive testing to be sure.

119 bugs fixed and counting.

Ronnen

  • Karlabos
  • *
  • Posts: 33
    • View Profile
Re: Using Lore & Summon in the Fanatics Tower
« Reply #10 on: June 07, 2011, 08:38:16 AM »
You could give lessons on writing code comments compared to some of the nonsense I see at work :)

Also, so I retested the limited version (only unlocking Summon, Lore, and Sketch) and it functions as expected (simplicity ftw)

However, after some more testing this morning, I was apparently wearing my flippy-floppys when coding the broad version...

I got my BCC and my BCS backwards the first time, and also forgot that BCS is a greater than OR EQUAL test...

Played through the MagiTek events, as well as doing a at least one battle in Fanatics with a variety of "characters" (Actually i just hacked the SRAM to alter the commands of the ones I was using to cycle through the complete list - as the MagiTek events don't really let you switch characters so to speak) and the broad version seems to be doing what I want it to do now.

The fixed greater than and less than checks should look like:

Code: [Select]
CMP #$0B     
BCS NextSlot   
; If this is NOT Fight, Item, Magic, Morph, Revert, Steal, Capture, SwdTech
;   Throw, Tools, or Blitz... skip to the next slot
CMP #$05       
BCC NextSlot   
; If this is NOT Steal, Capture, SwdTech
;   Throw, Tools, or Blitz... skip to the next slot

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Using Lore & Summon in the Fanatics Tower
« Reply #11 on: June 07, 2011, 09:12:27 AM »
Quote from: Ronnen
My basic strategy here was to buy space by eliminating the need for certain blocks of code, namely the ones I called "CheckFight" ($5372) and "CheckMagic" ($537A)... as well as getting rid of the need for all those XBAs by eliminating the need to check to see if this is "Gau"... which would "break" this code if anyone hacked a non-Gau to have Rage... so in addition to saving space I killed a "bug" (that granted can only be found by hacking but still ^_^ )

well, Gogo can have Rage without hacking.  so maybe the existing code checks for Gau, because the thinking is that if you want Gogo to have Magitek/Magic in these locations, you can simply assign Fight to him.

but what you said still applies to hacks that have a non-Gau, non-command-editing character with Rage. :)