Page 1 of 1

Random Ore question

PostPosted: Thu Nov 08, 2012 23:02
by Nubelite
Is it possible to have stone to give a random ore, stone, or nothing?

PostPosted: Thu Nov 08, 2012 23:59
by Topywo
Yes, but you need to do some coding:

http://minetest.net/forum/viewtopic.php?id=3620

PostPosted: Fri Nov 09, 2012 00:28
by Nubelite
i mean using none default items. for example the more ores mod.

PostPosted: Fri Nov 09, 2012 00:39
by Topywo
In that case you need to make your mod(ification) depended on the non-default mod and change the mod from (example) default:cobble to moreores:copper_lump

or integrate the node-registering and the textures of the nodes from the desired non-default nodes (and ask if the authors don't have a problem with that)

Edit: with changing the mod, I mean changing the mod you call in your lines/in your codes from default to the one you want to use.

PostPosted: Fri Nov 09, 2012 00:53
by Nubelite
is there a way to change the drop of stone? or change all default stone to moreores:stone?

maybe using this

generate_ore("moreores:stone", "default:stone", minp, maxp, get_next_seed(), 1/1/1/1, 8, -31000, 64)

i am not sure the full details of it.

PostPosted: Fri Nov 09, 2012 01:08
by Topywo
You mean changing all the stone into moreores:stone. I'm not sure. You can override default nodes, see the last part of post 6 of this link:

http://minetest.net/forum/viewtopic.php?id=3496

Post 8 might help you too.

Changing the droppings of any node can be done by changing the 'drop' line. Changing the output is what the leaves/saplings do.

PostPosted: Fri Nov 09, 2012 03:01
by Nubelite
im trying to use

Example: Any mod can redefine experimental:tnt by using the name
":experimental:tnt" when registering it.
can't seem to get it to replace the item.

does it have to be
minetest.register_node("stone:stone:default:stone"
or
minetest.register_node(":default:stone"

writing a separate mode named stone.

PostPosted: Fri Nov 09, 2012 03:06
by Nubelite
just got it

PostPosted: Fri Nov 09, 2012 03:51
by Nubelite
what i am trying to do now is have a new empty item that will fall into the players inventory. Then depending on the players pos have it be swapped out for an ore lump.

trying to use the documentation but not full sure as to how to completely do this.

PostPosted: Fri Nov 09, 2012 04:03
by GloopMaster
hrm... dunno.

PostPosted: Fri Nov 09, 2012 06:39
by Nubelite
got it working now. thanks for the help guys. i need to fine tune it then i will post it.