Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ff3:ff3us:doc:asm:codes:event_codes [2016/04/03 08:34] m06 created |
ff3:ff3us:doc:asm:codes:event_codes [2021/06/14 03:10] rycona [Character and Party Actions (77-90)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Event Commands ===== | + | ====== Event Commands |
- | ==== Character Action | + | ===== Character Action |
+ | |||
+ | The action queue will consist of [[ff3: | ||
+ | |||
+ | Character Numbers (xx): | ||
+ | * $00-$0F: Player Characters (Terra, Locke, Cyan ...) | ||
+ | * $10-$2F: NPC' | ||
+ | * $30: Camera | ||
+ | * $31-$34: Party Characters | ||
< | < | ||
- | xx nn | + | xx nn xx = Character Number, nn = Number of actions to perform (including the final end command) |
- | If nn & 0x80, the next action will not take place until this and any before it are complete. | + | |
</ | </ | ||
- | The action queue will consist of [[ff3: | ||
- | ==== General Actions ==== | + | ===== General Actions |
- | Jump table will be at '' | + | Jump table will be at '' |
+ | |||
+ | ==== Character Actions (35-47) ==== | ||
< | < | ||
- | 35 xx | + | 35 xx |
- | 36 xx | + | 36 xx |
37 xx yy $C09C8F | 37 xx yy $C09C8F | ||
38 $C09D0E | 38 $C09D0E | ||
39 $C09D16 | 39 $C09D16 | ||
- | 3A $C09D1E | + | 3A $C09D1E |
- | 3B $C09D2E | + | 3B $C09D2E |
3C c1 c2 c3 c4 $C09D6D | 3C c1 c2 c3 c4 $C09D6D | ||
3D xx | 3D xx | ||
Line 35: | Line 45: | ||
45 $C09CE2 | 45 $C09CE2 | ||
46 xx | 46 xx | ||
- | 47 $C09D03 | + | 47 $C09D03 |
+ | </ | ||
+ | ==== Dialogue (48-4B) ==== | ||
+ | < | ||
48 xxxx | 48 xxxx | ||
49 $C0A4A6 | 49 $C0A4A6 | ||
- | 4A $C0A4B0 | + | 4A $C0A4B0 |
4B xxxx | 4B xxxx | ||
If xxxx & 0x4000, only the text will be shown (no dialogue window) | If xxxx & 0x4000, only the text will be shown (no dialogue window) | ||
If xxxx & 0x8000, the text will be shown at the bottom of the screen | If xxxx & 0x8000, the text will be shown at the bottom of the screen | ||
- | 4C xx yy | + | (note these flags apply to both command 48 and 4B) |
+ | </ | ||
+ | ==== Invoke Battle (4C-4F) ==== | ||
+ | < | ||
+ | 4C xx bb | ||
4D xx bb $C0A578 | 4D xx bb $C0A578 | ||
- | bb: | + | 4E $C0A4F9 |
- | 00: Grass 10: Inside of Train Car 20: Owzer' | + | 4F $C0A5F3 |
- | 01: Brown Forest | + | </code> |
- | 02: Desert | + | ==== Screen Actions (50-65) ==== |
- | 03: Green Forest | + | < |
- | 04: Building | + | |
- | 05: World of Ruin 15: Floating Island | + | |
- | 06: The Veldt 16: Kefka' | + | |
- | 07: Falling through the Clouds | + | |
- | 08: Dark Town 18: Opera House Rafters | + | |
- | 09: Grey Cave 19: Flaming House 29: Airship, WoR, right | + | |
- | 0A: Brown Cave 1A: Castle | + | |
- | 0B: Mountain Top 1B: Magitek Research Facility w/ Tubes 2B: Light Building | + | |
- | 0C: Mountain Cave 1C: Colloseum | + | |
- | 0D: Raft on a River 1D: Magitek Research Facility | + | |
- | 0E: Imperial Base 1E: Village | + | |
- | 0F: On Top of Train Car 1F: Waterfall | + | |
- | 4E $C0A4F9 | + | |
- | 4F $C0A5F3 | + | |
50 xx | 50 xx | ||
51 ooorgbii pb pe | 51 ooorgbii pb pe | ||
Line 69: | Line 72: | ||
52 xx | 52 xx | ||
53 ooorgbii pb pe | 53 ooorgbii pb pe | ||
- | 54 $C0A784 | + | 54 $C0A784 |
55 ci | 55 ci | ||
56 ci | 56 ci | ||
Line 82: | Line 85: | ||
5A _x | 5A _x | ||
5B $C0A826 | 5B $C0A826 | ||
- | 5C $C0A82D | + | 5C $C0A82D |
5D xx yy $C0A838 | 5D xx yy $C0A838 | ||
5E xx yy $C0A8CE | 5E xx yy $C0A8CE | ||
Line 89: | Line 92: | ||
61 _c pb pe | 61 _c pb pe | ||
62 xx | 62 xx | ||
- | 63 xx | + | 63 xx |
- | 64 xx yy $C0AAE9 | + | 64 xx yy $C0AAE9 |
- | 65 xx yy $C0AB09 | + | 65 xx yy $C0AB09 |
- | 6A nnnn xx yy ff $C0AB47 | + | </ |
+ | ==== Map Actions (6A-76) ==== | ||
+ | < | ||
+ | 6A nnnn xx yy ff $C0AB47 | ||
ff: | ff: | ||
01: Party is in airship | 01: Party is in airship | ||
02: Party is on Chocobo | 02: Party is on Chocobo | ||
- | 6B nnnn xx yy ff $C0AB55 | + | 6B nnnn xx yy ff $C0AB55 |
- | 6C xxxx yyyy zz $C0AC0B | + | 6C xxxx xx yy ff |
70 xx yy $C0A881 | 70 xx yy $C0A881 | ||
71 xx yy $C0A917 | 71 xx yy $C0A917 | ||
Line 104: | Line 110: | ||
74 xx yy rr cc data... | 74 xx yy rr cc data... | ||
75 $C0AC1F | 75 $C0AC1F | ||
+ | </ | ||
+ | ==== Character and Party Actions (77-90) ==== | ||
+ | < | ||
77 xx | 77 xx | ||
- | 78 xx | + | 78 xx |
- | 79 xx yy zz $C0A36A | + | 79 xx nnnn |
7A xx aaaaaa | 7A xx aaaaaa | ||
- | 7B $C0A441 | + | 7B $C0A441 |
- | 7C xx | + | 7C xx |
7D xx | 7D xx | ||
7E xx yy $C0A39A | 7E xx yy $C0A39A | ||
Line 115: | Line 124: | ||
80 xx | 80 xx | ||
81 xx | 81 xx | ||
- | 82 $C0A570 | + | 82 $C0A570 |
84 xxxx | 84 xxxx | ||
85 xxxx | 85 xxxx | ||
Line 140: | Line 149: | ||
8F $C0AFF8 | 8F $C0AFF8 | ||
90 $C0B002 | 90 $C0B002 | ||
+ | </ | ||
+ | ==== Wait/Pause (91-95) ==== | ||
+ | < | ||
91 $C0B23F | 91 $C0B23F | ||
92 $C0B249 | 92 $C0B249 | ||
Line 145: | Line 157: | ||
94 $C0B25D | 94 $C0B25D | ||
95 $C0B267 | 95 $C0B267 | ||
+ | </ | ||
+ | ==== Menus, Timers and Cinematics (96-aF) ==== | ||
+ | < | ||
96 $C0A7F0 | 96 $C0A7F0 | ||
97 $C0A7FD | 97 $C0A7FD | ||
Line 153: | Line 168: | ||
9C xx | 9C xx | ||
9D $C0B09C | 9D $C0B09C | ||
- | A0 xx yy zz aa bb $C0B0E0 | + | A0 xx xx yy yy zz |
- | A1 xx | + | A1 xx |
- | A2 $C0B130 | + | A2 $C0B130 |
- | A6 $C0BA09 | + | A6 $C0BA09 |
- | A7 xx | + | A7 xx |
A8 $C0BA51 | A8 $C0BA51 | ||
A9 $C0B966 | A9 $C0B966 | ||
AA $C0B992 | AA $C0B992 | ||
AB $C0B91B | AB $C0B91B | ||
- | AC $C0B95E | + | AC $C0B95E |
AD $C0BA69 | AD $C0BA69 | ||
AE $C0B9C5 | AE $C0B9C5 | ||
AF $C0A503 | AF $C0A503 | ||
+ | </ | ||
+ | ==== Execution (B0-BF) ==== | ||
+ | < | ||
B0 xx | B0 xx | ||
B1 $C0B145 | B1 $C0B145 | ||
Line 185: | Line 203: | ||
" | " | ||
BF $C0B9E7 | BF $C0B9E7 | ||
+ | </ | ||
+ | |||
+ | ==== Conditionals (C0-CF) ==== | ||
+ | < | ||
+ | If MSB of bit to test is 0, the bit will be compared to 0, else it will be compared to 1. | ||
+ | [In a nutshell, if(tx & 0x8000) -> if(*tx); if(!(tx & 0x8000)) -> if(!(*tx))] | ||
+ | If result of all comparisons is true, jump will occur; otherwise, execution will occur at the next command. | ||
+ | Each condition to test (the bit value) is 2 bytes--the address to jump to is 3 bytes, and is added to $CA0000. | ||
- | C0-CF Conditionals: | ||
- | If MSB of bit to test is 0, the bit will be compared to 0, else it will be compared to 1. | ||
- | [In a nutshell, if(tx & 0x8000) -> if(*tx); if(!(tx & 0x8000)) -> if(!(*tx))] | ||
- | If result of all comparisons is true, jump will occur; otherwise, execution will occur at the next command. | ||
- | Each condition to test (the bit value) is 2 bytes--the address to jump to is 3 bytes, and is added to $CA0000. | ||
C0-C7: $C0B2C8, C8-CF: $C0B32D | C0-C7: $C0B2C8, C8-CF: $C0B32D | ||
Line 209: | Line 230: | ||
CE t1 t2 t3 t4 t5 t6 t7 addr if(t1 && t2 && t3 && t4 && t5 && t6 && t7) jump; else continue; | CE t1 t2 t3 t4 t5 t6 t7 addr if(t1 && t2 && t3 && t4 && t5 && t6 && t7) jump; else continue; | ||
CF t1 t2 t3 t4 t5 t6 t7 t8 addr if(t1 && t2 && t3 && t4 && t5 && t6 && t7 && t8) jump; else continue; | CF t1 t2 t3 t4 t5 t6 t7 t8 addr if(t1 && t2 && t3 && t4 && t5 && t6 && t7 && t8) jump; else continue; | ||
+ | </ | ||
+ | ==== Event Bits (D0-EF) ==== | ||
+ | |||
+ | < | ||
D0 xx | D0 xx | ||
D1 xx | D1 xx | ||
Line 239: | Line 264: | ||
Else If event word xx < yyyy then CaseWord = $0004 | Else If event word xx < yyyy then CaseWord = $0004 | ||
EF xx yy $C0B7AA | EF xx yy $C0B7AA | ||
+ | </ | ||
+ | |||
+ | ==== Sound / Music (F0-FC) ==== | ||
+ | |||
+ | < | ||
F0 xx | F0 xx | ||
F1 xx yy $C0B7D4 | F1 xx yy $C0B7D4 | ||
F2 xx | F2 xx | ||
- | F3 xx | + | F3 xx |
F4 xx | F4 xx | ||
F5 xx yy zz | F5 xx yy zz | ||
- | F6 xx yy zz | + | F6 xx yy zz |
F7 $C0B8A1 | F7 $C0B8A1 | ||
F8 $C0B8AF | F8 $C0B8AF | ||
F9 xx | F9 xx | ||
- | FA $C0B8C7 | + | FA $C0B8C7 |
+ | </ | ||
+ | ==== End Script (FD-FF) ==== | ||
+ | < | ||
+ | FD $C0B8D2 | ||
FE $C0B8D7 | FE $C0B8D7 | ||
+ | </ | ||
+ | |||
+ | ==== Unused General Actions ==== | ||
+ | The following is a list of unused pointers from the general actions jump table ($C0/98C4). | ||
+ | < | ||
+ | C0/9926: 1A B9 (act. 66: ** NOT USED **) | ||
+ | C0/9928: 1A B9 (act. 67: ** NOT USED **) | ||
+ | C0/992A: 1A B9 (act. 68: ** NOT USED **) | ||
+ | C0/992C: 1A B9 (act. 69: ** NOT USED **) | ||
+ | |||
+ | C0/9934: 1A B9 (act. 6D: ** NOT USED **) | ||
+ | C0/9936: 1A B9 (act. 6E: ** NOT USED **) | ||
+ | C0/9938: 1A B9 (act. 6F: ** NOT USED **) | ||
+ | |||
+ | C0/9946: 1A B9 (act. 76: ** NOT USED **) | ||
+ | |||
+ | C0/9960: 1A B9 (act. 83: ** NOT USED **) | ||
+ | |||
+ | C0/9996: 1A B9 (act. 9E: ** NOT USED **) | ||
+ | C0/9998: 1A B9 (act. 9F: ** NOT USED **) | ||
+ | |||
+ | C0/99A0: 1A B9 (act. A3: ** NOT USED **) | ||
+ | C0/99A2: 1A B9 (act. A4: ** NOT USED **) | ||
+ | C0/99A4: 1A B9 (act. A5: ** NOT USED **) | ||
+ | |||
+ | C0/9A24: 1A B9 (act. E5: ** NOT USED **) | ||
+ | C0/9A26: 1A B9 (act. E6: ** NOT USED **) | ||
+ | |||
+ | C0/9A32: 1A B9 (act. EC: ** NOT USED **) | ||
+ | C0/9A34: 1A B9 (act. ED: ** NOT USED **) | ||
+ | C0/9A36: 1A B9 (act. EE: ** NOT USED **) | ||
+ | |||
+ | C0/9A52: 1A B9 (act. FC: ** NOT USED **) | ||
+ | C0/9A58: 1A B9 (act. FF: ** NOT USED **) | ||
</ | </ |