Page 1 of 1

Question about changing inventory size...

PostPosted: Fri May 24, 2013 00:51
by cypher-neo
Who decided that blocks should stack in groups not exceeding 99? Is there a global configuration for this that I can change to a much higher number? I really want stacks approaching 1000, or even 10000 if it's possible!
How do you change the size of a stack?

And is there any reason that picks, axes, swords, and shovels can't be stacked?

PostPosted: Fri May 24, 2013 01:27
by cypher-neo
Never mind... (embarrassed grin)... I figured it out.

Just so that others can do it too, I'll explain what I discovered.

In the minetest /builtin folder, there is a file called item.lua. I'm not sure where this file is located on Windows, but on Linux it's in /usr/share/minetest/builtin (which is a write-protected location, so you'll have to sudo in order to edit the file)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Change the following "stack_max" lines to adjust the inventory size universally:
Line 389 (which is under minetest.nodedef_default)
Line 451 (which is under minetest.craftitemdef_default)
Line 487 (which is under minetest.noneitem_default)


Change those numbers, and the inventory stack sizes changes globally.

I do have one question for the gurus though. I figured out why tools only come in stacks of 1. In that same file I mentioned above, item.lua, there is an entry on Line 469 that defines tool stacks as 1.
Would the game get weird if this was a higher number?

PostPosted: Fri May 24, 2013 10:38
by PilzAdam
cypher-neo wrote:I do have one question for the gurus though. I figured out why tools only come in stacks of 1. In that same file I mentioned above, item.lua, there is an entry on Line 469 that defines tool stacks as 1.
Would the game get weird if this was a higher number?

I would be interesting to test this. Tools can wear out, and the wear is saved per itemstack. If the tool breaks then the whole itemstack is probably removed.

PostPosted: Sun Mar 02, 2014 21:29
by cypher-neo
cypher-neo wrote:Just so that others can do it too, I'll explain what I discovered.

In the minetest /builtin folder, there is a file called item.lua. I'm not sure where this file is located on Windows, but on Linux it's in /usr/share/minetest/builtin (which is a write-protected location, so you'll have to sudo in order to edit the file)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Change the following "stack_max" lines to adjust the inventory size universally:
Line 389 (which is under minetest.nodedef_default)
Line 451 (which is under minetest.craftitemdef_default)
Line 487 (which is under minetest.noneitem_default)


Change those numbers, and the inventory stack sizes changes globally.


I have the same issue again.
Using Minetest 0.4.9, and went to look for the /usr/share/minetest folder and... IT'S NOT THERE!?
Where in the world does 0.4.9 store it's variables?

PostPosted: Mon Mar 03, 2014 00:27
by PilzAdam
cypher-neo wrote:
cypher-neo wrote:Just so that others can do it too, I'll explain what I discovered.

In the minetest /builtin folder, there is a file called item.lua. I'm not sure where this file is located on Windows, but on Linux it's in /usr/share/minetest/builtin (which is a write-protected location, so you'll have to sudo in order to edit the file)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Change the following "stack_max" lines to adjust the inventory size universally:
Line 389 (which is under minetest.nodedef_default)
Line 451 (which is under minetest.craftitemdef_default)
Line 487 (which is under minetest.noneitem_default)


Change those numbers, and the inventory stack sizes changes globally.


I have the same issue again.
Using Minetest 0.4.9, and went to look for the /usr/share/minetest folder and... IT'S NOT THERE!?
Where in the world does 0.4.9 store it's variables?

That depends on your installation; ask your package manager if you have used it to install minetest.

PostPosted: Mon Mar 03, 2014 08:58
by Pitriss
cypher-neo wrote:
cypher-neo wrote:Just so that others can do it too, I'll explain what I discovered.

In the minetest /builtin folder, there is a file called item.lua. I'm not sure where this file is located on Windows, but on Linux it's in /usr/share/minetest/builtin (which is a write-protected location, so you'll have to sudo in order to edit the file)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Change the following "stack_max" lines to adjust the inventory size universally:
Line 389 (which is under minetest.nodedef_default)
Line 451 (which is under minetest.craftitemdef_default)
Line 487 (which is under minetest.noneitem_default)


Change those numbers, and the inventory stack sizes changes globally.


I have the same issue again.
Using Minetest 0.4.9, and went to look for the /usr/share/minetest folder and... IT'S NOT THERE!?
Where in the world does 0.4.9 store it's variables?


Don't change builtin, and write mod for this.. ..these values can be overriden by mods..