===== Overworld Character Script Commands ===== ==== Graphical Actions (00-7F):==== 00-3F $EE7922 Graphical Actions 40-7F $EE7932 Graphical Actions, flipped horizontally ==== Movement (80-AB):==== 100nnndd ___ _ __ | | |__ d: direction (0: up, 1: right, 2: down, 3: left) | |____ n: number of steps (1 is added to this, so 1-8 steps possible) |_______ always 100 Movement table in tiles: 1 2 3 4 5 6 7 8 ------------------------------------------------------ 80 84 88 8C 90 94 98 9C | Move character up 81 85 89 8D 91 95 99 9D | Move character right 82 86 8A 8E 92 96 9A 9E | Move character down 83 87 8B 8F 93 97 9B 9F | Move character left A0 Move character right/up 1x1 tiles A1 Move character right/down 1x1 tiles A2 Move character left/down 1x1 tiles A3 Move character left/up 1x1 tiles A4 Move character right/up 1x2 tiles A5 Move character right/up 2x1 tiles A6 Move character right/down 2x1 tiles A7 Move character right/down 1x2 tiles A8 Move character left/down 1x2 tiles A9 Move character left/down 2x1 tiles AA Move character left/up 2x1 tiles AB Move character left/up 1x2 tiles ==== Conditionals (B0-BF): ==== ci: sbbbbbbb bbbbbiii _ ___________ ___ | | |__ i: bit index (0-7) | |__________ b: byte (added to $1E80) |_________________ s: if 1, check that bit is set; else, check that bit is clear Summary: B0 c1 aaaaaa if(c1), goto aaaaaa B1 c1 c2 aaaaaa if(c1 || c2), goto aaaaaa B2 c1 c2 c3 aaaaaa if(c1 || c2 || c3), goto aaaaaa B3 c1 c2 c3 c4 aaaaaa if(c1 || c2 || c3 || c4), goto aaaaaa B4 c1 c2 c3 c4 c5 aaaaaa if(c1 || c2 || c3 || c4 || c5), goto aaaaaa B5 c1 c2 c3 c4 c5 c6 aaaaaa if(c1 || c2 || c3 || c4 || c5 || c6), goto aaaaaa B6 c1 c2 c3 c4 c5 c6 c7 aaaaaa if(c1 || c2 || c3 || c4 || c5 || c6 || c7), goto aaaaaa B7 c1 c2 c3 c4 c5 c6 c7 c8 aaaaaa if(c1 || c2 || c3 || c4 || c5 || c6 || c7 || c8), goto aaaaaa B8 c1 aaaaaa if(c1), goto aaaaaa B9 c1 c2 aaaaaa if(c1 && c2), goto aaaaaa BA c1 c2 c3 aaaaaa if(c1 && c2 && c3), goto aaaaaa BB c1 c2 c3 c4 aaaaaa if(c1 && c2 && c3 && c4), goto aaaaaa BC c1 c2 c3 c4 c5 aaaaaa if(c1 && c2 && c3 && c4 && c5), goto aaaaaa BD c1 c2 c3 c4 c5 c6 aaaaaa if(c1 && c2 && c3 && c4 && c5 && c6), goto aaaaaa BE c1 c2 c3 c4 c5 c6 c7 aaaaaa if(c1 && c2 && c3 && c4 && c5 && c6 && c7), goto aaaaaa BF c1 c2 c3 c4 c5 c6 c7 c8 aaaaaa if(c1 && c2 && c3 && c4 && c5 && c6 && c7 && c8), goto aaaaaa ==== Other (C0-FF) ==== C0 Set entity's speed (within the event) to slowest C1 Set entity's speed (within the event) to slow C2 Set entity's speed (within the event) to normal C3 Set entity's speed (within the event) to fast C4 Set entity's speed (within the event) to fastest C7 xx xx Bit manipulation (C8-C9): bbbbbbbb bbbbbiii ____________ ___ | |__ i: bit index (0-7) |__________ b: byte (added to $1E80) C8 xxxx $EE7D46 Set event bit C9 xxxx $EE7D6F Clear event bit CC Turn character up CD Turn character right CE Turn character down CF Turn character left D0 Show character D1 Hide character D2 nnnn xx yy mm Load map nnnn, position (xx, yy), mode mm D3 nnnn xx yy mm Load map nnnn, position (xx, yy), mode mm D4 aaaaaa If ($08 & 0x80 == 0), goto $aaaaaa D5 xx aaaaaa If ($F6 != xx), goto $aaaaaa D8 Unfade screen D9 Fade screen DD Hide mini-map DF Show mini-map E0 xx Pause for xx units FC Change character to ship graphic FD Show Figaro Castle submerging FE Show Figaro Castle emerging FF End Map Script