-
Notifications
You must be signed in to change notification settings - Fork 12
Custom data in info.dat
Artemis Kearney edited this page Jun 4, 2019
·
2 revisions
Custom data can also be placed on entire levels (songs) and on individual difficulties. For example:
// ...
"_songFilename":"song.ogg",
"_coverImageFilename":"cover.png",
"_environmentName":"DefaultEnvironment",
"_customData":{
"_contributors":[
{
"_role":"Kirb",
"_name":"Kyle 1413",
"_iconPath":"derp.png"
},
{
"_role":"Lighter",
"_name":"Kyle 1413 The Second",
"_iconPath":"test.png"
}
],
"_customEnvironment":"",
"_customEnvironmentHash":""
},
"_difficultyBeatmapSets":[
{
"_beatmapCharacteristicName":"Standard",
"_difficultyBeatmaps":[
{
"_difficulty":"Easy",
"_difficultyRank":1,
"_beatmapFilename":"Easy.dat",
"_noteJumpMovementSpeed":0.0,
"_noteJumpStartBeatOffset":0,
"_customData":{
"_difficultyLabel":"",
"_colorLeft":{
"r":0.013660844415416155,
"g":0,
"b":0.07069587707519531
},
"_colorRight":{
"r":0.0014191981941151946,
"g":0.14107830811467803,
"b":0.07064014358987808
}
}
// ...
This data can be accessed by casting a BeatmapData to CustomJSONData.CustomBeatmap.CustomBeatmapData. The first "_customData" section (the one for the whole level) is provided as levelCustomData, and the second (the one for the Easy difficulty) is provided as beatmapCustomData.
The per-level custom data section is also available from a StandardLevelInfoSaveData by casting to CustomJSONData.CustomLevelInfo.CustomLevelInfoSaveData and accessing the customData property, or from an IPreviewBeatmapLevel using the extension method CustomJSONData.Extensions.getLevelCustomData.