DivaScript

From DivaDocs
Revision as of 12:58, 28 September 2025 by GGAB3 (talk | contribs) (Added TIME, TARGET, TARGET_FLYING_TIME, SE_EFFECT, SATURATE, PV_END, PV_BRANCH_MODE. Removed "Required" column from the tables)

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

FT: AGEAGE_CTRL(chara, side, unk1, scale, unk2, unk3, -1, -1);

Parameter Description Type
chara Character slot int
side Side to control:

0: both 1: left

2: right

enum
unk1 Unknown int
scale Effect scale int
unk2 Unknown int
unk3 Unknown int

BAR_TIME_SET

Sets the length of a measure.

BAR_TIME_SET(bpm, beats);

Parameter Description Type
bpm Beats per minute int
beats Number of quarter note beats minus 1. eg.: 3 for 4/4. int

BLOOM

Sets data from bloom pv_param.

FT, F2, X: BLOOM(id, unk);

Parameter Description Type
id ID matching the data in pv_param. int
unk Unknown int

CHANGE_FIELD

Changes the field defined in pv_field/pv_db.

CHANGE_FIELD(id);

F2, X: CHANGE_FIELD(id, unk);

Parameter Description Type
id ID matching the field number in pv_field or pv_db. int

CHARA_SIZE

Sets a character's scale/size.

CHARA_SIZE(chara, size);

Parameter Description Type
chara Character slot int
size Character scale int

END

Ends reading of the script.

END();

HAND_SCALE

Sets the size of a character's hand.

FT: HAND_SCALE(chara, hand, scale);

Parameter Description Type
chara Character slot int
hand Which hand to scale:

1: left

2: right

enum
scale Hand scale in percentage times 10; eg. for 105% use 1050 int

LYRIC

Displays a lyric from pv_db.

LYRIC(id, color);

Parameter Description Type
id ID matching the number of a lyric in pv_db.

Use -1 as "disable".

int
color #AARRGGBB hex color code converted to decimal.

eg.: for a red lyric the command would be LYRIC(id, 16711680);

because Red: #00FF00000x00ff000016711680

Default: -1

int

MIKU_DISP

Shows or hides a character in a PV.

MIKU_DISP(chara, disp);

Parameter Description Type
chara Character slot int
disp Whether to display the character or not. bool

MIKU_MOVE

Moves a character in 3D space in a PV.

MIKU_MOVE(chara, x, y, z);

Parameter Description Type
chara Character slot int
x X coordinate int
y Y coordinate int
z Z coordinate int

MIKU_ROT

Rotates a character in a PV.

MIKU_ROT(chara, angle);

Parameter Description Type
chara Character slot int
angle Angle value int

MIKU_SHADOW

Shows or hides a character's shadow in a PV.

MIKU_SHADOW(chara, disp);

Parameter Description Type
chara Character slot int
disp Whether to display the character's shadow or not. bool

MODE_SELECT

Starts or ends a special chart segment, such as Chance Time.

MODE_SELECT(difficulty, mode);

Parameter Description 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:

1 - Easy

2 - Normal

4 - Hard

8 - Extreme

16 - Encore

Adding the values up to each other results in a group: 6 = Hard (4) and Normal (2).

Use 31 as a universal value (works on any difficulty).

bitfield enum
mode What segment to start/end:

1 - Challenge Time (Arcade games) / Chance Time (Console games) Start

3 - Challenge Time (Arcade games) / Chance Time (Console games) End

8 - Technical Zone Start

9 - Technical Zone End

Only used by the New Classics mod:

4 - Chance Time Start

5 - Chance Time End

enum

MOVIE_CUT_CHG

Plays, shows or hides 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.

FT: MOVIE_CUT_CHG(id, disp);

Parameter Description 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 movie.list item. Re-calling a movie again doesn't play it from the starting position.

int
disp 1 - display the movie layer

Any other value - hide the movie layer (playback keeps going)

bool

MOVIE_DISP

Shows or hides the movie layer in a PV.

MOVIE_DISP(disp);

Parameter Description Type
disp 1 - display the movie layer

Any other value - hide the movie layer (playback keeps going)

bool

MOVIE_PLAY

Starts playing the movie defined in pv_db or the first movie in movie.list in pv_db.

MOVIE_PLAY(play);

Parameter Description Type
play 1 - plays the movie

Any other value doesn't do anything.

bool

MUSIC_PLAY

Starts playing the song file defined in pv_db.

MUSIC_PLAY();

PV_BRANCH_MODE

Make future DSC commands only be executed on either the Global, Fail or Success branch.

FT, F, F2, X: PV_BRANCH_MODE(branch);

Parameter Description Type
branch 0 - Global (commands are executed regardless of success state)

1 - Fail (commands are executed only if the PV is in the 'failed' state)

2 - Success (commands are executed only if the PV is in the 'success' state)

enum

PV_END

Ends PV playback.

PV_END();

SATURATE

Changes color saturation in a PV.

SATURATE(amount);

Parameter Description Type
amount Saturation strength on a scale from 0 to 1000:

0 - No color, perfect grayscale

1000 - Regular colors

int

SCENE_FADE

Plays a screen fade effect during PVs.

SCENE_FADE(speed, start, end, r, g, b)

Parameter Description Type
speed Fade duration in seconds

eg:

1000: 1 second

800: 0.8 seconds

int
start The opacity the fade will start with

0: fully transparent

1000: fully opaque

int
end The opacity the fade will end with

0: fully transparent

1000: fully opaque

int
r Red color component scale, from 0 to 1000 int
g Green color component scale, from 0 to 1000 int
b Blue color component scale, from 0 to 1000 int

SE_EFFECT

Plays a sound effect in a PV defined in pv_db. Normally used for success scenes but not restricted to them.

FT, F, F2, X: SE_EFFECT(id);

Parameter Description Type
id number of a effect_se_name_list item defined in pv_db. int

TARGET

Spawns a rhythm game note.

FT: TARGET(type, pos_x, pos_y, angle, dist, amp, freq);

F: TARGET(type, duration, is_end, pos_x, pos_y, angle, freq, dist, amp, fly_time, sig);

F2, X: TARGET(type, duration, is_end, pos_x, pos_y, angle, freq, dist, amp, fly_time, sig, hit_eff);

Parameter Description Type
type ID corresponding to a note type.

Full ID list for each game on the dedicated Target page.

enum
pos_x X position of the note's target. int
pos_y Y position of the note's target. int
angle Angle of the note's path. int
distance Distance between the note's spawn position and the target's position.

Default: 300000

int
amp Amplitude of the note's path wave.

Default: 500

int
freq Frequency of the note's path wave. int
duration (for F/F2/X formats)

Sustain and Rush Note duration. Default (for notes other than Sustain and Rush): -1

DivaTime
is_end (for F/F2/X formats)

set to 1 for Sustain 'end' notes, otherwise set to -1

bool
fly_time (for F/F2/X formats)

Target Flying Time value (same format as the TARGET_FLYING_TIME command)

int
sig (for F/F2/X formats)

Signature Doesn't affect gameplay.

int
hit_eff (for F2/X formats)

Assigns a hit effect to the note based on a local ID defined in a previous TARGET_EFFECT command.

int

TARGET_FLYING_TIME

Sets the time it takes for the rhythm game notes to hit their targets.

TARGET_FLYING_TIME(flytime);

Parameter Description Type
flytime time value in DivaTime DivaTime

TIME

Waits until a specified game time.

TIME(t);

Parameter Description Type
t time value in DivaTime DivaTime