Page 1 of 1

Questions about modding

PostPosted: Sun Apr 15, 2012 21:45
by NakedFury
description = "Horizontal Jungletree",
tile_images = {"default_jungletree.png", "default_jungletree.png", "default_jungletree.png",
"default_jungletree.png", "default_jungletree_top.png", "default_jungletree_top.png"},

Is that example the way to tell how a block will have a top side?
are blocks side defined by included a texture named: default_namehere_back or _top, _bottom, _sides?

in _sides, can I be more specific and tell it _side_right and _side_left?

Is there any place where I can get ALL the info on what each parameter will do or does and what each parameter the game has?
paramtype = "facedir_simple",
groups = {tree=1,snappy=2,choppy=2,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
furnace_burntime = 30,

some are obvious like sounds but having a full document that lists and explains them could help more. If that has been done before then ignore me, ill just look for it.

Also can it be possible to modify things already in the game? like the furnace? I want to make it have a regular top.

PostPosted: Sun Apr 15, 2012 21:53
by mauvebic
you change the image filenames for whatever you want. As for the order in which each side must be listed, you gotta figure that out yourself to get it. but take a look at the registor node for furnace or chest in default/init.lua should give you some hints :-)

PostPosted: Mon Apr 16, 2012 00:40
by RabbiBob
NakedFury wrote:Is that example the way to tell how a block will have a top side?


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

PostPosted: Mon Apr 16, 2012 00:50
by NakedFury
thanks for that, would have save me minutes of tinkering around. now my furnaces have top and bottom. same texture but its ok.

PostPosted: Thu Apr 19, 2012 11:34
by NakedFury
another question.
Where do I find info on the crack animation?

I want to see how the game reads that png file and see if I can make it do the same for water, lava, and fire animations.

PostPosted: Thu Apr 19, 2012 14:11
by lkjoel
Water lava and fire cannot be digged, so the crack animation does not come in handy there lol

PostPosted: Thu Apr 19, 2012 14:30
by mauvebic
You can change the fire, lava and water textures, and im relatively sure you can change the crack texture too. I changed the player texture to something more pimp looking lol

Image

PostPosted: Thu Apr 19, 2012 15:52
by sfan5
Amazing Player Texture!
Please post a Download Link :D

PostPosted: Thu Apr 19, 2012 16:45
by NakedFury
I know I can change the animations or textures but what I meant about the crack animation was to know how the game reads it or uses it so I can see if it could do the same for a water, fire, and lava animation. Its so I can have them animated.

PostPosted: Thu Apr 19, 2012 16:47
by Jordach
Game does not support animated nodes as of yet.

PostPosted: Thu Apr 19, 2012 17:08
by NakedFury
then how is crack animated?

PostPosted: Thu Apr 19, 2012 17:19
by Jordach
That is the only thing supported as of now.

PostPosted: Wed Apr 25, 2012 20:15
by NakedFury
ok I started to create my mod and I have all the code written.

example:
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("metallurgy:vein_copper", {
    description = "Copper Vein",
    tile_images = {"default_stone.png^metallurgy_copper.png"},
    is_ground_content = true,
    groups = {cracky=3},
    drop = 'metallurgy:metallurgy_copper_ore',
    sounds = default.node_sound_stone_defaults(),
})


All of it is copy pasting this and changing lines but I need some help in understanding better what some lines or codes mean and do. I have been reading: https://github.com/celeron55/minetest/blob/master/doc/lua_api.txt
But I have some questions that doesn't answer.

is_ground_content = true : what does this stand for?
groups = {cracky=3}: the value[3] I do know there can be 4 values, 0-1-2-3, but I don't understand their function yet.
on the tile_images = ... : why does it need to have the default stone.png first then the ore .png? cant I just leave my ore .png in?

another code:
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( "metallurgy:manganese_ore", {
    description = "Manganese Ore",
    inventory_image = "metallurgy_manganese_ore.png",
    on_place_on_ground = minetest.craftitem_place_item,
})


on place on ground : is for when I drop it so we see the little block spinning?

code:
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("metallurgy:adamantine_pick", {
    description = "Adamantine Pickaxe",
    inventory_image = "metallurgy_adamantine_tool_pick.png",
    tool_capabilities = {
        max_drop_level=3,
        groupcaps={
            cracky={times={[1]=3.00, [2]=1.20, [3]=0.80}, uses=300, maxlevel=1}
        }
    },
})


Now we get to another part I don't understand much, even after reading about it. I guess its the way it is written, too stiff, like math.

max_drop_level=3 : I keep reading it and my brain just won't understand it. What does it do? how high or low can I change the value, what happens if I do? What depends on a higher or lower value?
times={[1]=3.00, [2]=1.20, [3]=0.80: this complete line deals with the speed of mining for certain blocks BUT how do I know which blocks? Do the numbers 1-2-3 are the numbers that go with the cracky=3 on block code? Whould this mean this pick can mine only a cracky block 3?
maxlevel=1: max level of what? dont understand this one at all.

How do uses change on the tool? I saw this formula: 3^leveldiff but I don't know how to work it.

Sorry if this is silly to ask or obvious when reading that document but it just wont click for me, I'm posting here to see if someone or a group of someones can explain it in a better way. After this the last thing I would need, for the moment, would be to understand the ore generation part of the code so I can include my new ores. I will ask that later, after learning this first.