Hard limit on item registration?

Post Reply
User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Hard limit on item registration?

by PolySaken » Post

So I accidentally created a loop which registers 500 craftitems.
When I loaded up the world, everything was normal, but in the inventory everything was unknown nodes/items. What causes this?
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Hard limit on item registration?

by paramat » Post

There is a hard limit but it is actually approximately 32000.

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Hard limit on item registration?

by rubenwardy » Post

A spam bot copied this thread, which brought my attention to it. Commenting here in case someone finds this via google

paramat is wrong: as far as I know, there's no limit on craftitems and tools. The only limit is on nodes, which is limited to 32768. Perhaps you accidentally changed the name?
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: Hard limit on item registration?

by Festus1965 » Post

too less info, or you answered it yourself
PolySaken wrote:
Sat Jan 11, 2020 01:31
What causes this?
PolySaken wrote:
Sat Jan 11, 2020 01:31
So I accidentally created a loop
How ? You know what you changed,
and if we don't know what you changed,
how might we answer the question ?
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Hard limit on item registration?

by PolySaken » Post

All I did was register a set of 500 craftitems named axistools:handle_x_y where x & y were numbers. Nothing else. When I loaded a new world, every node was an unknown node, except for air. My intent was to create a loop, just not to loop 500 times.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Hard limit on item registration?

by rubenwardy » Post

Would be interesting to see the code for this, if it's still a problem. Sounds very odd
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Hard limit on item registration?

by Linuxdirk » Post

I remember ...

Automatically register lots of shit for a lot of nodes and you can reach the limit pretty fast :)

https://github.com/minetest/minetest/issues/6101

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Hard limit on item registration?

by PolySaken » Post

rubenwardy wrote:
Tue Jun 22, 2021 02:32
Would be interesting to see the code for this, if it's still a problem. Sounds very odd
I haven't tested recently, although AFAIK it still is, from my other attempts at procedural content. Also worth noting that registering too many ores will prevent mapblocks from being generated, and registering too many biomes causes a weird effect where each one is very small. I personally don't think this needs to be "fixed" as it's likely machine dependent, however other methods of creating "flexible" item registry (such as textures via metadata) are definitely required.

Perhaps a new drawtype where the tiles are actually tables of tiles, and one of the params is used to select which tile group to draw?
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Hard limit on item registration?

by PolySaken » Post

Linuxdirk wrote:
Wed Jun 23, 2021 13:23
I remember ...

Automatically register lots of shit for a lot of nodes and you can reach the limit pretty fast :)

https://github.com/minetest/minetest/issues/6101
Haha, I'd never seen this thread. It's pretty foolish of the devs to think that people don't want to register >32000 nodes, especially when there's no alternative for variants and so on.

My initial usecase was multi-material tools (steel handle, mithril head, web binding, etc.) where one could compose a new tool with unique stats from any given set of tool materials, however I recently tried to create a system where everything from the ore types to the tree species and the biomes (including the nodes for dirt grass, etc.) was completely procedurally generated and then saved in the world folder as a worldmod.
I'd like to return to that idea one day, perhaps even generating lore and stories like some sort of dwarf fortress derivative where even the types of material and species of animal are random. However, it's currently impossible.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Hard limit on item registration?

by PolySaken » Post

Uhh, so it turns out i was actually trying to register ~755,000 items in my initial case, which is obviously a reasonable cause for error.
(I initially had taken 50 materials * 10 tool types to get 500, completely forgetting that each tool type registers n^3 or n^2 items, based on the existing tool parts, which in turn register 50 items per part-type.)

However the second time it happened I was only registering ~10,000 items, so I'm still unsure what the actual issue was.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests