[Mod] lib_ecology [lib_ecology][git]
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [Mod] lib_ecology [lib_ecology][git]
Thanks You!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
I think I've cleared up the CONTENT IGNORE messages. Most, if not all, were due to name changes that affected various decorations or trying to place the wrong kind of decorations.
FIXES:
Added a few new plants and trees.
Corrected missing texture issues.
Fixed broken schematics and other decorations.
IMPROVEMENTS:
Added support for lib_shapes (git), lib_shapes (forum topic) mod.
**lib_shapes is a drop in replacement for stairs, walls, fences, beds, doors..
DOWNLOAD:
lib_ecology on github.
Please report issues here or on git. I watch both. Let me know what you think, either way.
Shad
FIXES:
Added a few new plants and trees.
Corrected missing texture issues.
Fixed broken schematics and other decorations.
IMPROVEMENTS:
Added support for lib_shapes (git), lib_shapes (forum topic) mod.
**lib_shapes is a drop in replacement for stairs, walls, fences, beds, doors..
DOWNLOAD:
lib_ecology on github.
Please report issues here or on git. I watch both. Let me know what you think, either way.
Shad
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [Mod] lib_ecology [lib_ecology][git]
Cool! I'll test as soon as possible!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
UPDATE 2019 - 10 - 12:
Added dry grass as ecosystem in semi arid biomes.
Added aliases for shapes as stairs / slabs
Added dry grass as ecosystem in semi arid biomes.
Added aliases for shapes as stairs / slabs
Re: [Mod] lib_ecology [lib_ecology][git]
Hi ShaMOrdre,
What version of MTG are you developing on? I've tried using lib_ecology on 4.17 and 5.1.1 and I get no new trees new biomes etc.
What version of MTG are you developing on? I've tried using lib_ecology on 4.17 and 5.1.1 and I get no new trees new biomes etc.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
Hello Cartmic,
Currently, I have been developing on MTv5.0.1.
As for the issue you report, this is common when lib_materials / lib_ecology are used in combination with other mods that also define their own biomes. Ethereal, valleys_c, australia, and aoteara are all mods that clear registered biomes, and so when used with this mod, the biomes produced by this mod may or may not be enabled, depending on which mod loaded first. This is a common issue, and is the expected behavior of MT and mods.
Another consideration is that this mod hard depends on lib_materials. All biomes and ecosystems are registered in lib_materials, while lib_ecology only adds plants and trees.
Please ensure that you have both lib_materials and lib_ecology loading, and that you are not also using any of the aforementioned mods that may be clearing biomes. If you do want to use those mods, you will either need to prevent that mod from clearing biomes, or add a dependency to your copies of these mods to accommodate all mods running together. They can coexist well, if the proper edits are done to local copies of installed mods.
Please let me know if either of these solutions worked for you.
Thanks for using lib_ecology!
Shad
Currently, I have been developing on MTv5.0.1.
As for the issue you report, this is common when lib_materials / lib_ecology are used in combination with other mods that also define their own biomes. Ethereal, valleys_c, australia, and aoteara are all mods that clear registered biomes, and so when used with this mod, the biomes produced by this mod may or may not be enabled, depending on which mod loaded first. This is a common issue, and is the expected behavior of MT and mods.
Another consideration is that this mod hard depends on lib_materials. All biomes and ecosystems are registered in lib_materials, while lib_ecology only adds plants and trees.
Please ensure that you have both lib_materials and lib_ecology loading, and that you are not also using any of the aforementioned mods that may be clearing biomes. If you do want to use those mods, you will either need to prevent that mod from clearing biomes, or add a dependency to your copies of these mods to accommodate all mods running together. They can coexist well, if the proper edits are done to local copies of installed mods.
Please let me know if either of these solutions worked for you.
Thanks for using lib_ecology!
Shad
Re: [Mod] lib_ecology [lib_ecology][git]
Thank you! I'll have a play around and see if I can find what's going wrong.
Trailgen A C++ mgv6-like mapgen using the biome api viewtopic.php?f=7&t=26751
Re: [Mod] lib_ecology [lib_ecology][git]
for some reason your mods create massive shadows underwater.
from above, this makes water look mostly opaque even when it is set to 'transparent', and rivers get very ugly textures because of the shadow.
the worst view is underwater. kelp is just black, the floor is black, terrain is mostly invisible, corals and clay are invisible. it looks like it's supposed to be very dark, but it's not because the sky shines brightly and caves seem to be glowing since the air inside is brighter than the water (even though the cave should be dark since the sun doesn't reach there).
from above, this makes water look mostly opaque even when it is set to 'transparent', and rivers get very ugly textures because of the shadow.
the worst view is underwater. kelp is just black, the floor is black, terrain is mostly invisible, corals and clay are invisible. it looks like it's supposed to be very dark, but it's not because the sky shines brightly and caves seem to be glowing since the air inside is brighter than the water (even though the cave should be dark since the sun doesn't reach there).
✨🏳️🌈♣️✨
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
firefox,
This should have been corrected in the last release. If that is not the case, I will push an update soon, that addresses this and other issues.
Thanks for reporting.
Shad
This should have been corrected in the last release. If that is not the case, I will push an update soon, that addresses this and other issues.
Thanks for reporting.
Shad
Re: [Mod] lib_ecology [lib_ecology][git]
What are the modifications that need to be made to Australia and Aeotora for this mod to work well?
cdb_71b6f99a808c
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
Updated for efficiency. Includes minimal new content.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [Mod] lib_ecology [lib_ecology][git]
Tried downloading this + 'lib_materials' today, but during the world startup it crashed due to not having lib_shapes, even though it is listed as an optional dependency.
So I added the 'lib_shapes' mod from here: https://github.com/ShadMOrdre/lib_shapes
which sadly only got me to another error:
Please advise.
Spoiler
Code: Select all
ModError: Failed to load and run script from C:\Games\minetest\bin\..\mods\lib_ecology\init.lua:
...in\..\mods\lib_ecology/lib_ecology_node_registration.lua:863: attempt to index global 'lib_shapes' (a nil value)
stack traceback:
...in\..\mods\lib_ecology/lib_ecology_node_registration.lua:863: in main chunk
[C]: in function 'dofile'
C:\Games\minetest\bin\..\mods\lib_ecology\init.lua:94: in main chunk
Check debug.txt for details.
which sadly only got me to another error:
Code: Select all
ModError: Failed to load and run script from C:\Games\minetest\bin\..\mods\lib_materials\init.lua:
...bin\..\mods\lib_shapes/lib_shapes_register_set_basic.lua:26: attempt to index local 'shape_def' (a nil value)
stack traceback:
...bin\..\mods\lib_shapes/lib_shapes_register_set_basic.lua:26: in function 'register_node'
....\mods\lib_materials/lib_materials_node_registration.lua:1048: in main chunk
[C]: in function 'dofile'
C:\Games\minetest\bin\..\mods\lib_materials\init.lua:126: in main chunk
Check debug.txt for details.
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
Skamiz Kazzarch,
The "optional" dependency is based on config options. If you look at the mod settings, from inside MTs Settings menu, you should see an option to enable lib_shapes support. If you disable this option, lib_materials and lib_ecology should work without lib_shapes. I don't remember when I've last updated that mod, but will push the code I currently use so that lib_shapes is also up to date.
Thanks for pointing out these issues. Let me know if you encounter any further problems.
Shad
The "optional" dependency is based on config options. If you look at the mod settings, from inside MTs Settings menu, you should see an option to enable lib_shapes support. If you disable this option, lib_materials and lib_ecology should work without lib_shapes. I don't remember when I've last updated that mod, but will push the code I currently use so that lib_shapes is also up to date.
Thanks for pointing out these issues. Let me know if you encounter any further problems.
Shad
- Gael de Sailly
- Member
- Posts: 845
- Joined: Sun Jan 26, 2014 17:01
- GitHub: gaelysam
- IRC: Gael-de-Sailly
- In-game: Gael-de-Sailly gaelysam
- Location: Voiron, France
Re: [Mod] lib_ecology [lib_ecology][git]
I notice that you removed the check for lib_shapes in lib_ecology_node_registration.lua. Why? IMO checking that the variable exists is the best way to deal with optional dependencies. It's important for the users that a mod can work natively without going into settings first, or installing mods that are listed as optional.ShadMOrdre wrote: ↑Mon Nov 23, 2020 05:04The "optional" dependency is based on config options. If you look at the mod settings, from inside MTs Settings menu, you should see an option to enable lib_shapes support. If you disable this option, lib_materials and lib_ecology should work without lib_shapes.
EDIT: tried to disable it and it still attempts to load it. I found that it is hardcoded in lib_materials/init.lua.
Just realize how bored we would be if the world was perfect.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [Mod] lib_ecology [lib_ecology][git]
OK. so.. found the setting, switched it... It doesn't seem to do anything.
So I start diging in the code and eventually find this line:
Now, I wasn't myself sure how exactly settings work, so I added a few debug lines to show the type and vlaue returned by 'setting_get'. Here are my findings:
If the setting hasn't been touched yet or if you use the 'Restore Default' button in the menu then the return value is nil. In this case the 'or' kicks in and 'enable_lib_shapes' is set to true.
If the setting has been switched manualy either way, the return value is is the string "true"/"false". Since in lua a string always evaluates as true 'enable_lib_shapes' now contains a string.
From what I have seen in your code you use 'enable_lib_shapes' by comparing it's equality to true, which means that if the setting is untouched the code will always execute. And if the setting was manualy changed then regardles if it's "true" or "false" the code won't be executed since "stirng" == 'boolean' will alway evaluate as false.
Furhtermore, even if 'setting_get' returned a boolean value, if it returned false that just means that the 'or' clause kicks in and the true at the end of the line gets used, which would make the setting impossible to turn off.
Of course non of this maters since three lines bellow that you have:
which completely discards the setting anyway.
Anyway, I tried setting the second line to false and it indeed solved the error regarding the missing 'lib_shapes'.
Instead I got this lovely error caused by looking for a file in the schems directory... which deosn't even exist.
Edit: Here I spend my time writing an elaborate post, and then I get ninjad and the punchline is spoiled. :(
So I start diging in the code and eventually find this line:
Code: Select all
lib_materials.enable_lib_shapes = minetest.setting_get("lib_materials_enable_lib_shapes_support") or true
If the setting hasn't been touched yet or if you use the 'Restore Default' button in the menu then the return value is nil. In this case the 'or' kicks in and 'enable_lib_shapes' is set to true.
If the setting has been switched manualy either way, the return value is is the string "true"/"false". Since in lua a string always evaluates as true 'enable_lib_shapes' now contains a string.
From what I have seen in your code you use 'enable_lib_shapes' by comparing it's equality to true, which means that if the setting is untouched the code will always execute. And if the setting was manualy changed then regardles if it's "true" or "false" the code won't be executed since "stirng" == 'boolean' will alway evaluate as false.
Furhtermore, even if 'setting_get' returned a boolean value, if it returned false that just means that the 'or' clause kicks in and the true at the end of the line gets used, which would make the setting impossible to turn off.
Of course non of this maters since three lines bellow that you have:
Code: Select all
lib_materials.enable_lib_shapes = true
Anyway, I tried setting the second line to false and it indeed solved the error regarding the missing 'lib_shapes'.
Instead I got this lovely error caused by looking for a file in the schems directory... which deosn't even exist.
Code: Select all
ModError: Failed to load and run script from C:\Games\minetest\bin\..\mods\lib_ecology\init.lua:
C:\Games\minetest\bin\..\mods\lib_ecology/schems/lib_ecology_schem_tree_mangrove_01.lua: No such file or directory
stack traceback:
[C]: in function 'schem'
...in\..\mods\lib_ecology/lib_ecology_deco_registration.lua:97: in function 'add_tree'
...in\..\mods\lib_ecology/lib_ecology_deco_registration.lua:654: in main chunk
[C]: in function 'dofile'
C:\Games\minetest\bin\..\mods\lib_ecology\init.lua:106: in main chunk
Check debug.txt for details.
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
Gael and Skamiz,
Thanks for pointing out these issues.
Yes, I need to properly code for dependant mods. I'll work out the kinks over the next few days, and get them posted.
Skamiz, thanks for clarifying the use of settings. I never thought that a true value from the settings would be typed as a string instead of a bool. That kinda explains many of the issues I've encountered as well as others. That info should be in the wiki, and lua api, since it is not really clear. This will get refactored into my many mods that use settings_type.txt. Thanks again!
Shad
Thanks for pointing out these issues.
Yes, I need to properly code for dependant mods. I'll work out the kinks over the next few days, and get them posted.
Skamiz, thanks for clarifying the use of settings. I never thought that a true value from the settings would be typed as a string instead of a bool. That kinda explains many of the issues I've encountered as well as others. That info should be in the wiki, and lua api, since it is not really clear. This will get refactored into my many mods that use settings_type.txt. Thanks again!
Shad
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod] lib_ecology [lib_ecology][git]
from here : viewtopic.php?p=391205#p391205ShadMOrdre wrote: ↑Tue Mar 02, 2021 05:53sirrobzeroone,
So I have 160 different tree types, each with 1 to 4 models, ....snip
Ideas?
Shad
Now I have lib_ecology and lib_materials running I've managed to get at least an initial pass at auto registering all the trees in lib_ecology. I say initial pass as I'm not convinced that all the trees have auto-registered correctly. I did run around and successfully cut a few down....I didnt check out coral trees :).
Anyways a few snags I hit which I had to manual edit on my local lib_ecology version. None of the decorations in lib_ecology have names, makes it tough to sort the trees from the shrubs and flowers. So I added the name field and pointed it at "f" in the "lib_ecology_deco_registration.lua". Just an example snip:
Spoiler
Code: Select all
local add_schem = function(a, b, c, d, e, f, g)
--if h ~= 1 then return end
minetest.register_decoration({
name = f, -- new addition
deco_type = "schematic",
place_on = a,
sidelen = 16,
fill_ratio = tonumber(b),
biomes = c,
y_min = tonumber(d) or (heights[d] - lib_ecology.biome_vertical_blend),
y_max = tonumber(e) or (heights[e] + lib_ecology.biome_vertical_blend),
schematic = lib_ecology.schematics.select(f),
flags = g or "place_center_x, place_center_z",
rotation = "random",
})
end
- lib_ecology:tree_teak_trunk",
- lib_ecology:tree_eucalyptus_trunk
- lib_ecology:tree_bamboo_small
- lib_ecology:tree_desert_palm
- lib_ecology:tree_small_jungle
- lib_ecology:fern_tree_small
Last one and I don't think this is an issue, more just asking a few tree schematics seem to include slopes from shapes. Does that cause any problems when the trees spawn in and if you dont have shapes installed? I can probably get a list of trees that have it but one I know for sure is the 2x2 trunked sequoia tree, it might be named "schem_tree_giant_sequoia_04", sorry I lost track of the name but its definitly one of those 4.
Anyways I'll keep refining, I may need to split trees differently than by trunk dimensions and skimming my reg table I have some what looks like odd stuff eg orange leaves on one jungle tree...might be like that or might not. I'll have to check the schematic :).
Edit: Also forgot to say when the leaves for the various trees get registered as nodes, there appears to be no saplings set as a 1/20 drop? Or at least not in the ecology nodes.csv file. I skimmed the code but couldnt see any special case handling for leaves either. Im guessing it might be on the todo list. If your open to it, Im happy to push some of these through as PR's on git?
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] lib_ecology [lib_ecology][git]
sirrobzeroone,
Sorry to hear about the difficulties in getting this to work. I must admit, I've mostly abandoned lib_materials / lib_ecology in favor of the GAL project. I've been coding on a Lua mapgen mostly, and forgot about the issue with mgv7. I think that is what got me on the Lua mapgen to begin with. The GAL project has the most trees, including those from australia and aotearoa mods.
Naming decorations, other than the water decos, never really occurred to me, but I can see how useful that is. I'll update GAL to include this nifty functionality.
Currently, not all trees are actually registered as decos, and so do not appear in the world, or in the registered_decos table.
All trees have a trunk node. Many others also have two allface nodes, one bark and one trunk top texture.
The tree_bamboo_small, is actually from Farlands game, and is a schematic of plant_like nodes, trunk and leaves.
The desert_palm, small_jungle, and fern_tree_small are all plant_like single nodes.
Schematics should only include air, trunk, leaves, fruit, or other tree associated nodes, like vines, liana, or moss. There are, however, exceptions, such as a schem of a tree on a mound of dirt. There was a couple of those, I think. The sequoia or redwood schem with a dirt node is an artifact, and represents a "dirty" schem. I'll get it cleaned up.
Also, any schem that references a slope can either set that node to air or to the base "cube" node. Slope_dirt becomes dirt.
Thanks for your efforts. I will incorporate the changes you suggest for here into the GAL project. I am working to get gal_geology and gal_ecology_plants /gal_ecology_trees to be depedency free, moving biome, ore, ecosystem, and deco registrations to a standalone mod, and leaving the geology and ecology mods as simply content providers.
Shad
Sorry to hear about the difficulties in getting this to work. I must admit, I've mostly abandoned lib_materials / lib_ecology in favor of the GAL project. I've been coding on a Lua mapgen mostly, and forgot about the issue with mgv7. I think that is what got me on the Lua mapgen to begin with. The GAL project has the most trees, including those from australia and aotearoa mods.
Naming decorations, other than the water decos, never really occurred to me, but I can see how useful that is. I'll update GAL to include this nifty functionality.
Currently, not all trees are actually registered as decos, and so do not appear in the world, or in the registered_decos table.
All trees have a trunk node. Many others also have two allface nodes, one bark and one trunk top texture.
The tree_bamboo_small, is actually from Farlands game, and is a schematic of plant_like nodes, trunk and leaves.
The desert_palm, small_jungle, and fern_tree_small are all plant_like single nodes.
Schematics should only include air, trunk, leaves, fruit, or other tree associated nodes, like vines, liana, or moss. There are, however, exceptions, such as a schem of a tree on a mound of dirt. There was a couple of those, I think. The sequoia or redwood schem with a dirt node is an artifact, and represents a "dirty" schem. I'll get it cleaned up.
Also, any schem that references a slope can either set that node to air or to the base "cube" node. Slope_dirt becomes dirt.
Thanks for your efforts. I will incorporate the changes you suggest for here into the GAL project. I am working to get gal_geology and gal_ecology_plants /gal_ecology_trees to be depedency free, moving biome, ore, ecosystem, and deco registrations to a standalone mod, and leaving the geology and ecology mods as simply content providers.
Shad
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod] lib_ecology [lib_ecology][git]
Shad, no worries at all.
Once i got ecology up and running, the biome defs and trees etc are very natural in regards to tree types found in biomes.
At the moment Im tidying up code and trying to deal with the coconut tree a little better once done I'll have a look and see how I go against GAL in regards to gettign the trees to register.
Once i got ecology up and running, the biome defs and trees etc are very natural in regards to tree types found in biomes.
At the moment Im tidying up code and trying to deal with the coconut tree a little better once done I'll have a look and see how I go against GAL in regards to gettign the trees to register.
Who is online
Users browsing this forum: Bing [Bot], Bla and 25 guests