Modding:MusicConfig Property Type
From Vintage Story Wiki
Usage
The MusicConfig property type is a content-type used to add new music tracks to Vintage Story. Any number of mods can add new tracks, however the properties element will only load from one mod. Because of this, it is not recommended to add the properties element to your mod.
MusicConfig files must be created as "music/musicconfig.json" in a mod's domain folder for them to be loaded.
The script for MusicConfig is currently not available on GitHub.
Property Reference
Property ID | Type | Description |
---|---|---|
Properties | MusicConfigProperties | Defines some properties for controlling the music engine. It is recommended to not include this in a mod. |
Tracks | Array (SurfaceMusicTrack or CaveMusicTrack ) | A list of music track properties, one entry per track. |
Example
survival/music/musicconfig.json |
---|
{
"properties": {
"mindelay": 4,
"maxdelay": 8
},
"tracks": [
{
"$type": "Vintagestory.API.Client.SurfaceMusicTrack, VintagestoryAPI",
"file": "night-to-day",
"name": "Night To Day",
"onPlayList": "survival|creative",
"minhour": 3,
"maxhour": 5
},
{
"$type": "Vintagestory.API.Client.SurfaceMusicTrack, VintagestoryAPI",
"file": "setting-sun",
"name": "The Setting Sun",
"onPlayList": "survival|creative",
"minhour": 3.25,
"maxhour": 5.25
},
...
]
}
|
JSON Properties - Audio | |
---|---|
Content Types | MusicConfig • SoundConfig |
Sub-Types | Empty |
Enum Types | Empty |
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |