BGM Amp - Music Track Manager

by PcNm

A solution for managing music added by compatible mods. The mod allows each track to be enabled/disabled in the mod startup options.

Tweaks
1 year, 9 months ago
1.1
945

FAQ

Third-Party Modder's Guide


Foreword

VIEWER DISCRETION ADVISED...

Get ready for a bit of a technical novel... :D

In this guide we'll go over the process of adding music to BGM Amp - Music Track Manager!

I'll assume that you have a good grasp of the English language. I don't want to sink more time into this... novel shit.

I'll assume that the reader is familiar with navigating around a PC running Windows 7 or higher, but any OS should work... with adaptation.

Mods for Factorio primarily consists of text files written in languages known as Lua, Config or ini, and Json.
Secondarily, mods can contain images and sounds, which are completely optional.

I will assume that the reader is using Notepad++ (or a similar, capable text editor) Preferably with Lua, json, and ini support.*
Notepad++ will be the only text editor that I use or talk about - if that comes up. It's a very capable editor.

Knowing Lua is not necessary, as long as you follow along and copy the code where it should go. If you're familiar, that's great.

Knowing modding is not required either, as I will be going over the entire process for how to make your mod. Any prior knowledge is helpful.

I won't go over modding in general, just relevant stuff, ditto for Lua. I'll go over what we'll need to know for this guide. Nothing else...

I may refer to mods that add tracks to the manager as adjuncts as they are just mods for a mod (and calling them modmods may get silly)


Tools of the Trade

Before we begin, we'll need some software. This guide walks through the process using the following software tools.
(I initially considered automating this, but doing it by hand should give us better results, and covers the steps better.)

  • Text Editor
    The author of this guide will be using Notepad++ (You can grab it here)

  • Audio Editor
    The author of this guide will be using Audacity (You can grab it here and FFmpeg for it here)

  • Image Editor
    The author of this guide will be using Paint.Net (You can grab it here)
    Another good alternative would be GIMP (You can grab that here)
    The industry standard option would be Photoshop ($$$)

For audio preview/playback, you can use anything capable enough, or just stick to Audacity.


> Installing Notepad++

  • You may skip this step if you've already got an appropriate text editor.

The installation is pretty straight-forward:

  1. Go to the Notepad++ website.
  2. Select a version on the downloads page at the Notepad++ website.
  3. Click the giant button that screams DOWNLOAD.
  4. Run the installer.
  5. Click next, until you're done. Accept all agreements, etc.
  6. Let Notepad++ start and see if it works. It should...
  7. There's one thing that we should configure before we close Notepad++
    • Go to Settings
    • Click on Style Configurator...
    • Scroll down the language list until you locate INI file in the list.
    • Select the list item named INI file.
    • Click on the textbox below User ext. :
    • Enter the following: cfg
    • Click on Save & Close

Note: In Step 7 we internally associate .cfg files with the ini format so that we get syntax highlighting when we edit .cfg files.

The installation of Notepad++ is now complete.

You can now spend an inordinate amount of time configuring until you're comfy. That's outside the scope of this guide, however.
Do however take care to configure colors after you've decided on a light mode (or dark mode) to use, if you do.

You may now want to go ahead and associate .lua .cfg .json files with Notepad++ if you wish. (Open with...)


> Installing Audacity

  • We'll use Audacity in this guide. If you've already installed it with FFmpeg, you may skip this step.
    If you're already familiar with audio editors, and have, and prefer another, you could skip this step.

This installation is a bit longer as FFmpeg cannot be distributed with Audacity, thanks to pesky patents (worse than biters).

  1. Go to the Audacity website.
  2. Click the giant button that screams DOWNLOAD AUDACITY.
  3. You'll be taken to the download page. Let it download...
  4. Run the installer. (Version 3.1.3 as of today - any later version should work too)
  5. Start Audacity.
  6. Close Audacity. We did this just to check that it works, and if needed, prepare for FFmpeg installation.
  7. Go to the FFmpeg site for Audacity here and download the installer. (FFmpeg v2.2.2 INSTALLER as of today)
  8. Run the FFmpeg for Audacity installer and let it install.
  9. Start up Audacity again.
  10. Go to Edit and Preferences... (or press Control + P)
    1. Click on Libraries
    2. Click on Locate... It will tell you that it found FFmpeg, and ask you, if you want to manually locate it.
    3. Click on No to close the question dialog.
    4. Click on OK to close the Preferences dialog.
  11. Close Audacity

The installation of Audacity is now complete.


> Installing Paint.Net

  • You may skip this step if you already have it, or use another editor, and already understand the common procedures.

It's a little harder to navigate around their website, but other than that, it's just another trivial installation process.

  1. Navigate their website, or try this quicker link, or click the second row on this page (for the free version).
  2. Follow the instructions on their website page, and download it.
  3. Run the installer.
  4. Let Paint.Net start and check that it works.
  5. Close Paint.Net

Next, well... that's about it. The installation of Paint.Net is now complete.
In addition to Paint.Net you may also wish to get GIMP, but that's outside the scope of this guide.


Getting started

First, create a list of the music that you want.
Grab all the music files (however you do that, is outside the scope of this guide).

So, you've got your intrepid list of tracks, saved them to your hard drive (or whatever) and you're ready to continue this adjunct journey.

You should decide on a good title for your adjunct, one that encapsulates the collection (it could be one or multiple albums, but no mixtape please, keep each song separate so that the game can shuffle them around) (like a game OST*)

Your collection of tracks shall determine how you'll title your adjunct.

  • Please use English!
  • If may, I wouldn't mind it if you started off your title with something like BGM - T-Adjunct:
  • No really, wouldn't mind, anything that sorts your mod below BGM Amp in the mod list makes life easier.
  • For example, BGM Extension would work, just as well as BGM Bundle would work here...
  • The title should be kept as short as possible. Simplifies mod naming and organization.
  • Don't use more than one whitespace to separate words. Don't use tabs in the title.
  • I will henceforth refer to your chosen title as mod-title since I won't know the title of your adjunct.

* Game OSTs usually doesn't come with a valid license for this kind of use. It's best to ask for permission first. It's usually fine if it's for non-profit and not an entire album, and as long as it doesn't get attention. The composer often doesn't control licensing, music is just a job to pay the bills...

I'd recommend that you use tracks that you have the permission to use, whether it be due to the fact that you're a composer (made them yourself) or that they are public domain or attribution-licensed or otherwise licensed to you, for you to use and redistribute as a mod.

In any case, you've got a title to pick for your mod.

So, the full title might end up as BGM - T-Adjunct: Title or whatever you decide (replace Title)

With those details sorted out, you may proceed to actually creating a folder for your mod, but, wait, before you do that...
You'll also need a mod-name.

  • The mod name should be as similar as possible to your mod-title.
  • You could prefix it with your username if that's what you normally do with your mods. This alleviates bulletpoint 1 somewhat.
  • The mod-name should be standard ASCII characters.
  • If possible, avoid uppercase characters. They are ugly. You use that in Java and such. :-(
  • Keeping your mod-name lowercase makes it standardized, following standard Factorio file naming convention.

As an example, you could call your mod myname-adjunct-title (Replace title with your mod-title but replace spaces with - and use lowercase)

I will henceforth refer to your adjunct's mod name as mod-name since I won't know the name of your adjunct.

Alright, let's finally get that mod folder created, in the next section!


Mod folder preparation

Alright, let's create the main mod folder!

  • Call it mod-name
  • Don't write a version number, or anything "extra" there!

Before we continue, let's hop into this folder!

This folder will be referred to as root from now on, and will abbreviated as ./ to avoid endless typing.

Let's also create a few more folders inside root:

  • includes This folder will contain your adjunct.lua.
  • music This folder will contain your music files.
  • locale This folder will contain localizations, as described below.

Within the locale folder, we'll need a folder called en, so go ahead and create that as well.

./locale/en will contain a file (or several) with the names of your tracks, albums, descriptions, and remarks, in English.

You may add other languages with appropriate sub-folders in the ./locale/ folder, but that's outside the scope of this guide.
In this guide we'll only cover the English base locale, but what you learn can be applied to any other locale.

Your mod should now have this folder structure:

./
./includes/
./music/
./locale/
./locale/en/

In the next section, we'll create the files that go into these folders!


Mod file preparation

Alrightey, let's get your mod files created!

First I'll just give you a quick overview of what your root may look like by the end of this section:

./info.json
./data.lua
./settings.lua
./thumbnail.png
./thumbnail.pdn
./includes/adjunct.lua
./locale/en/adjunct.cfg

To create these files, start up Notepad++ and Paint.Net (note: thumbnail is optional).

So, in Notepad++ we will do the following...

  1. Do File -> New (or press Control + N) to create a new file.
  2. Repeat that action until you've got 5 new tabs in Notepad++.
  3. For each tab, we're going to want to save the files, correspondingly... say YES when saving.
    • Select tab 1 then File -> Save As... (or Control + Alt + S) @ root/ as info.json
    • Select tab 2 then File -> Save As... (or Control + Alt + S) @ root/ as data.lua
    • Select tab 3 then File -> Save As... (or Control + Alt + S) @ root/ as settings.lua
    • Select tab 4 then File -> Save As... (or Control + Alt + S) @ root/includes/ as adjunct.lua
    • Select tab 5 then File -> Save As... (or Control + Alt + S) @ root/locale/en/ as adjunct.cfg

In Paint.Net we'll do the following... (Note: You can skip this step if you want.)

Thumbnail creation is completely optional. It could make your mod stand out better on the portal.

  1. Do File -> New (or press Control + N) to open the dialog for creating a new image file.
  2. Enter width 256 and height 256, leave resolution at the default (96 pixels/inch) and press OK.
  3. You can drag-and-drop an image in here or whatever. It kinda lies outside the scope of this guide...

Basic thumbnail guide:

  1. Add a layer (press Control + Shift + N), the new layer will be named Layer 2.
  2. Double click on Layer 2 to open its properties. Name it Foreground and click OK (or hit Enter).
  3. Select the Background layer by clicking on it, it's named Background in the Layers window.
  4. Select the Paint Bucket tool (or press F) and fill the Background layer with black.
  5. Select the Foreground layer.
  6. Select the Text tool (or press T).
  7. Select an appropriate Font and give it a large size, let's say 36.
  8. Select a light grey or white color, alternatively swap colors (by pressing X).
  9. Click somewhere in the image frame and start typing.
  10. Adjust font size if needed and move the text around so that it is nicely framed.
  11. Save the image as thumbnail.pdn so that we may edit it in the future.
  12. Disable the Background layer, or select it and remove it (Control + Shift + Delete).
  13. Do Save as... and save the image as thumbnail.png (use .png format here)
  14. We created a crude thumbnail but it may help users notice your mod on the mod portal.
  15. Close Paint.Net.

We're done with the thumbnail, but I'd recommend something, a bit more interesting...


Let the scripting begin!

So, first you're going to work on your info.json file. Go to that tab in Notepad++ now (it should be on the first tab).

The contents of this file describes to the game and the mod portal what your mod is named, and how it loads up.
Copy and paste the following code into your .json file - you'll need to edit it afterwards:

{
    "name"             : "mod-name",
    "version"          : "0.0.1",
    "factorio_version" : "1.1",
    "title"            : "mod-title",
    "author"           : "mod-author",
    "contact"          : "",
    "homepage"         : "",
    "dependencies" : [
        "base >= 1.1",
        "pcnm-bgm-pack >= 1.0.0"
    ],
    "description"      : "mod-description"
}

Alright, so that's the template.

You're going to need to modify the following parts... * mod-name - Enter the mod-name that you decided on earlier. * mod-title - Enter the mod-title that you decided on earlier. * mod-author - Enter your Factorio player/user name here. * mod-description - Enter a description for your mod here.

If you update your mod in the future, you'd also bump the value of "version" ("0.0.1") to a higher value (i.e. "0.0.2").

That's everything for the info.json so we can save the file and close this tab now.


File: settings.lua

I'll just make this super quick for you. Copy and paste the following into your settings.lua

local adjunct = require("includes/adjunct")

BGM:RegisterAdjunct( adjunct.nfo )

for _,track in pairs( adjunct.tracks ) do
    BGM:AddTrack( adjunct.nfo, track )
end

Save the file, like we've already done before, and close it.


File: data.lua

Again, I'll just make this super quick for you. Copy and paste the following into your data.lua

local adjunct = require("includes/adjunct")

BGM:RegisterAdjunct( adjunct.nfo )

for _,track in pairs( adjunct.tracks ) do
    BGM:AddTrack( adjunct.nfo, track )
end

Save the file, like we've already done before, and close it.

You may've noticed that it contains exactly the same code. It's because stuff mostly happens behind the API.
When Factorio loads mods, it runs mod scripts in stages. The settings stage is isolated from the data stage.
These scripts must therefore iterate on each thing that it adds to the corresponding loading stage.


File: adjunct.lua

Again, I'll just make this super quick for you. Copy and paste the following into your adjunct.lua

local adjunct = {
    tracks = {}, -- place your tracks into this table; you do that in this script!
    nfo = {
        tag = "mod-tag" -- you must "TAG" your adjunct!
    }
}

Now we must give our mod a unique identifier. Preferably this will be globally unique, so let's ensure that.

Change line 4 so that it now reads like...
tag = "mod-name" but replace mod-name with your mod-name.

Alright, let's start specifying our music tracks!

Do you see that tracks variable? It's the Lua table that will hold all of your tracks.
We probably don't want to directly specify your tracks in-line so let's just leave it as it is, and write them to the table instead.

So, what does that look like?
Well, let's have a look!

adjunct.tracks.album_01_track_01 = {
    album   = 1,
    track   = 1,
    path    = "__mod-name__/music/album/track-name.ogg",
    music   = BGM.AMBIENT,
    remark  = false
}

Alrightey, let's start at the top, let's walk through this bit of code, line by line, in excruciating detail.

Line 1: On this line we directly write into our tracks table.

  • The name that we enter here doesn't matter.
  • This will function as long as it is written directly to our tracks table, in our adjunct.
  • That means that we cannot have sub-tables. Name your track well, but don't fret over it.
  • Any name that doesn't conflict with another you write will get picked up by the track manager.
  • The name is of no future use. The name will neither appear in-game nor in the track manager.
  • I recommend following the mundane example using simple numbers like this, tracks will be numbered just like that.
  • Pro Tip : You can actually use sub-tables here if you rewrite your settings.lua and data.lua so that "it just works".

Line 2: On this line we specify the album index.

  • We can have up to 99 albums in one adjunct, which would be insane.

Line 3: On this line we specify the track index.

  • We can have up to 99 tracks per album.

Line 4: On this line we specify the location of our music file.

  • Pay attention to __mod-name__ and replace mod-name accordingly.
  • Pay attention to where that path points. It shall point to your track-name music file.

Line 5: On this line we specify what kind of track we're adding. It can be one of four types.

  • BGM.MUSICAL tells the game to treat the track as a music track. Music tracks have an active element (melody, etc.)
  • BGM.AMBIENT tells the game to treat the track as ambient track. Ambient tracks mostly have passive elements.
  • BGM.EARLY_GAME tells the game to play the track when little is happening, in the early game. I can't confirm that one.
  • BGM.MENU_MUSIC tells the game to play the track during the main menu screen.

Line 6: On this line we specity that we're not interested in making any remarks.

  • This line is completely optional. By default, remarks are disabled.
    • Setting remark to true tells the track manager that we wish to make a remark.
    • The track remark is displayed right next to the track title in the tracks list in-game.
  • Other, optional parameters that we can provide are...
    • enable - Set to false to disable a track by default. The user has to enable it, then. -Why? Why not!
    • volume - Modify the track's volume by setting this value. Allows for minor late-adjustments in the future.

Line 7. On this line we conclude our track entry.

  • The track will now appear in-game when starting Factorio.

Note: If there are any mistakes, the track manager will report it as an error during the mod loading process.
If Factorio cannot load the specified music file, then the game will also fail on start with a helpful error.

Pro Tip : You can wrap up your tracks any way you like. The manager API is fairly easy to use directly.


All you'll need do for each of your track, is to repeat the above chunk of code.

  • Change the table-name.
  • Change the file-path.
  • Change the track-index.
  • Change the album-index (if necessary)

You're done. ... well, almost!

Add a couple of lines to the bottom of your adjunct.lua file.

At the end of this file, we must hand over our tables to our masters! They're called settings and data!

  • Copy and paste the following line to the bottom of your adjunct.lua :
    return adjunct;

For reference, our complete and functional adjunct.lua now looks like this:

local adjunct = {
    tracks = {}, -- place your tracks into this table; you do that in this script!
    nfo = {
        tag = "mod-tag" -- you must "TAG" your adjunct!
    }
}

adjunct.tracks.album_01_track_01 = {
    album   = 1,
    track   = 1,
    path    = "__mod-name__/music/album/track-name.ogg",
    music   = BGM.AMBIENT,
    remark  = false
}

return adjunct;

I think we've covered everything for this file... let's move on!


The Loudness Normalization Process

This process can either be very easy or very time consuming. Let's start easy. Actually... that's all I'll cover.

Alright, so you've got a track. You want it in the game. But the loudness is likely not quite right.

  1. Open Audacity
  2. Drag & drop your music file onto the window of Audacity, or File -> Import -> Audio to load the file.
  3. Select the track in Audacity, highlighting it. You may hit Control + A to select everything.

Solution #1: Primary solution...

  • Go to Effect -> Loudness Normalization...
    This will bring up a window that lets us configure the loudness normalization settings.
  • Set algorithm to Normalize "perceived loudness" and set it to -18.5 LUFS.
  • The checkbox for "Normalize stereo channels separately" should be unchecked.
  • The checkbox for "Treat mono as dual-mono" should be checked.
  • Click OK.
  • If the music got quieter, then we're likely done here...
  • We're aiming to hit a "close enough" average of +/- 0.5 on the amplitude.
  • It's perfectly alright to have some peaks and lows. That's dynamic range.
  • However, if it's too loud, we're going to try Solution #2...

Solution #2: Secondary solution...

If the previous step didn't noticeably change loudness, then we might already be in the zone.
However, if it's too loud, then we might need to do the following...

  • Go to Effect -> Normalize... This will bring up a window with normalization settings.
    This is a simpler form of normalization, but it may just do in a pinch.
  • Make sure that the "Remove DC offset (...)" checkbox is unchecked.
  • Make sure that the "Normalize peak amplitude to" checkbox is checked.
  • We'd want to normalize peak amplitude to around -4.0 dB to limit amplitude to around +/- 0.5.
  • Make sure that the "Normalize stereo channels independently" checkbox is unchecked.
  • Click OK.
  • The result may be slightly louder or quieter than Loudness Normalization... would do.
  • If the music is still "too loud" then we're not done yet!

Solution #3: Tertiary solution...

If neither solution presented thus far produced a satisfactory result, we do this.
Our result could be acceptable and as expected for a Factorio track. But if not...

  • If we want to make the quiet parts louder and the loud parts quieter, we'll need to use the compressor to crush the dynamic range!
  • Go to Effect -> Compressor...
    Fiddle around with the settings a while. The following may work...
    • Threshold: -22 dB
    • Noise Floor: -40 dB
    • Ratio: 2:1
    • Attack Time: 0.20 secs
    • Release Time: 1.0 secs
    • Enable "Make-up gain for 0 dB after compressing"
    • Disable "Compress based on Peaks"
    • Hit OK.
      Other settings may work better...
      Alas, I'm no compression expert... I'd usually avoid crushing highly dynamic music.
      Perhaps if someone taught me about compression... I could teach others.
      Well, teach me, sensei.
  • After performing compression, we must again perform loudness normalization, as in Solution #1.
    This will then help bring the music closer to the Factorio-level track loudness.

Wicked solutions...

  • In addition to performing a loudness normalization, we may need to apply a fade-in to the beginning of the music.
    It might simply be a loud introduction that we wish to suppress to some extent... But avoid overdoing it.

  • If we have a music that escalates and becomes far louder towards the end...

    • A solution is to add some silence to the end of the music before applying a fade-out
    • Afterwards, we can remove the silence that we added;
    • You may get better control over the fade out in other software... Audacity isn't so great.
  • Keep in mind that crushing the dynamic range and altering the dynamics is to stray from the "original music".

  • Something, a bit more sophisticated than Audacity, is recommended for better loudness normalization.
  • Even GoldWave will give you MUCH better amplitude control and expression evaluation.

If none of my suggested solutions works for you, then I cannot help you any further. Better ask some audio pro. :-)
And as I'm no grandmaster sensei, I'm happy to correct this process with corrections from a real grandmaster.


Frequency, The Hertz!

What's this?
Normally, music stored digitally is stored at a fixed number of sample points per second, this is the frequency, in Hz.

What happens if your music plays at the wrong frequency? The game and/or your system is going to have to resample it!
If that didn't happen, you'd either be listening to the chipmunks or slo-mo punks, or perhaps, just distorted noise.

So, what do we do? We apply the best resampling algo we can find of course, or use any that our audio editor gives us.
It's going to sound marginally better than whatever fast solution that the audio middleware of a game will use, right?

Well, let's just make sure, before we even hear it in-game!

In Audacity, changing the sample rate is very easy. * See the bottom of the window? Bottom left corner. * Project Rate (Hz) - Make this 44100. That's the standard sample rate used in Factorio.

Now, granted, of course, your system is likely going to resample any audio, but at least this should reduce internal mixer noise.

There's room left for audio improvement in games these days, and Factorio is no exception, right?

It's time to export your music from Audacity, now that it's sampled at an appropriate loudness and sample rate!

  1. Go to File -> Export -> Export as OGG.
    This will open the sound file export window.
  2. Select a location where you want to save the track.
    Navigate to your mod folder or paste the path into the filename field in Audacity and hit enter.
  3. Save to an appropriate location in our ajunct's music folder, i.e. mod-name/music/album/track-name.ogg
    • Pay attention to the name that you save the music as!
    • It must precisely match the name that you specified in adjunct.lua
  4. Give it a quality setting of 7 or 8.
    This will put it in line with the Factorio quality, and keeps music files sizes small.
    There is no point in going higher, and going lower can cause us to suffer instead.
  5. Hit the save button.
    • This will bring up the next window in which we may edit Metadata Tags.
    • Hit "Clear" or press E to clear the tags - and eliminate extra garbage.
    • We should add our own tag to indicate that this track is game-ready.
      1. Highlight the field below Comments and enter COMMENT
      2. Highlight the field beside it and enter Loudness Normalized
      3. We've now created our own metadata tag to indicate that the track is indeed ready.
  6. Finally, hit OK.
    The exported .ogg file should now be ready for playback in Factorio, at the standard 44.1 kHz.

Localization File: adjunct.cfg

Finally, we've got to deal with localization.
Without this, we won't know what a track is named and we won't get a description of the track either!

So, we've got to deal with this pesky little detail so that humans can more easily decide for themselves whether our track sucks or not.
This helps your intrepid connoisseurs (users) find that pesky track that they hate and detest so much :)

In here we'll have what's known as ini sections. They start and end with square brackets [ ].

Below each section we've got keys and values, separated by an equals = sign.

  • The key name goes to the left and the value goes to the right of the sign.
  • Factorio has a rather picky ini-loader compared to other games/libraries.
  • We're NOT allowed to have ANY spaces around the equals = sign!
  • We're interested in four sections at most, usually three if we don't care about remarks.
    As you know by now, we can have remarks, like, for example, that the track is a remix, or a remaster.
    Remarks shall be kept as short as possible, preferably no more than three words or so. Less is better, as they appear directly beside the title.
    These are the relevant ini sections:
  • The albums of our adjunct will go under the section named [mod-name-albums]
  • Track names of Album No. 1 goes under the section named [mod-name-album-01-names]
  • Track names of Album No. 2 goes under the section named [mod-name-album-02-names]
  • Track remarks of Album No. 1 goes under the section named [mod-name-album-01-remarks]
  • Track remarks of Album No. 2 goes under the section named [mod-name-album-02-remarks]
  • Track descriptions of Album No. 1 goes under the section named [mod-name-album-01-descriptions]
  • Track descriptions of Album No. 2 goes under the section named [mod-name-album-02-descriptions]
  • Track information for additional albums follow the same patterns as above, up to Album No. 99.

Note: Replace mod-name with your mod-name, as usual.

Alright, so we've got keys & values, what they heck are they? What's the meaning of this!?

What do we name keys for albums ?

  • Album key/values go under the [mod-name-albums] section by these rules:

  • The key is named album-NN where NN is zero-padded and equal to your track's album-index

    • Example 1: album-01=Metal Gear Solid labels Album No. 1 as Metal Gear Solid
    • Example 2: album-02=Klonoa labels Album No. 2 as Klonoa

What do we name keys when they're for track names, remarks, and comments ?

  • Tracks fall under a sections associated with its album, so first we look at the album-index.
  • Example 1: Section [mod-name-album-01-names] names tracks for Album No. 1
    • track-01=Discovery names Track 1 of Album 1 as "Discovery"
    • track-02=Enclosure names Track 2 of Album 1 as "Enclosure"
  • Example 2: Section [mod-name-album-02-names] names tracks for Album No. 2
    • track-01=Whatevers names Track 1 of Album 2 as "Whatevers"
  • Example 3: [mod-name-album-01-remarks] to define track remarks for Album No. 1
    Note: There's no need to specify a remark for a track that doesn't have remark = true.
    • track-01=Ripped remarks that Track 1 of Album 1 is "Ripped".
  • Example 4: [mod-name-album-01-descriptions] to define track descriptions for Album No. 1
    • track-01=Comment me! holds the comment for Track 1 of Album 1 that say "Comment me!"
    • track-02=Comment? holds the comment for Track 2 of Album 1 that say "Comment?"

Here's a complete locale file for the above examples put together and extended a little bit:

[mod-name-albums]
album-01=Metal Gear Solid
album-02=Klonoa

[mod-name-album-01-names]
track-01=Discovery
track-02=Enclosure

[mod-name-album-01-remarks]
track-01=Ripped

[mod-name-album-01-descriptions]
track-01=Comment me!
track-02=Comment?

[mod-name-album-02-names]
track-01=Whatevers

[mod-name-album-02-remarks]
track-01=unknown track

[mod-name-album-02-descriptions]
track-01=This track features throat singing with special sound effects backed by a rich eeire atmospheric soundscape.

And with that, you should now have a clear picture for how localization is structured.


And that, folks, wraps up this guide!

Good luck with your modding, and hopefully we'll all get to enjoy some great music! Who knows?

I've sacrificed a nice chunk of playtime writing this guide so hopefully this guide was helpful.

Disclaimer: I'm not a bloody novelist! I'm a software developer for fart's sake!


Signing off,

PcNm.