DivaScript: Difference between revisions

From DivaDocs
No edit summary
No edit summary
Line 237: Line 237:


=== MUSIC_PLAY ===
=== MUSIC_PLAY ===
Start playing the PV music
Starts playing the PV music


<code>MUSIC_PLAY();</code>
<code>MUSIC_PLAY();</code>

Revision as of 01:15, 24 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)

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

Display a lyric from pv_db.

LYRIC(id, color);

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

Use -1 as "disable".

True 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

False int

SCENE_FADE

Plays a screen fade effect during PVs

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

Parameter Description Required Type
speed How fast the effect should play, e.g: for 100% use 1000 True int
start the beginning of the fade effect

from 0 to 1000

True int
end the end of the fade effect

From 0 to 1000

True int
r red color code True int
g green color code True int
b blue color code True int

MUSIC_PLAY

Starts playing the PV music

MUSIC_PLAY();