DivaScript: Difference between revisions
No edit summary |
m added MIKU_ROT, MIKU_DISP, MIKU_MOVE, MIKU_SHADOW, MOVIE_ commands. Improved some descriptions. |
||
| Line 9: | Line 9: | ||
== List of DSC Commands ''(Incomplete)'' == | == List of DSC Commands ''(Incomplete)'' == | ||
List of commands that can be used in FT, F, F2/X DSC formats. Format-exclusive commands are marked individually. | |||
=== AGEAGE_CTRL === | === AGEAGE_CTRL === | ||
| Line 162: | Line 163: | ||
|- | |- | ||
|scale | |scale | ||
|Hand scale in percentage times 10; eg. | |Hand scale in percentage times 10; eg. for <code>105%</code> use <code>1050</code> | ||
|True | |True | ||
|int | |int | ||
| Line 168: | Line 169: | ||
=== LYRIC === | === LYRIC === | ||
Displays a lyric from <code>pv_db</code>. | |||
<code>LYRIC(id, color);</code> | <code>LYRIC(id, color);</code> | ||
| Line 192: | Line 193: | ||
|int | |int | ||
|} | |} | ||
=== MIKU_DISP === | |||
Show or hide a character in a PV. | |||
<code>MIKU_DISP(chara, disp);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|chara | |||
|Character slot | |||
|True | |||
|int | |||
|- | |||
|disp | |||
|Whether to display the character or not. | |||
|True | |||
|bool | |||
|} | |||
=== MIKU_MOVE === | |||
Moves a character in 3D space in a PV. | |||
<code>MIKU_MOVE(chara, x, y, z);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|chara | |||
|Character slot | |||
|True | |||
|int | |||
|- | |||
|x | |||
|X coordinate | |||
|True | |||
|int | |||
|- | |||
|y | |||
|Y coordinate | |||
|True | |||
|int | |||
|- | |||
|z | |||
|Z coordinate | |||
|True | |||
|int | |||
|} | |||
=== MIKU_ROT === | |||
Rotates a character in a PV. | |||
<code>MIKU_ROT(chara, angle);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|chara | |||
|Character slot | |||
|True | |||
|int | |||
|- | |||
|angle | |||
|Angle value | |||
|True | |||
|int | |||
|} | |||
=== MIKU_SHADOW === | |||
Show or hide a character's shadow in a PV. | |||
<code>MIKU_SHADOW(chara, disp);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|chara | |||
|Character slot | |||
|True | |||
|int | |||
|- | |||
|disp | |||
|Whether to display the character's shadow or not. | |||
|True | |||
|bool | |||
|} | |||
=== MODE_SELECT === | |||
Starts or ends a special chart segment, such as Chance Time. | |||
<code>MODE_SELECT(difficulty, mode);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|difficulty | |||
|Indicates under what difficulties the command will trigger in this exact script. | |||
This value is a bit flag corresponding to a group of difficulties: | |||
<code>1</code> - Easy | |||
<code>2</code> - Normal | |||
<code>4</code> - Hard | |||
<code>8</code> - Extreme | |||
<code>16</code> - Encore | |||
Adding the values up to each other results in a group: <code>6</code>:Hard(4) and Normal (2). | |||
Use <code>31</code> as a universal value (works on any difficulty). | |||
|True | |||
|bitfield enum | |||
|- | |||
|mode | |||
|What segment to start/end: | |||
<code>1</code> - Challenge Time (Arcade games) / Chance Time (Console games) Start | |||
<code>3</code> - Challenge Time (Arcade games) / Chance Time (Console games) End | |||
<code>8</code> - Technical Zone Start | |||
<code>9</code> - Technical Zone End | |||
Only used by the [https://divamodarchive.com/post/169 New Classics mod]: | |||
<code>4</code> - Chance Time Start | |||
<code>5</code> - Chance Time End | |||
|True | |||
|enum | |||
|} | |||
=== MOVIE_CUT_CHG === | |||
Play, show or hide the movie defined in <code>pv_db</code> or a movie from <code>movie.list</code> in <code>pv_db</code>. It can be used as a fancier version of both <code>MOVIE_DISP</code> and <code>MOVIE_PLAY</code> that allows more control. | |||
AFT: <code>MOVIE_CUT_CHG(id, disp);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|id | |||
|The number in <code>movie.list</code> of the movie to be played. | |||
Playback starts at the moment the command is called for a newly called <code>movie.list</code> item. Re-calling a movie again doesn't play it from the starting position. | |||
|True | |||
|int | |||
|- | |||
|disp | |||
|<code>1</code> - display the movie layer | |||
Any other value - hide the movie layer (playback keeps going) | |||
|True | |||
|bool | |||
|} | |||
=== MOVIE_DISP === | |||
Show or hide the movie layer in a PV. | |||
<code>MOVIE_DISP(disp);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|disp | |||
|<code>1</code> - display the movie layer | |||
Any other value - hide the movie layer (playback keeps going) | |||
|True | |||
|bool | |||
|} | |||
=== MOVIE_PLAY === | |||
Start playing the movie defined in <code>pv_db</code> or the first movie in <code>movie.list</code> in <code>pv_db</code>. | |||
<code>MOVIE_PLAY(play);</code> | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!Parameter | |||
!Description | |||
!Required | |||
!Type | |||
|- | |||
|play | |||
|<code>1</code> - plays the movie | |||
Any other value doesn't do anything. | |||
|True | |||
|bool | |||
|} | |||
=== MUSIC_PLAY === | |||
Starts playing the song file defined in <code>pv_db</code>. | |||
<code>MUSIC_PLAY();</code> | |||
=== SCENE_FADE === | === SCENE_FADE === | ||
Plays a screen fade effect during PVs | Plays a screen fade effect during PVs. | ||
<code>SCENE_FADE(speed, start, end, r, g, b)</code> | <code>SCENE_FADE(speed, start, end, r, g, b)</code> | ||
| Line 204: | Line 397: | ||
|- | |- | ||
|speed | |speed | ||
| | |Fade duration in seconds | ||
eg: | |||
<code>1000</code>: 1 second | |||
<code>800</code>: 0.8 seconds | |||
|True | |True | ||
|int | |int | ||
|- | |- | ||
|start | |start | ||
| | |The opacity the fade will start with | ||
<code>0</code>: fully transparent | |||
<code>1000</code>: fully opaque | |||
|True | |True | ||
|int | |int | ||
|- | |- | ||
|end | |end | ||
|the end | |The opacity the fade will end with | ||
<code>0</code>: fully transparent | |||
<code>1000</code>: fully opaque | |||
|True | |True | ||
|int | |int | ||
|- | |- | ||
|r | |r | ||
| | |Red color component scale, from 0 to 1000 | ||
|True | |True | ||
|int | |int | ||
|- | |- | ||
|g | |g | ||
| | |Green color component scale, from 0 to 1000 | ||
|True | |True | ||
|int | |int | ||
|- | |- | ||
|b | |b | ||
| | |Blue color component scale, from 0 to 1000 | ||
|True | |True | ||
|int | |int | ||
|} | |} | ||
<!-- Please keep all the commands in alphabetical order!! --> | |||
Revision as of 10:48, 27 September 2025
DivaScript (commonly referred to as DSC) is the file format used by all the Project DIVA games for storing various commands related to Music Videos/PVs and Rhythm Game Charts.
The data inside .dsc files is stored in a binary format. This means that they can not be edited with a text editor and instead require specialized programs that can decode them such as DSC Studio or ScriptEditor. Additionally, .dsc files from Project DIVA F2nd and Project DIVA X are encrypted using DIVAFILE encryption. They need to be decrypted before editing.
DSC Formats
Every Project DIVA game uses a specific DivaScript format. The exact format of a .dsc file is determined by the first 4 bytes of the file.
List of DSC Commands (Incomplete)
List of commands that can be used in FT, F, F2/X DSC formats. Format-exclusive commands are marked individually.
AGEAGE_CTRL
Controls the effect for the hair of the module "AgeAge Again".
AFT: AGEAGE_CTRL(chara, side, unk1, scale, unk2, unk3, -1, -1);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| side | Side to control | True | enum:
0: both 1: left 2: right |
| unk1 | Unknown | True | int |
| scale | Effect scale | True | int |
| unk2 | Unknown | False | int |
| unk3 | Unknown | True | int |
BAR_TIME_SET
Sets the length of a measure.
BAR_TIME_SET(bpm, beats);
| Parameter | Description | Required | Type |
|---|---|---|---|
| bpm | Beats per minute | True | int |
| beats | Number of quarter note beats minus 1. eg.: 3 for 4/4.
|
True | int |
BLOOM
Sets data from bloom pv_param.
AFT, F2, X: BLOOM(id, unk);
| Parameter | Description | Required | Type |
|---|---|---|---|
| id | ID matching the data in pv_param. | True | int |
| unk | Unknown | True | int |
CHANGE_FIELD
Changes the field defined in pv_field/pv_db.
CHANGE_FIELD(id);
| Parameter | Description | Required | Type |
|---|---|---|---|
| id | ID matching the field number in pv_field or pv_db.
|
True | int |
F2, X: CHANGE_FIELD(id, unk);
CHARA_SIZE
Sets a character's scale/size.
CHARA_SIZE(chara, size);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| size | Character scale | True | int |
END
Ends reading of the script.
END();
HAND_SCALE
Set the size of a character's hand.
AFT: HAND_SCALE(chara, hand, scale);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| hand | Which hand | True | enum:
1: left 2: right |
| scale | Hand scale in percentage times 10; eg. for 105% use 1050
|
True | int |
LYRIC
Displays a lyric from pv_db.
LYRIC(id, color);
| Parameter | Description | Required | Type |
|---|---|---|---|
| id | ID matching the number of a lyric in pv_db.
Use |
True | int |
| color | #AARRGGBB hex color code converted to decimal.
eg.: for a red lyric the command would be Default: |
False | int |
MIKU_DISP
Show or hide a character in a PV.
MIKU_DISP(chara, disp);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| disp | Whether to display the character or not. | True | bool |
MIKU_MOVE
Moves a character in 3D space in a PV.
MIKU_MOVE(chara, x, y, z);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| x | X coordinate | True | int |
| y | Y coordinate | True | int |
| z | Z coordinate | True | int |
MIKU_ROT
Rotates a character in a PV.
MIKU_ROT(chara, angle);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| angle | Angle value | True | int |
MIKU_SHADOW
Show or hide a character's shadow in a PV.
MIKU_SHADOW(chara, disp);
| Parameter | Description | Required | Type |
|---|---|---|---|
| chara | Character slot | True | int |
| disp | Whether to display the character's shadow or not. | True | bool |
MODE_SELECT
Starts or ends a special chart segment, such as Chance Time.
MODE_SELECT(difficulty, mode);
| Parameter | Description | Required | Type |
|---|---|---|---|
| difficulty | Indicates under what difficulties the command will trigger in this exact script.
This value is a bit flag corresponding to a group of difficulties:
|
True | bitfield enum |
| mode | What segment to start/end:
|
True | enum |
MOVIE_CUT_CHG
Play, show or hide the movie defined in pv_db or a movie from movie.list in pv_db. It can be used as a fancier version of both MOVIE_DISP and MOVIE_PLAY that allows more control.
AFT: MOVIE_CUT_CHG(id, disp);
| Parameter | Description | Required | Type |
|---|---|---|---|
| id | The number in movie.list of the movie to be played.
Playback starts at the moment the command is called for a newly called |
True | int |
| disp | 1 - display the movie layer
Any other value - hide the movie layer (playback keeps going) |
True | bool |
MOVIE_DISP
Show or hide the movie layer in a PV.
MOVIE_DISP(disp);
| Parameter | Description | Required | Type |
|---|---|---|---|
| disp | 1 - display the movie layer
Any other value - hide the movie layer (playback keeps going) |
True | bool |
MOVIE_PLAY
Start playing the movie defined in pv_db or the first movie in movie.list in pv_db.
MOVIE_PLAY(play);
| Parameter | Description | Required | Type |
|---|---|---|---|
| play | 1 - plays the movie
Any other value doesn't do anything. |
True | bool |
MUSIC_PLAY
Starts playing the song file defined in pv_db.
MUSIC_PLAY();
SCENE_FADE
Plays a screen fade effect during PVs.
SCENE_FADE(speed, start, end, r, g, b)
| Parameter | Description | Required | Type |
|---|---|---|---|
| speed | Fade duration in seconds
eg:
|
True | int |
| start | The opacity the fade will start with
|
True | int |
| end | The opacity the fade will end with
|
True | int |
| r | Red color component scale, from 0 to 1000 | True | int |
| g | Green color component scale, from 0 to 1000 | True | int |
| b | Blue color component scale, from 0 to 1000 | True | int |
