Modding:MusicConfig Property Type

From Vintage Story Wiki
This page contains changes which are not marked for translation.

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
Icon Sign.png

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 ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository