Users browsing this thread: 1 Guest(s)
Battlescript variables...
08-03-2015, 07:11 PM
Bit 0 of $11E4 is what allows Gau to spawn. There are a couple of places that clear this bit (like if you're in a back attack or if you have 4 people in your party), but it only gets set when you're on the veldt. The game determines if you're on the veldt based on your position on the world map. Here's the code that does it:
The values at $CF5400 normally determine which set of battles to choose from on the world map. But if the value is set to $FF that means you're on the veldt, so instead it chooses from all of the available veldt battles. FF3usME makes it easy to change these values. Go to "Form", and then the "Zoning" tab. Any section of the map where the value is set to 255 (i.e. $FF) will be the veldt. If you want to get rid of the veldt completely, I would recommend changing these values so that none of them are 255.
Here is the code that triggers Gau:
Code:
C0/C1CF: BF 00 54 CF LDA $CF5400,X
C0/C1D3: 85 24 STA $24
C0/C1D5: C9 FF CMP #$FF
C0/C1D7: D0 06 BNE $C1DF ; branch if not a veldt sector
C0/C1D9: A9 0F LDA #$0F
C0/C1DB: 8F E4 11 00 STA $0011E4
The values at $CF5400 normally determine which set of battles to choose from on the world map. But if the value is set to $FF that means you're on the veldt, so instead it chooses from all of the available veldt battles. FF3usME makes it easy to change these values. Go to "Form", and then the "Zoning" tab. Any section of the map where the value is set to 255 (i.e. $FF) will be the veldt. If you want to get rid of the veldt completely, I would recommend changing these values so that none of them are 255.
Here is the code that triggers Gau:
Code:
C2/4840: AE 0B 30 LDX $300B
C2/4843: 30 1C BMI $4861 ; skip if gau is not in the party
C2/4845: A9 01 LDA #$01
C2/4847: 1C E4 11 TRB $11E4
C2/484A: F0 15 BEQ $4861 ; skip if gau can't appear after battle
C2/484C: 20 5A 4B JSR $4B5A ; random number (0..255)
C2/484F: C9 A0 CMP #$A0
C2/4851: B0 0E BCS $4861 ; 5/8 chance to skip
C2/4853: AD BD 3E LDA $3EBD
C2/4856: 89 02 BIT #$02
C2/4858: D0 74 BNE $48CE ; branch if gau has been obtained
C2/485A: AD 76 3A LDA $3A76
C2/485D: C9 02 CMP #$02
C2/485F: B0 6D BCS $48CE ; branch if more than 2 characters are left
; gau shows up
C2/48CE: BD 18 30 LDA $3018,X ; gau's character mask
C2/48D1: 0C 4E 2F TSB $2F4E ; gau can be targetted
C2/48D4: 0C 40 3A TSB $3A40 ; gau acts like an enemy
C2/48D7: A9 04 LDA #$04
C2/48D9: 0C 46 3A TSB $3A46 ; disable counterattacks ???
C2/48DC: A2 1B LDX #$1B ; battle event $1B (gau appears on veldt)
C2/48DE: 80 E4 BRA $48C4
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)