Start documentation for map scripts

This commit is contained in:
Remy Oukaour 2017-12-11 21:40:21 -05:00
parent 11b9bcb9e5
commit 20f98e1403
3 changed files with 250 additions and 219 deletions

31
docs/map_scripts.md Normal file
View File

@ -0,0 +1,31 @@
# Map Scripts
## `const_value set 2`
## *`MapName`*`_MapScriptHeader:`
## `.MapTriggers:`
**`maptrigger `**___`script`___
## `.MapCallbacks:`
**`dbw `**___`type`___**`, `**___`script`___
## *`MapName`*`_MapScriptHeader:`
## `.Warps:`
**`warp_def `**___`y`___**`, `**___`x`___**`, `**___`id`___**`, `**___`map`___
## `.XYTriggers:`
**`xy_trigger `**___`id`___**`, `**___`y`___**`, `**___`x`___**`, $0, `**___`script`___**`, $0, $0`**
## `.Signposts:`
**`signpost `**___`y`___**`, `**___`x`___**`, `**___`type`___**`, `**___`script``___
## `.PersonEvents:`
**`person_event `**___`sprite`___**`, `**___`y`___**`, `**___`x`___**`, `**___`movement`___**`, `**___`ry`___**`, `**___`rx`___**`, `**___`hour`___**`, `**___`day`___**`, `**___`palette`___**`, `**___`type`___**`, `**___`range`___**`, `**___`script`___**`, `**___`flag`___

View File

@ -1,93 +1,93 @@
# Music Commands
## **`musicheader`** *n*, *index*, *address*
## `musicheader` *n*, *index*, *address*
## **`cry_header`** *n*, *index*, *address*
## `cry_header` *n*, *index*, *address*
## **`note`** *pitch*, *octave*
## `note` *pitch*, *octave*
## **`sound`** *pitch*, *octave*, *intensity*, *frequency*
## `sound` *pitch*, *octave*, *intensity*, *frequency*
## **`noise`** *pitch*, *duration*, *intensity*, *frequency*
## `noise` *pitch*, *duration*, *intensity*, *frequency*
## `$D0``$D7`: **`octave`** *n*
## `$D0``$D7`: `octave` *n*
## `$D8`: **`notetype`** *length*[, *intensity*]
## `$D8`: `notetype` *length*[, *intensity*]
## `$D9`: **`pitchoffset`** *octave*, *key*
## `$D9`: `pitchoffset` *octave*, *key*
## `$DA`: **`tempo`** *tempo*
## `$DA`: `tempo` *tempo*
## `$DB`: **`dutycycle`** *duty_cycle*
## `$DB`: `dutycycle` *duty_cycle*
## `$DC`: **`intensity`** *intensity*
## `$DC`: `intensity` *intensity*
## `$DD`: **`soundinput`** *input*
## `$DD`: `soundinput` *input*
## `$DE`: **`sound_duty`** *a*, *b*, *c*, *d*
## `$DE`: `sound_duty` *a*, *b*, *c*, *d*
## `$DF`: **`togglesfx`**
## `$DF`: `togglesfx`
## `$E0`: **`slidepitchto`** *duration*, *octave*, *pitch*
## `$E0`: `slidepitchto` *duration*, *octave*, *pitch*
## `$E1`: **`vibrato`** *delay*, *extent*
## `$E1`: `vibrato` *delay*, *extent*
## `$E2`: **`unknownmusic0xe2`** *unknown*
## `$E2`: `unknownmusic0xe2` *unknown*
## `$E3`: **`togglenoise`** *id*
## `$E3`: `togglenoise` *id*
## `$E4`: **`panning`** *tracks*
## `$E4`: `panning` *tracks*
## `$E5`: **`volume`** *volume*
## `$E5`: `volume` *volume*
## `$E6`: **`tone`** *tone*
## `$E6`: `tone` *tone*
## `$E7`: **`unknownmusic0xe7`** *unknown*
## `$E7`: `unknownmusic0xe7` *unknown*
## `$E8`: **`unknownmusic0xe8`** *unknown*
## `$E8`: `unknownmusic0xe8` *unknown*
## `$E9`: **`tempo_relative`** *value*
## `$E9`: `tempo_relative` *value*
## `$EA`: **`restartchannel`** *address*
## `$EA`: `restartchannel` *address*
## `$EB`: **`newsong`** *id*
## `$EB`: `newsong` *id*
## `$EC`: **`sfxpriorityon`**
## `$EC`: `sfxpriorityon`
## `$ED`: **`sfxpriorityoff`**
## `$ED`: `sfxpriorityoff`
## `$EE`: **`unknownmusic0xee`** *address*
## `$EE`: `unknownmusic0xee` *address*
## `$EF`: **`stereopanning`** *tracks*
## `$EF`: `stereopanning` *tracks*
## `$F0`: **`sfxtogglenoise`** *id*
## `$F0`: `sfxtogglenoise` *id*
## `$F1`: **`music0xf1`**
## `$F1`: `music0xf1`
## `$F2`: **`music0xf2`**
## `$F2`: `music0xf2`
## `$F3`: **`music0xf3`**
## `$F3`: `music0xf3`
## `$F4`: **`music0xf4`**
## `$F4`: `music0xf4`
## `$F5`: **`music0xf5`**
## `$F5`: `music0xf5`
## `$F6`: **`music0xf6`**
## `$F6`: `music0xf6`
## `$F7`: **`music0xf7`**
## `$F7`: `music0xf7`
## `$F8`: **`music0xf8`**
## `$F8`: `music0xf8`
## `$F9`: **`unknownmusic0xf9`**
## `$F9`: `unknownmusic0xf9`
## `$FA`: **`setcondition`** *condition*
## `$FA`: `setcondition` *condition*
## `$FB`: **`jumpif`** *condition*, *address*
## `$FB`: `jumpif` *condition*, *address*
## `$FC`: **`jumpchannel`** *address*
## `$FC`: `jumpchannel` *address*
## `$FD`: **`loopchannel`** *count*, *address*
## `$FD`: `loopchannel` *count*, *address*
## `$FE`: **`callchannel`** *address*
## `$FE`: `callchannel` *address*
## `$FF`: **`endchannel`**
## `$FF`: `endchannel`

View File

@ -1,345 +1,345 @@
# Scripting Commands
## `$00`: **`scall`** *script*
## `$00`: `scall` *script*
## `$01`: **`farscall`** *script*
## `$01`: `farscall` *script*
## `$02`: **`ptcall`** *script*
## `$02`: `ptcall` *script*
## `$03`: **`jump`** *script*
## `$03`: `jump` *script*
## `$04`: **`farjump`** *script*
## `$04`: `farjump` *script*
## `$05`: **`ptjump`** *script*
## `$05`: `ptjump` *script*
## `$06`: **`if_equal`** *byte*, *script*
## `$06`: `if_equal` *byte*, *script*
## `$07`: **`if_not_equal`** *byte*, *script*
## `$07`: `if_not_equal` *byte*, *script*
## `$08`: **`iffalse`** *script*
## `$08`: `iffalse` *script*
## `$09`: **`iftrue`** *script*
## `$09`: `iftrue` *script*
## `$0A`: **`if_greater_than`** *byte*, *script*
## `$0A`: `if_greater_than` *byte*, *script*
## `$0B`: **`if_less_than`** *byte*, *script*
## `$0B`: `if_less_than` *byte*, *script*
## `$0C`: **`jumpstd`** *std_script*
## `$0C`: `jumpstd` *std_script*
## `$0D`: **`callstd`** *std_script*
## `$0D`: `callstd` *std_script*
## `$0E`: **`callasm`** *asm*
## `$0E`: `callasm` *asm*
## `$0F`: **`special`** *special_pointer*
## `$0F`: `special` *special_pointer*
## `$10`: **`ptcallasm`** *asm*
## `$10`: `ptcallasm` *asm*
## `$11`: **`checkmaptriggers`** *map*
## `$11`: `checkmaptriggers` *map*
## `$12`: **`domaptrigger`** *map*, *trigger_id*
## `$12`: `domaptrigger` *map*, *trigger_id*
## `$13`: **`checktriggers`**
## `$13`: `checktriggers`
## `$14`: **`dotrigger`** *trigger_id*
## `$14`: `dotrigger` *trigger_id*
## `$15`: **`writebyte`** *value*
## `$15`: `writebyte` *value*
## `$16`: **`addvar`** *value*
## `$16`: `addvar` *value*
## `$17`: **`random`** *value*
## `$17`: `random` *value*
## `$18`: **`checkver`**
## `$18`: `checkver`
## `$19`: **`copybytetovar`** *address*
## `$19`: `copybytetovar` *address*
## `$1A`: **`copyvartobyte`** *address*
## `$1A`: `copyvartobyte` *address*
## `$1B`: **`loadvar`** *address*, *value*
## `$1B`: `loadvar` *address*, *value*
## `$1C`: **`checkcode`** *variable*
## `$1C`: `checkcode` *variable*
## `$1D`: **`writevarcode`** *variable*
## `$1D`: `writevarcode` *variable*
## `$1E`: **`writecode`** *variable*, *value*
## `$1E`: `writecode` *variable*, *value*
## `$1F`: **`giveitem`** *item_id*[, *quantity*=1]
## `$1F`: `giveitem` *item_id*[, *quantity*=1]
## `$20`: **`takeitem`** *item_id*[, *quantity*=1]
## `$20`: `takeitem` *item_id*[, *quantity*=1]
## `$21`: **`checkitem`** *item_id*
## `$21`: `checkitem` *item_id*
## `$22`: **`givemoney`** *account*, *value*
## `$22`: `givemoney` *account*, *value*
## `$23`: **`takemoney`** *account*, *value*
## `$23`: `takemoney` *account*, *value*
## `$24`: **`checkmoney`** *account*, *value*
## `$24`: `checkmoney` *account*, *value*
## `$25`: **`givecoins`** *value*
## `$25`: `givecoins` *value*
## `$26`: **`takecoins`** *value*
## `$26`: `takecoins` *value*
## `$27`: **`checkcoins`** *value*
## `$27`: `checkcoins` *value*
## `$28`: **`addcellnum`** *contact_id*
## `$28`: `addcellnum` *contact_id*
## `$29`: **`delcellnum`** *contact_id*
## `$29`: `delcellnum` *contact_id*
## `$2A`: **`checkcellnum`** *contact_id*
## `$2A`: `checkcellnum` *contact_id*
## `$2B`: **`checktime`** *time*
## `$2B`: `checktime` *time*
- **`checkmorn`**: `checktime MORN`
- **`checkday`**: `checktime DAY`
- **`checknite`**: `checktime NITE`
- **`checkmorn`:** `checktime MORN`
- **`checkday`:** `checktime DAY`
- **`checknite`:** `checktime NITE`
## `$2C`: **`checkpoke`** *mon_id*
## `$2C`: `checkpoke` *mon_id*
## `$2D`: **`givepoke`** *mon_id*, *level*[, *item*=0[, *trainer*=0, *ot_name*, *nickname*]]
## `$2D`: `givepoke` *mon_id*, *level*[, *item*=0[, *trainer*=0, *ot_name*, *nickname*]]
## `$2E`: **`giveegg`** *mon_id*, *level*
## `$2E`: `giveegg` *mon_id*, *level*
## `$2F`: **`givepokeitem`** *pointer*
## `$2F`: `givepokeitem` *pointer*
## `$30`: **`checkpokeitem`** *pointer*
## `$30`: `checkpokeitem` *pointer*
## `$31`: **`checkevent`** *event_flag*
## `$31`: `checkevent` *event_flag*
## `$32`: **`clearevent`** *event_flag*
## `$32`: `clearevent` *event_flag*
## `$33`: **`setevent`** *event_flag*
## `$33`: `setevent` *event_flag*
## `$34`: **`checkflag`** *engine_flag*
## `$34`: `checkflag` *engine_flag*
## `$35`: **`clearflag`** *engine_flag*
## `$35`: `clearflag` *engine_flag*
## `$36`: **`setflag`** *engine_flag*
## `$36`: `setflag` *engine_flag*
## `$37`: **`wildon`**
## `$37`: `wildon`
## `$38`: **`wildoff`**
## `$38`: `wildoff`
## `$39`: **`xycompare`** *pointer*
## `$39`: `xycompare` *pointer*
## `$3A`: **`warpmod`** *warp_id*, *map*
## `$3A`: `warpmod` *warp_id*, *map*
## `$3B`: **`blackoutmod`** *map*
## `$3B`: `blackoutmod` *map*
## `$3C`: **`warp`** *map*, *x*, *y*
## `$3C`: `warp` *map*, *x*, *y*
## `$3D`: **`readmoney`** *account*, *memory*
## `$3D`: `readmoney` *account*, *memory*
## `$3E`: **`readcoins`** *memory*
## `$3E`: `readcoins` *memory*
## `$3F`: **`RAM2MEM`** *memory*
## `$3F`: `RAM2MEM` *memory*
## `$40`: **`pokenamemem`** *mon_id*, *memory*
## `$40`: `pokenamemem` *mon_id*, *memory*
## `$41`: **`itemtotext`** *item_id*, *memory*
## `$41`: `itemtotext` *item_id*, *memory*
## `$42`: **`mapnametotext`** *memory*
## `$42`: `mapnametotext` *memory*
## `$43`: **`trainertotext`** *trainer_id*, *trainer_group*, *memory*
## `$43`: `trainertotext` *trainer_id*, *trainer_group*, *memory*
## `$44`: **`stringtotext`** *text_pointer*, *memory*
## `$44`: `stringtotext` *text_pointer*, *memory*
## `$45`: **`itemnotify`**
## `$45`: `itemnotify`
## `$46`: **`pocketisfull`**
## `$46`: `pocketisfull`
## `$47`: **`opentext`**
## `$47`: `opentext`
## `$48`: **`refreshscreen`** *dummy*
## `$48`: `refreshscreen` *dummy*
## `$49`: **`closetext`**
## `$49`: `closetext`
## `$4A`: **`loadbytec2cf`** *byte*
## `$4A`: `loadbytec2cf` *byte*
## `$4B`: **`farwritetext`** *text_pointer*
## `$4B`: `farwritetext` *text_pointer*
## `$4C`: **`writetext`** *text_pointer*
## `$4C`: `writetext` *text_pointer*
## `$4D`: **`repeattext`** *byte1*, *byte2*
## `$4D`: `repeattext` *byte1*, *byte2*
## `$4E`: **`yesorno`**
## `$4E`: `yesorno`
## `$4F`: **`loadmenudata`** *data_pointer*
## `$4F`: `loadmenudata` *data_pointer*
## `$50`: **`closewindow`**
## `$50`: `closewindow`
## `$51`: **`jumptextfaceplayer`** *text_pointer*
## `$51`: `jumptextfaceplayer` *text_pointer*
## `$52`: **`farjumptext`** *text_pointer*
## `$52`: `farjumptext` *text_pointer*
## `$53`: **`jumptext`** *text_pointer*
## `$53`: `jumptext` *text_pointer*
## `$54`: **`waitbutton`**
## `$54`: `waitbutton`
## `$55`: **`buttonsound`**
## `$55`: `buttonsound`
## `$56`: **`pokepic`** *mon_id*
## `$56`: `pokepic` *mon_id*
## `$57`: **`closepokepic`**
## `$57`: `closepokepic`
## `$58`: **`_2dmenu`**
## `$58`: `_2dmenu`
## `$59`: **`verticalmenu`**
## `$59`: `verticalmenu`
## `$5A`: **`loadpikachudata`**
## `$5A`: `loadpikachudata`
## `$5B`: **`randomwildmon`**
## `$5B`: `randomwildmon`
## `$5C`: **`loadmemtrainer`**
## `$5C`: `loadmemtrainer`
## `$5D`: **`loadwildmon`** *mon_id*, *level*
## `$5D`: `loadwildmon` *mon_id*, *level*
## `$5E`: **`loadtrainer`** *trainer_group*, *trainer_id*
## `$5E`: `loadtrainer` *trainer_group*, *trainer_id*
## `$5F`: **`startbattle`**
## `$5F`: `startbattle`
## `$60`: **`reloadmapafterbattle`**
## `$60`: `reloadmapafterbattle`
## `$61`: **`catchtutorial`** *byte*
## `$61`: `catchtutorial` *byte*
## `$62`: **`trainertext`** *which_text*
## `$62`: `trainertext` *which_text*
## `$63`: **`trainerflagaction`** *action*
## `$63`: `trainerflagaction` *action*
## `$64`: **`winlosstext`** *win_text_pointer*, *loss_text_pointer*
## `$64`: `winlosstext` *win_text_pointer*, *loss_text_pointer*
## `$65`: **`scripttalkafter`**
## `$65`: `scripttalkafter`
## `$66`: **`end_if_just_battled`**
## `$66`: `end_if_just_battled`
## `$67`: **`check_just_battled`**
## `$67`: `check_just_battled`
## `$68`: **`setlasttalked`** *person*
## `$68`: `setlasttalked` *person*
## `$69`: **`applymovement`** *person*, *data_pointer*
## `$69`: `applymovement` *person*, *data_pointer*
## `$6A`: **`applymovement2`** *data_pointer*
## `$6A`: `applymovement2` *data_pointer*
## `$6B`: **`faceplayer`**
## `$6B`: `faceplayer`
## `$6C`: **`faceperson`** *person1*, *person2*
## `$6C`: `faceperson` *person1*, *person2*
## `$6D`: **`variablesprite`** *variable_sprite_id*, *sprite_id*
## `$6D`: `variablesprite` *variable_sprite_id*, *sprite_id*
## `$6E`: **`disappear`** *person*
## `$6E`: `disappear` *person*
## `$6F`: **`appear`** *person*
## `$6F`: `appear` *person*
## `$70`: **`follow`** *person2*, *person1*
## `$70`: `follow` *person2*, *person1*
## `$71`: **`stopfollow`**
## `$71`: `stopfollow`
## `$72`: **`moveperson`** *person*, *x*, *y*
## `$72`: `moveperson` *person*, *x*, *y*
## `$73`: **`writepersonxy`** *person*
## `$73`: `writepersonxy` *person*
## `$74`: **`loademote`** *emote_id*
## `$74`: `loademote` *emote_id*
## `$75`: **`showemote`** *emote_id*, *person*, *length*
## `$75`: `showemote` *emote_id*, *person*, *length*
## `$76`: **`spriteface`** *person*, *facing*
## `$76`: `spriteface` *person*, *facing*
## `$77`: **`follownotexact`** *person2*, *person1*
## `$77`: `follownotexact` *person2*, *person1*
## `$78`: **`earthquake`** *param*
## `$78`: `earthquake` *param*
## `$79`: **`changemap`** *bank*, *blockdata_pointer*
## `$79`: `changemap` *bank*, *blockdata_pointer*
## `$7A`: **`changeblock`** *x*, *y*, *block*
## `$7A`: `changeblock` *x*, *y*, *block*
## `$7B`: **`reloadmap`**
## `$7B`: `reloadmap`
## `$7C`: **`reloadmappart`**
## `$7C`: `reloadmappart`
## `$7D`: **`writecmdqueue`** *queue_pointer*
## `$7D`: `writecmdqueue` *queue_pointer*
## `$7E`: **`delcmdqueue`** *byte*
## `$7E`: `delcmdqueue` *byte*
## `$7F`: **`playmusic`** *music_id*
## `$7F`: `playmusic` *music_id*
## `$80`: **`encountermusic`**
## `$80`: `encountermusic`
## `$81`: **`musicfadeout`** *music_id*, *length*
## `$81`: `musicfadeout` *music_id*, *length*
## `$82`: **`playmapmusic`**
## `$82`: `playmapmusic`
## `$83`: **`dontrestartmapmusic`**
## `$83`: `dontrestartmapmusic`
## `$84`: **`cry`** *mon_id*
## `$84`: `cry` *mon_id*
## `$85`: **`playsound`** *sfx_id*
## `$85`: `playsound` *sfx_id*
## `$86`: **`waitsfx`**
## `$86`: `waitsfx`
## `$87`: **`warpsound`**
## `$87`: `warpsound`
## `$88`: **`specialsound`**
## `$88`: `specialsound`
## `$89`: **`passtoengine`** *data_pointer*
## `$89`: `passtoengine` *data_pointer*
## `$8A`: **`newloadmap`** *which_method*
## `$8A`: `newloadmap` *which_method*
## `$8B`: **`pause`** *length*
## `$8B`: `pause` *length*
## `$8C`: **`deactivatefacing`** *length*
## `$8C`: `deactivatefacing` *length*
## `$8D`: **`priorityjump`** *script*
## `$8D`: `priorityjump` *script*
## `$8E`: **`warpcheck`**
## `$8E`: `warpcheck`
## `$8F`: **`ptpriorityjump`** *script*
## `$8F`: `ptpriorityjump` *script*
## `$90`: **`return`**
## `$90`: `return`
## `$91`: **`end`**
## `$91`: `end`
## `$92`: **`reloadandreturn`** *which_method*
## `$92`: `reloadandreturn` *which_method*
## `$93`: **`end_all`**
## `$93`: `end_all`
## `$94`: **`pokemart`** *dialog_id*, *mart_id*
## `$94`: `pokemart` *dialog_id*, *mart_id*
## `$95`: **`elevator`** *floor_list*
## `$95`: `elevator` *floor_list*
## `$96`: **`trade`** *trade_id*
## `$96`: `trade` *trade_id*
## `$97`: **`askforphonenumber`** *contact_id*
## `$97`: `askforphonenumber` *contact_id*
## `$98`: **`phonecall`** *call_id*
## `$98`: `phonecall` *call_id*
## `$99`: **`hangup`**
## `$99`: `hangup`
## `$9A`: **`describedecoration`** *byte*
## `$9A`: `describedecoration` *byte*
## `$9B`: **`fruittree`** *tree_id*
## `$9B`: `fruittree` *tree_id*
## `$9C`: **`specialphonecall`** *call_id*
## `$9C`: `specialphonecall` *call_id*
## `$9D`: **`checkphonecall`**
## `$9D`: `checkphonecall`
## `$9E`: **`verbosegiveitem`** *item_id*[, *quantity*=1]
## `$9E`: `verbosegiveitem` *item_id*[, *quantity*=1]
## `$9F`: **`verbosegiveitem2`** *item_id*, *variable*
## `$9F`: `verbosegiveitem2` *item_id*, *variable*
## `$A0`: **`swarm`** *swarm_id*, *map*
## `$A0`: `swarm` *swarm_id*, *map*
## `$A1`: **`halloffame`**
## `$A1`: `halloffame`
## `$A2`: **`credits`**
## `$A2`: `credits`
## `$A3`: **`warpfacing`** *facing*, *map*, *x*, *y*
## `$A3`: `warpfacing` *facing*, *map*, *x*, *y*
## `$A4`: **`battletowertext`** *memory*
## `$A4`: `battletowertext` *memory*
## `$A5`: **`landmarktotext`** *landmark_id*, *memory*
## `$A5`: `landmarktotext` *landmark_id*, *memory*
## `$A6`: **`trainerclassname`** *trainer_group*, *memory*
## `$A6`: `trainerclassname` *trainer_group*, *memory*
## `$A7`: **`name`** *type*, *id*, *memory*
## `$A7`: `name` *type*, *id*, *memory*
## `$A8`: **`wait`** *duration*
## `$A8`: `wait` *duration*
## `$A9`: **`check_save`**
## `$A9`: `check_save`