can someone help me with my first mod

User avatar
alexcraft
Member
 
Posts: 66
Joined: Thu Sep 06, 2012 13:12

can someone help me with my first mod

by alexcraft » Wed Oct 03, 2012 17:53

i want to make another mineral that you get when you put in crafting like this

steel_block steel_block steel_block
mese mese mese
coal_lump coal_lump_coal_lump

it makes 10 chaos mese

chaos mese is used for making tools and hyper tool
this is my idea
i dont know how to make the init but for other things im best
Last edited by alexcraft on Wed Oct 03, 2012 17:54, edited 1 time in total.
 

Jungle Dave
 

by Jungle Dave » Wed Oct 03, 2012 20:25

What you want to do is use a craft recipe like so:

minetest.register_craft({
output = alexcraft:chaos_mese 10',
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:mese', 'default:mese', 'default:mese'},
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
}
})

And you'll want to look at the moreores source to see the nodedef example.
 

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

by PilzAdam » Thu Oct 04, 2012 15:16

Jungle Dave wrote:What you want to do is use a craft recipe like so:

minetest.register_craft({
output = alexcraft:chaos_mese 10',
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:mese', 'default:mese', 'default:mese'},
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
}
})

And you'll want to look at the moreores source to see the nodedef example.

Moreores is not a good example for node defintions.
 

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

by tinoesroho » Thu Oct 04, 2012 16:05

Shoot me in the foot, please. I wasn't thinking properly. Anyways, this may be better:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("default:stone_with_iron", {
    description = "Iron Ore",
    tiles = {"default_stone.png^default_mineral_iron.png"},
    is_ground_content = true,
    groups = {cracky=3},
    drop = 'default:iron_lump',
    sounds = default.node_sound_stone_defaults(),
})


You also will want to define chaos_mese like so:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_craftitem("alexcraft:chaos_mese", {
    description = "Chaos Mese Ingot",
    inventory_image = "default_steel_ingot.png",
})


The tools, I assume, will be similar to this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_tool("default:pick_steel", {
    description = "Steel Pickaxe",
    inventory_image = "default_tool_steelpick.png",
    tool_capabilities = {
        max_drop_level=1,
        groupcaps={
            cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2}
        }
    },
})

minetest.register_tool("default:shovel_steel", {
    description = "Steel Shovel",
    inventory_image = "default_tool_steelshovel.png",
    tool_capabilities = {
        max_drop_level=1,
        groupcaps={
            crumbly={times={[1]=1.50, [2]=0.70, [3]=0.60}, uses=30, maxlevel=2}
        }
    },
})

minetest.register_tool("default:axe_steel", {
    description = "Steel Axe",
    inventory_image = "default_tool_steelaxe.png",
    tool_capabilities = {
        max_drop_level=1,
        groupcaps={
            choppy={times={[1]=3.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2},
            fleshy={times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1}
        }
    },
})

minetest.register_tool("default:sword_steel", {
    description = "Steel Sword",
    inventory_image = "default_tool_steelsword.png",
    tool_capabilities = {
        full_punch_interval = 1.0,
        max_drop_level=1,
        groupcaps={
            fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2},
            snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1},
            choppy={times={[3]=0.70}, uses=40, maxlevel=0}
        }
    }
})

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/
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 5 guests

cron