Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Scripting

From BDSPedia
This page or section contains undocumented information.
Please ensure all of the info is complete!


Scripting is the act of editing or otherwise influencing all in-game interactions, movements and events that take place within BDSP. The commands within scripting essentially serve as puzzle pieces, building up to single events that chain together to create full sequences.

They are edited using the tool BSSE.

PlaceDatas

Introduction



This page or section contains undocumented information.
Please ensure all of the info is complete!


A PlaceData (also referred to as a PlaceDat) is a file located in the masterdatas bundle. Every area in the game has a corresponding PlaceData file, (ex. PlaceData_A01.json for the Area that includes Jubilife City) which includes information for all Objects in that area.


Annotations are made in red. This example uses a room in a building from Eterna City.

{
   "m_GameObject": {
       "m_FileID": 0,
       "m_PathID": 0
   },
   "m_Enabled": 1,
   "m_Script": {
       "m_FileID": 0,
       "m_PathID": 4652281892236711381
   },
   "m_Name": "PlaceData_C04R0303", (Area name)
   "Data": [
       {
           "ID": "C04R0303_MIDDLEMAN1", (Object ID)
           "zoneID": 68, (The ZoneID of the current area, a list of which can be found here.)
           "TrainerID": 0, (The TrainerID of the Object, a list of which can be found here.)
           "ObjectGraphicIndex": 120, (The Object Graphic of the Object, a list of which can be found here.)
           "ColorIndex": 0, (The associated skin tone and hair color of that Object Graphic, if it has multiple.)
           "Position": {
               "x": 5.0, (The X coordinate of the Object, with x=0 and y=0 as the top left of the map.)
               "y": 9.0 (The Y coordinate of the Object.)
           },
           "HeightLayer": 0, (The height layer of the Object.)
           "HeightIgnore": 0, (Allows the player to interact with Objects that are of a different height layer to them (Rock Climb rocks, etc.)
           "Size": {
               "x": 0.0, (The X-height coordinate of the Object.)
               "y": 0.0 (The Y-height coordinate of the Object.)
           },
           "Rotation": 90, (The initial direction the Object faces when an area is loaded)
           "MoveLimit": {
               "x": 1.0, (The movement range of an Object on the X-axis.)
               "y": 1.0 (The movement range of an Object on the Y-axis.)
           },
           "EventType": 0, (0 = normal Object, 1 = Trainer)
           "MoveCode": 16, (Dictates how an Object moves from a hardcoded list.)
           "MoveParam0": 0, (Line of sight distance if the Object is a Trainer)
           "MoveParam1": 0, (Undocumented.)
           "MoveParam2": 1, (Undocumented.)
           "TalkLabel": "ev_c04r0303_middleman1", (Talk label of the trainer, found in the dp_scenario file.)
           "ContactLabel": "", (Undocumented.)
           "Work": 4000, (The flag that needs to be reset in order for an Object to be seen.)
           "Dowsing": 0, (The range that the Dowsing Machine app on the Pokétch can see an item from.)
           "LoadFirst": 0, (The priority that an Object receives when sharing the same space with another Object.)
           "DoNotLoad": 4000, 
           "TalkToRange": 1.25,  (The distance that an Object can be interacted with from.)
           "TalkToSize": {
               "x": 0.0, (Undocumented.)
               "y": 0.0 (Undocumented.)
           },
           "TalkBit": 15 (Undocumented.)
       } (Has a comma here (},) if there's another Object beneath it)
   ]
}

ColorIndex

This page or section contains undocumented information.
Please ensure all of the info is complete!


The ColorIndex parameter found in a PlaceData will change the skin tone, eye color, and occasionally the associated hair color of an Object. This only applies to Objects with a specific ObjectGraphicsIndex.

Objects with a different skin tone in the vanilla game are referred to as IRO by the game, or COLOR.


Original OGI Index = 0 Index = 1 Index = 2 Index = 3

Script Commands


For the purpose of this page, different types of functions within a script will be marked with a particular color.

Commands are Green.
Dialogue files are Blue.
Flags are Purple.
Scripts are Orange.
Values are Red.
Work values are Pink.

Everyday Scripts

_END (3)
Ends a script

This example ends the script ev_d29r0103_flag_change

ev_d29r0103_flag_change
_ARRIVE_FLAG_SET FLAG_ARRIVE_D29R0103
_END
_JUMP (24)
Jumps to a script

This example jumps to the script d11r0101_end

_JUMP d11r0101_end
_CALL (28)
Calls a script

This example calls the script ev_another_out

_CALL ev_another_out
_SWITCH (36)
Begins a switch statement based off the work value.

This example is used with a dialogue choice with the work value SCWK_ANSWER

Var. - Work Value

_SWITCH SCWK_ANSWER
_ADD_WK (58)
Add to the value of a variable.

This example adds one to the work variable LOCALWORK10

Var. - Work Value
Any - Value to add.

_ADD_WK LOCALWORK10 1
_SUB_WK (59)
Subtracts a value from the variable.

This example subtracts one from the work variable LOCALWORK11

Var. - Work Value
Any - Value to subtract.

_SUB_WK LOCALWORK11 1
_LDVAL (60)
Set a value to a variable.

This example sets the value 399 to SCWK_TEMP0 and the value 5 to SCWK_TEMP0

Var. - Work Value
Any - Value to assign to the work variable

_LDVAL SCWK_TEMP0 399
_LDVAL SCWK_TEMP1 5
_LDWK (61)
Set a variable to a value.

This example sets the work variable WK_PLAY_REPO_NO to the value of 14

Var. - Work Value
Any - Value to assign to the work variable

_LDWK WK_PLAY_REPO_NO 14
_GET_MY_SEX (479)
Gets the value of the player's gender.

<work> This example will call a script (known as ev_the_boy or ev_the_girl) depending on the player's gender:

0 - Male
1 - Female

_GET_MY_SEX SCWK_ANSWER
_IFVAL_CALL SCWK_ANSWER EQ 0 ev_the_boy
_IFVAL_CALL SCWK_ANSWER EQ 1 ev_the_girl
_IFVAL_JUMP (32)
Jumps to a script depending on the specified condition.

This example checks the player's party if they have a Regirock, and then jumps to a script if it doesn't.

_TEMOTI_POKE_CHK SCWK_ANSWER 377
_IFVAL_JUMP SCWK_ANSWER EQ 0 ev_d20r0106_legend_unseal_ng
_PLAYER_POS_GET (158)
Jumps to a script depending on the player's position on the current map.

This example checks where the player is, then executes a command for the Rival to move to, depending on that value.

SCWK_TEMP0 - X Coordinates
SCWK_TEMP1 - Y Coordinates

_PLAYER_POS_GET SCWK_TEMP0 SCWK_TEMP1
_IFVAL_JUMP SCWK_TEMP1 EQ 723 pos_c02_rival_z1
_IFVAL_JUMP SCWK_TEMP1 EQ 724 pos_c02_rival_z2
_IFVAL_JUMP SCWK_TEMP1 EQ 725 pos_c02_rival_z3
_IFVAL_JUMP SCWK_TEMP1 EQ 726 pos_c02_rival_z4
_IFVAL_JUMP SCWK_TEMP1 EQ 727 pos_c02_rival_z5

Flag-related Scripts

_FLAG_SET (41)
Sets a flag as complete.

This example sets the flag FE_C02R0401_START as complete.

_FLAG_SET FE_C02R0401_START
_ARRIVE_FLAG_SET (42)
Sets a location flag.

This example sets the system flag FLAG_ARRIVE_D29R0103.

_ARRIVE_FLAG_SET FLAG_ARRIVE_D29R0103
_FLAG_RESET (43)
Clears a flag.

This example clears the flag FV_D29R0103_REI

_FLAG_RESET FE_D29R0103_REI
_IF_FLAON_JUMP (46)
Checks a flag, and if it is set, jumps to a script

This example checks the flag FE_D05R0114_LEGEND_CLEAR and triggers the script ev_d29r0103_init_change_obj_del if the flag is set.

_IF_FLAGON_JUMP FE_D05R0114_LEGEND_CLEAR  ev_d29r0103_init_change_obj_del
_IF_FLAGOFF_JUMP (47)
Checks a flag, and if it isn't set, jumps to a script

This example checks the flag FE_D05R0114_CLEAR and triggers the script ev_d29r0103_init_change_obj_del if the flag is not set.

_IF_FLAGOFF_JUMP FE_D05R0114_CLEAR  ev_d29r0103_init_change_obj_del
_TRAINER_FLAG_SET (51)
Sets a trainer flag.

This example sets a flag with an Elite Trainer in the Snowpoint Gym.

Flag - Flag of the trainer to set

_TRAINER_FLAG_SET COLDELITEM_06
_SYS_FLAG_SHOES_GET (446)
Permanently gives the player their Running Shoes.

The only instance of this command would be to give the player their Running Shoes.

_SYS_FLAG_SHOES_SET
_SYS_FLAG_BADGE_GET (448)
Checks if the player has a specific gym badge.

Checks if the player has the Icicle Badge, in order to enter Lake Acuity.

_SYS_FLAG_BADGE_GET BADGE_ID_C09 SCWK_ANSWER
_SYS_FLAG_BADGE_SET (448)
Gives the player a gym badge.

Gives the player the Icicle Badge.

_SYS_FLAG_BADGE_SET BADGE_ID_C09
This script lacks information.
We don't know the complete list of the Poketech Apps?
_POKETECH_ADD (419)
Permanently gives the player a Poketch app.

This example gives the player the Digital Watch app, with the number influencing the ID of the Poketch app given.

1 - Digital Watch
2 - Calculator
3 - Memo Pad
4 - Pedometer
5 - Pokemon List
6 - ???
7 - ???
8 - ???
9 - ???
10 - ???
11 - ???
12 - ???
13 - ???
14 - ???
15 - ???
16 - ???
17 - ???
18 - ???
19 - Hidden Moves

_POKETECH_ADD 1
_SYS_FLAG_SET (873)
Sets a system flag.

This example sets the system flag SYS_FLAG_AUTOSAVE_STOP.

_SYS_FLAG_SET SYS_FLAG_AUTOSAVE_STOP

Events

_TALK_OBJ_START_TURN_NOT (152)
Starts an object event with the actor only turning their head to face the player.

You would simply use this when calling a NPC script.

ev_d31_assistantw:
_TALK_OBJ_START_TURN_NOT
_EVENT_START (155)
Starts a cutscene event

This example starts an event related to the script ev_d29r0103_rei.

ev_d9r0103_rei
_EVENT_START
_EVENT_END (157)
Ends a cutscene event

This example ends an event related to the script ev_d29r0103_legend_event_clear.

ev_d9r0103_legend_event_clear
_EVENT_END
_EVENT_CAMERA_INDEX (942)
Changes the camera used

This example changes the camera when entering Acuity Cavern.

No. - Camera

_EVENT_START
_EVENT_CAMERA_INDEX 480
_EVENT_CAMERA_END_WAIT (942)
Resets the camera

You would only use this command to reset the camera at the end of an event.

_EVENT_START
_EVENT_CAMERA_INDEX 555
_EVEN_CAMERA_END_WAIT

Animations

_AB_KEYWAIT (76)
Some sort of key wait usually used before doing a screen fade-out.


_AB_KEYWAIT
_OBJ_ANIME (136)
Animates an actor based on a given animation script.

This example animates the player character with the script anm_d11r0101_player_turn_left

Label - Actor to use
Label - Script to use
Unknown - (Optional) Unknown Use

_OBJ_ANIME HERO anm_d11r0101_player_turn_left 
_OBJ_ANIME_WAIT (140)
Waits for the current actor animations to finish before resuming execution.

The only use case would be after _OBJ_ANIME

_OBJ_ANIME_WAIT
_BLACK_OUT (283)
Makes the screen fade to black.

The only instance of this command would be to make the screen fade to black.

_BLACK_OUT SCR_WIPE_DIV 3
_BLACK_IN (284)
Makes the screen fade from black to normal.

The only instance of this command would be to make the screen fade from black.

anm_r201_rival_00_g
_BLACK_IN SCR_WIPE_DIV 3
ACMD_END
ACMD_END (777)
Ends a sequence of animations.

The only instance of this command would be to end a sequence of animations.

AC_ANIME_DURATION  0.11
AC_INDEX_ANIME  3 1
ACMD_END
AC_MARK_GYOE (783)
Shows a [!] Bubble above the affected actor.


No. - Unknown Use. Always 1 when present.

an_r201_rival_00_g:
AC_MARK_GYOE 1
ACMD_END
AC_WAIT (779)
Lingers on an animation for a certain amount of frames.

This example lingers on a facial animation for 20 frames.

AC_FACE_INDEX  1
AC_WAIT  20
AC_FACE_INDEX  0
ACMD_END
_FADE_WAIT (784)
Holds on a fade transition.

This example forces the screen to hold on a fade to black.

_BLACK_OUT SCR_WIPE_DIV 3
_FADE_WAIT
AC_INDEX_ANIME (870)
Forces an object to animate.

This example would make the actor animate with Animation ID 3.

No. 1 - Animation ID of choice
No. 2 - Unknown, always set at 1

AC_ANIME_DURATION  0.11
AC_INDEX_ANIME  3 1
ACMD_END
AC_INDEX_ANIME_WAIT (871)
Waits for the currently playing animation from AC_INDEX_ANIME to end.


AC_INDEX_ANIME 1 1
AC_INDEX_ANIME_WAIT
Main article: Facial Animation
AC_FACE_INDEX (876)
Changes the facial animation of a character.

This example would change the facial animation to Happy, then back to Default after 20 frames.

0 - Default
1 - Happy
2 - Angry
3 - Sad
4 - Relieved
5 - Shocked

AC_FACE_INDEX  1
AC_WAIT  20
AC_FACE_INDEX  0
ACMD_END
_AC_ANIM_LOCK (880)
Locks a character's animations.


_AC_ANIM_LOCK fc1062_00
_AC_ANIM_RELEASE (881)
Unlocks a target that was locked with _AC_ANIM_LOCK


_AC_ANIM_RELEASE fc1062_00
AC_MARK_EMO (900)
Shows an emotion bubble above the affected actor.


No. - ID of the emotion to show
AC_MARK_EMO 1 
AC_INVISIBLE_ON (964)
Hides the affected actor.


AC_INVISIBLE_ON
AC_INVISIBLE_OFF (965)
Reveals the affected actor.


AC_INVISIBLE_OFF
AC_ANIME_DURATION (1155)
Changes the length of an animation.

This example would change the length of the animation to 0.11 seconds.

No. - Length of the animation in seconds.

AC_ANIME_DIRECTION  0.11
AC_INDEX_ANIME 3 1
ACMD_END

Battles

_2VS2_BATTLE_CHECK (348)
Appears to check if you have a partner trainer, if yes, goes to different pre-trainer dialogue


_2VS2_BATTLE_CHECK SCWK_ANSWER
_TRAINER_BTL_SET (335)
Initiates a Trainer Battle.

This example initiates the first Trainer Battle against Cyrus, with each Trainer's NameLabel found in TrainerTable.json.

_TRAINER_BTL_SET GINGALEADER1_01 0
_SP_WILD_BTL_SET (402)
Initiates a Wild Battle.

This example initiates a Wild Battle against a level 56 Shaymin Sky form that can be caught, and does not have a Hidden Ability.

No. 1 - National Pokédex No.
No. 2 - Level
No. 3 - Catch Flag (1 = Uncatchable)
No. 4 - FormID
No. 5 - Hidden Ability (1 = HA)

_SP_WILD_BTL_SET 492 56 0 1 0
_BTL_ENCSEQ_LOAD (966)
Loads a battle intro sequence.

This example loads the VS Candice intro sequence when battlign Candice.

Value - Whatever the name of the battle intro sequence is.

_BTL_ENCSEQ_LOAD gym07

Dialogue

_TALKMSG (70)
Shows a textbox with a given message.

This example below shows the textbox dp_scenario3%42-msg_d31_rival_02_1

_TALKMSG dp_scenario3%42-msg_d31_rival_02_1
_TALK_CLOSE (81)
Closes the currently open textbox.


_TALK_CLOSE
_TALK_CLOSE_NO_CLEAR (82)
Closes the currently open textbox. Used before shop commands. Functionally the same as _TALK_CLOSE


_TALK_CLOSE_NO_CLEAR
_EASY_OBJ_MSG (84)
Displays a specific line of text.

This example displays a line of text from dp_scenario1.

_EASY_OBJ_MSG dp_scenario1%24-msg_t01r0202_game_01
This script lacks information.
What does the number parameter do?
_EASY_BOARD_MSG (92)
Shows a sign message.

This example displays text on a signboard from dp_scenario3.

Message - Message to show
Type - Type of sign.
No. - Unknown, always used with 0
No. - (Optional) The ID Of the arrow to show on the textbox, only used for road signs.

_EASY_BOARD_MSG dp_scenario3%42-msg_d31_sign1_01 BOARD_TYPE_POST 0
_EASY_INFOBOARD_MSG (93)
Shows an info sign message. Mostly used for Gym signs.

This example displays text on a signboard from dp_scenario2.

Type - Type of sign textbox. Always BOARD_TYPE_INFO.
No. - Unknown. Default and Standard use is 0.

_EASY_INFOBOARD_MSG dp_scenario2%0-msg_c04_sign6_01 BOARD_TYPE_INFO 0
_TALK_OBJ_START (151)
Starts an event where an object turns to face the player.

The only instance of this command would be to make the start an event where an object turns to face the player.

_TALK_OBJ_START
_ADD_CUSTUM_WIN_LABEL (821)
Brings up a selection menu with choices that are not Yes/No.

This example brings the menu up with the options "I want to battle", "Tell me about this place", and "No, thanks"

_ADD_CUSTUM_WIN_LABEL ss_btl_tower_menu_ui_text%msg_tower_choice_00
_ADD_CUSTUM_WIN_LABEL ss_btl_tower_menu_ui_text%msg_tower_choice_01
_ADD_CUSTUM_WIN_LABEL ss_btl_tower_menu_ui_text%msg_tower_choice_02
_TALK_OBJ_START ss_btl_tower_menu_ui_text%msg_tower_choice_00   0 
_TALK_OBJ_START ss_btl_tower_menu_ui_text%msg_tower_choice_01   1 
_TALK_OBJ_START ss_btl_tower_menu_ui_text%msg_tower_choice_02   2 
_OPEN_CUSTUM_WIN (822)
Opens and saves the player's answer from _ADD_CUSTUM_WIN_LABEL in a work value.

At any point if you want to use different dialogue responses, you should probably use this in tandem with _ADD_CUSTUM_WIN_LABEL

_OPEN_CUSTUM_WIN SCWK_ANSWER
This script lacks information.
Probably related to _ADD_CUSTUM_WIN_LABEL, not certain though, needs fully documented.
_ADD_CUSTUM_WIN_LABEL_TWO_WINDOW (1196)
'


_ADD_CUSTUM_WIN_LABEL_TWO_WINDOW


This script lacks information.
Probably related to _ADD_CUSTUM_WIN_LABEL, not certain though, needs fully documented.
_ADD_CUSTUM_WIN_LABEL_WORD_SET (962)
'


_ADD_CUSTUM_WIN_LABEL_WORD_SET

Movement

AC_DIR_U (773)
Turns an object upwards over an amount of frames.

This example turns the object upward over the span of 43 frames.

No. - Frames

AC_DIR_U 43
AC_DIR_R (774)
Turns an object rightwards over the span of frames.

This example turns the object rightward for 43 frames.

No. - Frames

AC_DIR_R 43
AC_DIR_D (775)
Turns an object downwards over an amount of frames.

This example turns the object downward over the span of 43 frames.

No. - Frames

AC_DIR_D 43
AC_DIR_L (776)
Turns an object leftwards over an amount of frames.

This example turns the object leftward over the span of 43 frames.

No. - Frames

AC_DIR_L 43
AC_DIR_VAL (778)
Turns the affected actor to a specific angle over an amount of frames.

This example turns the actor 45 degrees over 15 frames.

No. - Frames
No. - Angle in degrees

AC_DIR_VAL 15 45
AC_UP (768)
Turns an object a certain amount of tiles upwards over an amount of frames.

This example moves the object 2 tiles upwards over the span of 8 frames.

No. 1 - Tiles to move
No. 2 - Frames

AC_UP 2 8
AC_DOWN (769)
Turns an object a certain amount of tiles downwards over an amount of frames.

This example moves the object 2 tiles downwards over the span of 8 frames.

No. 1 - Tiles to move
No. 2 - Frames

AC_DOWN 2 8
AC_LEFT (770)
Turns an object a certain amount of tiles leftwards over an amount of frames.

This example moves the object 2 tiles leftwards over the span of 8 frames.

No. 1 - Tiles to move
No. 2 - Frames

AC_LEFT 2 8
AC_RIGHT (771)
Turns an object a certain amount of tiles rightwards over an amount of frames.

This example moves the object 2 tiles rightwards over the span of 8 frames.

No. 1 - Tiles to move
No. 2 - Frames

AC_RIGHT 2 8
ACMD_END (777)
Ends a movement script.

The only instance of this command would be to end a movement script.

AC_RIGHT 2 8
ACMD_END
AC_HERO_MATCH_X (789)
Moves the affected actor up or down to match the X Position of the player.


No. - Time in frames to move per tile.

AC_HERO_MATCH_Z 3
AC_HERO_MATCH_Z (789)
Moves the affected actor left or right to match the Z Position of the player.


No. - Time in frames to move per tile.

AC_HERO_MATCH_Z 3

Shops

_SHOP_OPEN_BATTLE (913)
Opens a shop screen that uses BP as currency.

This example opens the first shop in the Battle Park Point Corner.

No. 1 - Shop ID

_SHOP_OPEN_BATTLE 0

Pokémon & Items

_ADD_ITEM (189)
Gives the player a defined amount of item(s).

This example gives the player five Metal Coats.

No. 1 - Item ID
No. 2 - Amount

_ADD_ITEM 233 5
_ITEM_CHK (190)
Checks if the player has a specific amount of items in their bag.

This example checks to see if the player has five Metal Coats in their bag.

No. 1 - Item ID
No. 2 - Amount

_ITEM_CHK 233 5
_ADD_ITEM_CHK (191)
Gives an amount of one item to the player after checking if they have enough bag space.

This example checks to see if the player has five Metal Coats in their bag, if they don't then they are given 5 Metal Coats.

No. 1 - Item ID - ID Of the item to give
No. 2 - Amount - Amount to give
No. 3 - Result - Variable to put if the player has enough bag space in.

_ADD_ITEM_CHK 233 5 SCWK_ANSWER 
_CB_ITEM_NUM_ADD (216)
Gives the player a specific amount of seals (stickers).

This example gives the player 5 of the sticker with the ID of 58 (Cool Sticker B)

No. 1 - Seal ID
No. 2 - Amount

_CB_ITEM_NUM_ADD 57 6
_ITEM_NAME (310)
Puts the name of a given item into a buffer.

This example puts the value assigned to the work variable from _LDVAL into the buffer ID of 0.

No. 1 - Buffer ID
Value - Work Value with the item name.
No. 2 - Amount of the item.

_LDVAL SCWK_TEMP0 399
_ITEM_NAME 0 SCWK_TEMP0  1 
_PC_KAIFUKU (480)
Heals every Pokemon in the player's party.

The only instance of this command would be to heal every Pokemon in the player's party.

_PC_KAIFUKU


This script lacks information.
What are the 3rd and 4th arguments used for?
_POKEMON_NAME_EXTRA (322)
Gives the player a Pokemon.

This example gives the player a Level 1 Eevee. Most of these values are hardcoded, and _ADD_POKEMON_UI should be used instead.

No. 1 - Level
No. 2 - Dex. No
No. 3 - ???
No. 4 - ???

_PLAYER_NAME 0
_POKEMON_NAME_EXTRA 1 133 0 0
_ADD_MOVE_POKE (635)
Sets a Roaming Pokemon out into the wild. These two values are hardcoded, and must be edited with code injection.

This example sets Cresselia as a Roaming Pokemon.

No. 1 - Mesprit
No. 2 - Cresselia

_ADD_MOVE_POKE 1
This script lacks information.
What are all the other Egg TIDs?
_ADD_TAMAGO (322)
Gives the player an egg.

This example gives the player a Happiny egg, with the Egg TID of Riley.

No. 1 - Dex Number
No. 2 - Egg TID
A variety of known Egg TIDs exist, which can change the original met location ID of the Egg when hatched.
60005 - Riley
60007 - Travelling Man
60010 - Day Care Couple

_ADD_TAMAGO 440 60007
This script lacks information.
What values dictate which form and ability are given to the player?
_ADD_POKEMON_UI (1209)
Gives the player a Pokémon.

This example will give the player a Level 50 Qwilfish holding a Sacred Ash.

No. 1 - National Pokédex No.
No. 2 - Level
No. 3 - Item ID

_ADD_POKEMON_UI 211 50 44 SCWK_ANSWER 3 0
_TEMOTI_MOSNO (543)
Gets the NatDex number of a Pokemon in a specific slot in the player's party, and returns it as a work value.

Gets the players first slotted Pokemon.

No. - Slot Number
Value - Work Value

_TEMOTI_MOSNO 1 SCWK_ANSWER
_TEMOTI_POKE_CHK (563)
Checks the player's party for specific Pokemon.

Checks to see if the player has a Spiritomb in their party.

No. - Dex No.

_TEMOTI_POKE_CHK 442
_ADD_MAROYAKA_POFFIN (1175)
Gives the player a Mild Poffin


_ADD_MAROYAKA_POFFIN

Sound

_ME_PLAY (115)
Plays a fanfare, functionally the same as _SE_PLAY.

This example plays the Sticker Obtained! fanfare.

A list of all Fanfare IDs can be found here.

_ME_PLAY M_FI014
_ME_WAIT (116)
Waits for a playing fanfare to finish.


_ME_WAIT
_BGM_PLAY (118)
Plays a specific music track indefinitely until _BGM_NOW_MAP_PLAY is initiated.

This example plays the track associated with Jubilife City (Day).

A list of all BGM IDs can be found here.

_BGM_PLAY EV001
_BGM_NOW_MAP_PLAY (121)
Plays the background music associated with the current map.

The only instance of this command would be to play the BGM associated with the current map.

_BGM_NOW_MAP_PLAY
_SE_PLAY (109)
Plays a sound effect.

This example plays the sound effect M_FI013.

_SE_PLAY M_FI013


This script lacks information.
What is the third argument is used for?
_VOICE_PLAY (112)
Plays a Pokemon Cry.

This example plays the cry for Pokemon 485, Heatran.

No. 1 - ID of the Pokemon whose cry is played.
No. 2 - ID of the form of the Pokemon whose cry is played.
No. 3 - Unknown. Use 0.

_SE_PLAY 485 0 0

Warps

_MAP_CHANGE_NONE_FADE (1143)
Warps to a map without fading to black.

This example warps to the Battle Zone, at Warp ID 2.

Main article: Location Information

No. 1 - Map ID
No. 2 - Warp ID
No. 3 - [OPTIONAL] X Coordinate
No. 4 - [OPTIONAL] Z Coordinate
No. 5 - [OPTIONAL] Y Coordinate

_MAP_CHANGE_NONE_FADE D30 2 

Union Room Exclusive

This script lacks information.
Now sure exactly what the key is, but if i had to guess it's related to internet connectivity. - Ocean
_AB_KEY_TIME_WAIT (77)
Some sort of key wait with a timer.


No. 1 - Time in frames

_AB_KEY_TIME_WAIT 10 

Other

_ADD_GOLD (175)
Gives the player money

This example gives the player ¥8000.

No. - Money Given

_ADD_GOLD 8000
_TIME_WAIT (4)
Prevents any and all game progression for an amount of frames.

This example prevents anything from happening for 120 frames-- or two seconds.

No. - Frames

_TIME_WAIT 120
_SAVE_RENDOU_ENABLE (1027)
Checks for specific save data from another game.

This example checks to see if the player has completed "The Deified Pokémon" quest from save data of Pokémon Legends Arceus. All Save Data values are hard-coded, and must be edited via Code Injection.


0 - Let's Go Pikachu or Eevee
1 - Sword or Shield
2 - Legends Arceus, after having completed "The Deified Pokemon" quest

_SAVE_RENDOU_ENABLE SCWK_ANSWER 2

Deprecated/Dummied/Unused Scripts

This section is for the scripts that are either deprecated, dummied out, or unsused.

Deprecated/Dummied Out Scripts
No. Script Call
695 _ACCE_NAME
474 _ACCE_SHOP_CALL
196 _ADD_BOX_ITEM
185 _ADD_COIN
715 _ADD_COIN_CHK
198 _ADD_GOODS
200 _ADD_GOODS_CHK
694 _ADD_SCORE
210 _ADD_TAMA
212 _ADD_TAMA_CHK
202 _ADD_TRAP
204 _ADD_TRAP_CHK
206 _ADD_TREASURE
208 _ADD_TREASURE_CHK
39 _ADD_WAITICON
707 _AGB_CARTRIDGE_VER_GET
673 _AIKOTOBA_KABEGAMI_SET
753 _AIKOTOBA_OKURIMONO_CHK
139 _ANIME_DATA
138 _ANIME_LABEL
223 _APPROVE_POISON_DEAD
261 _BAG_SET_PROC_NORMAL
26 _BG_ID_JUMP
95 _BG_SCROLL
126 _BGM_FADEIN
124 _BGM_FADEOUT
125 _BGM_FADEOUT_PLAY
119 _BGM_PLAY_CHECK
127 _BGM_PLAYER_PAUSE
123 _BGM_SPECIAL_CLR
104 _BMPLIST_INIT
105 _BMPLIST_INIT_EX
106 _BMPLIST_MAKE_LIST
107 _BMPLIST_START
108 _BMPMENU_HV_START
98 _BMPMENU_INIT
99 _BMPMENU_INIT_EXIT
100 _BMPMENU_MAKE_LIST
101 _BMPMENU_MAKE_LIST16
102 _BMPMENU_START
742 _BTL_POINT_ADD
743 _BTL_POINT_SUB
739 _BTL_POINT_WIN_DEL
738 _BTL_POINT_WIN_WRITE
740 _BTL_POINT_WRITE
243 _BTL_SEARCHER_DIR_MV_SET
610 _BTOWER_GET_LEADER_ROOMID
611 _BTOWER_IS_LEADER_EXIST
606 _BTOWER_PRIZE_GET
607 _BTOWER_PRIZEMAN_SET
609 _BTOWER_RECV_BUF
608 _BTOWER_SEND_BUF
605 _BTOWER_SEVEN_POKE_GET
604 _BTOWER_TOOLS
601 _BTOWER_WORK_CLEAR
602 _BTOWER_WORK_INIT
603 _BTOWER_WORK_RELEASE
1025 _BTWR_DEB_IS_WORK_NULL
1030 _BTWR_SUB_BTL_TRAINER_SET
1010 _BTWR_SUB_CHK_ENTRY_POKE
1016 _BTWR_SUB_CHOICE_BTL_PARTNER
1020 _BTWR_SUB_GET_LEADER_CLEAR_FLAG
1023 _BTWR_SUB_GET_MINE_OBJ
1019 _BTWR_SUB_SET_LEADER_CLEAR_FLAG
1002 _BTWR_TOOL_CHK_ENTRY_POKE_NUM
1006 _BTWR_TOOL_GET_WIFI_RANK
876 _CAMERA_COS_ANGLE_WAIT
214 _CB_SEAL_KIND_NUM_GET
748 _CHECK_MY_GSID
220 _CHG_POKE_WAZA
197 _CHK_BOX_ITEM
652 _CHK_RIBBON_COUNT
399 _CHK_ZENKOKU_ZUKAN
620 _CLIMAX_DEMO
415 _CLIP_CONSAVEDATA_CHECK
416 _CLIP_TV_TITLE_SAVE
414 _CLIP_TVSAVEDATA_CHECK
18 _CMPVAL
182 _COIN_WIN_DEL
181 _COIN_WIN_WRITE
183 _COIN_WRITE
288 _COLOSSEUM_MAP_CHANGE_OUT
482 _COMM_DIRECT_END
483 _COMM_DIRECT_END_TIMING
484 _COMM_DIRECT_ENTER_BTL_ROOM
235 _COMM_GET_CURRENT_ID
485 _COMM_PLAYER_SET_DIR
422 _COMM_RESET
421 _COMM_SYNCHRONIZE
744 _COMP_BTL_POINT
713 _COMP_COIN
752 _COMP_WK_COIN
382 _CON_ACCE_NO_GET
364 _CON_BREEDER_NAME_GET
385 _CON_CAMERA_FLASH_CHECK
384 _CON_CAMERA_FLASH_SET
379 _CON_DESK_MODE_GET
388 _CON_ENDING_SKIP_CHECK
383 _CON_ENTRY_PARAM_GET
387 _CON_HBLANK_START
386 _CON_HBLANK_STOP
305 _CON_HERO_CHANGE
363 _CON_JUDGE_NAME_GET
391 _CON_MSGPRINT_FLAG_RESET
390 _CON_MSGPRINT_FLAG_SET
376 _CON_MY_ENTRY_NO_GET
365 _CON_NICK_NAME_GET
366 _CON_NUM_TAG_SET
377 _CON_OBJ_CODE_GET
269 _CON_POKELIST_GET_RESULT
268 _CON_POKELIST_SET_PROC
270 _CON_POKESTATUS_SET_PROC
378 _CON_POPULARITY_GET
369 _CON_RANK_NAME_GET
902 _CON_RANK_SET
374 _CON_RANKING_CHECK
381 _CON_RIBBON_NAME_GET
911 _CON_SELECT_MULTI_MODE
367 _CON_SIO_PARAM_INIT_SET
361 _CON_SYSTEM_CREATE
362 _CON_SYSTEM_EXIT
370 _CON_TYPE_NAME_GET
371 _CON_VICTORY_BREEDER_NAME_GET
375 _CON_VICTORY_ENTRY_NO_GET
372 _CON_VICTORY_ITEM_NO_GET
373 _CON_VICTORY_NICK_NAME_GET
360 _CONSIO_TIMING_CHECK
359 _CONSIO_TIMING_SEND
17 _CP_ADR_ADR
15 _CP_ADR_REG
16 _CP_ADR_VAL
14 _CP_REG_ADR
12 _CP_REG_REG
13 _CP_REG_VAL
296 _CYCLING_ROAD_SET
725 _D17SYSTEM_MAP_SELECT
349 _DEBUG_BTL_SET
356 _DEBUG_CHILD_WIN
355 _DEBUG_PARENT_WIN
667 _DEBUG_PRINT_FLAG
669 _DEBUG_PRINT_FLAG_STATIONED
666 _DEBUG_PRINT_WORK
668 _DEBUG_PRINT_WORK_STATIONED
358 _DEBUG_SIO_CONTEST
357 _DEBUG_SIO_ENCOUNT
352 _DEBUG_TR_TALK_BTL
351 _DEBUG_TRAINER_FLAG_ON_JUMP
350 _DEBUG_TRAINER_FLAG_SET
20 _DEBUG_WATCH_WORK
532 _DEL_SODATEYA_EGG
40 _DEL_WAITICON
688 _DENDOU_BALL_ANM
258 _DPS_INIT_PROC
706 _DRESSING_IMC_ACCE_CHECK
2 _DUMMY
393 _ELEVATOR_FLOOR_GET
394 _ELEVATOR_FLOOR_WRITE
828 _EVENT_CAMERA_FRAME
825 _EVENT_CAMERA_MODE
827 _EVENT_CAMERA_WAIT
166 _EVENT_DATA
167 _EVENT_DATA_END
837 _FADE_BALL
838 _FADE_DEFAULT
761 _FIELDOBJ_BITSET_FELLOWHIT
260 _FIRST_POKE_SELECT_SET_AND_DEL
472 _FIX_GOODS_CALL
473 _FIX_SEAL_CALL
471 _FIX_SHOP_CALL
767 _FLD_SCOPE_MODE_OFF
766 _FLD_SCOPE_MODE_ON
644 _FLD_TRADE_ALLOC
646 _FLD_TRADE_CHG_MONSNO
648 _FLD_TRADE_DEL
647 _FLD_TRADE_EVENT
645 _FLD_TRADE_MOSNO
704 _FLDOBJ_BLINK_ANM
703 _FLDOBJ_SHAKE_ANM
576 _FNOTE_DATA_MAKE
577 _FNOTE_DATA_SAVE
575 _FNOTE_START_SET
749 _FRIEND_DATA_NUM
1116 _FUREAI_TALK_END
477 _GAME_OVER_CALL
745 _GET_BP_GIFT
741 _GET_BTL_POINT
750 _GET_COIN_GIFT
184 _GET_COIN_NUM
400 _GET_HYOUKA_MSGID
552 _GET_MAILBOX_DATANUM
228 _GET_MAP_POS
496 _GET_SEED_COMPOST
407 _GET_SEED_GROUND
512 _GET_SODATE_NAME
561 _GET_SODATEYA_AISHOU
533 _GET_SODATEYA_EGG
526 _GET_TAMAGO_COUNT
229 _GET_TEMOTI_POKE_NUM
674 _GET_UG_HATA_NUM
179 _GOLD_WIN_DEL
178 _GOLD_WIN_WRITE
180 _GOLD_WRITE
201 _GOODS_CHK
329 _GOODS_NAME
97 _GUINNESS_WIN
347 _HAIFU_POKE_RETRY_CHECK
188 _HIDE_ITEM_EVENT
709 _HIDEMAP_STATE_CHG
538 _HIKITORI_LIST
560 _HIKITORI_LIST_NAME_SET
541 _HIKITORI_POKE
540 _HIKITORI_RYOUKIN
408 _HONEY_TREE_AFTER_SET
245 _IMAGE_CLIP_SET_PROC
246 _IMAGE_CLIP_VIEW_TV_SET_PROC
578 _IMC_ACCE_ADD_ITEM
579 _IMC_ACCE_ADD_ITEM_CHK
580 _IMC_ACCE_ITEM_CHK
718 _IMC_ACCE_SUB_ITEM
581 _IMC_BG_ADD_ITEM
582 _IMC_BG_ITEM_CHK
712 _IMC_BG_NAME
520 _INIT_ELEC_GYM
621 _INIT_SAFARI_TRAIN
518 _INIT_STEEL_GYM
514 _INIT_WATER_GYM
225 _INIT_WEATHER
596 _ITEMLIST_GET_RESULT
595 _ITEMLIST_SET_PROC
78 _LAST_KEYWAIT
11 _LD_ADR_ADR
9 _LD_ADR_REG
8 _LD_ADR_VAL
7 _LD_REG_ADR
10 _LD_REG_REG
5 _LD_REG_VAL
6 _LD_REG_WDATA
345 _LOSE_CHECK
551 _MAILBOX
94 _MENU_REQ
164 _MOVE_CODE_GET
535 _MSG_AZUKE_SET
244 _MSG_BOY_EVENT
534 _MSG_SODATEYA_AISHOU
511 _MSGEXPANDBUF
321 _MY_TR_TYPE_NAME
857 _MYSTERY_DIASBLE_MSG
858 _MYSTERY_ENABLE_MSG
854 _MYSTERY_GET_PRESENT_ID
859 _MYSTERY_POSTMAN_END
852 _MYSTERY_POSTMAN_INIT
860 _MYSTERY_POSTMAN_SAVE_END
853 _MYSTERY_PRESENT_CHECK
855 _MYSTERY_RECEIVE_CHECK
856 _MYSTERY_RECEIVE_PRESENT
277 _NAMEIN
630 _NATURAL_PARK_ACCESSORY_NO_GET
629 _NATURAL_PARK_WALK_COUNT_GET
723 _NEW_NANKAI_WORD_COMPLETE_CHECK
721 _NEW_NANKAI_WORD_SET
633 _NEWS_COUNT_CHK
632 _NEWS_COUNT_SET
79 _NEXT_ANM_LAST_KEYWAIT
681 _NICK_NAME_PC
344 _NORMAL_LOSE
643 _NORMAL_WAZALIST_GET_RESULT
642 _NORMAL_WAZALIST_SET_PROC
162 _NOT_ZONE_DEL_SET
265 _NPC_TRADE_POKELIST_SET_PROC
584 _NUTMIXER_PLAY_CHECK
137 _OBJ_ANIME_POS
25 _OBJ_ID_JUMP
143 _OBJ_PAUSE_CLEAR_ALL
251 _OEKAKI_BOARD_SET_PROC
635 _OSHIE_WAZA_COUNT
640 _OSHIE_WAZALIST_GET_RESULT
638 _OSHIE_WAZALIST_SET_PROC
592 _PAPERPLANE_SET
131 _PERAP_DATA_CHECK
132 _PERAP_REC_START
133 _PERAP_REC_STOP
134 _PERAP_SAVE
27 _PLAYER_DIR_JUMP
297 _PLAYER_FORM_GET
160 _PLAYER_POS_OFFSET_SET
476 _PLAYER_REPORT_DRAW_DEL
475 _PLAYER_REPORT_DRAW_SET
493 _PMS_BUF
492 _PMS_INPUT_DOUBLE
491 _PMS_INPUT_SINGLE
729 _POFIN_ADD
591 _POKE_MAIL_CHK
593 _POKE_MAIL_DEL
240 _POKE_WINDOW_ANM
241 _POKE_WINDOW_ANM_WAIT
239 _POKE_WINDOW_DEL
238 _POKE_WINDOW_PUT_PP
684 _POKEPARK_CONTROL
685 _POKEPARK_DEPOSIT_COUNT
687 _POKEPARK_GET_SCORE
271 _POKESTATUS_GET_RESULT
700 _POKETECH_HOOK_RESET
699 _POKETECH_HOOK_SET
614 _RECORD_ADD
254 _RECORD_CORNER_SET_PROC
613 _RECORD_GET
615 _RECORD_SET
616 _RECORD_SETIFLARGE
661 _REGULATION_LIST_CALL
641 _REMAIND_WAZALIST_GET_RESULT
639 _REMAIND_WAZALIST_SET_PROC
413 _REPORT_WIN_CLOSE
412 _REPORT_WIN_OPEN
758 _SAVE_FIELD_OBJ
354 _SEL_CHILD_WIN
353 _SEL_PARENT_WIN
103 _SEL_WIN_JUMP
760 _SET_ESCAPE_LOCATION
826 _SET_EVENT_CAMERA_PARAM
230 _SET_MAP_PROC
499 _SET_SEED_COMPOST
536 _SET_SODATEYA_POKE
486 _SET_UP_DOOR_ANIME
226 _SET_WEATHER
675 _SETUP_PASO_ANM
692 _SETUP_RAH_CYL
470 _SHOP_CALL
701 _SLOT_MACHINE
714 _SLOT_RENTYAN_CHK
135 _SND_CLIMAX_DATA_LOAD
117 _SND_INITIAL_VOL_SET
539 _SODATE_POKE_LEVEL_STR
537 _SODATEYA_POKELIST
733 _SODATEYA_POKELIST_GET_RESULT
732 _SODATEYA_POKELIST_SET_PROC
562 _SODATEYA_TAMAGO_CHK
392 _SP_LOCATION_SET
677 _START_PASO_OFF_ANM
676 _START_PASO_ON_ANM
693 _START_RAH_CYL
186 _SUB_COIN
199 _SUB_GOODS
559 _SUB_NATSUKI
211 _SUB_TAMA
207 _SUB_TREASURE
751 _SUB_WK_COIN
508 _SXY_BG_POS_CHANGE
141 _TALK_OBJ_PAUSE_ALL
63 _TALKMSG_ALLPUT
64 _TALKMSG_ALLPUT_ARC
66 _TALKMSG_ALLPUT_PMS
65 _TALKMSG_ARC
75 _TALKMSG_AUTOGET
74 _TALKMSG_CON_SIO
69 _TALKMSG_NG_POKE_NAME
73 _TALKMSG_NOSKIP
67 _TALKMSG_PMS
72 _TALKMSG_SP_AUTO
213 _TAMA_CHK
331 _TAMA_NAME
546 _TEMOTI_POKE_SEX_GET
573 _TEMOTI_WAZANO
252 _TR_CARD_SET_PROC
253 _TRADE_LIST_SET_PROC
342 _TRAINER_LOSE
343 _TRAINER_LOSE_CHECK
340 _TRAINER_TYPE_GET
205 _TRAP_CHK
330 _TRAP_NAME
209 _TREASURE_CHK
409 _TSIGN_SET_PROC
1048 _TUREARUKI_ITEM_TIMER_SET
844 _TV_ENTRY_PARKINFO_ACCE
842 _TV_ENTRY_PARKINFO_INIT
869 _TV_GET_DATA_TOTAL
862 _TV_INTERVIEW_MSG
868 _TV_MAKE_MSG
867 _TV_SET_ENDFLAG
746 _UG_BALLITEM_CHECK
481 _UG_MAN_SHOP_NPC_RAND_PLACE
530 _UG_SHOP_ITEM_NAME
529 _UG_SHOP_TALK_END
528 _UG_SHOP_TALK_START
531 _UG_SHOP_TRAP_NAME
727 _UNDERGROUND_KASEKI_DIG_COUNT
627 _UNDERGROUND_TALK_COUNT
708 _UNDERGROUND_TALK_COUNT_CLEAR
735 _UNDERGROUND_TALK_COUNT2
726 _UNDERGROUND_TOOL_GIVE_COUNT
728 _UNDERGROUND_TRAP_HIT_COUNT
764 _UNION_BATTLE_START_CHECK
425 _UNION_BEACON_CHANGE
763 _UNION_BMPMENU_START
437 _UNION_CHILD_SELECT_COMMAND_SET
430 _UNION_CONNECT_CUT_RESTART
438 _UNION_CONNECT_START
426 _UNION_CONNECT_TALK_DENIED
427 _UNION_CONNECT_TALK_OK
755 _UNION_GET_CARD_TALK_NO
424 _UNION_GET_INFO_TALK_NO
431 _UNION_GET_TALK_NUMBER
432 _UNION_ID_SET
439 _UNION_MAP_CHANGE
434 _UNION_OBJ_ALL_VANISH
423 _UNION_PARENT_CARD_TALK_NO
436 _UNION_PARENT_START_COMMAND_SET
266 _UNION_POKELIST_SET_PROC
433 _UNION_RESULT_GET
429 _UNION_RETURN_SETUP
435 _UNION_SCRIPT_RESULT_SET
428 _UNION_TRAINER_NAME_REGIST
443 _UNION_VIEW_MY_STATUS_SET
440 _UNION_VIEW_TR_SEL_SET
441 _UNION_VIEW_TR_TYPE_MSG_GET
442 _UNION_VIEW_TR_TYPE_NO_GET
861 _UNKNOWN_MSG
227 _UPDATE_WEATHER
148 _VANISH_DUMMY_OBJ_ADD
149 _VANISH_DUMMY_OBJ_DEL
21 _VM_ADD
570 _WAZALIST_GET_RESULT
569 _WAZALIST_SET_PROC
232 _WIFI_AUTO_REG
754 _WIFI_HUSIGINAOKURIMONO_OPEN_FLAG_SET
233 _WIFI_P2P_MATCH_EVENT_CALL
234 _WIFI_P2P_MATCH_SET_DEL
280 _WIPE_FADE_END_CHECK
279 _WIPE_FADE_START
756 _WIRELESS_ICON_EASY
757 _WIRELESS_ICON_EASY_END
257 _WORLDTRADE_SET_PROC
737 _ZISHIN
650 _ZUKAN_SEX_VER_UP
649 _ZUKAN_TEXT_VER_UP
Unused Scripts
No. Script Call
120 _BGM_STOP
86 _BOARD_MAKE
90 _BOARD_MSG
222 _CHK_POKE_WAZA_GROUP
129 _CTRL_BGM_FLAG_SET
85 _EASY_MSG
44 _FLAG_CHECK
49 _FLAG_CHECK_WK
31 _IF_CALL
57 _IF_TR_FLAGOFF_CALL
55 _IF_TR_FLAGOFF_JUMP
56 _IF_TR_FLAGON_CALL
35 _IFWK_CALL
174 _INIT_CHANGE_LABEL
62 _LDWKVAL
0 _NONE_USE_NUMBER
1 _NOP
159 _OBJ_POS_GET
805 AC_ANM_PAUSE_OFF
804 AC_ANM_PAUSE_ON
797 AC_DIR_DOWN_CENTER
808 AC_HERO_BANZAI
810 AC_HERO_BANZAI_UKE
807 AC_HIDE_PULLOFF
772 AC_LOOP
809 AC_MARK_SAISEN
811 ACMD_NOT
1227 CMD_NAME_END

Notes

This section is for taking notes.
Please take everything from this section and properly bake it into the section above.
_OBJ_POS_CHANGE_WORLD <actor> -<X cords> <Y cords> <Z cords>

Changes the position of the specified actor. For some reason, the X cords needs to be negative

Common Scripts

These are scripts found in the "Common Scripts" file, which are referenced at various points throughout the game. To call these, use just type _CALL followed by the name of the script.

_CALL ev_another_out_sp ------- Removes any and all following Pokémon, and forces the player off the Bicycle.
_CALL ev_block_doc ------- Locks the player's inputs, and prevents autosaving.