Question about changing inventory size...

cypher-neo
Member
 
Posts: 46
Joined: Wed Oct 17, 2012 12:15

Question about changing inventory size...

by cypher-neo » Fri May 24, 2013 00:51

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?
 

cypher-neo
Member
 
Posts: 46
Joined: Wed Oct 17, 2012 12:15

by cypher-neo » Fri May 24, 2013 01:27

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?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri May 24, 2013 10:38

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.
 

cypher-neo
Member
 
Posts: 46
Joined: Wed Oct 17, 2012 12:15

by cypher-neo » Sun Mar 02, 2014 21:29

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?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Mar 03, 2014 00:27

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.
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

by Pitriss » Mon Mar 03, 2014 08:58

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..
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron