[Mod] lib_ecology [lib_ecology][git]

User avatar
StarNinjas
Member
Posts: 334
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: aincrad

Re: [Mod] lib_ecology [lib_ecology][git]

by StarNinjas » Post

Thanks You!

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
StarNinjas
Member
Posts: 334
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: aincrad

Re: [Mod] lib_ecology [lib_ecology][git]

by StarNinjas » Post

Cool! I'll test as soon as possible!

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

UPDATE 2019 - 10 - 12:
Added dry grass as ecosystem in semi arid biomes.
Added aliases for shapes as stairs / slabs
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

Cartmic
Member
Posts: 16
Joined: Thu Jul 12, 2018 18:03

Re: [Mod] lib_ecology [lib_ecology][git]

by Cartmic » Post

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.

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

Cartmic
Member
Posts: 16
Joined: Thu Jul 12, 2018 18:03

Re: [Mod] lib_ecology [lib_ecology][git]

by Cartmic » Post

Thank you! I'll have a play around and see if I can find what's going wrong.

User avatar
firefox
Member
Posts: 1588
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: [Mod] lib_ecology [lib_ecology][git]

by firefox » Post

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

Image
Image
✨🏳️‍🌈♠️✨

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
uwu666
Member
Posts: 37
Joined: Mon May 04, 2020 05:20
Location: Latinoamerica

Re: [Mod] lib_ecology [lib_ecology][git]

by uwu666 » Post

What are the modifications that need to be made to Australia and Aeotora for this mod to work well?

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

Updated for efficiency. Includes minimal new content.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

Skamiz Kazzarch
Member
Posts: 178
Joined: Fri Mar 09, 2018 20:34
GitHub: Skamiz
In-game: Skamiz
Location: la lojbaugag.

Re: [Mod] lib_ecology [lib_ecology][git]

by Skamiz Kazzarch » Post

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.
+ Spoiler
So I added the 'lib_shapes' mod from here: https://github.com/ShadMOrdre/lib_shapes
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.
Please advise.

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] lib_ecology [lib_ecology][git]

by Gael de Sailly » Post

ShadMOrdre wrote:
Mon Nov 23, 2020 05:04
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 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.

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: 178
Joined: Fri Mar 09, 2018 20:34
GitHub: Skamiz
In-game: Skamiz
Location: la lojbaugag.

Re: [Mod] lib_ecology [lib_ecology][git]

by Skamiz Kazzarch » Post

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:

Code: Select all

lib_materials.enable_lib_shapes = minetest.setting_get("lib_materials_enable_lib_shapes_support") or true
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:

Code: Select all

lib_materials.enable_lib_shapes = true
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.

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.
Edit: Here I spend my time writing an elaborate post, and then I get ninjad and the punchline is spoiled. :(

ShadMOrdre
Member
Posts: 696
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod] lib_ecology [lib_ecology][git]

by ShadMOrdre » Post

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

Post Reply

Who is online

Users browsing this forum: sirrobzeroone and 6 guests