Page 1 of 2
[Mod] New Timber mod [nt]

Posted:
Wed Apr 10, 2013 05:57
by deivan
Details: I started with a basic idea, make this script (mod) work with big and deformed trees... I have some of this in my game after many tests of many mods. The basic idea of the original timber mod is start a massive drop of the entire tree beginning in the first cut point and going up cutting off each found nod of the same type.
What I made here?
1) The original process still here.
2) I added two levels for the cutter script, the first one cut every node of the same type of the first one going up in a line.
3) ...the second level search for a node from the same starter type a 2 nodes from the current last cut point.
Symbolic tree:
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
0 0 0 T 0
0 0 0 0 0
0 0 T 0 0
0 0 0 0 0
T
T
T
In this symbolic tree you see leaves (0) and tree nodes (T), if you cut the lower one then all "T" become item log in the same place of the original node.
I use the drop item mod here in my server and I think this is a very nice complement to it.
The original code of this mod is from Jeija and is here (
http://forum.minetest.net/viewtopic.php?id=1590)
Well, I started with the idea of the use of a group of trees but after some testes I preferred a manual approach typing all type of materials affected by my mod, is ugly but is effective. :)
Download: http://www.novoseusadosinformatica.com.br/arq/minetest/DOM-modpack-nt.zip (Version 20130603)
License: GPL
Dependencies: default, domb (my own library of utility functions)
domb is here:
http://www.novoseusadosinformatica.com.br/arq/minetest/DOM-modpack-domb.zip

Posted:
Wed Apr 10, 2013 07:50
by deivan
Solved 2 bugs, now I think this is full operational, ready for real tests. :D

Posted:
Wed Apr 10, 2013 11:10
by PilzAdam
AFAIK the MC timber mod doesnt kill the whole tree if you hold shift.

Posted:
Wed Apr 10, 2013 11:44
by deivan
Well, my idea is just this one, kill the entire tree don't leaving floating leaves in any place. (Leaves still if have a single wood then I drop all wood and kill the entire plant)

Posted:
Wed Apr 10, 2013 21:19
by deivan
I am planning add the timber like a power to users then if the user don't need it will be possible enable/disable by chat command. Or I make a hotkey (when possible).

Posted:
Mon Apr 15, 2013 13:22
by deivan
I split my mods and my library, in this format I don't need a new release to all if I update the library. I only update the library to fix any problem. :D

Posted:
Mon Apr 15, 2013 21:52
by Jouster27
After playing the Moretrees mod, I can really see the value in this mod... only problem is, the mod doesn't seem to recognize Moretrees. Any chance we can get it updated for the Moretrees mod, please?

Posted:
Mon Apr 15, 2013 22:42
by deivan
Well, already have this compatibilty, any change of have a identification of the type of the wood for me?
This mod cover:
"default:jungletree"
"default:papyrus"
"default:cactus"
"default:tree"
"irontrees:irontree"
"bamboo:bamboo"
"bamboo:bamboo_dry"
"vines:vine"
"vines:vine_rotten"
"vines:root"
"rubber:rubber_tree_full"
"rubber:rubber_tree_empty"
"technic:rubber_tree_full"
"technic:rubber_tree_empty"
"growing_trees:branch"
"growing_trees:branch_xmzm"
"growing_trees:branch_xx"
"growing_trees:branch_zz"
"growing_trees:branch_xpzp"
"growing_trees:branch_xmzp"
"growing_trees:branch_xpzm"
"moretrees:beech_trunk"
"moretrees:apple_tree_trunk"
"moretrees:oak_trunk"
"moretrees:sequoia_trunk"
"moretrees:birch_trunk"
"moretrees:palm_trunk"
"moretrees:spruce_trunk"
"moretrees:pine_trunk"
"moretrees:willow_trunk"
"moretrees:rubber_tree_trunk"
"moretrees:jungletree_trunk"
"moretrees:fir_trunk"

Posted:
Mon Apr 15, 2013 23:48
by onpon4
One thing I notice in the older timber mod is that the trees added by the food mod, like the banana trees, are unaffected by it.

Posted:
Tue Apr 16, 2013 00:05
by deivan
I don't have this name in my mods, inclusive in the moretrees, give me the name of the node and I add it to the mod. You see a message for every dug node, well, I see here in the terminal. Identify it to me and I updated the mod with this support.

Posted:
Sat Apr 20, 2013 23:09
by Devestatio
Hello, I am trying to use this mod, but I am getting this error when I try to play with it loaded;
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
Irrlicht Engine version 1.8.0
Microsoft Windows 7 Ultimate Edition Service Pack 1 (Build 7601)
Using renderer: OpenGL 4.2.12002
AMD Radeon HD 6900 Series: ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 4.2
Resizing window (800 600)
Loaded texture: E:/Program Files/Minetest-0.4.6/textures/base/pack/menuheader.pn
g
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
[Mod travelnet] Error: Savefile 'E:\Program Files\Minetest-0.4.6\bin\..\worlds\F
irst Try/mod_travelnet.data' not found.
[Teleport Request] Teleport Request v0.1a Loaded.
[Titanium Mod] Loaded! By Aqua!
DROPS LOADED!
StreetsMod loaded!
[Plantlife Library] Loaded
[Vines] Loaded!
[Poison Ivy] Loaded.
[Junglegrass] Loaded.
[Flowers] Loaded.
[UnifiedDyes] Loaded!
[UnifiedBricks] Loaded!
[Colored Wood] Loaded!
Peaceful NPC commands.lua loaded! By jojoa1997!
Peaceful NPC items.lua loaded! By jojoa1997!
Peaceful NPC spawning.lua loaded! By jojoa1997!
Peaceful NPC recipes.lua loaded! By jojoa1997!
Peaceful NPC loaded! By jojoa1997!
[Moretrees] Loaded (2013-02-11)
Pipeworks loaded!
[OK] Mesecons
[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loading....
[BobBlocks] loading Blocks
[BobBlocks] loaded Blocks
[BobBlocks] loading Health
[BobBlocks] loaded Health
[BobBlocks] loading Traps
[BobBlocks] loaded Traps
[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loaded!
Registered default:fence_wood and signs:sign_post
Registered homedecor:fence_brass and homedecor:fence_brass_with_sign
Registered homedecor:fence_wrought_iron and homedecor:fence_wrought_iron_with_si
gn
[HomeDecor] Loaded!
[Habitat] Loaded!
[Plants] Loaded!
[Bamboo] Loaded!
[MESSAGE][GloopTest v0.0.3a] Loading Ore Module Now!
17:08:06: ERROR[main]: register_ore: clust_scarcity and clust_num_ores must be g
reater than 0
[MESSAGE][GloopTest v0.0.3a] Loading Tools Module Now!
[MESSAGE][GloopTest v0.0.3a] Loading Parts Module Now!
[MESSAGE][GloopTest v0.0.3a] Loading Compat Module Now!
[MESSAGE][GloopTest v0.0.3a] 4 modules were successfully loaded!
17:08:06: ACTION[main]: [DOM]diamonds is ready.
17:08:06: ERROR[main]: ========== ERROR FROM LUA ===========
17:08:06: ERROR[main]: Failed to load and run script from
17:08:06: ERROR[main]: E:\Program Files\Minetest-0.4.6\bin\..\mods\survival\DOM\
nt\init.lua:
17:08:06: ERROR[main]: ...\Minetest-0.4.6\bin\..\mods\survival\DOM\nt\init.lua:1
26: attempt to call global 'DOM_mensagem_de_carga' (a nil value)
17:08:06: ERROR[main]: stack traceback:
17:08:06: ERROR[main]: ...\Minetest-0.4.6\bin\..\mods\survival\DOM\nt\init.lua:
126: in main chunk
17:08:06: ERROR[main]: =======END OF ERROR FROM LUA ========
17:08:06: ERROR[main]: Server: Failed to load and run E:\Program Files\Minetest-
0.4.6\bin\..\mods\survival\DOM\nt\init.lua
17:08:06: ERROR[main]: ModError: Failed to load and run E:\Program Files\Minetes
t-0.4.6\bin\..\mods\survival\DOM\nt\init.lua

Posted:
Sat Apr 20, 2013 23:24
by deivan
Need my api to, from the second link.

Posted:
Sat Apr 20, 2013 23:27
by Devestatio
deivan wrote:Need my api to, from the second link.
I have it installed also

Posted:
Sat Apr 20, 2013 23:32
by deivan
I will check it. Moment...

Posted:
Sat Apr 20, 2013 23:33
by Devestatio
ok just deleted all yours and reinstalled the 2 folders linked, I am now getting 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
Irrlicht Engine version 1.8.0
Microsoft Windows 7 Ultimate Edition Service Pack 1 (Build 7601)
Using renderer: OpenGL 4.2.12002
AMD Radeon HD 6900 Series: ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 4.2
Resizing window (800 600)
Loaded texture: E:/Program Files/Minetest-0.4.6/textures/base/pack/menuheader.pn
g
[Mod travelnet] Error: Savefile 'E:\Program Files\Minetest-0.4.6\bin\..\worlds\F
irst Try/mod_travelnet.data' not found.
[Teleport Request] Teleport Request v0.1a Loaded.
[Titanium Mod] Loaded! By Aqua!
DROPS LOADED!
StreetsMod loaded!
[Plantlife Library] Loaded
[Vines] Loaded!
[Poison Ivy] Loaded.
[Junglegrass] Loaded.
[Flowers] Loaded.
[UnifiedDyes] Loaded!
[UnifiedBricks] Loaded!
[Colored Wood] Loaded!
Peaceful NPC commands.lua loaded! By jojoa1997!
Peaceful NPC items.lua loaded! By jojoa1997!
Peaceful NPC spawning.lua loaded! By jojoa1997!
Peaceful NPC recipes.lua loaded! By jojoa1997!
Peaceful NPC loaded! By jojoa1997!
[Moretrees] Loaded (2013-02-11)
Pipeworks loaded!
[OK] Mesecons
[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loading....
[BobBlocks] loading Blocks
[BobBlocks] loaded Blocks
[BobBlocks] loading Health
[BobBlocks] loaded Health
[BobBlocks] loading Traps
[BobBlocks] loaded Traps
[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loaded!
Registered default:fence_wood and signs:sign_post
Registered homedecor:fence_brass and homedecor:fence_brass_with_sign
Registered homedecor:fence_wrought_iron and homedecor:fence_wrought_iron_with_si
gn
[HomeDecor] Loaded!
[Habitat] Loaded!
[Plants] Loaded!
[Bamboo] Loaded!
[MESSAGE][GloopTest v0.0.3a] Loading Ore Module Now!
17:31:58: ERROR[main]: register_ore: clust_scarcity and clust_num_ores must be g
reater than 0
[MESSAGE][GloopTest v0.0.3a] Loading Tools Module Now!
[MESSAGE][GloopTest v0.0.3a] Loading Parts Module Now!
[MESSAGE][GloopTest v0.0.3a] Loading Compat Module Now!
[MESSAGE][GloopTest v0.0.3a] 4 modules were successfully loaded!
[Display Blocks] Loaded! by jojoa1997 :-)
[moreores] loaded.
[moreblocks] loaded.
[stained_glass] Loaded!
Gloopblocks Loaded!
[maptools] loaded.
17:31:58: ACTION[main]: MOD: animalmaterials loading ...
17:31:58: ACTION[main]: MOD: animalmaterials mod version 0.0.15 loaded
MOD: mobf loading ...
registering pattern dont_move
registering pattern run_and_jump_low
registering pattern stop_and_go
registering pattern swim_pattern1
registering pattern swim_pattern2
registering pattern flight_pattern1
MOD: mob framework mod 2.0.5 loaded
17:31:58: ACTION[main]: MOD: mobf_settings mod loading ...
17:31:58: ACTION[main]: MOD: mobf_settings mod version 0.0.18 loaded
17:31:58: ACTION[main]: MOD: mob_slime mod loading ...
17:31:58: ACTION[main]: adding mob slime_L
17:31:58: ACTION[main]: adding mob slime_M
17:31:58: ACTION[main]: adding mob slime_S
17:31:58: ACTION[main]: MOD: mob_slime mod version 0.0.9 loaded
17:31:58: ACTION[main]: MOD: mob_ostrich mod loading ...
17:31:58: ACTION[main]: adding mob ostrich_m
17:31:58: ACTION[main]: adding mob ostrich_f
17:31:58: ACTION[main]: MOD: mob_ostrich mod version 0.0.3 loaded
17:31:58: ACTION[main]: MOD: mob_npc mod loading ...
17:31:58: ACTION[main]: adding mob npc_trader
17:31:58: ACTION[main]: adding mob npc
17:31:58: ACTION[main]: MOD: mob_npc mod version 0.0.9 loaded
17:31:58: ACTION[main]: MOD: barn mod loading ...
17:31:58: ACTION[main]: MOD: barn mod version 0.0.9 loaded
17:31:58: ACTION[main]: MOD: mob_wolf loading ...
17:31:58: ACTION[main]: adding mob wolf
17:31:58: ACTION[main]: MOBF: no movement pattern specified!
17:31:58: ACTION[main]: adding mob tamed_wolf
17:31:58: ACTION[main]: MOBF: no movement pattern specified!
17:31:58: ACTION[main]: MOD: animal_wolf mod version 0.0.12 loaded
17:31:58: ACTION[main]: MOD: loading animal_vombie ...
17:31:58: ACTION[main]: adding mob vombie
17:31:58: ACTION[main]: MOD: animal_vombie mod version 0.0.17 loaded
17:31:58: ACTION[main]: MOD: trap mod loading ...
17:31:58: ACTION[main]: MOD: trap mod version 0.0.2 loaded
17:31:58: ACTION[main]: MOD: animal_sheep mod loading ...
17:31:58: ACTION[main]: adding animal sheep
17:31:58: ACTION[main]: adding animal sheep_naked
17:31:58: ACTION[main]: adding animal lamb
17:31:58: ACTION[main]: MOD: animal_sheep mod version 0.0.22 loaded
17:31:58: ACTION[main]: MOD: animal_rat loading ...
17:31:58: ACTION[main]: adding rat
17:31:58: ACTION[main]: MOD: animal_rat mod version 0.0.8 loaded
17:31:58: ACTION[main]: MOD: animal_gull loading ...
17:31:58: ACTION[main]: adding mob gull
17:31:58: ACTION[main]: MOD: animal_gull mod version 0.0.11 loaded
17:31:58: ACTION[main]: MOD: animal_fish_blue_white loading ...
17:31:58: ACTION[main]: adding mob fish_blue_white
17:31:58: ACTION[main]: MOD: animal_fish_blue_white mod version 0.0.11 loaded
17:31:58: ACTION[main]: MOD: animal_dm loading ...
17:31:58: ACTION[main]: adding mob dm
17:31:58: ACTION[main]: MOD: animal_dm mod version 0.0.15 loaded
17:31:58: ACTION[main]: MOD: animal_deer mod loading ...
17:31:58: ACTION[main]: adding mob deer_m
17:31:58: ACTION[main]: MOD: animal_deer mod version 0.0.10 loaded
17:31:58: ACTION[main]: MOD: animal_creeper mod loading ...
17:31:58: ACTION[main]: adding mob creeper
17:31:58: ACTION[main]: MOD: animal_creeper mod version 0.0.15 loaded
17:31:58: ACTION[main]: MOD: animal_cow mod loading ...
17:31:58: ACTION[main]: adding baby_calf_f
17:31:58: ACTION[main]: adding baby_calf_m
17:31:58: ACTION[main]: adding cow
17:31:58: ACTION[main]: adding steer
17:31:58: ACTION[main]: MOD: animal_cow mod version 0.0.18 loaded
17:31:58: ACTION[main]: MOD: animal_clownfish mod loading ...
17:31:58: ACTION[main]: adding animal clownfish
17:31:58: ACTION[main]: MOD: animal_clownfish mod version 0.0.9 loaded
17:31:58: ACTION[main]: MOD: animal_chicken mod loading ...
17:31:58: ACTION[main]: adding animal chicken
17:31:58: ACTION[main]: adding animal chick_m
17:31:58: ACTION[main]: adding animal chick_f
17:31:58: ACTION[main]: adding animal rooster
17:31:58: ACTION[main]: MOD: animal_chicken mod version 0.0.15 loaded
17:31:58: ACTION[main]: MOD: animal_big_red mod loading ...
17:31:58: ACTION[main]: adding mob big_red
17:31:58: ACTION[main]: MOD: animal_big_red mod version 0.0.17 loaded
17:31:58: ERROR[main]: ========== ERROR FROM LUA ===========
17:31:58: ERROR[main]: Failed to load and run script from
17:31:58: ERROR[main]: E:\Program Files\Minetest-0.4.6\bin\..\mods\survival\DOM\
nt\init.lua:
17:31:58: ERROR[main]: ...\Minetest-0.4.6\bin\..\mods\survival\DOM\nt\init.lua:1
26: attempt to call global 'DOM_mensagem_de_carga' (a nil value)
17:31:58: ERROR[main]: stack traceback:
17:31:58: ERROR[main]: ...\Minetest-0.4.6\bin\..\mods\survival\DOM\nt\init.lua:
126: in main chunk
17:31:58: ERROR[main]: =======END OF ERROR FROM LUA ========
17:31:58: ERROR[main]: Server: Failed to load and run E:\Program Files\Minetest-
0.4.6\bin\..\mods\survival\DOM\nt\init.lua
17:31:58: ERROR[main]: ModError: Failed to load and run E:\Program Files\Minetes
t-0.4.6\bin\..\mods\survival\DOM\nt\init.lua

Posted:
Sat Apr 20, 2013 23:36
by deivan
Ok, I miss the link. I already updated now both, library and mod. Try again please.

Posted:
Sat Apr 20, 2013 23:53
by Devestatio
Ok that worked great now, it take a while to load with it on, but I can deal with that. One request though, can you make it so that the leaves decay instantly, instead of having to wait for them to decay on their own? and also make the fruit and stuff drop with the logs?

Posted:
Sun Apr 21, 2013 00:07
by deivan
Well, each mod added is more time you need to load all. If found a problem please call me. :D

Posted:
Sun Apr 21, 2013 00:16
by Devestatio
yea I understand that, that's why I said I was fine with it, but you didn't answer my question =P
Can you make it so that the leaves decay instantly, instead of having to wait for them to decay on their own? and also make the fruit and stuff drop with the logs?

Posted:
Sun Apr 21, 2013 00:58
by deivan
Well, this mod get the first node and "kill" all other of the same type, without a list of each part of each tree is a risk process. Is possible timber part of your house... :-o
Maybe in the future. ;)

Posted:
Fri May 24, 2013 12:27
by Mossmanikin
Like it!
Hope you can find a way to let the leaves drop together with the logs.

Posted:
Fri May 24, 2013 21:46
by deivan
You need it? I like the natural decay of leaves and this path leave this mod very simple.
The main problem with this idea is the tree don't is a live entity, when a tree is a entity this mod don't will be necessary. If a tree die, all drop in a option, if is developed to it. But at this point I need a big table with the map of every tree and leaves and maybe fruits. Is possible but the correct way in my point of view is every tree a entity, if your "kill him" then all drops instantly or like leaves, with some time.

Posted:
Fri May 24, 2013 22:23
by Mossmanikin
It's just that I imagine a whole tree going down when reading/hearing the word "timber".
Don't know if you looked at TreeCapitator (
http://forum.minetest.net/viewtopic.php?id=4772), I had the impression you wanted this mod to be more like that one.
Of course if you want to keep this mod simple it's fine the way it is.

Posted:
Fri May 24, 2013 22:47
by deivan
My plan is to wait for the implementation in the game core. At this point I only am planning add this "power" as a super power granted for some users.

Posted:
Tue Jun 04, 2013 02:38
by deivan
New version is ready, now covering trees from the mod "growing trees" and all this new strange trees. :D

Posted:
Thu Jun 06, 2013 20:58
by deivan
No problem with the version 0.4.7. All ok here with this mod.

Posted:
Sat Apr 05, 2014 07:56
by mimilus
A little slow on mt 0.4.9 dev
Usefull mod , I like it :)

Posted:
Mon Apr 07, 2014 01:30
by deivan
This is a game problem... I don't have how correct the speed of the script. :-/
Sorry.

Posted:
Mon Apr 07, 2014 08:47
by Krock
deivan wrote:Well, already have this compatibilty, any change of have a identification of the type of the wood for me?
This mod cover:
"default:jungletree"
...
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
if minetest.registered_nodes[name].groups.tree then
cut_down()
end
deivan wrote:This is a game problem... I don't have how correct the speed of the script. :-/
Sorry.
How about voxelmanip?

Posted:
Mon Apr 07, 2014 15:11
by deivan
Well. Maybe I rewrite some of this and make some tests... Thanks.