2018-01-30 19:44:44 -08:00
|
|
|
# Map Event Scripts
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-31 08:11:09 -08:00
|
|
|
## Contents
|
|
|
|
|
|
|
|
- [Object constants](#object-constants)
|
|
|
|
- [Map scripts](#map-scripts)
|
|
|
|
- [Scene scripts](#scene-scripts)
|
|
|
|
- [Callbacks](#callbacks)
|
|
|
|
- [Callback types](#callback-types)
|
|
|
|
- [Event scripts](#event-scripts)
|
|
|
|
- [Text](#text)
|
|
|
|
- [Movement data](#movement-data)
|
|
|
|
- [Map events](#map-events)
|
|
|
|
- [Warp events](#warp-events)
|
|
|
|
- [Coord events](#coord-events)
|
|
|
|
- [BG events](#bg-events)
|
|
|
|
- [BG event types](#bg-event-types)
|
|
|
|
- [Object events](#object-events)
|
|
|
|
- [Movement types](#movement-types)
|
|
|
|
- [Object types](#object-types)
|
2020-08-13 11:46:35 -07:00
|
|
|
- [Template](#template)
|
2018-01-31 08:11:09 -08:00
|
|
|
|
|
|
|
|
2018-01-31 08:08:47 -08:00
|
|
|
## Object constants
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
object_const_def
|
2018-01-16 19:57:19 -08:00
|
|
|
const <i>MAPNAME</i>_<i>OBJECTNAME</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-30 19:38:00 -08:00
|
|
|
## Map scripts
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
<i>MapName</i>_MapScripts:
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-30 19:38:00 -08:00
|
|
|
### Scene scripts
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
def_scene_scripts
|
2022-08-09 15:04:18 -07:00
|
|
|
scene_script <i>script</i>, SCENE_<i>MAPNAME</i>_<i>SCENE_NAME</i>
|
2018-01-16 19:57:19 -08:00
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-30 19:38:00 -08:00
|
|
|
### Callbacks
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
def_callbacks
|
2018-01-16 19:57:19 -08:00
|
|
|
callback <i>type</i>, <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-31 08:11:09 -08:00
|
|
|
#### Callback types
|
2017-12-12 10:56:17 -08:00
|
|
|
|
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>
|
2022-08-09 15:04:18 -07:00
|
|
|
callback MAPCALLBACK_CMDQUEUE, <i>MapName</i>BouldersCallback
|
2018-01-12 21:47:38 -08:00
|
|
|
|
2022-08-09 15:04:18 -07:00
|
|
|
<i>MapName</i>BouldersCallback:
|
2018-01-12 21:47:38 -08:00
|
|
|
writecmdqueue .BoulderCmdQueue
|
2020-07-17 05:37:03 -07:00
|
|
|
endcallback
|
2018-01-12 21:47:38 -08:00
|
|
|
|
|
|
|
.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-30 19:38:00 -08:00
|
|
|
## Map events
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-30 19:38:00 -08:00
|
|
|
<pre>
|
|
|
|
<i>MapName</i>_MapEvents:
|
2018-01-30 11:15:47 -08:00
|
|
|
db 0, 0 ; filler
|
2018-01-30 19:38:00 -08:00
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-30 19:38:00 -08:00
|
|
|
### Warp events
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
def_warp_events
|
2018-02-01 18:54:00 -08:00
|
|
|
warp_event <i>x</i>, <i>y</i>, <i>map</i>, <i>warp_id</i>
|
2018-01-16 19:57:19 -08:00
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
|
|
|
|
2018-01-30 19:38:00 -08:00
|
|
|
### Coord events
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
def_coord_events
|
2018-01-16 19:57:19 -08:00
|
|
|
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-30 19:38:00 -08:00
|
|
|
### BG events
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
def_bg_events
|
2018-01-16 19:57:19 -08:00
|
|
|
bg_event <i>x</i>, <i>y</i>, <i>type</i>, <i>script</i>
|
|
|
|
</pre>
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-31 08:11:09 -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>
|
2018-01-23 09:59:21 -08:00
|
|
|
hiddenitem <i>item_id</i>, <i>event_flag</i>
|
2018-01-16 19:57:19 -08:00
|
|
|
</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-30 19:38:00 -08:00
|
|
|
### Object events
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
<pre>
|
2020-07-24 06:49:26 -07:00
|
|
|
def_object_events
|
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
|
|
|
|
2018-01-31 08:11:09 -08:00
|
|
|
#### Movement types
|
2017-12-11 19:02:20 -08:00
|
|
|
|
2018-01-30 19:12:53 -08:00
|
|
|
- `SPRITEMOVEDATA_STILL`
|
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-30 19:34:05 -08:00
|
|
|
- `SPRITEMOVEDATA_BIGDOLLSYM`
|
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-30 19:34:05 -08:00
|
|
|
- `SPRITEMOVEDATA_BIGDOLLASYM`
|
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
- `SPRITEMOVEDATA_BIGDOLL`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-30 19:42:41 -08:00
|
|
|
- `SPRITEMOVEDATA_SWIM_WANDER`
|
2017-12-11 18:40:21 -08:00
|
|
|
|
2018-01-31 08:11:09 -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>
|
2018-01-23 09:59:21 -08:00
|
|
|
itemball <i>item_id</i>[, <i>quantity</i>=1]
|
2018-01-16 19:57:19 -08:00
|
|
|
</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>
|
2018-01-23 10:08:48 -08:00
|
|
|
trainer <i>group_id</i>, <i>trainer_id</i>, <i>event_flag</i>, <i>seen_text</i>, <i>beaten_text</i>, <i>loss_text</i>, <i>script</i>
|
2018-01-16 19:57:19 -08:00
|
|
|
</pre>
|
2020-08-13 11:46:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
## Template
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
object_const_def
|
|
|
|
; const <i>MAPNAME</i>_<i>OBJECTNAME</i>
|
|
|
|
|
|
|
|
<i>MapName</i>_MapScripts:
|
|
|
|
def_scene_scripts
|
2022-08-09 15:04:18 -07:00
|
|
|
; scene_script <i>script</i>, SCENE_<i>MAPNAME</i>_<i>SCENE_NAME</i>
|
2020-08-13 11:46:35 -07:00
|
|
|
|
|
|
|
def_callbacks
|
|
|
|
; callback <i>type</i>, <i>script</i>
|
|
|
|
|
|
|
|
<i>MapName</i>_MapEvents:
|
|
|
|
db 0, 0 ; filler
|
|
|
|
|
|
|
|
def_warp_events
|
|
|
|
; warp_event <i>x</i>, <i>y</i>, <i>map</i>, <i>warp_id</i>
|
|
|
|
|
|
|
|
def_coord_events
|
|
|
|
; coord_event <i>x</i>, <i>y</i>, <i>scene_id</i>, <i>script</i>
|
|
|
|
|
|
|
|
def_bg_events
|
|
|
|
; bg_event <i>x</i>, <i>y</i>, <i>type</i>, <i>script</i>
|
|
|
|
|
|
|
|
def_object_events
|
|
|
|
; 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>
|
|
|
|
</pre>
|