Starbound

Starbound

More Tillable Blocks: Dirts and Sands
lophatkao 11 Sep, 2016 @ 11:04pm
Gardenbot2 patch
note this wont do anything at moment, but will work after next gb update

i recommend a seperate compatibility patch, as you need to modify mod priority

location (example)
/Starbound/mods/<patch mod name>/gardenbot2.config.patch
note lowercase G


{ "op":"add", "path":"/tillableList/-", "value":"sand2" }, // watch your commas o.o
{ "op":"add", "path":"/tillableList/-", "value":"another_material" }


after you create your _metadata file, open it and add lines:

"priority" : 4
"includes" : ["GardenBot2"]

to make sure it loads after gardenbot, so the patch has a file to actually patch
gardenbot loads after most other mods so its patch files can do their patches

you could modify priority of main mod and just have patch included with it.. i dont forsee your material patches conflicting with anything...
but as a seperate patch mod, i could add it to my gardenbot + patches collection

i freaking hate steams formatting - it sucks -.-
wont let me use [ code ] tags properly
Last edited by lophatkao; 11 Sep, 2016 @ 11:11pm
< >
Showing 1-4 of 4 comments
Azure Fang  [developer] 12 Sep, 2016 @ 3:01am 
I swap out [ for ( in the codeblock and annotate it when posting on Steam for that reason :P

Thanks. I know how to patch JSON, and I figured I'd unpack GB2 after the update to look directly at the new implementation, but this helps. I don't think the priority will be necessary as SB seems to properly auto-prioritize patches after assets, but I'll experiment as necessary.

And thanks again for the upcoming change!
lophatkao 12 Sep, 2016 @ 7:01am 
no the priority is necessary, just having the includes/requires would change gardenbot's priority (silly loader)

also why the ore patch for FU never worked :/

sorry about post tone, ive had to lower my expectations of what people know how to do since release - trying to get some people to even find their starbound.log is ... difficult ;)
i see starbound isnt your first modding rodeo... so i'll try not to make same mistake hehe
lophatkao 12 Sep, 2016 @ 7:10am 
changes: (yes this is all of it ;) )
in botspawner.lua - OnInteraction()

parameters.tillableList = root.assetJson("/gardenbot2.config:tillableList")

in tillState.lua - findPosition()

local isTillable = function(mname)
if type(mname) ~= "string" then return end
self.tillables = self.tillables or config.getParameter("tillableList",{})
for _,k in ipairs(self.tillables) do
if k == mname then return true end
end
return (string.find(mname,"dirt") or mname == "mud" or mname == "clay")
end


edit: doh just figured out this only affects newly spawned bots, not relocated ones... oh well
edit2: hrm actually i think i may redo when it loads list - as is, the tillable list would be forever locked to whatever is set when they are first spawned
Last edited by lophatkao; 12 Sep, 2016 @ 7:15am
Azure Fang  [developer] 12 Sep, 2016 @ 7:29am 
Originally posted by lophatkao:
no the priority is necessary, just having the includes/requires would change gardenbot's priority (silly loader)

also why the ore patch for FU never worked :/

sorry about post tone, ive had to lower my expectations of what people know how to do since release - trying to get some people to even find their starbound.log is ... difficult ;)
i see starbound isnt your first modding rodeo... so i'll try not to make same mistake hehe
I understand (post tone). You weren't being condesending(sp?) and were trying to help, which I can fully respect. And with the number of modders I have helped (read as: written their code) at this point, I understand the feeling.

I understand (priority). I'll have to look into that. I use a small, unreleased, personal patch set that I've never had to set a priority for, so I assumed it was logically prioritizing. Setting an arbitrarily high (2 to the 10th high enough? :squirtyay:) should be effective and prevent theoretical third-party patch conflict, correct?



Originally posted by lophatkao:
changes: (yes this is all of it ;) )
in botspawner.lua - OnInteraction()

parameters.tillableList = root.assetJson("/gardenbot2.config:tillableList")

in tillState.lua - findPosition()

local isTillable = function(mname)
if type(mname) ~= "string" then return end
self.tillables = self.tillables or config.getParameter("tillableList",{})
for _,k in ipairs(self.tillables) do
if k == mname then return true end
end
return (string.find(mname,"dirt") or mname == "mud" or mname == "clay")
end


edit: doh just figured out this only affects newly spawned bots, not relocated ones... oh well
edit2: hrm actually i think i may redo when it loads list - as is, the tillable list would be forever locked to whatever is set when they are first spawned
I don't understand Lua... but I understood this... What is this game doing to me?!
< >
Showing 1-4 of 4 comments
Per page: 1530 50