op2_sdk:music

Music

Reviewed For: SDK 2.1

Each scenario in Outpost 2 can be tailored to use a specific subset of the available in game music. All music tracks are represented in the enum SongIds. In order to customize the tracks, place an array of SongIds in the scenario. Then inform the game of the array via the function TethysGame::SetMusicPlayList().

You can use the function parameter repeatStartIndex on SetMusicPlayList in order to designate the index where repeat play starts. This allows setting some songs that are only played when the scenario is initially started and then not playing these songs later in the scenario.

Below is a table of the names of the MP3 tracks compared to their equivalent SDK enum. The MP3 tracks can be downloaded from the Outpost Universe Outpost 2 downloads page.

Song MP3 NameSong Enum
Eden & Plymouth 1songEP41
Eden & Plymouth 2songEP42
Eden & Plymouth 3songEP43
Eden & Plymouth 4songEP51
Eden & Plymouth 5songEP52
Eden & Plymouth 6songEP61
Eden & Plymouth 7songEP62
Eden & Plymouth 8songEP63
Eden 1songEden11
Eden 2songEden21
Eden 3songEden22
Eden 4songEden31
Eden 5songEden32
Eden 6songEden33
Plymouth 1songPlymth11
Plymouth 2songPlymth12
Plymouth 3songPlymth21
Plymouth 4songPlymth22 (main menu music)
Plymouth 5songPlymth31
Plymouth 6songPlymth32
Plymouth 7songPlymth33
Static 1songStatic01
Static 2songStatic02
Static 3songStatic03
Static 4songStatic04 (standard multiplayer theme)
Static 5songStatic05

TethysGame

static void __fastcall SetMusicPlayList(int numSongs, int repeatStartIndex, SongIds* songIdList);

Enums.h

enum SongIds 
{
    songEden11 = 0,	// 0x0
    songEden21,		// 0x1
    songEden22,		// 0x2
    songEden31,		// 0x3
    songEden32,		// 0x4
    songEden33,		// 0x5
    songEP41,		// 0x6
    songEP42,		// 0x7
    songEP43,		// 0x8
    songEP51,		// 0x9
    songEP52,		// 0xA
    songEP61,		// 0xB
    songEP62,		// 0xC
    songEP63,		// 0xD
    songPlymth11,	// 0xE
    songPlymth12,	// 0xF
    songPlymth21,	// 0x10
    songPlymth22,	// 0x11
    songPlymth31,	// 0x12
    songPlymth32,	// 0x13
    songPlymth33,	// 0x14
    songStatic01,	// 0x15
    songStatic02,	// 0x16
    songStatic03,	// 0x17
    songStatic04,	// 0x18
    songStatic05,	// 0x19
};

Set song playlist for scenario

SongIds songs[] = {
    SongIds::songEden11,
    SongIds::songEden21,
    SongIds::songEden31,
    SongIds::songEden32,
    SongIds::songEden33,
    SongIds::songEP41,
    SongIds::songStatic01
};
 
int InitProc()
{
    TethysGame::SetMusicPlayList(7, 3, songs);
}

- Go Back to Programming a Scenario
- Go Back to Outpost 2 Mapmaking
- Go Back to Outpost 2 Main page
- Go Back to Wiki Home Page

  • op2_sdk/music.txt
  • Last modified: 2016/10/12 21:32
  • (external edit)