CODEING PROBLEM

Post Reply
chase programer
Member
Posts: 117
Joined: Thu Jan 03, 2013 16:56
Location: Everywhere.

CODEING PROBLEM

by chase programer » Post

Is this right )=

Code: Select all

minetest.register_craft({
    output = 'Deathpick:Death_pick',
    recipe = {
        {'default:coallump', 'default:coallump', 'default:coallump'},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''},
    }
})
-- Tool
minetest.register_tool("Deathpick:Death_pick", {
    description = "Death Pickaxe",
    inventory_image = "Deathpick.png",
    tool_capabilities = {
        full_punch_interval = 1.0,
        max_drop_level=3,
        groupcaps={
            cracky={times={[2]=2.5, [2]=1.5, [3]=1.0}, uses=1000, maxlevel=10},
            crumbly={times={[2]=2.0, [2]=1.0, [3]=0.5}, uses=1, maxlevel=1},
            snappy={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=1000, maxlevel=10}
        }
    },
})
Last edited by chase programer on Wed May 15, 2013 21:06, edited 1 time in total.
Back and ready to help with this amazing community that i lost.

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

by tinoesroho » Post

Looks like it SHOULD work, if only on 0.4.5 (or lower). What's broken? Damage? Craft-

... shouldn't it be default:coal_lump, not default:coallump? That might fix crafting.

EDIT:
I really don't know what the heck I'm doing with code, so my advice might not be all that helpful. I'm a "mod-modder", a "script modder" rather than an actual coder. From memory, coallump is the issue.

EDIT EDIT:
Look at the [2] things again: you define it TWICE for two groups (crumbly, and something else). I'm pretty sure that you meant to type [1] [2] [3] once, not [2] [2] [3].

EDIT EDIT EDIT:
Yay, got ninja replied.
Last edited by tinoesroho on Wed May 15, 2013 21:14, 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/

chase programer
Member
Posts: 117
Joined: Thu Jan 03, 2013 16:56
Location: Everywhere.

by chase programer » Post

tinoesroho wrote:Looks like it SHOULD work, if only on 0.4.5 (or lower). What's broken? Damage? Craft-

... shouldn't it be default:coal_lump, not default:coallump? That might fix crafting.
Ok i have the newest update and i wanted it to work )=
Back and ready to help with this amazing community that i lost.

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

by tinoesroho » Post

I think the damage system was changed for 0.4.6 (can't confirm). Default.lua should define tools/weapons; take a look at that if you haven't already.

EDIT:
... this topic goes over the new damage system.
Last edited by tinoesroho on Wed May 15, 2013 21:15, 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
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

This is definetly in the wrong section of the forum. It should be in Modding General.

Also, it might help you if you just read other mods and/or the default mod(s) to get some experience with Lua.

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Moved to Modding General, because wrong section
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Uppercase letters in mod names and file names (textures) is a bad practice, by the way.
Last edited by Calinou on Thu May 16, 2013 07:13, edited 1 time in total.

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

by tinoesroho » Post

... although it won't break anything. It'll just confuse people like hell (and make sure your files and folders actually have uppercase letters, otherwise you just broke the mod on Linux). :-/

What's the status?
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
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

I tried making a mod called YAMM but it was not allowed.

(Says "a-z,0-9 only")
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by tinoesroho » Post

There you have 't. I think that's all the problems in the code, all laid out.
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/

Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests