Need help with scripting. I made an armor with a backpack that i Injected a buff to. I want the buff to increase the backpack size of the hearthling wearing it. So far I have this:
backpack_buff.json
{
"type": "buff",
"axis": "buff",
"display_name": "i18n(random_additions:data.buffs.backpack.backpack_buff.display_name)",
"description": "i18n(random_additions:data.buffs.backpack.backpack_buff.description)",
"icon": "file(backpack_buff.png)",
"modifiers": {
"speed": {
"add": 25
}
},
"script": "file(backpack_buff.lua)",
"backpack_size_increase": "12"
}
backpack_buff.lua
[code]local backpack_buff = class()
function backpack_buff:increase_backpack_size(args)
local sc = self._sv._entity:get_component(‘stonehearth:storage’)
sc:change_max_capacity(args.backpack_size_increase)
end
return backpack_buff[/code]
I know something is wrong somewhere, but I have no clue where. Any help will be appreciated.