2017-12-12 02:40:21 +00:00
|
|
|
# Map Scripts
|
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-12 02:40:21 +00:00
|
|
|
## `const_value set 2`
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`const` *`MAPNAME_OBJECTNAME`***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
## `MapName_MapScriptHeader:`
|
|
|
|
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
## `.SceneScripts: db` *N*
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`scene_script` *script***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
|
2017-12-12 04:11:58 +00:00
|
|
|
## `.MapCallbacks: db` *N*
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2018-01-13 05:47:38 +00:00
|
|
|
- **`callback` *type*, *script***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-12 18:56:17 +00:00
|
|
|
Callback types:
|
|
|
|
|
|
|
|
- **`MAPCALLBACK_NEWMAP`**
|
|
|
|
|
|
|
|
- **`MAPCALLBACK_TILES`**
|
|
|
|
|
|
|
|
- **`MAPCALLBACK_OBJECTS`**
|
|
|
|
|
|
|
|
- **`MAPCALLBACK_SPRITES`**
|
|
|
|
|
|
|
|
- **`MAPCALLBACK_CMDQUEUE`**
|
|
|
|
|
2018-01-13 05:47:38 +00:00
|
|
|
<!-- need pre tags here; can't use inline bold/italic formatting in Markdown code blocks -->
|
|
|
|
<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 18:56:17 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-12 18:51:07 +00:00
|
|
|
## Event scripts
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-12 18:51:58 +00:00
|
|
|
[Event commands](event_commands.md)
|
2017-12-12 17:18:11 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
## Text
|
|
|
|
|
2017-12-12 18:51:58 +00:00
|
|
|
[Text commands](text_commands.md)
|
2017-12-12 18:51:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Movement data
|
|
|
|
|
2017-12-12 18:51:58 +00:00
|
|
|
[Movement commands](movement_commands.md)
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
## `MapName_MapEventHeader:`
|
|
|
|
|
2018-01-13 05:47:38 +00:00
|
|
|
```asm
|
2017-12-12 03:02:20 +00:00
|
|
|
; filler
|
|
|
|
db 0, 0
|
2018-01-13 05:47:38 +00:00
|
|
|
```
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
|
2017-12-12 04:11:58 +00:00
|
|
|
## `.Warps: db` *N*
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-28 19:31:25 +00:00
|
|
|
- **`warp_def` *x*, *y*, *warp_id*, *map***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
## `.CoordEvents: db` *N*
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2018-01-01 18:43:02 +00:00
|
|
|
- **`coord_event` *x*, *y*, *scene_id*, *script***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
## `.BGEvents: db` *N*
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-28 19:31:25 +00:00
|
|
|
- **`bg_event` *x*, *y*, *type*, *script***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
BG event types:
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`BGEVENT_READ`**
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`BGEVENT_UP/DOWN/LEFT/RIGHT`**
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`BGEVENT_IFSET/IFNOTSET`**
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2018-01-13 05:47:38 +00:00
|
|
|
**`conditional_event` *event_flag*, *script***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`BGEVENT_ITEM`**
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2018-01-13 05:47:38 +00:00
|
|
|
**`hiddenitem` *event_flag*, *item_id***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`BGEVENT_COPY`**
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
## `.ObjectEvents: db` *N*
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2018-01-01 18:43:02 +00:00
|
|
|
- **`object_event` *x*, *y*, *sprite*, *movement*, *rx*, *ry*, *h1*, *h2*, *palette*, *type*, *range*, *script*, *event_flag***
|
2017-12-12 03:02:20 +00:00
|
|
|
|
2017-12-12 17:18:11 +00:00
|
|
|
Movement types:
|
2017-12-12 03:02:20 +00:00
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_ITEM_TREE`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_WANDER`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_SPINRANDOM_SLOW`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_WALK_UP_DOWN`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_WALK_LEFT_RIGHT`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_STANDING_UP/DOWN/LEFT/RIGHT`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_SPINRANDOM_FAST`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_SNORLAX`**
|
|
|
|
|
|
|
|
- **`SPRITEMOVEDATA_POKEMON`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_SUDOWOODO`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_SMASHABLE_ROCK`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_STRENGTH_BOULDER`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_SPINCLOCKWISE`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_BIGDOLL`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 03:02:20 +00:00
|
|
|
- **`SPRITEMOVEDATA_LAPRAS`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
Object types:
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`OBJECTTYPE_SCRIPT`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`OBJECTTYPE_ITEMBALL`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 04:11:58 +00:00
|
|
|
**`itemball` *item_id***
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
- **`OBJECTTYPE_TRAINER`**
|
2017-12-12 02:40:21 +00:00
|
|
|
|
2017-12-12 04:11:58 +00:00
|
|
|
**`trainer` *event_flag*, *group_id*, *trainer_id*, *seen_text*, *beaten_text*, *loss_text*, *script***
|