Starbound

Starbound

Zekrom's Kazdra Fixes and Recipes! KAZDRA IN SPACE!
zekrom_vale  [developer] 31 Mar, 2018 @ 6:26am
Moding tips/hints
Things that may help moding! Or warnings on what not to do.
< >
Showing 1-5 of 5 comments
zekrom_vale  [developer] 31 Mar, 2018 @ 6:53am 
Starbound JSON .patch files can be segmented [[patch],[patch]]

Input
{ "n":"c" }
Patch
[[ { "op": "test", "path": "/n"}, {"op":"replace","path":"/n","value": "a"} ],[ { "op": "test", "path": "/m"}, {"op":"replace","path":"/m","value": "b"} ]]
Output
{ "n":"a" }


If else statment
[[ { "op": "test", "path": "/n"}, {"op":"replace","path":"/n","value": "a"} ],[ { "op": "test", "path": "/n", "inverse": true }, { "op": "test", "path": "/m"}, {"op":"replace","path":"/m","value": "b"} ],[ { "op": "test", "path": "/n", "inverse": true }, { "op": "test", "path": "/m", "inverse": true}, { "op": "test", "path": "/q"}, {"op":"replace","path":"/m","value": "b"} ]]

And
[ { "op": "test", "path": "/n"}, { "op": "test", "path": "/m"}, { "op": "test", "path": "/q"}, {"op":"replace","path":"/n","value": "a"} ]

Xor
[[ { "op": "test", "path": "/n"}, { "op": "test", "path": "/m", "inverse": true}, {"op":"replace","path":"/n","value": "a"} ],[ { "op": "test", "path": "/n", "inverse": true}, { "op": "test", "path": "/m"}, {"op":"replace","path":"/n","value": "a"} ]]

Or //"inverse":true allows it to only run once
[[ { "op": "test", "path": "/n"}, { "op": "test", "path": "/m", "inverse": true}, {"op":"replace","path":"/n","value": "a"} ],[ { "op": "test", "path": "/n", "inverse": true}, { "op": "test", "path": "/m"}, {"op":"replace","path":"/n","value": "a"} ],[ { "op": "test", "path": "/n"}, { "op": "test", "path": "/m"}, {"op":"replace","path":"/n","value": "a"} ]]
Last edited by zekrom_vale; 9 Apr, 2018 @ 12:20pm
zekrom_vale  [developer] 31 Mar, 2018 @ 6:54am 
Do not use google drive sync if you care about filling your trash with junk! Every removed file goes into the trash!
zekrom_vale  [developer] 31 Mar, 2018 @ 6:26pm 
%ProgramFiles(x86)%\Steam\steamapps\common\Starbound\win32\sbinit.config and %ProgramFiles(x86)%\Steam\steamapps\common\Starbound\win64\sbinit.config contains the "assetDirectories" settings so I created a folder called mymods in the Starbound folder (Not mods as it tries to double load mods) and create a folder for my github root folder and another for starbound and add it to the assetDirectories. For example it could look like this...
"assetDirectories" : [ "..\\assets\\", "..\\mods\\", "..\\mymods\\DraconisShipForKazdra\\", "..\\mymods\\KazdraDungeonPatch\\", "..\\mymods\\ZekromsKazdraRecipes\\", "..\\mymods\\yourmodname\\" ]

Note: if you want to keep old unused code in the file it must not be in the last folder (ex "..\\mymods\\yourmodname") to fix this you can put it in mymods or add another folder.

So it now looks like:
"assetDirectories" : [ "..\\assets\\", "..\\mods\\", "..\\mymods\\DraconisShipForKazdra\\raconisShipForKazdra\\", "..\\mymods\\KazdraDungeonPatch\\KazdraDungeonPatch\\", "..\\mymods\\ZekromsKazdraRecipes\\ZekromsKazdraRecipes\\", "..\\mymods\\yourmodname\\yourmodname\\" ]
Last edited by zekrom_vale; 9 Apr, 2018 @ 5:57am
zekrom_vale  [developer] 9 Apr, 2018 @ 5:18am 
JSON patch "and" will replace the current value if it exists.
zekrom_vale  [developer] 9 Apr, 2018 @ 5:23am 
JSON patch "add" needs to have the parent element to exist. The folowing code will not work!
{ "a":{} }
[{ "op":"add", "path":"/a/b/c", "value":false }]
But this will!
[{ "op":"add", "path":"/a/b", "value":{"c":false} }]
Last edited by zekrom_vale; 9 Apr, 2018 @ 5:26am
< >
Showing 1-5 of 5 comments
Per page: 1530 50