The spin-off to Starpoint Gemini 2 introduces coveted strategic elements into the tactical space simulation that is the Starpoint Gemini franchise. Conquer territory, conduct research, scavenge for resources and defeat your enemies. In Warlords, think BIGGER! Bigger universe, bigger ships, bigger stations. Expect many tweaked features; the community has decided on what they want and now they are getting it!

Submit Spaceship or Spacestation Submit Decal, Sound or Portrait


Post tutorial Report RSS Adding music to Warlords

A simple step-by-step tutorial showing how to add new music tracks into Starpoint Gemini Warlords.

Posted by on - Basic Music

Besides having the audio file of course, implementing a new music track into Warlords is a simple process explained in this tutorial.

1. The almighty file format

This one's simple: use .wav. That's it. Don't even try using .mp3 or something else. It WON'T work! ... But also, check the Food for thought section at the end of the tutorial for a sneak peek ;).

2. Database entry

As is the case with almost any asset in Warlords, to use your new music track in the game, you have to add the entry into the appropriate database. For music, this means using the Data\Base\Sound.wdt so we'll look at that one in particular. The specifics on editing and using databases in mods are explained in a different tutorial which we encourage you to read here.

Id KeyName Type Name File Loop MaxBuffers DisMin DistMax
...
200 SN208 2 music_ambient_1 Data\Sound\Music\Dark_Heart.wav 0 1 0 50


The above snippet doesn't look appealing, does it? It likely looks worse than it really is, but again, check out the Dynamic Databases tutorial ;). Let's go over the individual columns in the Sound.wdt to clear things up.

  • Id - Unique number identifier.
  • KeyName - Unique(!) keyname identifying the database entry.
  • Type - Set this value to 2. 0 = effects, 1 = GUI, 2 = music tracks
  • Name - Name you give to this database entry which must be UNIQUE in this database. Music tracks are referenced by this name in other files! For simplicity, set this to the same value as KeyName.
  • File - Path to the actual audio file.
  • Loop - We don't want music tracks to loop, since playlists are handled in a different fashion. Set to 0 for music tracks.
  • MaxBuffers - The maximum number of simultaneous sounds that can be played (this sound in particular). Set to 1 for music tracks.
  • DisMin - The distance at which the sound volume will be at its maximum. Not relevant for music tracks. (PS the clearly missing "t" is also not relevant ;) )
  • DistMax - The distance at which the sound volume will be at its minimum. Any farther than this value, and the sound will not be heard at all. Not relevant for music tracks.

When you're done with the database, save it and proceed to the next step where you'll actually link the database entry into the game.

3. Linking the music in region files

Maybe you're now thinking Huh? What do region files have to do with music?. In our case, a whole lot. The audio engine is setup in a way to allow region-specific tracks. If you want to specify several tracks to be used only in one or two specific regions, you can easily achieve this. Navigate to the Data\World\Regions folder. All the regions that exist in the game have their definition files in this folder. Open one of the region (.icr) files in a text editor like Notepad++. Most of the data in here is of no relevance for the current tutorial, so just scroll down to the Music: section which will look something like this:

Music:
{
  Standard:
  {
    music_ambient_1
    music_ambient_2
    music_ambient_3
    music_ambient_4
    music_ambient_5
    music_ambient_6
    music_ambient_7 
  }
  Combat:
  {
    music_combat_1
  }
}


The two types of music tracks are listed in these blocks by their database name column entries. Each track in its own row. The Standard tracks are played as ambient music, while you're travelling or something, while the Combat tracks are player, you guessed it, during combat.

4. Food for thought

There is one more thing important to mention here. We'll be doing some changes with the sound engine before the game exits Early Access which should allow other sound formats to be used (mp3 or ogg for example), so if you're interested in doing sound-related mods, please be on the lookout for any related announcements.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: