-
Notifications
You must be signed in to change notification settings - Fork 9
Configuration reference
This reference contains all supported values, naming schemes and more.
Following naming rules apply to your music files. The mod will analyze the file name and look for specific hashtags at the end of the file name. The hashtag then decides which type of content the file is.
| Hashtag | Function | Example |
|---|---|---|
| No hashtag | Will count as music
|
foobar.ogg, foobar#thishashtagisnotknownsoitsignored.ogg
|
| #blurb | Will count as blurb, a short commercial. |
foobar#blurb.ogg |
| #broadcast | Will count as broadcast, an emergency broadcast etc. |
foobar#onlythelasthastagcounts#talk#broadcast.ogg |
| #commercial | Will count as commercial, a long commercial. |
foobar#commercial.ogg |
| #talk | Will count as talk, some program with talking. |
foobar#talk.ogg |
Following settings are supported by the radio station configuration file (the *.json file):
| Setting | Function | Example |
|---|---|---|
| name | The name of the station | "name" : "Mergim's Trash-Channel" |
| thumbnail | The icon of the station. The icon should be in the same folder as the JSON. The size must be 64x64 pixels. If left out, a default icon is used. | "thumbnail" : "mergim-channel-thumbnail.png" |
| collections | A list of collections used in this station. More info below. | "collections" : ["Songs", "Ads", "Klausi Party Songs"] |
| schedule | See below | See wiki entry |
| contexts | See below | See wiki entry |
| filters | See below | See wiki entry |
Collections are folders that are in the CSLMusicMod_Music directory that contain songs. CSLMusicMod will not automatically add content from collections into any station (except CSLMusic Mix) - you have to define from which collections your station will get the content from.
Collections are loaded globally. All channels have access to collections in CSLMusicMod_Music, music packs and vanilla game. To find the names of all collections, run the game once and search for [CSLMusic] Available collections in the log file. This will list you all collection names.
schedule sets the schedule of your station and is a list of maps. It will look like this: "schedule" : [ { ... }, { ... }, ... ].
Entry settings:
| Setting | Function | Example |
|---|---|---|
| type | Content-type that should play. Can be blurb, broadcast, commercial, music or talk. See naming rules for more explanation. | "type" : "music" |
| min | The minimum amount of how many time the content plays. | "min" : 1 |
| max | The maximum amount of how many time the content plays. | "max" : 5 |
contexts defines which collections should play when conditions apply. As with schedule this setting is a list of maps. CSL Music Mod will check the conditions from top to bottom and enforce the collection if one applies.
Conditions that will be checked to determine if a context applies can be either defined within the conditions setting or externally defined and named in the filter setting.
Entry settings:
| Setting | Function | Example |
|---|---|---|
| collections | The collections that should play if the conditions apply. | "collections" : ["SimCity Day", "Ads Day"] |
| conditions | The conditions that are required to force the list of collections.See the documentation for more information and a reference of supported conditions. |
"conditions" : [[ { "type" : "time", "from" : 6, "to" : 20 } ]] or if the condition is defined within filters as day "conditions" : [[ "day" ]]
|
Note: If you add a collection into a context entry, but it's not present in the main collections setting, it will be added to the main one automatically.
Content is internally identified by its collection and the filename, but it is possible to overwrite content. It depends on where the content is placed in the internal load order to know which one will be kept.
The load order is:
- Vanilla content
- Modpack content
- Userdefined content (folder in game directory)
All entries after some entry can overwrite content of it.
Same behavior as with content.
Collections are joined together. You can for example use this to split your station pack into multiple mods that contain different genres/ads/etc. Just put the same collection directories and the same station definitions into the mod. The list of music files will be concatenated.
If you add a missing collection (not existing) into the collections setting, it will be ignored.
If you define contexts that don't cover all cases (e.g. you only define one for the day), all music will play if none of the conditions apply (e.g. when it's night then).