/Audica-SongDataLoader

A utility that allows mods to read default and custom song data

Primary LanguageC#MIT LicenseMIT

Song Data Loader

A utility that allows mods to read default and custom song data from song.desc

Download

Song Data Loader Download

Legacy version for MelonLoader 0.2.7.X

Mods That use Song Data Loader

(Missing a mod? Contact CB#1997 on Discord)

Using Song Data Loader in your mod

  • Grab this dll
  • Add it as a refrence in your project
  • Include the dll with your mod download (or ask them to download it from here)

Need help? Contact CB#1997 on Discord

"Documentation"

public class SongDataLoader

Properties:

  • public static Dictionary<string, SongData> AllSongData Contains all the song data for all loaded songs. Dictionary string is the song ID. Returns a SongData class (documented) below

Methods:

  • public static void ReloadSongData() Reloads the song data for all songs

public class SongData

Properties:

[insert every default audica song.desc variable]

Methods:

  • public bool SongHasCustomData() Returns true if there is any custom song data present for a specified SongData, otherwise false

  • public bool SongHasCustomDataKey(string key) Returns true if a specified SongData has custom data for a specified key

  • public T GetCustomData<T>(string key) generic function that gets data for a specific SongData that corresponds to a given key

  • public static bool IsDataLoaded() returns true if data loading has finished

Usage Examples

//return if the song doesnt have custom data
if (!SongDataLoader.AllSongData[song.songID].HasCustomData())
  break;

//if the song has data for the key "customExpert"
if (SongDataLoader.AllSongData[song.songID].SongHasCustomDataKey("customExpert"))
{

}

//get a default data value. tempo in this case
SongDataLoader.AllSongData[song.songID].tempo