FaceDeer / real_minerals

Realistic minerals and metals for Minetest, forked out from the realtest game
GNU General Public License v3.0
3 stars 3 forks source link

Some ingots are a waste if they can't be converted, making the mod useless #2

Open ghost opened 6 years ago

ghost commented 6 years ago

Example: you find copper and gold but you can't use them in any craft recipe. Furthermore, once that you have crafted a block (e.g. real minerals gold block) you can't revert it to ingots.

I've used this code to fix these issues:

-- Allow converting certain ingots to default ingots and vice-versa

-- Real Minerals to default

minetest.register_craft({
    output = "default:bronze_ingot",
    recipe = {
        {"real_minerals:bronze_ingot"},
    }
})

minetest.register_craft({
    output = "default:copper_ingot",
    recipe = {
        {"real_minerals:copper_ingot"},
    }
})

minetest.register_craft({
    output = "default:gold_ingot",
    recipe = {
        {"real_minerals:gold_ingot"},
    }
})

minetest.register_craft({
    output = "default:steel_ingot",
    recipe = {
        {"real_minerals:black_steel_ingot"},
    }
})

minetest.register_craft({
    output = "default:steel_ingot",
    recipe = {
        {"real_minerals:steel_ingot"},
    }
})

minetest.register_craft({
    output = "default:tin_ingot",
    recipe = {
        {"real_minerals:tin_ingot"},
    }
})

-- Default to Real Minerals

minetest.register_craft({
    output = "real_minerals:bronze_ingot",
    recipe = {
        {"default:bronze_ingot"},
    }
})

minetest.register_craft({
    output = "real_minerals:copper_ingot",
    recipe = {
        {"default:copper_ingot"},
    }
})

minetest.register_craft({
    output = "real_minerals:gold_ingot",
    recipe = {
        {"default:gold_ingot"},
    }
})

minetest.register_craft({
    output = "real_minerals:steel_ingot",
    recipe = {
        {"default:steel_ingot"},
    }
})

minetest.register_craft({
    output = "real_minerals:tin_ingot",
    recipe = {
        {"default:tin_ingot"},
    }
})

-- Allow to revert metal blocks to ingots

minetest.register_craft({
    output = "real_minerals:aluminium_ingot 9",
    recipe = {
        {"real_minerals:aluminium_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:bismuth_ingot 9",
    recipe = {
        {"real_minerals:bismuth_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:bronze_ingot 9",
    recipe = {
        {"real_minerals:bronze_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:copper_ingot 9",
    recipe = {
        {"real_minerals:copper_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:gold_ingot 9",
    recipe = {
        {"real_minerals:gold_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:lead_ingot 9",
    recipe = {
        {"real_minerals:lead_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:nickel_ingot 9",
    recipe = {
        {"real_minerals:nickel_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:pig_iron_ingot 9",
    recipe = {
        {"real_minerals:pig_iron_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:platinum_ingot 9",
    recipe = {
        {"real_minerals:platinum_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:silver_ingot 9",
    recipe = {
        {"real_minerals:silver_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:steel_ingot 9",
    recipe = {
        {"real_minerals:steel_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:tin_ingot 9",
    recipe = {
        {"real_minerals:tin_block"},
    }
})

minetest.register_craft({
    output = "real_minerals:zinc_ingot 9",
    recipe = {
        {"real_minerals:zinc_block"},
    }
})
FaceDeer commented 6 years ago

Have to admit, I wasn't expecting anyone to actually be using this mod yet. I haven't publicized it anywhere, I was planning on using it as part of another mod that I didn't get very far into working on before real life consumed a bunch of my spare time and I drifted away from MineTest.

But if you actually are using it, then maybe this is the prompt I need to get off my duff and resume noodling around in Minetest again. :) What sort of context are you using this mod in? Adding these back-to-ingots recipes will be simple enough, but some of the other stuff I had planned might cause some disruption so I'll want to be careful (if you look in the "rocks" branch you may see that I' was working on adding more types of base stone than just boring old "stone" - I want to have granite and shale and basalt and all that sort of stuff too. I wasn't going to merge it into the master branch until I had some mapgen support for that, though, so it stalled out over there).

ghost commented 6 years ago

I'm using it in a medieval themed game, they serve to the purpose of increasing diversity, thus your new rocks would fit perfectly; the more, the merrier. The metal blocks are good for cosmetic purposes, using them in buildings and such; but when you start a new game is a bit frustrating having Real Ores' iron ingots - or any ingot/block that you could use to craft a tool or an item - that are not convertible into default iron, gold, copper, etc. ingots.

Speaking of, non-metal nodes (lazurite, serpentine, etc.) could be good to craft decorative nodes - e.g. 9 lazurite stones to craft a lazurite block.

FaceDeer commented 6 years ago

The direction I was going with this mod before I went on "hiatus" was to make stone blocks and stone bricks something you had to quarry directly, rather than something you could magically create by heating a pile of rubble over burning wood. Here's what I had in mind:

Pick + stone => cobble, which is only useful as a crappy building material or as raw reagents in some cases (limestone cobble as flux stone, for example)

Pick + ore stone => ore lump, which is only useful as raw reagent to smelt into metal ingots. I envision "real minerals" having enormous ore deposits in veins and large bodies, where most of the time digging an ore stone gives you cobble but with a small chance of getting an ore lump; that way you get actual mines where you have to excavate large amounts of material for a reasonable amount of metal.

Hammer and splitting wedge + stone => stone block, which can be crafted into stone bricks and other more finely-crafted products. I could make hammer and splitting wedge + ore stone => ore stone block easily enough, with a reaction for breaking stone blocks down into cobble and ore lumps as if you'd mined it directly with a pick.

In this way a pick becomes a simple "I want to tear a hole in the ground" tool, but if you want to actually use the rock that comes out for stuff other than just piling it up in rough forms you need to use a tool with more finesse.

In combination with my further plans with simplecrafting_lib, I was going to have a full blown "mason's workshop" where much of these processes would be performed. My in-progress work is over in https://github.com/FaceDeer/workshops if you're interested in that. But of course I could add conventional workshop-free versions of these recipes if you don't want to go that far into simulationism. :)

ghost commented 6 years ago

I think that the whole project is very interesting and worth trying, if I were you I would consider the option of making ores last longer: e.g. gold ore, you could have the chance to mine it for 1D6 ore lumps; or you could get more lumps depending on the pick's quality - this is how it works in Voxelands - a stone pick will give you just one lump, while steel and better tools would allow you to get more lumps.

Anyway, my general rule of thumb is to let players choose their favourite gameplay style; if I were you I would use a setting type to toggle workshops, that way people could choose to begin playing with the basic style to get used with the new ores, and later turn on the workshops to make gameplay more realistic and challenging.

In the past I have discarded a charcoal mod that required you to actually simulate the charcoal creation process, just because I needed a lot of charcoal and quickly - thus I've chosen another mod that simply required to cook tree nodes. But now I would like to be able to toggle the charcoal creation process simulation, if only that was allowed, instead I would have to use two charcoal mods. :/

To sum up things, use a switch to toggle workshops, that way players can tailor their gaming experience as needed over time. :)

FaceDeer commented 6 years ago

I just added basic "ore blocks" to the rocks branch of real_minerals, if you want to see how that looks. I can add "ore bricks" too, just didn't get around to that tonight. The way it works currently:

ore + splitting wedge -> ore block ore + pick -> cobble of the "host" rock type, 25% chance of mineral lump. crafting: 4 ore blocks -> 4 cobble of the "host" rock type and one mineral lump.

So by mining ore blocks and then breaking them down you get a guaranteed yield of 25%, and by mining with a pick you get a random chance of ore that should end up with the same 25% yield over the fullness of time. I'll add some configuration options to set what % yield the game should have, and perhaps add modifiers for individual ores so that for example you could have thin veins of gold ore that produces plenty of metal and huge pipes of kimberlite that you have to mine lots of to pick out rare diamonds from.

I'm not a fan of the notion of pick material resulting in more mineral lumps from the same ore. It strikes me as very unrealistic (why would the material of the pick change how much mineral is in the rock?), and it's not actually necessary from a game balance perspective since using a better quality pick already gives you a greater lumps-per-second and lumps-per-wear yield thanks to the fact that it simply mines more quickly and has a lower rate of wear.