Scripting Documentation - Team-Sigma-Platinum/Sigma-Platinum GitHub Wiki

- Open the BrilliantDiamondScriptEditor.
- Hit Open (Folder Icon) in the top left, then select the Sigma Platinum romfs folder.
- Make any edits to scripts, which can be seen on the right.
- You can click the [i] button at the top or simply hover over a script for information on the various script commands.
- When done, uncheck Safe and then click Save Script into Memory.
- Click Export Changes to save everything.
- Make sure BDSP isn’t open in Ryujinx, or else it won’t save.
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 Pokemon, and forces the player off the Bicycle.
_CALL ev_block_doc ------- Locks the player's inputs, and prevents autosaving._GET_MY_SEX -- Gets the value of the player's gender.
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 -- Jumps to a script depending on the value of something.
For example, this 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 -- Jumps to a script depending on the player's position on the current map.
For example, this checks where the player is, then executes a command for the Rival to move to, depending on that value.
_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_SET -- Sets a flag as complete.
_FLAG_SET FE_C02R0401_START_SYS_FLAG_SHOES_SET -- Permanently gives the player their Running Shoes.
_SYS_FLAG_SHOES_GET_POKETCH_ADD -- Permanently gives the player a Poketch app.
The number presented will determine the app the player is given.
0 - Digital Watch
1 - Calculator
2 - Memo Pad
3 - Pedometer
4 - Pokemon List
5 - __
6 - __
7 - __
8 - __
9 - __
10 - __
11 - __
12 - __
13 - __
14 - __
15 - __
16 - __
17 - __
18 - __
19 - Hidden Moves
_POKETCH_ADD 1_POKETCH_ADD
AC_ANIME_DURATION -- Changes the length of an animation.
No. - Length of the following animation in seconds
AC_ANIME_DURATION 0.11
AC_INDEX_ANIME 3 1
ACMD_ENDAC_FACE_INDEX -- Changes the facial animation of a character.
0 - Default
1 - Happy
2 - Angry
3 - Sad
4 - Relieved
5 - Shocked
AC_FACE_INDEX 1
AC_WAIT 20
AC_FACE_INDEX 0
ACMD_ENDAC_INDEX_ANIME -- Forces an object to animate.
No. 1 - Animation ID of choice
No. 2 - Unknown, always set at 1
AC_ANIME_DURATION 0.11
AC_INDEX_ANIME 3 1
ACMD_ENDAC_WAIT -- Lingers on an animation for a certain amount of frames.
No. - Frames
AC_FACE_INDEX 1
AC_WAIT 20
AC_FACE_INDEX 0
ACMD_ENDACMD_END -- Ends a series of animations.
AC_ANIME_DURATION 0.11
AC_INDEX_ANIME 3 1
ACMD_END_SET_FORCE_BLINK -- Forces an object to close its eyes.
0 - Eyes Open
1 - Eyes Closed
_SET_FORCE_BLINK HERO 1_BLACK_IN -- Makes the screen fade from black to normal.
_BLACK_OUT SCR_WIPE_DIV 3_BLACK_OUT -- Makes the screen fade to black.
_BLACK_OUT SCR_WIPE_DIV 3_FADE_WAIT -- Holds on a fade transition.
_BLACK_OUT SCR_WIPE_DIV 3
_FADE_WAIT_SP_WILD_BTL_SET -- Initiates a Wild Battle.
No. 1 - Dex Number
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_TRAINER_BTL_SET -- Initiates a Trainer Battle.
The NameLabel of a Trainer can be found in masterdatas, in TrainerTable.json
_TRAINER_BTL_SET GINGALEADER1_01 0_EASY_OBJ_MSG -- Displays a specific line of text.
_EASY_OBJ_MSG dp_scenario1%24-msg_t01r0202_game_01_TALK_OBJ_START -- Starts an event where the object turns to face the player.
_TALK_OBJ_STARTAC_DIR_U -- Turns an object upwards over an amount of frames.
No. - Frames
AC_DIR_U 43AC_DIR_D -- Turns an object downwards over an amount of frames.
No. - Frames
AC_DIR_D 43AC_DIR_L -- Turns an object leftwards over an amount of frames.
No. - Frames
AC_DIR_L 43AC_DIR_R -- Turns an object rightwards over an amount of frames.
No. - Frames
AC_DIR_R 43AC_UP -- Moves an object a certain amount of tiles upwards over an amount of frames.
No. 1 - Tiles to move
No. 2 - Frames
AC_UP 2 8AC_DOWN -- Moves an object a certain amount of tiles downwards over an amount of frames.
No. 1 - Tiles to move
No. 2 - Frames
AC_DOWN 2 8AC_LEFT -- Moves an object a certain amount of tiles leftwards over an amount of frames.
No. 1 - Tiles to move
No. 2 - Frames
AC_LEFT 2 8AC_RIGHT -- Moves an object a certain amount of tiles rightwards over an amount of frames.
No. 1 - Tiles to move
No. 2 - Frames
AC_RIGHT 2 8ACMD_END -- Ends a movement script.
AC_RIGHT 2 8
ACMD_END_ADD_ITEM -- Gives the player an amount of a specific item(s).
No. 1 - Item ID
No. 2 - Amount
_ADD_ITEM 233 5_PC_KAIFUKU -- Heals every Pokemon in the player's party.
_PC_KAIFUKU_POKEMON_NAME_EXTRA -- Gives the player a Pokemon.
No. 1 - Level
No. 2 - Dex. No
No. 3 - ??
No. 4 - ??
_PLAYER_NAME 0
_POKEMON_NAME_EXTRA 1 133 0 0_ADD_MOVE_POKE -- Sets a Roaming Pokemon out into the wild.
The following values themselves are hardcoded, and must be edited with exefs modding.
0 - Mesprit
1 - Cresselia
_ADD_MOVE_POKE 1_ADD_TAMAGO -- Gives the player an Egg.
No. 1 - Dex Number
No. 2 - Egg TID
A variety of known Egg TIDs exist, which change the original met location ID of the Egg when hatched.
60005 - Riley
60007 - Travelling Man
60010 - Day Care Couple
_ADD_TAMAGO 440 60007_ITEM_CHK -- Checks the player's inventory for specific item(s).
No. 1 - Item ID
No. 2 - Amount
_ITM_CHK 233 5_TEMOTI_POKE_CHK -- Checks the player's party for specific Pokemon.
No. 1 - Dex No.
_TEMOTI_POKE_CHK SCWK_ANSWER 442_BGM_PLAY -- Plays a song indefinitely until _BGM_NOW_MAP_PLAY is initiated.
_BGM_PLAY EV008_BGM_NOW_MAP_PLAY -- Plays the background music associated with the current map.
_BGM_NOW_MAP_PLAY_SE_PLAY -- Plays a sound effect.
_SE_PLAY M_FI013_VOICE_PLAY -- Plays a Pokemon's cry.
No. 1 - Dex Number
No. 2 - NEEDS RESEARCH
No. 3 - NEEDS RESEARCH
_VOICE_PLAY 485 0 0_SET_FORCE_BLINK -- Warps to a map without fading to black.
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_ADD_GOLD -- Gives the player money.
No. 1 - Money Given
_ADD_GOLD 8000_TIME_WAIT -- Prevents any and all game progression for an amount of frames.
No. 1 - Frames waited
_TIME_WAIT 120_SAVE_RENDOU_ENABLE -- Checks for specific save data from another game.
The following values themselves are hardcoded, and must be edited with exefs modding.
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