Modding:MusicConfig Property Type: Difference between revisions

From Vintage Story Wiki
mNo edit summary
mNo edit summary
 
Line 10: Line 10:


=== Property Reference ===
=== Property Reference ===
{| class="wikitable sortable mw-collapsible mw-collapsed"
{| class="wikitable sortable mw-collapsible"
!Property ID
!Property ID
!Type
!Type

Latest revision as of 23:05, 25 April 2024

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 ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity 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