Page 1 of 1

How do you remove default copper in 0.4.6?

PostPosted: Sat Apr 13, 2013 03:32
by BAGPIPE
While playing 0n 0.4.6, and with the more ores mod, there is a ton of copper, how do I remove/disable it. Do I wan't the default mod folder?

PostPosted: Sat Apr 13, 2013 05:20
by tinoesroho
You could comment out the code. Or, in mapgen.lua, find "default:copper_ore", and change it to whatever you want.

PostPosted: Sun Apr 14, 2013 03:32
by BAGPIPE
What do you mean comment out, or change to what?

PostPosted: Sun Apr 14, 2013 04:35
by tinoesroho
Actually, what I mean is this:
1. Open up /games/minetest_game/ (or was that common?)/default/ mapgen.lua in WordPad.
2. Find the line that reads something like this: "minetest.register_alias("mapgen_stone_with_copper", "default:stone_with_copper")"
3. Replace "default:stone_with_copper" with "default:stone_with_iron".

Happy mining.

EDIT: This should stop the default engine from spawning copper. I don't know if base moreores still has copper, but if it does, it will still spawn. Just not in the same quantities.

PostPosted: Sun Apr 14, 2013 09:22
by Zeg9
You can also add minetest.register_alias("default:stone_with_copper","default:stone") to any mod, and all copper will be replaced by stone.

PostPosted: Sun Apr 14, 2013 10:03
by PilzAdam
tinoesroho wrote:Actually, what I mean is this:
1. Open up /games/minetest_game/ (or was that common?)/default/ mapgen.lua in WordPad.
2. Find the line that reads something like this: "minetest.register_alias("mapgen_stone_with_copper", "default:stone_with_copper")"
3. Replace "default:stone_with_copper" with "default:stone_with_iron".

Happy mining.

EDIT: This should stop the default engine from spawning copper. I don't know if base moreores still has copper, but if it does, it will still spawn. Just not in the same quantities.

That is absolutly wrong.
The correct path is games/common/mods/default/mapgen.lua and you dont have to find the alias line (there is none for copper) but the register ore call for copper. Then comment it out with -- at the beginning of the line(s).

PostPosted: Sun Apr 14, 2013 14:46
by BAGPIPE
PilzAdam wrote:
tinoesroho wrote:Actually, what I mean is this:
1. Open up /games/minetest_game/ (or was that common?)/default/ mapgen.lua in WordPad.
2. Find the line that reads something like this: "minetest.register_alias("mapgen_stone_with_copper", "default:stone_with_copper")"
3. Replace "default:stone_with_copper" with "default:stone_with_iron".

Happy mining.

EDIT: This should stop the default engine from spawning copper. I don't know if base moreores still has copper, but if it does, it will still spawn. Just not in the same quantities.

That is absolutly wrong.
The correct path is games/common/mods/default/mapgen.lua and you dont have to find the alias line (there is none for copper) but the register ore call for copper. Then comment it out with -- at the beginning of the line(s).

All my mods are in games/minetest_game/mods, or something like that, so I think
tinoesroho wrote:Actually, what I mean is this:
1. Open up /games/minetest_game/ (or was that common?)/default/ mapgen.lua in WordPad.
2. Find the line that reads something like this: "minetest.register_alias("mapgen_stone_with_copper", "default:stone_with_copper")"
3. Replace "default:stone_with_copper" with "default:stone_with_iron".

Happy mining.

EDIT: This should stop the default engine from spawning copper. I don't know if base moreores still has copper, but if it does, it will still spawn. Just not in the same quantities.

is right, I havent changed anything yet.

PostPosted: Sun Apr 14, 2013 17:21
by BAGPIPE
PilzAdam wrote:
tinoesroho wrote:Actually, what I mean is this:
1. Open up /games/minetest_game/ (or was that common?)/default/ mapgen.lua in WordPad.
2. Find the line that reads something like this: "minetest.register_alias("mapgen_stone_with_copper", "default:stone_with_copper")"
3. Replace "default:stone_with_copper" with "default:stone_with_iron".

Happy mining.

EDIT: This should stop the default engine from spawning copper. I don't know if base moreores still has copper, but if it does, it will still spawn. Just not in the same quantities.

That is absolutly wrong.
The correct path is games/common/mods/default/mapgen.lua and you dont have to find the alias line (there is none for copper) but the register ore call for copper. Then comment it out with -- at the beginning of the line(s).

All I found was
= "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
height_min = -31000,
height_max = -64,
})

function default.generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
minetest.log('action', "WARNING: default.generate_ore is deprecated")

if maxp.y < height_min or minp.y > height_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
if chunk_size >= y_max - y_min + 1 then
return
end
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
local pr = PseudoRandom(seed)
local num_chunks = math.floor(chunks_per_volume * volume)
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
--print("generate_ore num_chunks: "..dump(num_chunks))
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then

No clue what I'm looking for, is this the right area?

PostPosted: Sun Apr 14, 2013 18:09
by Topywo
Open games/common/mods/default/mapgen.lua

Put the copper code between --[[ and --]]

--[[ Start of commenting code out

minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 12*12*12,
clust_num_ores = 4,
clust_size = 3,
height_min = -63,
height_max = -16,
})

minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
height_min = -31000,
height_max = -64,
})

End of commenting code out --]]

Edit: some extra info

+ the rest of the code uses code like this:
function default.generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)

name looks for the ores, like copper, diamond, iron etc.. Those ores are 'defined' earlier with the minetest.register_ore. By commenting it out, it will not look for copper. You could also define extra ores or change ores easily like this (if you're willing to change the default folder).

PostPosted: Sun Apr 14, 2013 19:01
by BAGPIPE
I searched mapgen and found no ocurence of "minetest.register_ore" . Nevermind found it but it didn't do anything

PostPosted: Mon Apr 15, 2013 16:41
by Zeg9
BAGPIPE wrote:I searched mapgen and found no ocurence of "minetest.register_ore" . Nevermind found it but it didn't do anything

Why didn't you do my alias thing ? Never mind...

PostPosted: Mon Apr 15, 2013 17:07
by BAGPIPE
Zeg9 wrote:
BAGPIPE wrote:I searched mapgen and found no ocurence of "minetest.register_ore" . Nevermind found it but it didn't do anything

Why didn't you do my alias thing ? Never mind...

There isn't one for copper