Sign in to follow this  
SpaceStalin

Logs Max Stack to 40 - MiniMod

Recommended Posts

Love this mod so much, I want to make larger stacks of everything else now. What's curious is that when I open some files, like rope.lua, the section that should specify it's stacking characteristics are empty, so they must be specified elsewhere. It just says: inst:AddComponent("stackable")...and then nothing. But for cutstone.lua, I was able to change the stack size from "LARGEITEM" to "SMALLITEM" so like your log stack mod, it's: inst:AddComponent("stackable") inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM Hrm. This will take further experimenting.

Share this post


Link to post
Share on other sites
w00tyd00d    197

By default the component "stackable" is set to stack_size_normal, which is 20. So anything that has a stack size of 20 doesn't need to have the value changed. However, anything that's larger or smaller must have their default value changed accordingly. You would get the same result if you put:inst.components.stackable.maxsize = TUNING.STACK_SIZE_NORMALITEMunderneath the AddComponent line as you would if you put nothing at all.

Share this post


Link to post
Share on other sites
WrathOf    40

[MENTION=10338]wrongenvelope[/MENTION]All the devs did was shortcut having to set the maxsize every time. Only items with atypical stack size have their maxsize set to something different. You can add the maxsize statement to change it to what you want.The code is consistant so....inst.components.stackable.maxsize = nnshould work for all items you want to tweak where nn is a number or one of the settings from the tuning file

Share this post


Link to post
Share on other sites
w00tyd00d    197

Yeah, exactly what [MENTION=10271]WrathOf[/MENTION] said, but just remember to try and keep the tuning.lua the way it is when you downloaded it. It's meant to be a universal script that all others can refer back to to see like 90% of all the values in the game (few exceptions.)

Share this post


Link to post
Share on other sites
iluvfuzz    10

Using your mod I was able to learn a little bit about modding myself. I opened up the log.lua untouched and compared it to your file. I then looked at the tuning file. I was able to make a new stacking value of 60 and then use that for the log.lua I edited. I tried it out in game and was able to get 60 logs stacked together. I know nothing of coding so I was like well something simple like this is easy. I went ahead and replaced the edited files with the backups I made. Sixty stackable logs is a bit much. Anyways thanks for making your mod!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this