Przejdź do treści

C_MUSICTHEME Daedalus class

Acknowledgment

Heavily inspired by the amazing documentation site Gothic library

Class C_MusicTheme describes musical themes.

Class definition

Class definition as it is defined in Scripts/System/_intern/Music.d script file.

C_MusicTheme Daedalus class
class C_MusicTheme
{
    var string      file;           // Sound file in DirectMusic `.sgt` format
    var float       vol;            // Sound volume
    var int         loop;           // Enable cycle
    var float       reverbMix;      // Reverb mixing
    var float       reverbTime;     // Reverb time
    var int         transType;      // Type of transition to the next theme
    var int         transSubType;   // Subtype of transition to the next theme song
};

Class members

Variable Type Description
file string Sound file in DirectMusic .sgt format
vol float Sound volume
loop int Enable/disable cycle
reverbMix float Reverb mixing
reverbTime float Reverb time
transType int The type of transition to the next theme song
transSubType int The subtype of transition to the next theme song

Class member overview

Description of the class member variables.

file

DirectMusic sound in *.sgt format or MIDI file.

vol

The volume of the theme song. From 0.0 to 1.0.

loop

Enable/disable theme music looping. Disabled = 0. Enabled = 1.

reverbMix

Reverb mixing. Measured in decibels.

reverbTime

Reverberation time in milliseconds.

transType

The type of transition to the next theme song.

The list of constants for all transitions types is described in the file Scripts/System/_intern/Music.d

1
2
3
4
5
6
7
const int TRANSITION_TYPE_NONE          = 1;    // No transition
const int TRANSITION_TYPE_GROOVE        = 2;    // Ripple
const int TRANSITION_TYPE_FILL          = 3;    // Padding
const int TRANSITION_TYPE_BREAK         = 4;    // Break
const int TRANSITION_TYPE_INTRO         = 5;    // Introductory
const int TRANSITION_TYPE_END           = 6;    // End topic
const int TRANSITION_TYPE_ENDANDINTRO   = 7;    // End and start new

transSubType

The subtype of transition to the next theme song.

The list of constants for all transitions subtypes is described in the file Scripts/System/_intern/Music.d

1
2
3
const INT TRANSITION_SUB_TYPE_IMMEDIATE = 1;    // Instant transition
const INT TRANSITION_SUB_TYPE_BEAT      = 2;    // Rhythmic transition
const INT TRANSITION_SUB_TYPE_MEASURE   = 3;    // Gradual transition

Name features

The musical themes of the game are played depending on the game situation. By default, the theme with the _STD (standard) suffix is played. In case of a threat, the _THR (threat) theme will be played. During the combat the _FGT (fight) theme plays.

instance WOO_DAY_STD(C_MUSICTHEME_STANDARD)
{
    file = "woo_daystd.sgt";
};

instance WOO_DAY_THR(C_MUSICTHEME_THREAT)
{
    file = "woo_daythr.sgt";
};

instance WOO_DAY_FGT(C_MUSICTHEME_FIGHT)
{
    file = "woo_dayfgt.sgt";
};
In addition, the suffix _DAY_ and _NGT_ determines whether the theme should be played on day or night.
1
2
3
4
5
6
7
8
9
instance OWD_DAY_FGT(C_MUSICTHEME_FIGHT)
{
    file = "owp_dayfgt.sgt";
};

instance OWD_NGT_STD(C_MUSICTHEME_STANDARD)
{
    file = "owd_daystd.sgt";
};

Tip

In G2 the C_MUSICTHEME_STANDARD, C_MUSICTHEME_THREAT and C_MUSICTHEME_FIGHT prototypes are used by default.