A slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=112 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexc01a.html slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=112 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexc01a.html.z x Eg^ Ћ OK text/html ISO-8859-1 gzip 8: Tue, 10 Mar 2020 08:02:41 GMT 0 0 P Eg^
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
01 00 FF
03 02 FF
05 04 FF
Here we go:Code: [Select]Enemy Formation Table (70200-711FF)The unknown bits and byte seem to be insignificant, or at least not worth changing.
Each formation is represented by 8 bytes:
Byte 0:
Bit 0: ?
Bit 1: ?
Bit 2: ?
Bit 3: Forced Back Attack
Bit 4: Enemies Have Boss Death
Bit 5: Monster(s) 3 Begin In Eggs
Bit 6: Monster(s) 2 Begin In Eggs
Bit 7: Monster(s) 1 Begin In Eggs
Byte 1: Monster(s) 1 Type
Byte 2: Monster(s) 2 Type
Byte 3: Monster(s) 3 Type
Byte 4: Qty. of Each Monster Type (max 8 altogether)
Bit 0-1: ?
Bit 2-3: Monster(s) 3 Qty.
Bit 4-5: Monster(s) 2 Qty.
Bit 6-7: Monster(s) 1 Qty.
Byte 5: Preset Monster Arrangement
-Values 00-91
-Total qty. of monsters is limited by arrangement
Byte 6:
Bit 0: Can't Run
Bit 1: No Game Over (think impossible Dark Elf battle)
Bits 2-3: Battle Music (Regular/Boss/Fiend/No Change)
Bit 4: Character Battle (Edward v. Tellah, etc.)
Bit 5: Auto Battle (not sure where the AI is for these?)
Bit 6: Floating
Bit 7: Transparent (Breath, Mind)
Byte 7: ?
In case anyone's interested, the so-smart-it's-stupid way I traced this: Took two identical files, changed the monster type of group 1 from imp to basilisk (using zyrthofar's editor), created an .ips patch, read the patch with my hex editor to determine the altered location. Voila!
02/8ECA: AD A4 29 LDA $29A4
02/8ECD: 29 07 AND #$07
02/8ECF: 0A ASL
02/8ED0: 0A ASL
02/8ED1: 48 PHA
02/8ED2: 0A ASL
02/8ED3: AA TAX
02/8ED4: 7B TDC
02/8ED5: A8 TAY
02/8ED6: BF DC FB 16 LDA $16FBDC,X
02/8EDA: 99 CB 6C STA $6CCB,Y
02/8EDD: BF AC FB 16 LDA $16FBAC,X
02/8EE1: 99 D3 6C STA $6CD3,Y
02/8EE4: E8 INX
02/8EE5: C8 INY
02/8EE6: C0 08 00 CPY #$0008
02/8EE9: D0 EB BNE $8ED6
02/8EEB: 7B TDC
02/8EEC: A8 TAY
02/8EED: 68 PLA
02/8EEE: AA TAX
02/8EEF: BF 0C FC 16 LDA $16FC0C,X
02/8EF3: 99 DB 6C STA $6CDB,Y
02/8EF6: BF 24 FC 16 LDA $16FC24,X
02/8EFA: 99 DF 6C STA $6CDF,Y
02/8EFD: C8 INY
02/8EFE: E8 INX
02/8EFF: C0 04 00 CPY #$0004
02/8F02: D0 EB BNE $8EEF
Well, diving into the ROM, the hex code appears to say exactly what the editor says it's saying according to my information.
A004B: 00 07 00 01 00 0B 00 0B FF
00 07 = Cast spell 7 (Slow)
00 01 = Cast spell 1 (Hold)
00 0B = Cast spell 11 (White)
00 0B = Cast spell 11 (White)
FF = End script
A005D: 00 2F 00 0C FF
00 2F = Cast spell 31 (Meteo)
00 0C = Cast spell 12 (Dummy / Dispel)
FF = End script
Unless there's something special about those indexes, it's being parsed correctly.
Wait I see what's happening now. It's writing over Golbez' script code. It doesn't know how to read the Golbez scripts and doesn't even acknowledge their existence and just goes ahead and computes what it thinks is the correct place to put the "next" autobattle, which is right over top of where the Golbez script should be. Ok at least I know what to do now.
03/8985: B7 80 LDA [$80],Y ;Load auto battle script
03/8987: 9D 8C 38 STA $388C,X ;And save
03/898A: C8 INY
03/898B: E8 INX
03/898C: C9 FF CMP #$FF ;End of script?
03/898E: D0 F5 BNE $8985 ;No, branch
03/8990: A5 84 LDA $84 ;Script number
03/8992: C9 0C CMP #$0C ;Next to last?
03/8994: F0 04 BEQ $899A ;Yes, branch
03/8996: C9 0E CMP #$0E ;Last?
03/8998: D0 15 BNE $89AF ;No, branch
03/899A: 7B TDC
03/899B: AA TAX
03/899C: B7 80 LDA [$80],Y ;Continue on past the first FF byte
03/899E: 9D 9A 38 STA $389A,X
03/89A1: C8 INY
03/89A2: E8 INX
03/89A3: C9 FF CMP #$FF ;Second terminator reached?
03/89A5: D0 F5 BNE $899C ;No, branch