Users browsing this thread: 1 Guest(s)
Doomgaze's Event Scripts?

#1
Posts: 31
Threads: 17
Thanks Received: 0
Thanks Given: 15
Joined: Jan 2020
Reputation: 0
Status
None
I want to read how Doomgaze's event scripts "var13 seFF3t bit: 0" from ff3usME, managed to trigger "Give esper to the party" script in Zone Doctor. What is Doomgaze's NPC event# in the world map if there such thing? Thank.
  Find
Quote  

#2
Posts: 3,704
Threads: 268
Thanks Received: 717
Thanks Given: 320
Joined: Oct 2011
Reputation: 60
Status
Faith
There is no event code for the Doom Gaze fight, the battle formation loading is done by ASM:

Code:
EE/6F1D:    BF000B00    LDA $000B00,X  (Load X position of Doom Gaze's 4x4 block) ($0B00,X...)
EE/6F21:    C558        CMP $58        (Does it match that of the current 4x4 block?)
EE/6F23:    D00A        BNE $6F2F      (Branch if not)
EE/6F25:    BF020B00    LDA $000B02,X  (Load Y position of Doom Gaze's 4x4 block) ($0B02,X...)
EE/6F29:    C55A        CMP $5A        (Does it match that of the current 4x4 block?)
EE/6F2B:    D002        BNE $6F2F      (Branch if not) (BEQ $6F3A...)
EE/6F2D:    800B        BRA $6F3A      (You're here if both matched, proceed to fight Doom Gaze)
EE/6F2F:    E8          INX
EE/6F30:    E8          INX
EE/6F31:    E8          INX
EE/6F32:    E8          INX            (Point to next 4x4 block)
EE/6F33:    E00800      CPX #$0008     (Tested both blocks?)
EE/6F36:    D0E5        BNE $6F1D      (Loop if not)
EE/6F38:    8031        BRA $6F6B      (Exit)
EE/6F3A:    6426        STZ $26        (Set vehicle speed to zero)
EE/6F3C:    6428        STZ $28
EE/6F3E:    642A        STZ $2A
EE/6F40:    642C        STZ $2C
EE/6F42:    642D        STZ $2D        (Zero speed of ascent or descent)
EE/6F44:    C210        REP #$10       (16-bit indexes)
EE/6F46:    A27401      LDX #$0174     (If the event was loading it, this would be 2-pack $5D)
EE/6F49:    BF0050CF    LDA $CF5000,X  (Monster formations for events)
EE/6F4D:    8DE011      STA $11E0      (Save Doom Gaze's formation)
EE/6F50:    A92900      LDA #$0029
EE/6F53:    8DE211      STA $11E2      (Set background as WoR airship view, ship on right side)
EE/6F56:    E220        SEP #$20       (8-bit A)
EE/6F58:    9CE411      STZ $11E4      (Clear various battle flags)
EE/6F5B:    ADF611      LDA $11F6
EE/6F5E:    0922        ORA #$22       (Set a battle to occur; remember that it involved Doom Gaze)
EE/6F60:    8DF611      STA $11F6      (Save changes) (LDA #$22, TSB $11F6...)
EE/6F63:    ADFA11      LDA $11FA
EE/6F66:    0901        ORA #$01       (Set bit to maintain airship mode after the battle)
EE/6F68:    8DFA11
  Find
Quote  

#3
Posts: 31
Threads: 17
Thanks Received: 0
Thanks Given: 15
Joined: Jan 2020
Reputation: 0
Status
None
(01-02-2020, 09:32 AM)madsiur Wrote: There is no event code for the Doom Gaze fight, the battle formation loading is done by ASM:

Code:
EE/6F1D:    BF000B00    LDA $000B00,X  (Load X position of Doom Gaze's 4x4 block) ($0B00,X...)
EE/6F21:    C558        CMP $58        (Does it match that of the current 4x4 block?)
EE/6F23:    D00A        BNE $6F2F      (Branch if not)
EE/6F25:    BF020B00    LDA $000B02,X  (Load Y position of Doom Gaze's 4x4 block) ($0B02,X...)
EE/6F29:    C55A        CMP $5A        (Does it match that of the current 4x4 block?)
EE/6F2B:    D002        BNE $6F2F      (Branch if not) (BEQ $6F3A...)
EE/6F2D:    800B        BRA $6F3A      (You're here if both matched, proceed to fight Doom Gaze)
EE/6F2F:    E8          INX
EE/6F30:    E8          INX
EE/6F31:    E8          INX
EE/6F32:    E8          INX            (Point to next 4x4 block)
EE/6F33:    E00800      CPX #$0008     (Tested both blocks?)
EE/6F36:    D0E5        BNE $6F1D      (Loop if not)
EE/6F38:    8031        BRA $6F6B      (Exit)
EE/6F3A:    6426        STZ $26        (Set vehicle speed to zero)
EE/6F3C:    6428        STZ $28
EE/6F3E:    642A        STZ $2A
EE/6F40:    642C        STZ $2C
EE/6F42:    642D        STZ $2D        (Zero speed of ascent or descent)
EE/6F44:    C210        REP #$10       (16-bit indexes)
EE/6F46:    A27401      LDX #$0174     (If the event was loading it, this would be 2-pack $5D)
EE/6F49:    BF0050CF    LDA $CF5000,X  (Monster formations for events)
EE/6F4D:    8DE011      STA $11E0      (Save Doom Gaze's formation)
EE/6F50:    A92900      LDA #$0029
EE/6F53:    8DE211      STA $11E2      (Set background as WoR airship view, ship on right side)
EE/6F56:    E220        SEP #$20       (8-bit A)
EE/6F58:    9CE411      STZ $11E4      (Clear various battle flags)
EE/6F5B:    ADF611      LDA $11F6
EE/6F5E:    0922        ORA #$22       (Set a battle to occur; remember that it involved Doom Gaze)
EE/6F60:    8DF611      STA $11F6      (Save changes) (LDA #$22, TSB $11F6...)
EE/6F63:    ADFA11      LDA $11FA
EE/6F66:    0901        ORA #$01       (Set bit to maintain airship mode after the battle)
EE/6F68:    8DFA11  

...... which code is the one that triggered by Var013 set bit: 0?
  Find
Quote  

#4
Posts: 3,704
Threads: 268
Thanks Received: 717
Thanks Given: 320
Joined: Oct 2011
Reputation: 60
Status
Faith
Sorry I misread your question, the event address is loaded here, your Var013:0 is the LDA $1DD2 followed by BIT #$01:

Code:
EE/0198:    8920        BIT #$20       (Battle involved Doom Gaze?)
EE/019A:    F02C        BEQ $01C8      (Branch if not)
EE/019C:    ADD21D      LDA $1DD2      (Battle event byte)
EE/019F:    8901        BIT #$01       (Defeated Doom Gaze?)
EE/01A1:    F01B        BEQ $01BE      (Branch if not) (LSR A, BCC...)
EE/01A3:    AF7BB2EE    LDA $EEB27B    (Pointer to Bahamut event, low byte)
EE/01A7:    8FFD1100    STA $0011FD    (Set backup of event address, low byte) ($11FD...)
EE/01AB:    AF7CB2EE    LDA $EEB27C    (Pointer to Bahamut event, middle byte)
EE/01AF:    8FFE1100    STA $0011FE    (Set backup of event address, middle byte) ($11FE...)
EE/01B3:    AF7DB2EE    LDA $EEB27D    (Pointer to Bahamut event, high byte)

and this is the event address:

Code:
EE/B27B:    960000      (CA/0096; Bahamut)

Edit: Note tha CA/0096 is only the map loading, the actual event is at CA/009D.
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • doofenH (01-02-2020)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite