2017-12-11 18:40:21 -08:00
|
|
|
# Map Scripts
|
|
|
|
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
## <code>const_value set 2</code>
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
const <i>MAPNAME</i>_<i>OBJECTNAME</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
## <code>MapName_MapScripts:</code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
### <code>.SceneScripts: db <i>N</i></code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
scene_script <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
### <code>.MapCallbacks: db <i>N</i></code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
callback <i>type</i>, <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2017-12-12 10:56:17 -08:00
|
|
|
Callback types:
|
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `MAPCALLBACK_NEWMAP`
|
2017-12-12 10:56:17 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `MAPCALLBACK_TILES`
|
2017-12-12 10:56:17 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `MAPCALLBACK_OBJECTS`
|
2017-12-12 10:56:17 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `MAPCALLBACK_SPRITES`
|
2017-12-12 10:56:17 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `MAPCALLBACK_CMDQUEUE`
|
2017-12-12 10:56:17 -08:00
|
|
|
|
2018-01-12 21:47:38 -08:00
|
|
|
<pre>
|
|
|
|
callback MAPCALLBACK_CMDQUEUE, .Boulders
|
|
|
|
|
|
|
|
.Boulders:
|
|
|
|
writecmdqueue .BoulderCmdQueue
|
|
|
|
return
|
|
|
|
|
|
|
|
.BoulderCmdQueue:
|
|
|
|
cmdqueue CMDQUEUE_STONETABLE, .BoulderTable
|
|
|
|
|
|
|
|
.BoulderTable:
|
|
|
|
stonetable <i>warp_id</i>, <i>person</i>, <i>script</i>
|
|
|
|
db -1 ; end
|
|
|
|
</pre>
|
2017-12-12 10:56:17 -08:00
|
|
|
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2017-12-12 10:51:07 -08:00
|
|
|
## Event scripts
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2017-12-12 10:51:58 -08:00
|
|
|
[Event commands](event_commands.md)
|
2017-12-12 09:18:11 -08:00
|
|
|
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
## Text
|
|
|
|
|
2017-12-12 10:51:58 -08:00
|
|
|
[Text commands](text_commands.md)
|
2017-12-12 10:51:07 -08:00
|
|
|
|
|
|
|
|
|
|
|
## Movement data
|
|
|
|
|
2017-12-12 10:51:58 -08:00
|
|
|
[Movement commands](movement_commands.md)
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
## <code>MapName_MapEvents:</code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-12 21:47:38 -08:00
|
|
|
```asm
|
2017-12-11 19:02:20 -08:00
|
|
|
; filler
|
|
|
|
db 0, 0
|
2018-01-12 21:47:38 -08:00
|
|
|
```
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
### <code>.Warps: db <i>N</i></code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
warp_def <i>x</i>, <i>y</i>, <i>warp_id</i>, <i>map</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
### <code>.CoordEvents: db <i>N</i></code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
coord_event <i>x</i>, <i>y</i>, <i>scene_id</i>, <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
### <code>.BGEvents: db <i>N</i></code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
bg_event <i>x</i>, <i>y</i>, <i>type</i>, <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2017-12-24 10:46:34 -08:00
|
|
|
BG event types:
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `BGEVENT_READ`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `BGEVENT_UP/DOWN/LEFT/RIGHT`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `BGEVENT_IFSET/IFNOTSET`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
conditional_event <i>event_flag</i>, <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `BGEVENT_ITEM`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
hiddenitem <i>event_flag</i>, <i>item_id</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `BGEVENT_COPY`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-17 10:58:50 -08:00
|
|
|
### <code>.ObjectEvents: db <i>N</i></code>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2018-01-17 11:50:34 -08:00
|
|
|
object_event <i>x</i>, <i>y</i>, <i>sprite</i>, <i>movement</i>, <i>rx</i>, <i>ry</i>, <i>h1</i>, <i>h2</i>, <i>palette</i>, <i>type</i>, <i>range</i>, <i>script</i>, <i>event_flag</i>
|
2018-01-16 19:57:19 -08:00
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2017-12-12 09:18:11 -08:00
|
|
|
Movement types:
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_ITEM_TREE`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_WANDER`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SPINRANDOM_SLOW`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_WALK_UP_DOWN`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_WALK_LEFT_RIGHT`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_STANDING_UP/DOWN/LEFT/RIGHT`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SPINRANDOM_FAST`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SNORLAX`
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_POKEMON`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SUDOWOODO`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SMASHABLE_ROCK`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_STRENGTH_BOULDER`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_SPINCLOCKWISE`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_BIGDOLL`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_LAPRAS`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2017-12-24 10:46:34 -08:00
|
|
|
Object types:
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `OBJECTTYPE_SCRIPT`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `OBJECTTYPE_ITEMBALL`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
itemball <i>item_id</i>
|
|
|
|
</pre>
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `OBJECTTYPE_TRAINER`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
|
|
|
trainer <i>event_flag</i>, <i>group_id</i>, <i>trainer_id</i>, <i>seen_text</i>, <i>beaten_text</i>, <i>loss_text</i>, <i>script</i>
|
|
|
|
</pre>
|