Starbound

Starbound

JukeCrate (tm)
 Denne tråd er blevet fastgjort, så den er sikkert vigtig
Soblow  [udvikler] 24. juli 2018 kl. 4:25
HOW TO : COMPATIBILITY OF YOUR MOD
This topic will quickly explain how to "edit" your mod to make it compatible with JukeCrate

Keep in mind that you don't have to change your mod content, simply add the two files I'll describe later to your mod. Note that even if JukeCrate isn't available, your mod won't crash

First of all, create, at the root of your mod, two folders : "/datafiles" and "/datafiles/jukecrate"

Then, create "/datafiles/jukecrate/index.json" and add this to your file :
===
[ { "op" : "add", "path" : "/modPresent/-", "value" : "YOURMODNAME" }, { "op" : "add", "path" : "/filesToLoad/-", "value" : "/datafiles/jukecrate/DIRECTORY.json" } ]
```
===
Don't forget to replace :
- YOURMODNAME with the name of your mod
- DIRECTORY with the name of your directory. The directory is the name of the "category" which will be displayed in the list, and in which you will place your musics

The, create "/datafiles/jukecrate/DIRECTORY.json" where DIRECTORY is the name you gave earlier, and add this to your file :
===
{ "folderName" : "DIRECTORY", "files" : [ { "name" : "/PATH/TO/MUSIC.ogg", "duration" : 0, "plainName" : "MUSICNAME" } ] }
===
Don't forget to replace :
- DIRECTORY : The name which will be displayed on the list. (Not necessarily the same as the filename)
- /PATH/TO/MUSIC.ogg : The path to your music (relative to starbound root)
- MUSICNAME : The real name of your music (as it will be displayed in the music list)

Adding duration is optional, but not giving this information will be problematic when random playlists will be added. It should be in seconds (ex : a 2min34s music should have a duration of 2*60+34 = 154)

To add multiple musics
You can duplicate the block above, following the rules I gave above
===
{ "name" : "/PATH/TO/MUSIC.ogg", "duration" : 0, "plainName" : "MUSICNAME" }
===
Don't forget to add a comma at the end of all blocks except the last one
Sidst redigeret af Soblow; 24. juli 2018 kl. 4:37
< >
Viser 1-3 af 3 kommentarer
Soblow  [udvikler] 24. juli 2018 kl. 4:32 
Example of directory file :

===
{ "folderName" : "Base Cinematics", "files" : [ { "name" : "/sfx/cinematics/finale/finale_music.ogg", "duration" : 54, "plainName" : "Finale" }, { "name" : "/sfx/cinematics/finale/finale_music1.ogg", "duration" : 46, "plainName" : "Finale (version 1)" } ] }
===
Sidst redigeret af Soblow; 24. juli 2018 kl. 4:36
Freon 26. juni 2020 kl. 10:34 
"Folder name cannot contain any of the following characters: / \ * etc. AKA no special characters
Soblow  [udvikler] 26. juni 2020 kl. 10:51 
... yeah ?
Well, that's a common rule, not specific to this Mod ?
Why did you send this ?
< >
Viser 1-3 af 3 kommentarer
Per side: 1530 50