[Mod] More Trees! [git][moretrees]
- Likwid H-Craft
- Member
- Posts: 1113
- Joined: Sun Jan 06, 2013 14:20
- Location: Lost in Crypt
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Thanks for the bugfix on the vertical tree nodes! The small houses I did build for wood-traders look better now. Hopefully they can eventually be spawned and populated.
A list of my mods can be found here.
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
Likwid: Palm trees have coconuts.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
If the jungle biome returns to Minetest, will your jungle trees appear in them and more heavily than they do normally? A jungle should be a wet place. Will the palm trees appear in them as well?
Last edited by Inocudom on Tue Feb 12, 2013 01:14, edited 1 time in total.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
I don't know what changes will take place if jungle trees are added back to the default game. That said, the ones provided by this mod aren't quite as prevalent as I wanted them to be. I'll fix this eventually.
In the meantime, new update just now:
Made leaves depend on the trunks they spawn with to avoid decaying rather than just any trunk being enough to stop just any leaves from decaying. Re-tuned the leaf decay interval/chance values accordingly. Changed a few variables to avoid possible conflicts. Added a setting to allow one to disable the new leaf decay code. Moved sapling growth code into its own file. Minor changes to comments here and there. Got rid of simple trees list (made the code do various checks in realtime instead, since it's just startup code anyway). Fixed messed-up crafting for jungle trees; condensed most of the crafting code into main craft registry loop. Mostly fixed broken aliases of default jungletrees.
In the meantime, new update just now:
Made leaves depend on the trunks they spawn with to avoid decaying rather than just any trunk being enough to stop just any leaves from decaying. Re-tuned the leaf decay interval/chance values accordingly. Changed a few variables to avoid possible conflicts. Added a setting to allow one to disable the new leaf decay code. Moved sapling growth code into its own file. Minor changes to comments here and there. Got rid of simple trees list (made the code do various checks in realtime instead, since it's just startup code anyway). Fixed messed-up crafting for jungle trees; condensed most of the crafting code into main craft registry loop. Mostly fixed broken aliases of default jungletrees.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
It's already there, in the "Dependencies" section.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
First you gotta tell me what the problem IS :-)
Moretrees saplings won't spawn on anything but sand for palms and dirt with grass for everything else.
Moretrees saplings won't spawn on anything but sand for palms and dirt with grass for everything else.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
VanessaE wrote:First you gotta tell me what the problem IS :-)
well. as you probably fugured out (sorry for not mention the exact problem, my mind is total rubbish) saplings don't spawn.
what do you mean?VanessaE wrote:Moretrees saplings won't spawn on anything but sand for palms and dirt with grass for everything else.
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
I mean they won't *grow* except if planted on those surfaces, sorry. They take quite a while to grow, but this is intentional, given the average size of the trees.
Are you sure you have the very latest plants_lib and moretrees? Usually when I update one, some related update has been done to the other, so you usually have to keep them both up-to-date.
Is there anything in your install that could keep ABMs from running?
Are you sure you have the very latest plants_lib and moretrees? Usually when I update one, some related update has been done to the other, so you usually have to keep them both up-to-date.
Is there anything in your install that could keep ABMs from running?
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
Oh ok.
Pretty sure.
I was thinking something like that, but as far as I understand there shouldn't be an abm which could do this at all. If you could look through latest dwarves... Yes, I understand you may not have time, but just give a fast glance on mods which may cause the problem, I'll look into it more deeply, if I can.
Thank you
EDIT: do i have to have whole plantlife or is just the plants_lib is enough?
EDIT2:
code for my leaves.
Pretty sure.
I was thinking something like that, but as far as I understand there shouldn't be an abm which could do this at all. If you could look through latest dwarves... Yes, I understand you may not have time, but just give a fast glance on mods which may cause the problem, I'll look into it more deeply, if I can.
Thank you
EDIT: do i have to have whole plantlife or is just the plants_lib is enough?
EDIT2:
Code: Select all
minetest.register_node("default:leaves", {
description = "Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_leaves.png"},
paramtype = "light",
groups = {snappy=3, leafdecay=3, flammable=2},
drop = {
max_items = 1,
items = {
{
items = {'default:sapling'},
rarity = 15,
},
{
items = {'default:leaves'},
}
}
},
climbable = true,
after_destruct = function(pos, node, digger)
pos.y = pos.y + 1
local nodename = minetest.env:get_node(pos).name
if nodename == "snow:snow" then
minetest.env:remove_node(pos)
end
end,
sounds = default.node_sound_leaves_defaults(),
walkable = false,
})
Last edited by Mito551 on Mon Feb 18, 2013 19:14, edited 1 time in total.
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
Only plants_lib is required to run moretrees. An ABM is really the only way to handle saplings, since after a sapling grows, there's nothing to trigger on anymore in that spot. Regarding leaves, I might consider this code in future, as I do want to make sure moretrees plays nicely with the snow mod. I just haven't had much time lately.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
Yeah, well. Since I'm keeping a game which is a whole, there is just no need to redefine all the stuff hundreds of times. OK, I'll try to look into the problem myself then. Thank you anyways.VanessaE wrote:Only plants_lib is required to run moretrees. An ABM is really the only way to handle saplings, since after a sapling grows, there's nothing to trigger on anymore in that spot. Regarding leaves, I might consider this code in future, as I do want to make sure moretrees plays nicely with the snow mod. I just haven't had much time lately.
Code: Select all
minetest.register_abm({
nodenames = {"moretrees:jungletree_leaves_red","moretrees:jungletree_leaves_green","moretrees:jungletree_leaves_yellow"},
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, {"default:jungletree", "moretrees:jungletree_trunk"}) then
minetest.env:remove_node(pos)
minetest.env:dig_node(pos)
end
end
})
Code: Select all
minetest.env:remove_node(pos)
Code: Select all
minetest.env:dig_node(pos)
Code: Select all
minetest.env:remove_node(pos)
Code: Select all
ACTION[ServerThread]: digs air at (446,34,-457)
Last edited by Mito551 on Tue Feb 19, 2013 15:34, edited 1 time in total.
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
The purpose of that code is to force a node update, which causes "attached" items such as pine cones to fall in the case of a pine tree. If you just dig_node() first, you end up digging a leaves node, which takes a tiny bit longer than doing a remove_node() followed by digging the resultant air. This just seemed like the easiest way to do it without any side effects.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
I don't understand how that helps cones fall. Could you expand on it a bit?VanessaE wrote:The purpose of that code is to force a node update, which causes "attached" items such as pine cones to fall in the case of a pine tree. If you just dig_node() first, you end up digging a leaves node, which takes a tiny bit longer than doing a remove_node() followed by digging the resultant air. This just seemed like the easiest way to do it without any side effects.
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
Just executing remove_node() by itself doesn't cause them to fall. Adding the dig_node() call right after is what does it, probably because that call is intended to simulate a player actually digging the node (even if it's air), which triggers the engine's attached-item-falling code and also forces the engine to update the lighting in the immediate area, which tends to be a necessity with these huge trees.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
2013-02-20: Made jungle trees more numerous and able to spread further from water, took leaves out of the avoidnodes table, there's really no reason to have them there and having them causes too much spacing between trees. Reduced the prevalence of sequoias.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
I think that you should be patching the engine, creating a Lua function to do just the update-triggering part of digging.VanessaE wrote:Just executing remove_node() by itself doesn't cause them to fall. Adding the dig_node() call right after is what does it, probably because that call is intended to simulate a player actually digging the node (even if it's air), which triggers the engine's attached-item-falling code and also forces the engine to update the lighting in the immediate area, which tends to be a necessity with these huge trees.
Speaking of falling items etc., I sometimes see trees suspended in mid-air. Presumably, at map generation time, soil was placed there but later removed or dropped by some cavern generation code.
It could be useful to have the game handle groups of nodes much like it handles falling sand and gravel, but retaining shape – with some ‘attached to’ information: more than just which side, though, such that adjacent leaves aren't considered connected unless they share a (possibly indirect) attachment to a trunk node. Intent is that if all in the group can fall, then and only then will they fall.
(Implementation: I'd probably have it such that both spawning node and spawned node reference each other if part of a group.)
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
Patching the engine to automatically trigger the falling code is beyond my skills at this point.
Parts of the trees just randomly getting erased is indeed a cave generator bug, which is expected to be fixed soon.
About the other falling stuff, I'm not sure I understand what you're getting at - are you suggesting causing an entire tree to drop down a bit in the case of the bottom being erased?
The leaves cutting a trunk due to an oversight/missing feature in the tree spawning code in the engine, which should also be fixed soon.
offtopic: Noting your mention of nature mod, I take it that mod works okay alongside current plants_lib then? What about bushes and the others from nature pack?
Parts of the trees just randomly getting erased is indeed a cave generator bug, which is expected to be fixed soon.
About the other falling stuff, I'm not sure I understand what you're getting at - are you suggesting causing an entire tree to drop down a bit in the case of the bottom being erased?
The leaves cutting a trunk due to an oversight/missing feature in the tree spawning code in the engine, which should also be fixed soon.
offtopic: Noting your mention of nature mod, I take it that mod works okay alongside current plants_lib then? What about bushes and the others from nature pack?
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
I may be able to do that; I've not looked at the relevant code, though, so I can't say any more than that.VanessaE wrote:Patching the engine to automatically trigger the falling code is beyond my skills at this point.
Basically, yes, if it's not blocked in some way. (It occurs to me that leaf blocks could be randomly broken off if they would otherwise stop the tree from falling.)[…] About the other falling stuff, I'm not sure I understand what you're getting at - are you suggesting causing an entire tree to drop down a bit in the case of the bottom being erased?
’bushes’ doesn't work at present, but ‘irontrees’, ‘legacy’, ‘nature’ and ‘plants’ seem fine so far.[…] offtopic: Noting your mention of nature mod, I take it that mod works okay alongside current plants_lib then? What about bushes and the others from nature pack?
Code: Select all
…/bushes/init.lua:39: attempt to call global 'spawn_on_surfaces' (a nil value)
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
Moving a whole tree down is doable and not too terribly hard to detect when it needs to happen, but it would be slow given the sheer number of nodes in a tree, even if the engine did all the work.
Bushes should be easy to fix, just add "plantslib:" in front of that function call, e.g. "plantslib:spawn_on_surfaces(...."
Actually, the furnaces are fine - I just needed to add fuel recipes for the leaves (and saplings). Fixed in git.
Bushes should be easy to fix, just add "plantslib:" in front of that function call, e.g. "plantslib:spawn_on_surfaces(...."
Actually, the furnaces are fine - I just needed to add fuel recipes for the leaves (and saplings). Fixed in git.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
Who is online
Users browsing this forum: No registered users and 22 guests