Can ore type "scatter" take a seed parameter?

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

Can ore type "scatter" take a seed parameter?

by SegFault22 » Tue Oct 04, 2016 18:44

I want to control the seed of a "scatter" type ore. This would be useful if I want to create an ore that has the same seed as another (and a different node), except the second ore has less nodes per cluster or a different cluster size, so that this ore occurs with (inside or around) the first ore. For example, clusters of magnetite could have a small content of vanadium magnetite, or clusters of cassiterite could have a small content of "native" (not chemically bonded) tin.

However, I looked on the developer wiki, and there isn't any mention of the scatter ore type taking a seed parameter. If it doesn't, then I will have to use some old code that was used to implement ore generation before minetest.register_ore() was created, because I know it takes a seed parameter.

Even if this is possible, by either setting a seed parameter (which may or may not exist) or using the old method, would the first ore prevent the second ore from being generated where any of the first ore's nodes are supposed to be generated (for example, if the first ore fills an entire 2*2 cube, and the second ore only generates 3 nodes per cluster), regardless of the value of clust_num_ores for the second ore? If this is so, it greatly limits the uses of this, because the second ore's nodes would only generate where there isn't supposed to be any nodes of the first ore, such as in the stone within the cluster or outside of the cluster (larger clust_size for the second one). It is understandable that the first ore could generate in stone, and then the second ore would not generate where the first ore's nodes are simply because they are not stone.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Can ore type "scatter" take a seed parameter?

by paramat » Wed Oct 05, 2016 22:36

Scatter ore uses perlin noise, the seed is part of the noiseparams.
Other randomness in scatter ore is pseudorandom using the blockseed, so is repeatable.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron