Buffs and Modifiers

Hello everyone! Kuroneko here with yet another question regarding to modding. I’ve grasped a lot of things about modding already by fooling around with my test mod and by asking questions here. You all have been a great help to me.

Moving on, I’m trying to modify the storage size for the backpack. I made an outfit with a backpack that I want certain hearthlings set to be only haulers to use. I’m trying to add it by using a buff. The problem is that I can’t find any documentation regarding what can be modified.

I found this in base_human.json but don’t know how to modify it using an armor/buff.

"stonehearth:storage": { "type": "backpack", "public": false, "capacity": 4 },

Any help?

Try to find the Trappers character manifest ( it has a backpack upgrade on lvl 4 or 5 and this code should show you how to code it onto an item.

Hmmm seems like it’s done with lua. Something else I have to learn then hahaha

Increase Size:

function TrapperClass:increase_backpack_size(args)
   local sc = self._sv._entity:get_component('stonehearth:storage')
   sc:change_max_capacity(args.backpack_size_increase)
end

Decrease Size:

function TrapperClass:decrease_backpack_size(args)
   local sc = self._sv._entity:get_component('stonehearth:storage')
   sc:change_max_capacity(args.backpack_size_increase * -1)
end

Sure doesn’t look easy :stuck_out_tongue: