[Mod] More Trees! [git][moretrees]

dsalt
Member
 
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Thu Feb 21, 2013 19:56

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.


I think that you should be patching the engine, creating a Lua function to do just the update-triggering part of digging.

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.)
 

dsalt
Member
 
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Thu Feb 21, 2013 20:16

[img=Trunk eaten by leaves!]http://www.moreofthesa.me.uk/minetest/moretrees-20130221-trunk-oops.jpg[/img]

Looks like one tree trunk has been ‘eaten’ by leaves from another…

(Current moretrees git; current minetest git; blossom provided by the ‘nature’ mod.)
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Feb 21, 2013 22:35

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?
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

dsalt
Member
 
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Fri Feb 22, 2013 02:23

VanessaE wrote:Patching the engine to automatically trigger the falling code is beyond my skills at this point.


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.

[…] 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?


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.)

[…] 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?


’bushes’ doesn't work at present, but ‘irontrees’, ‘legacy’, ‘nature’ and ‘plants’ seem fine so far.

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
…/bushes/init.lua:39: attempt to call global 'spawn_on_surfaces' (a nil value)


Looks like the furnace needs some tweaking – it's picky about which leaves it can use. I've not tried different wood yet.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Feb 22, 2013 03:24

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.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

dsalt
Member
 
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Fri Feb 22, 2013 16:52

VanessaE wrote: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.


Could very well be…

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.


Those seem fine now ☺
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Feb 23, 2013 17:38

2013-02-23: Added support for spawning small fir trees in snow biomes. Made jungletrees and palms require at least +15°C to grow. This is supposed to keep them away from snow biomes, but the engine doesn't let me tell the snow mod to always run first. Also please note that due to the load that snow biomes + moretrees adds to the map generator, well... stuff will look cut off, broken, etc. due to bugs in the map generator.

You must get today's of update plantlife/plants_lib to take advantage of this feature, but I don't think anything will break if you don't.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

dsalt
Member
 
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Sat Feb 23, 2013 18:36

Yes… dependency issues are Fun™.

I have a patch which does two-pass initialisation – first pass (hooks.lua) for things which don't depend on other mods, then the second pass (init.lua) for the rest.

That said, I think that that splits things in the wrong way for what you want, which would appear to be soft dependencies.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Feb 23, 2013 18:39

Well something like that. Ideally I'd just want snow mod's mapgen hooks to be executed before mine, so that my mod doesn't have things like palm trees in the middle of a snowy beach, etc.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Sat Feb 23, 2013 22:31

so, it's me again. it decided that something's wrong, but i have no idea why.

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
02:30:05: ERROR[main]: ========== ERROR FROM LUA ===========
02:30:05: ERROR[main]: Failed to load and run script from
02:30:05: ERROR[main]: E:\Dropbox\minetest-2013.02.20-b29834ab02\bin\..\games\dwarves_simple\mods\moretrees\init.lua:
02:30:05: ERROR[main]: ...\..\games\dwarves_simple\mods\moretrees/saplings.lua:10: attempt to index field '?' (a nil value)
02:30:05: ERROR[main]: stack traceback:
02:30:05: ERROR[main]:     ...\..\games\dwarves_simple\mods\moretrees/saplings.lua:10: in main chunk
02:30:05: ERROR[main]:     [C]: in function 'dofile'
02:30:05: ERROR[main]:     ...\bin\..\games\dwarves_simple\mods\moretrees\init.lua:31: in main chunk
02:30:05: ERROR[main]: =======END OF ERROR FROM LUA ========


...and by "?" it means "surface"
plants_lib latest.
Last edited by Mito551 on Sat Feb 23, 2013 22:45, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Feb 24, 2013 01:09

I can't be sure either, unless either moretrees or plants_lib is not actually current with this afternoon's updates. They work fine on my end, and I don't see anything about the code in either mod that would do this normally.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Sun Feb 24, 2013 09:54

both latest, i downloaded them from github just yesterday evening. i suspect it might be happening because i have a russian system with jap locale set? :D

UPD: did a clean install, now works
Last edited by Mito551 on Sun Feb 24, 2013 11:06, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Feb 24, 2013 16:54

Good deal. glad to know it wasn't my code ;-)
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Sun Feb 24, 2013 17:02

VanessaE wrote:Good deal. glad to know it wasn't my code ;-)

but i ran into something AGAIN. sorry, this isn't even funny.
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
ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...bin\..\games\dwarves_simple\mods\plants_lib\init.lua:376: attempt to index global 'p_top' (a nil value)


i don't what why or when that happened, i was out. i come back - i see this. server loads fine, but sometimes carshes with that.
Last edited by Mito551 on Sun Feb 24, 2013 17:03, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Feb 24, 2013 17:13

GAH! Sorry about that. I suck. p_top should be pos in those lines. Fixed in git.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Sun Feb 24, 2013 18:12

VanessaE wrote:GAH! Sorry about that. I suck. p_top should be pos in those lines. Fixed in git.


roger.
 

User avatar
doyousketch2
Member
 
Posts: 82
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2

by doyousketch2 » Thu Mar 14, 2013 02:32

Was trying to figure out why seedling wouldn't grow, so I set

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
-- Sapling settings

moretrees.sapling_interval = 0
moretrees.sapling_chance = 100


so it would sprout right away -

Perhaps this is the wrong way to go about doing it, I dunno, but it would crash when a tree grew.

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
22:09:20: ERROR[EmergeThread]: ERROR: An unhandled exception occurred: LuaError: error: ...t/bin/../mods/minetest/plantlife/plants_lib/init.lua:111: attempt to concatenate field 'surface' (a table value)


Here's the full debug if you need more info:
http://wikisend.com/download/607126/debug.txt

there was also a huge shadow under trees that seemed more than it should be...
- tho that's 'ptolly moreso the game engine.

And I was having some kinda trouble with Unified Inventory, so I disabled that-
along with all the other mods, just to be certain they weren't interfering.
Last edited by doyousketch2 on Thu Mar 14, 2013 02:35, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Mar 14, 2013 02:42

Can you re-check that you have the latest plants_lib (and moretrees)? Line 111 of my current plants_lib code doesn't use that variable (in fact it's in the middle of the mapgen-based spawner).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
doyousketch2
Member
 
Posts: 82
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2

by doyousketch2 » Thu Mar 14, 2013 04:56

ty, yeah. That seems to clear everything up.
Still dunno why they weren't sprouting on 12Me21's house.

As far as I can tell, most only need a single block of dirt_with_grass underneath 'em.

Can be out in the ocean, floating 5 blocks up, in the middle of the night, and still spring up.
Image

Just needs lots of time, even with it cut down like that.

N e way, think it would be smooth to add in another texture block for each tree,
that's got more transparent holes in 'em with some branchy looking lines.

I was originally thinking it'll mostly fluff up the outside
- dense bits inside, lighter open branches outside,

but it'd be cool just to generate the trees by randomly flipping between the two,
and let the branchy bits be inside too.

Might try it out with one tree and show you what I mean, then you can lemme know what'cha think.

Edit: oh, I suppose some kinda small bush-like entities would be smooth to add too.
Last edited by doyousketch2 on Thu Mar 14, 2013 05:24, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Mar 14, 2013 15:30

Well I used to require a 3x3 flat area under a tree to spawn, early in this mod's development, but the way Minetest's maps usually are, that caused large portions of the map to remain bare of the new trees because of the hills being usually 1 node wide per step in elevation.

Bush-like trees would be easy: the default trees, as compared to even a willow. Hell even the beech trees (disabled by default) are larger. :D
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Thu Mar 14, 2013 15:48

The missing flat area is less of a problem. Let's better stick to speed there. Bushes are something diffrent. They would be great if they could be done convincingly! They ought to be far less heigh than the default trees and start further down at the ground. Plus the thrunks need to be much smaller. Those leave-nodes containing branches as suggested by doyousketch2 might fit well.
A list of my mods can be found here.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Thu Mar 14, 2013 15:51

I think it would be awsome to have a bush that hangs off the side of a cliff.likeImage
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
doyousketch2
Member
 
Posts: 82
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2

by doyousketch2 » Thu Mar 14, 2013 17:38

Been playing this game too much, started my reply by typing T...

lols, well thought about it while I slept.

It's 'prolly too much to make leaves_2 for every tree,
'cuz then you'd have to register all of 'em,
and carry around a seperate leaf-type for every tree.

However, we could make one block and simply call it branches.
It could have, say a 35-40% chance of replacing any leaf on a tree
(other than palm trees.)

It could be quite open, with just a little bit of green and some brown twiggy lines,
then when you chop it, it gives you a stick or two.

Everybody likes sticks, they're usable.
Plus you wouldn't have to register a whole lotta extra nodes, or create graphics for every tree type.

Gonna do the shower thing. The graphic should be easy.
Coding shoudln't be too difficult. Maybe do a final loop where it scans from ceiling to ground again,
swapping out a leaf for a branch here and there. Might take a min to put it together tho.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Thu Mar 14, 2013 17:58

Great mod! I installed it and I'm speechless! :)
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Mar 14, 2013 22:14

Actually rendering two types of leaves is trivial - jungle trees do this. Now, getting them to only show up in certain places is more difficult. One could register one type as a fruit and use L-systems commands to explicitly place them (palm trees do this), leaving the other kind of leaves as the main filler.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

legumev
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 11:43

by legumev » Mon Mar 18, 2013 16:00

Tree variety is nice, but, in my opinion, this mod goes a little overboard with tree height and trunk thickness.
Also, the building time at game startup is very long.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Mar 18, 2013 16:28

The height and size of the trees is deliberate and the world startup time is as good as I can do short of porting plants_lib (the part that does all the heavy lifting) to C++.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Mar 19, 2013 21:06

Update 2013-03-19: Moretrees no longer redefines/overrides jungle tree nodes et.al, except for red/green/yellow leaves. Instead, the default minetest_game nodes will be used to grow a jungle tree. Aliases are provided for backwards compatibility with existing maps made with previous versions of moretrees.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Apr 08, 2013 02:55

Update 2013-04-07:

Multiple changes in the master branch:

Fix replacement of default trees so that it works correctly. Beeches now use default tree nodes, but L-systems models. This redefines the default tree, wood, leaves, and saplings so that they use Moretrees' textures and the word "Beech" in their descriptions, but only if replacement of default trees is enabled (which is the default).

Added backward-compat aliases for this change.

Moved tree replacement mapgen->air aliases to a more logical spot in the code.

Also, changed out all leaf decay dig_node() calls for nodeupdate(), since the former calls the latter anyway, and the latter is what does the job.

Increased the palm leaf decay radius to 12.

Newstuff branch:

Newly-added branch containing experimental support for stairs/slabs/etc via More Blocks' circular saw, and so unlike the master branch, newstuff depends on the More Blocks mod. Notice: it adds a crapload of nodes, and may cause your server to crash if you're already near the limit of defined nodes (4096, due to an engine limitation).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Jouster27
Member
 
Posts: 117
Joined: Fri Mar 29, 2013 14:16

by Jouster27 » Mon Apr 08, 2013 05:06

VanessaE wrote:Update 2013-03-19: Moretrees no longer redefines/overrides jungle tree nodes et.al, except for red/green/yellow leaves. Instead, the default minetest_game nodes will be used to grow a jungle tree. Aliases are provided for backwards compatibility with existing maps made with previous versions of moretrees.


Tried the newstuff branch and now I'm able to craft with wood again. Thank you.

Oh and I have no idea how many nodes I'm running at the moment but yeah, it did crash my server the first time I started my game with the new version of the mod. Tried again, though and it seems to be running ok. *knock on wood*
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 61 guests

cron