Starbound

Starbound

JukeCrate (tm)
 此主题已被置顶,因此可能具有重要性
Soblow  [开发者] 2018 年 7 月 24 日 上午 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
最后由 Soblow 编辑于; 2018 年 7 月 24 日 上午 4:37
< >
正在显示第 1 - 3 条,共 3 条留言
Soblow  [开发者] 2018 年 7 月 24 日 上午 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)" } ] }
===
最后由 Soblow 编辑于; 2018 年 7 月 24 日 上午 4:36
Freon 2020 年 6 月 26 日 上午 10:34 
"Folder name cannot contain any of the following characters: / \ * etc. AKA no special characters
Soblow  [开发者] 2020 年 6 月 26 日 上午 10:51 
... yeah ?
Well, that's a common rule, not specific to this Mod ?
Why did you send this ?
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50