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

Placedatas

Using Brilliant Diamond Script Editor

image


  • 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.

Script Commands


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 Pokemon, and forces the player off the Bicycle.
_CALL ev_block_doc ------- Locks the player's inputs, and prevents autosaving.

Everyday Scripts

_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-related Scripts

_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

Animations

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_END
AC_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_END
AC_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_END
AC_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_END
ACMD_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

Battles

_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

Dialogue

_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_START

Movement

AC_DIR_U -- Turns an object upwards over an amount of frames.

No. - Frames

AC_DIR_U 43
AC_DIR_D -- Turns an object downwards over an amount of frames.

No. - Frames

AC_DIR_D 43
AC_DIR_L -- Turns an object leftwards over an amount of frames.

No. - Frames

AC_DIR_L 43
AC_DIR_R -- Turns an object rightwards over an amount of frames.

No. - Frames

AC_DIR_R 43
AC_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 8
AC_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 8
AC_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 8
AC_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 8
ACMD_END -- Ends a movement script.
AC_RIGHT 2 8
ACMD_END

Pokemon & Items

_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

Sound

_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

Warps

_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

Other

_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
⚠️ **GitHub.com Fallback** ⚠️