As the title says, I want to give a specific item a new maximum stack size in a mod. While this is joyfully (or maybe ridiculously) simple to do in Don't Starve:
modmain.lua:
local function changestackA(inst)
inst.components.stackable.maxsize = 12
end
local function changestackB(inst)
inst.components.stackable.maxsize = 53
end
AddPrefabPostInit("poop",changestackA) --manure now stacks up to 12
AddPrefabPostInit("cutgrass",changestackB) --cut grass now stacks up to 53
...I can't manage to do the same in Don't Starve Together. Whatever I thought to attempt only caused an error related to stackable_replica.lua or just had no discernible effect. I tried to look into it and it appears that in DST item stack sizes may be based on predefined amounts in a local table in stackable_replica.lua. I'm quite stumped, as I'm not sure how to go about dealing with that, or if netcode is related to my problems...
Does anyone know how to accomplish this?
Thanks for any help.