How do you remove default copper in 0.4.6?

BAGPIPE
Member
 
Posts: 70
Joined: Tue Jan 22, 2013 20:37

How do you remove default copper in 0.4.6?

by BAGPIPE » Sat Apr 13, 2013 03:32

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?
Last edited by BAGPIPE on Sat Apr 13, 2013 03:52, edited 1 time in total.
My username tells almost everything about me.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Sat Apr 13, 2013 05:20

You could comment out the code. Or, in mapgen.lua, find "default:copper_ore", and change it to whatever you want.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

BAGPIPE
Member
 
Posts: 70
Joined: Tue Jan 22, 2013 20:37

by BAGPIPE » Sun Apr 14, 2013 03:32

What do you mean comment out, or change to what?
My username tells almost everything about me.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Sun Apr 14, 2013 04:35

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.
Last edited by tinoesroho on Sun Apr 14, 2013 04:37, edited 1 time in total.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
Zeg9
Member
 
Posts: 608
Joined: Fri Sep 21, 2012 11:02

by Zeg9 » Sun Apr 14, 2013 09:22

You can also add minetest.register_alias("default:stone_with_copper","default:stone") to any mod, and all copper will be replaced by stone.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Apr 14, 2013 10:03

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).
 

BAGPIPE
Member
 
Posts: 70
Joined: Tue Jan 22, 2013 20:37

by BAGPIPE » Sun Apr 14, 2013 14:46

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.
My username tells almost everything about me.
 

BAGPIPE
Member
 
Posts: 70
Joined: Tue Jan 22, 2013 20:37

by BAGPIPE » Sun Apr 14, 2013 17:21

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?
Last edited by BAGPIPE on Sun Apr 14, 2013 17:21, edited 1 time in total.
My username tells almost everything about me.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Apr 14, 2013 18:09

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).
Last edited by Topywo on Sun Apr 14, 2013 18:18, edited 1 time in total.
 

BAGPIPE
Member
 
Posts: 70
Joined: Tue Jan 22, 2013 20:37

by BAGPIPE » Sun Apr 14, 2013 19:01

I searched mapgen and found no ocurence of "minetest.register_ore" . Nevermind found it but it didn't do anything
My username tells almost everything about me.
 

User avatar
Zeg9
Member
 
Posts: 608
Joined: Fri Sep 21, 2012 11:02

by Zeg9 » Mon Apr 15, 2013 16:41

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...
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
 

BAGPIPE
Member
 
Posts: 70
Joined: Tue Jan 22, 2013 20:37

by BAGPIPE » Mon Apr 15, 2013 17:07

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
My username tells almost everything about me.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 2 guests

cron