Morgume Posted March 7, 2021 Share Posted March 7, 2021 Is it too much work to make a mod to change the stack size of one item? I want to make gunpowder stack only to 20 but I have minimum modding experience Link to comment Share on other sites More sharing options...
Combustiblemon Posted March 8, 2021 Share Posted March 8, 2021 local function stacksizesmall(inst) if inst.components.stackable then inst.components.stackable.maxsize = 20 --set max size to 20 end end AddPrefabPostInit("gunpowder", stacksizesmall) --before world initialize, "stacksizesmall" is added to gunpowder Add this to your modmain.lua. Link to comment Share on other sites More sharing options...
Morgume Posted March 9, 2021 Author Share Posted March 9, 2021 12 hours ago, Combustiblemon said: local function stacksizesmall(inst) if inst.components.stackable then inst.components.stackable.maxsize = 20 --set max size to 20 end end AddPrefabPostInit("gunpowder", stacksizesmall) --before world initialize, "stacksizesmall" is added to gunpowder Add this to your modmain.lua. Oh nice, that works fine. Thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now