Page 1 of 1
Attn Mod Devs: Please update your mods to work with latest unstable..

Posted:
Sun Mar 18, 2012 21:28
by RAPHAEL
I'm making a request for mod devs to update their mods for latest unstable dev build. Should be pretty quick for someone who knows how to do it. For the time being I suggest providing the old mod and the updated mod so users can use whichever based on their minetest version.

Posted:
Mon Mar 19, 2012 00:44
by IPushButton2653
The main problem I see is you need to change the "minetest.digprop" line to "groups = {type=0}"
Whereas type corresponds to the node/tool you are defining. And the number can be 0,2, or 3. (Look in default init.lua for more)

Posted:
Mon Mar 19, 2012 00:56
by RabbiBob
You can leave minetest.digprop in place if you want some backwards compatibility. I'm keeping it in there for a little bit.

Posted:
Mon Mar 19, 2012 22:38
by randomproof
So it seems to me that there are not hardcoded groups, but the ones that are in the default init.lua file are:
fleshy
crumbly
snappy
cracky
choppy
bendy
dig_immediate
oddly_breakable_by_hand

Posted:
Mon Mar 19, 2012 22:42
by Death Dealer
i found this.. not like i know what it means but i know this is whats causing the mods to not work.
-- minetest.digprop_constanttime(time)
-- minetest.digprop_stonelike(toughness)
-- minetest.digprop_dirtlike(toughness)
-- minetest.digprop_gravellike(toughness)
-- minetest.digprop_woodlike(toughness)
-- minetest.digprop_leaveslike(toughness)
-- minetest.digprop_glasslike(toughness)
--
and that fleshly oddly_breakable by hand to.
so whats the problem exactly is there a new system to register the nodes or something?

Posted:
Tue Mar 20, 2012 15:18
by randomproof
All the "minetest.digprop_" functions are deprecated and do nothing now. Look at the default init.lua file to see how nodes are now defined. Also look at the tools to see how they are now interacting with the node groups.
See this 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_tool("default:shovel_steel", {
description = "Steel Shovel",
inventory_image = "default_tool_steelshovel.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
crumbly={times={[1]=0.50, [2]=0.35, [3]=0.30}, maxwear=0.1, maxlevel=2} <---------------crumbly
}
},
})
minetest.register_node("default:sand", {
description = "Sand",
tile_images = {"default_sand.png"},
is_ground_content = true,
groups = {crumbly=3}, <-----------------crumbly
})
I can't say I fully understand what all the different numbers mean, though.

Posted:
Tue Mar 20, 2012 16:00
by LorenzoVulcan
Those new functions are really usefull for items,but so limitative for nodes.Is there any way for making new groups or new valours without using C++?

Posted:
Tue Mar 20, 2012 16:17
by randomproof
I think you can make any groups you want. For example you could edit the plant growing mods to have a 'plant' group on their nodes and tools.

Posted:
Tue Mar 20, 2012 16:29
by kddekadenz
I updated my desert mod :)
Cacti should be actually be destroyable in default mode with your fists.

Posted:
Tue Mar 20, 2012 16:39
by randomproof
kddekadenz wrote:I updated my desert mod :)
Cacti should be actually be destroyable in default mode with your fists.
You can change nodes that have already been defined if you want. First, make sure that 'default' is in your depends.txt file, then you add this to your mod's init.lua file:
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.registered_nodes["default:cactus"].groups[oddly_breakable_by_hand]=2

Posted:
Tue Mar 20, 2012 16:55
by kddekadenz
Nice, thank you for the tip :)