-
Notifications
You must be signed in to change notification settings - Fork 4
/
scrdoc.txt
170 lines (162 loc) · 9.1 KB
/
scrdoc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Pre-Script Commands:
-----------------
00 (FirstEnter) - <nop> <nop> <nop> <nop> <nop> <nop> { Executes script on first entry of map }
01 (Enter) - <nop> <nop> <nop> <nop> <nop> <nop> { Executes script on entry of map }
02 (BumpTile) - <x> <y> <tile/sprite number> <nop> <nop> <nop> { Executes script on bumping into something }
03 (DragItem) - <x> <y> <layer> <tile/sprite number> <item number> <nop> { Executes script on dragging an item onto a tile }
04 (Walk) - <x> <y> <nop> <nop> <nop> <nop> { Executes script on walking into something (cannot click or spacebar it) }
05 (TempVarEq) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if TempVar == value }
06 (RandVarEq) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if RandVar == value }
07 (RandVarGt) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if RandVar > Value }
08 (RandVarLs) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if RandVar < Value }
09 (EnterVehicle) - <nop> <nop> <nop> <nop> <nop> <nop> { Executes script on map entry (used for X-wings and transportation anims) }
0a (CheckMapTile) - <value> <x> <y> <layer> <nop> <nop> { Checks if map tile is set to a value, used for variable storage }
0b (EnemyDead) - <enemy id> <nop> <nop> <nop> <nop> <nop> { Checks if enemy is dead }
0c (AllEnemiesDead) - <nop> <nop> <nop> <nop> <nop> <nop> { Checks if all enemies are dead }
0d (HasItem) - <item num> <nop> <nop> <nop> <nop> <nop> { Checks if an item is in the player's inventory, does something unknown if the item num is FFFF (gets item currently equipped?) }
0e (CheckEndItem) - <item num> <nop> <nop> <nop> <nop> <nop> { Checks the world's end item }
0f (CheckStartItem) - <item num> <nop> <nop> <nop> <nop> <nop> { Checks the world's start item }
10 - Used in map 150, also in early maps in Indy with leaked text "Pick"
11 (GameInProgress) - <nop> <nop> <nop> <nop> <nop> <nop> { Executes script if player has not beaten game yet? Never used. }
12 (GameCompleted) - <nop> <nop> <nop> <nop> <nop> <nop> { Executes script is player has beaten game? }
13 (HealthLs) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if Luke health < Value }
14 (HealthGt) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if Luke health > Value }
15 - Never used, and actually not implemented in Yoda Stories
16 - Related to 10
17 (DragWrongItem) - <x> <y> <layer> <tile/sprite number> <item number> <nop> { Executes script on dragging an incorrect item onto a tile }
18 (PlayerAtPos) - <x> <y> <nop> <nop> <nop> <nop> { Checks if player is at position }
19 (GlobalVarEq) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if GlobalVar == value }
1a (GlobalVarLs) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if GlobalVar < value }
1b (GlobalVarGt) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if GlobalVar > value }
1c (ExperienceEq) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if ExperienceVar == value, used in map 94 (Dagobah) a lot. }
1d - <unk> <unk> <nop> <nop> <nop> <nop> { Used in map 57, 139, 160 a lot, related to script cmd 15/16? Checks goals? }
1e -
1f (TempVarNe) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if TempVar != value }
20 (RandVarNe) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if RandVar != value }
21 (GlobalVarNe) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if GlobalVar != value }
22 (CheckMapTileVar) - <value> <x> <y> <layer> <nop> <nop> { Checks if map tile is set to a value, used for variable storage, exact same as CheckMapTile in code }
23 (ExperienceGt) - <value> <nop> <nop> <nop> <nop> <nop> { Checks if ExperienceVar > Value }
Script Commands:
-----------------
00 (SetMapTile) - <x> <y> <layer> <value> <nop> <strlen> { Sets a map tile to a value, used for variable storage }
01 (ClearTile) - <x> <y> <layer> <nop> <nop> <strlen> { Sets map tile to 0xFFFF (cleared) }
02 (MoveMapTile) - <x from> <y from> <layer from> <x to> <y to> { Moves a map tile from one spot to another }
03 (DrawOverlayTile) - <x> <y> <tile> <nop> <nop> <strlen> { Draws/Overlays a tile on the map }
04 (SayText) - <x> <y> <Sh ow Te> <strlen> <string> { Shows text from Luke }
05 (ShowText) - <x> <y> <Sh ow Te> <strlen> <string> { Shows text from coords }
06 (RedrawTile) - <x> <y> <Re dr aw> <strlen> { Redraws the map tile at a position }
07 (RedrawTiles) - <x1> <y1> <x2> <y2> <nop> <strlen> { Redraws tiles from range x1,y1 to x2,y2 }
08 (RenderChanges) - <unk> <nop> <nop> <nop> <nop> <strlen> { Triggers a draw call }
09 (WaitTicks) - <seconds> <nop> <Wa it Fo> <strlen> { Waits a number of ticks }
0a (PlaySound) - <sound id> <nop> <nop> <nop> <nop> <strlen> { Plays a sound }
0b - (TransitionIn) - <nop> <nop> <nop> <nop> <nop> <strlen> { Transitions into the map, needed explicitly for intro? }
0c (Random) - <highest number> <nop> <nop> <nop> <nop> <strlen> { Stores a random from 0 to a set number to RandVar }
0d (SetTempVar) - <value> <nop> <nop> <nop> <nop> <strlen> { Sets TempVar to value }
0e (AddTempVar) - <value> <nop> <nop> <nop> <nop> <strlen> { Adds value to TempVar }
0f (SetMapTileVar) - <x> <y> <layer> <value> <nop> <strlen> { Sets a map tile to a value, used for variable storage }
10 (ReleaseCamera) - <nop> <nop> <nop> <nop> <nop> <strlen> { Releases camera from player }
11 (LockCamera) - <nop> <nop> <nop> <nop> <nop> <strlen> { Locks camera to player }
12 (SetPlayerPos) - <x> <y> <nop> <nop> <nop> <strlen> { Teleport/Move Player Position }
13 (MoveCamera) - <x1> <y1> <x2> <y2> <time> { Moves camera from x1,y1 to x2,y2 in a set amount of time }
14 (FlagOnce) - <nop> <nop> <nop> <nop> <nop> <strlen> { Flag IACT script so that it doesn't run again }
15 (ShowObject) - <obj num> <nop> <nop> <nop> <nop> <strlen> { Shows an object }
16 (HideObject) - <obj num> <nop> <nop> <nop> <nop> <strlen> { Hides an object }
17 (ShowEntity) - <entity num> <nop> <nop> <nop> <nop> <strlen> { Show entity }
18 (HideEntity) - <entity num> <nop> <nop> <nop> <nop> <strlen> { Hide entity }
19 (ShowAllEntities) - <nop> <nop> <nop> <nop> <nop> <strlen> { Show all entities }
1a (HideAllEntities) - <nop> <nop> <nop> <nop> <nop> <strlen> { Hide all entities }
1b (SpawnItem) - <item id> <x> <y> <nop> <nop> <nop> { Spawn item at coords }
1c (AddItemToInv) - <item id> <nop> <nop> <nop> <nop> <nop> { Adds item to inventory }
1d (RemoveItemFromInv) - <item id> <nop> <nop> <nop> <nop> <nop> { Drop item from cursor }
1e (Open?Show?) - 'Open'? 'Show'? Sets a bunch of values to 1. Used in map 52 on opening a box.
1f -
20 - Never used.
21 (WarpToMap) - <map num> <x> <y> <unk> <nop> <strlen> { Warps player to pos on map }
22 (SetGlobalVar) - <value> <nop> <nop> <nop> <nop> <strlen> { Sets GlobalVar to value }
23 (AddGlobalVar) - <value> <nop> <nop> <nop> <nop> <strlen> { Adds GlobalVar to value }
24 (SetRandVar) - <value> <nop> <nop> <nop> <nop> <strlen> { Sets RandVar to value }
25 (AddHealth) - <amt> <nop> <nop> <nop> <nop> <strlen> { Adds amt to player health }
Notes:
-----------------
This is for Yoda Stories. I'd imagine commands are similar between Indianna Jones and Yoda Stories, possibly reordered or slightly different though.
Arguments 3, 4, and 5 seem to leak a lot of what the original script was before compiling. Traces of command names can sometimes be found at, before, or after commands in these arguments as plaintext.
TempVar is apparently stored at 8,8 layer 0 in the map. While there is a command to check the value directly, some maps use the CheckMapTile command (cmd 0) instead.
GlobalVar seems to be a single variable per map which retains it's value across traveling? Seems to be used for setting blocks and stuff.
Stats:
-----------------
Number of uses of each action command:
0: 1470,
1: 187,
2: 2925,
3: 737,
4: 193,
5: 1291,
6: 1972,
7: 101,
8: 75,
9: 277,
a: 1276,
b: 354,
c: 11, 67, 187, 215, 223, 285, 306, 416, 462, 631,
d: 143,
e: 285,
f: 24, 94, 95, 151, 263, 476, 477, 478, 535,
10: 4, 150, 416, 458, 621,
11: 0,
12: 26, 1, 94, 95, 151, 282, 344, 380, 417, 450, 476, 477, 535, 537, 552, 641,
13: 25, 1, 129, 273, 282, 330, 370, 380, 454, 477, 547, 640,
14: 38, 1, 129, 273, 282, 330, 370, 380, 454, 477, 547, 640, 642,
15: 0,
16: 4, 401,
17: 118,
18: 635,
19: 543,
1a: 92,
1b: 97,
1c: 37, 94, 95, 535,
1d: 19, 37, 42, 57, 139, 160, 488,
1e: 4, 465, 641,
1f: 121,
20: 152,
21: 121,
22: 1649,
23: 10, 1, 98, 223, 263, 424, 477, 478,
Number of uses of each script command:
0: 5517,
1: 3009,
2: 3009,
3: 638,
4: 1086,
5: 1234,
6: 2821,
7: 2668,
8: 5483,
9: 4524,
a: 2702,
b: 35, 373, 374, 376, 377, 379, 416, 465, 470, 537, 578, 629,
c: 475,
d: 1451,
e: 137,
f: 1364,
10: 494,
11: 321,
12: 939,
13: 151,
14: 1075,
15: 446,
16: 552,
17: 448,
18: 283,
19: 11, 169, 207, 432, 455, 475, 621, 631, 633, 643,
1a: 32, 26, 85, 101, 169, 207, 222, 223, 232, 263, 265, 266, 276, 287, 296, 313, 379, 381, 409, 410, 432, 455, 475, 497, 498, 526, 570, 605, 621, 629, 631, 633,
1b: 765,
1c: 22, 614, 617, 620, 621, 623, 624, 625, 626, 629, 641,
1d: 354,
1e: 162,
1f: 16, 287, 316, 345, 376, 398, 409, 416, 450, 473, 498, 539, 578, 580, 605, 626, 636,
20: 0,
21: 415,
22: 339,
23: 59,
24: 1551,
25: 71,