Page 1 of 1
Add ores to a global table like nodes [Added]

Posted:
Wed Dec 03, 2014 20:34
by mtmodder148
Maybe the developers could add registered ores to a registered_ores table just like nodes.
Re: Add ores to gobal table like nodes

Posted:
Thu Dec 04, 2014 09:42
by TenPlus1
Ores are already quite easy to setup and spawn in a world...
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
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 8,
clust_size = 3,
height_min = -31000,
height_max = 64,
})
Re: Add ores to gobal table like nodes

Posted:
Thu Dec 04, 2014 15:41
by mtmodder148
Thank you for the reply but that's not what I'm saying. They should add ores to a global table like they do for nodes. For example:
minetest.registered_ores
Re: Add ores to a global table like nodes

Posted:
Thu Dec 04, 2014 17:11
by Krock
Re: Add ores to a global table like nodes

Posted:
Thu Dec 04, 2014 18:05
by mtmodder148
Thank you for linking that. I had no clue it existed. Maybe this thread will bring it to their attention again. It's easier to use this table than to make a table and try to add support for many mods that add ores. I made this topic because I forked gloopblocks so when flowing water comes in contact with source lava random ores or stone is generated.
Re: Add ores to a global table like nodes

Posted:
Fri Dec 05, 2014 20:32
by Gael de Sailly
+1, +2, +3 and even more…
Re: Add ores to a global table like nodes

Posted:
Sat Dec 06, 2014 01:47
by indriApollo
+1
Re: Add ores to a global table like nodes

Posted:
Sat Dec 06, 2014 11:29
by Gael de Sailly
I'm working on a LUA mapgen.
Of course, I want to add ores.
The problem is : I can't use the registered ores because, as you say, this table don't exist.
I have to redefine all of them myself. Not handy, and not "clean" because in this case my mapgen will not be compatible with ore mods like Calinou's Moreores.
Could you merge it, please ?
I really need it.
Re: Add ores to a global table like nodes

Posted:
Sat Dec 06, 2014 11:43
by ExeterDad
+1
Re: Add ores to a global table like nodes

Posted:
Sat Dec 06, 2014 15:28
by mtmodder148
Maybe you should commit out the duplicate biome registration. Maybe it will get merged sooner.
Re: Add ores to a global table like nodes

Posted:
Sun Dec 07, 2014 14:37
by rubenwardy
Gael de Sailly wrote:+1, +2, +3 and even more…
+1 +2 +3 +4 +5 +6 +7 ............. = -1/12
:P
Wikipedia Article
Re: Add ores to a global table like nodes

Posted:
Sun Dec 07, 2014 17:08
by mtmodder148
lol
Re: Add ores to a global table like nodes

Posted:
Sun Dec 07, 2014 20:19
by indriApollo
rubenwardy wrote:Gael de Sailly wrote:+1, +2, +3 and even more…
+1 +2 +3 +4 +5 +6 +7 ............. = -1/12
:P
Wikipedia Article
Half-life 3 confirmed !
Re: Add ores to a global table like nodes

Posted:
Fri Dec 12, 2014 19:41
by ArguablySane
Since I'm currently in the process of writing a mapgen, this is definitely something I support.
That said, I'd suggest a different way of describing where the ores should be placed. Mods which add ores generally should be mapgen-agnostic. This means that they should work just as well in a world made of floating islands or a giant maze as they do in the normal world. The current system of specifying maximum y coordinate, cluster size, etc, only really works with a normal world, and even then it restricts what mapgens can do when generating ores.
Instead, I propose a system more like that used by LaTeX and other markup languages. The ore definition should specify the gameplay purpose of the ore, while the precise implementation details should be left to the mapgen. For example, coal is essential in the early game and is required in large quantities. Iron is also required in the early game, but shouldn't be quite as abundant. Gold and mese are both late game ores, but mese is generally more useful than gold. With this knowledge a mapgen could easily determine where to place the ores and in what quantities, regardless of how unusual or insane the map topography is. Maybe in a floating islands map mese should only be found on high-altitude islands which are difficult to reach, or in a labyrinth the gold might be guarded by more dangerous traps.
Re: Add ores to a global table like nodes

Posted:
Sun Dec 14, 2014 23:10
by TeTpaAka
I like the idea. +1
Re: Add ores to a global table like nodes

Posted:
Tue Jan 06, 2015 00:03
by mtmodder148
Re: Add ores to a global table like nodes

Posted:
Tue Jan 06, 2015 12:39
by ExeterDad
Came here to post it but you beat me :)
Re: Add ores to a global table like nodes

Posted:
Wed Jan 07, 2015 00:14
by mtmodder148
:) I'm glad people can use it now. It's been about two month since I first wanted this. I guess it's been longer than that for other people.
Re: Add ores to a global table like nodes

Posted:
Thu Jan 08, 2015 21:45
by Gael de Sailly
Really happy that it's now merged.
Another good new for mapgen modders :
minetest.generate_ores, added last Sunday by kwolekr. I've not tested it yet, but looks handy and useful.