This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Song Configuration
muffichii edited this page Feb 17, 2022
·
1 revision
Here, we'll go in the coding part of the mod.
The song_conf file is used to specify which scripts will be used whenever a song is selected from your mod.
You can specify scripts (modcharts), cutscenes and end cutscenes. However, the last two ones are only started when PlayState_.isStoryMode
is equal to true.
Original Code
{
"songs": [
{
"name": "Your song",
"end_cutscene": "cutscenes/your-end-cutscene",
"cutscene": "cutscenes/your-cutscene",
"difficulties": null,
"scripts": [
"modcharts/script1"
]
}
]
}
- Name of the song (WARNING: The song's file name, not the display name)
- Song End Cutscene. The script at the specified path will execute at the end of the song in Story Mode. Call
end()
to end the cutscene and switch to the next song. - Song Cutscene. The script at the specified path will execute before the song starts, as a cutscene. Call
startCountdown()
at the end to end the cutscene. - Array of song difficulties. If not equal to null, will be the same as the parent "songs" array except the song names are replaced by the difficulty name.
- Array of scripts (modcharts) that'll be run during the song. For example, if "modcharts/script1" is specified, the game will look for a
Mod Folder/modcharts/script1.hx
orMod Folder/modcharts/script1.lua
file. You can also specify file extensions, but it ain't necessary.
This one is simpler to understand for hx programmers, in case you find the JSON system boring.
Available variables:
-
song:String
: The song name in lowercase. -
difficulty:String
: The difficulty name. -
scripts:Array<String> = []
: The array of returned scripts paths -
cutscene:String
: Cutscene script path -
end_cutscene:String
: Ending cutscene path
Example Script:
switch(song) {
case "bopeebo":
scripts = ["stages/default_stage"];
cutscene = "cutscenes/bopeebo_cutscene";
end_cutscene = "cutscenes/bopeebo_end_cutscene";
}