Starbound

Starbound

JukeCrate (tm)
 Toto téma bylo přilepeno, takže je nejspíš důležité
Soblow  [vývojář] 24. čvc. 2018 v 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
Naposledy upravil Soblow; 24. čvc. 2018 v 4.37
< >
Zobrazuje se 13 z 3 komentářů
Soblow  [vývojář] 24. čvc. 2018 v 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)" } ] }
===
Naposledy upravil Soblow; 24. čvc. 2018 v 4.36
Freon 26. čvn. 2020 v 10.34 
"Folder name cannot contain any of the following characters: / \ * etc. AKA no special characters
Soblow  [vývojář] 26. čvn. 2020 v 10.51 
... yeah ?
Well, that's a common rule, not specific to this Mod ?
Why did you send this ?
< >
Zobrazuje se 13 z 3 komentářů
Na stránku: 1530 50