[Mod] lib_materials [lib_materials][git]

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

[Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Fri Jan 19, 2018 22:39

MAJOR UPDATE: 2019-08-21
Image

UPDATES:
1. Can be used without default, is completely dependency free.
2. Now includes buckets, fluidity, fluid_lib, and nodeio functionality. All liquids use this functionality.
3. Stands in as replacement for vessels, which has been folded into the above liquids functionality.

lib_materials is a central repository of stone, dirt, sand, clay, baked clay, glass, ores, metals, minerals, and fluids, such as lava, water and oil. This mod attempts to distribute the various nodes according to thier natural distribution in the real world.

Included are 16 dirts with an additional 16 "grass covers", 6 sands, over 100 stones, including brick, cobble, gravel, and block variations for some, 5 water types, 2 lava types, and numerous decorative stones.

This mod also creates over 200 biomes, and within those biomes, generates additional "ecosystems", upon which plants and trees from lib_ecology will naturally spawn.

Can be used standalone, in new or existing worlds! It is best used with lib_ecology.

The ultimate goal is to categorize and enumerate the various materials types that are currently scattered across multiple mods, and combine them in one central location, with known properties and access to definitions.

Materials to be included are pretty much any node that can be considered a chemical element, earth aggregate, mineral, and even organic materials. As such, all stone, sand, dirt, tree, wood, leaf, grass, water, lava, oil, ore, and others will be categorized, orgranized, enumerated, and possibly overridden, or simply reproduced, for consistency sake.

DOWNLOAD:
lib_materials

RECOMMENDED:
Forum - lib_ecology
Github - lib_ecology

DEPENDENCIES:
OPTIONAL DEP:

LICENSES: LGPLv2.1, for code by me, CC-BY-SA-3.0 for graphics by me. Other licenses apply for code and graphics done by others. Where found, those licenses are included.
Attachments
screenshot_20190204_230104.jpg
(262.3 KiB) Not downloaded yet
Last edited by ShadMOrdre on Sat Aug 31, 2019 17:44, edited 6 times in total.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

happysmash27
New member
 
Posts: 5
Joined: Wed Sep 23, 2015 21:42
GitHub: happysmash27
IRC: happysmash27
In-game: happysmash27

Re: [Mod] lib_materials [lib_materials][git]

by happysmash27 » Tue Jan 29, 2019 20:39

This doesn't depend on Default, right? Because if not, this is exactly the type of mod I have been looking for! It's annoying when mods depend on one massive default mod.
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Wed Jan 30, 2019 03:27

happysmash27,

Currently, there are still dependencies regarding the sounds. I have not yet ported the default sounds into this mod.

My intention, however, is to do exactly as you've stated. This mod will attempt to provide a source of materials, stone, dirts, ores, sand, liquids, and any other node that would be naturally appear in the real world. I currently use a modified version of default, stripping out the parts that I successfully recreate here, or in my other mods, that are meant to become a drop in replacement usable by mod and game developers.

Please also take a look at lib_ecology, which depends on lib_materials, and more fully utilizes these nodes in biome defs.


Shad MOrdre
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Tue May 07, 2019 16:32

repost forum topic with updated links to github repository.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Thu Jun 13, 2019 21:19

Major update.

Biomes. Ecosystems.

Stone, Dirt, Water, Ores, Glass, Metals, Minerals.

No dependencies on default.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

Red_King_Cyclops
Member
 
Posts: 246
Joined: Sun Jun 16, 2019 20:17
Location: Earth

Re: [Mod] lib_materials [lib_materials][git]

by Red_King_Cyclops » Fri Aug 02, 2019 12:48

This mod looks like it could be very useful. The collection of fluids is much larger than other mods (fluid mods are rare), but I've noticed that all the fluids are just variations of water, lava, and oil. If you're interested in adding in more materials, here are some ideas for fluids. They're just ideas and I could make them myself.
  • Mercury
  • Bromine
  • Generic Acid
  • Lugol's Iodine
  • Pitch/resin
  • Liquid Oxygen
  • Liquid Nitrogen
Save pitch/resin, all of the above fluids are dangerous.

Edit: I made a mercury mod here.
Last edited by Red_King_Cyclops on Sat Aug 03, 2019 17:03, edited 1 time in total.
My mod space_travel is similar to Galacticraft, but for Minetest.
 

R-One
Member
 
Posts: 144
Joined: Wed Dec 20, 2017 23:06
Location: Nice, France

Re: [Mod] lib_materials [lib_materials][git]

by R-One » Fri Aug 02, 2019 14:32

just test in speed with the carpathian magen and ecology lib as only mod ... i have errors:

Code: Select all
2019-08-02 16:29:40: ERROR[Server]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "lib_materials:fluid_water_river_muddy_source" at (-1679,-6,-1308) (block (-105,-1,-82))
2019-08-02 16:29:40: ERROR[Server]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "lib_materials:fluid_water_river_muddy_source" at (-1683,-6,-1304) (block (-106,-1,-82))
2019-08-02 16:29:41: ERROR[Server]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "air" at (-1679,-6,-1307) (block (-105,-1,-82))


Great work all the same !
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Sun Aug 04, 2019 06:16

R-One,

Thanks for the support.

I'm currently in the middle of yet another major update to lib_materials. Gael provided a pull request to the last update that actually made a bigger impact than I originally thought. This has enabled me to more easily add new materials, as well as, ensure consistency between similar materials.

As such, I plan to include the ores from Facedeers' Real Minerals mod and and the liquid molten metals from IcyDiamonds' Fluidity mod. Liquids are rare amongst mods, and I've tried to collect as many as seemed appropriate for this mod. Water, oil, mud, quicksand, lava, and the various metals in molten form form the majority of the liquids available. I've thought about some poison air blocks, but not as a liquid, just as a "cloud" like air block. IMHO, gases act differently than liquids. Trying to make gases or plasmas using the engines liquid code would seem unnatural.

As for the Content Ignore messages, they come from the lakes code, lib_materials_lakes.lua. This is most likely due to incorrect node names within the code. I've recently updated this code to reflect the correct names, so I'll test to ensure that this issue is resolved.

I would like your permission to add the Cinnibar mod, but exclusively for the purpose of using the molten mercury. Real Minerals already includes a cinnibar ore, block, ingot, and lump, so the addition of the molten metal makes sense, to go along with the Fluidity liquids that match up to the metals from Real Minerals.

I'll get this posted soon, since the work is done, testing is almost complete, and I'm ready move on to applying the same code logic updates to lib_ecology, as well as, adding the plant and tree nodes from the aoteara, australia, farming and xocean mods, in addition to adding the new trees from Cool Trees.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

Red_King_Cyclops
Member
 
Posts: 246
Joined: Sun Jun 16, 2019 20:17
Location: Earth

Re: [Mod] lib_materials [lib_materials][git]

by Red_King_Cyclops » Sun Aug 04, 2019 11:08

I give you permission to use the mercury liquid from my mercury mod. Also, mercury is liquid at room temperature, so technically it is not molten.

Edits
I found the download for Hamlet's Quest here, which has the full real minerals mod in it.

My mod titan_moon has some new materials such as Liquid Hydrocarbon, but none of the materials are found on earth.

I found out that the textures for mercury look a lot like molten tin in melterns/fluidity.
My mod space_travel is similar to Galacticraft, but for Minetest.
 

Red_King_Cyclops
Member
 
Posts: 246
Joined: Sun Jun 16, 2019 20:17
Location: Earth

Re: [Mod] lib_materials [lib_materials][git]

by Red_King_Cyclops » Fri Aug 23, 2019 00:49

Now that I have tested this mod, I can see the application of it for making mods. A few textures are broken, but it's not a major problem. I've used the oil liquid for my rocket mod.
My mod space_travel is similar to Galacticraft, but for Minetest.
 

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

User avatar
Nigel
Member
 
Posts: 15
Joined: Fri May 03, 2019 09:08
GitHub: nyje
IRC: Nigel
In-game: Nigel

Re: [Mod] lib_materials [lib_materials][git]

by Nigel » Mon Sep 02, 2019 12:33

First: What an amazing pair of mods lib_materials & lib_ecology appear to be ;-)

Second: I just compiled the latest stable minetest & minetest game, added ONLY these two mods to the worldmods folder for testing, and I got this:

Code: Select all
2019-09-02 12:16:36: ERROR[Main]: ModError: Failed to load and run script from /home/www-data/LIVE_SERVERS/T4/bin/../worlds/T4/worldmods/lib_materials/init.lua:
2019-09-02 12:16:36: ERROR[Main]: ...rlds/T4/worldmods/lib_materials/lib_materials_nodeio.lua:292: Attempt to override non-existent item default:chest
2019-09-02 12:16:36: ERROR[Main]: stack traceback:
2019-09-02 12:16:36: ERROR[Main]:    [C]: in function 'error'
2019-09-02 12:16:36: ERROR[Main]:    ...ww-data/LIVE_SERVERS/T4/bin/../builtin/game/register.lua:388: in function 'override_item'
2019-09-02 12:16:36: ERROR[Main]:    ...rlds/T4/worldmods/lib_materials/lib_materials_nodeio.lua:292: in function 'init_main_inventory'
2019-09-02 12:16:36: ERROR[Main]:    ...worldmods/lib_materials/lib_materials_nodeio_support.lua:7: in main chunk
2019-09-02 12:16:36: ERROR[Main]:    [C]: in function 'dofile'
2019-09-02 12:16:36: ERROR[Main]:    ...rlds/T4/worldmods/lib_materials/lib_materials_nodeio.lua:297: in main chunk
2019-09-02 12:16:36: ERROR[Main]:    [C]: in function 'dofile'
2019-09-02 12:16:36: ERROR[Main]:    ...ERS/T4/bin/../worlds/T4/worldmods/lib_materials/init.lua:96: in main chunk


I guess I'll have to wait to try these amazing mods, as I don't have time to hunt down the issue right now.
I was also going to add an issue on github in case you don't see this, but I see someone beat me to it ;-)
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Mon Sep 02, 2019 23:22

axcore and Nigel,

Thanks for bringing this to my attention. This issue should now be resolved.

I had previously removed the soft dependency on default, thus causing this error.

I am working to make this and other mods completely dependency free, and this is one that slipped by me. IMHO, default should be registering its own nodes, instead of API mods registering them. But then, who wants a mod that doesn't do anything? ;)

Please continue to report any other issues, either here on on github.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Wed Sep 04, 2019 17:27

Another update, fixes some issues that I've been noticing.

Still tracking down the source of the CONTENT_IGNORE messages.

Stay tuned!

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Fri Sep 06, 2019 22:44

I've pushed some fixes.

Have disabled code that was generating the content ignore messages.

Fixed some textures and pushed some other bug fixes.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Tue Sep 24, 2019 05:28

I'm happy to announce this update.

FIXES:
CONTENT IGNORE messages due to broken liquids.
Broken liquids.
Fixed soil texture.

IMPROVEMNETS:
Finite Water logic included for river water.
New nodes.
River and Road networks
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_materials

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.
 

kestral
Member
 
Posts: 58
Joined: Mon Mar 27, 2017 21:56
GitHub: kestral246

Re: [Mod] lib_materials [lib_materials][git]

by kestral » Wed Oct 02, 2019 20:19

After playing around for a little bit, I can now start exploring the biomes of lib_materials and lib_ecology a little more systematically.

Image
Attachments
very_voronoi_lib_world.jpeg
Very Voronoi lib world
(338.6 KiB) Not downloaded yet
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Thu Oct 03, 2019 16:53

kestral,

That's a nifty screenshot. Did you do anything specific, or did you just move the biomes to specific coordinates?

I can see tremendous value in this, it will help me to flesh out the biomes and ecosystems for more easily than randomly flying around, looking for a specific biome.

Care to share what you did to make this?

Glad you are enjoying the mod. I would also recommend lib_ecology, for the plant life and trees. These two mods work in tandem.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

kestral
Member
 
Posts: 58
Joined: Mon Mar 27, 2017 21:56
GitHub: kestral246

Re: [Mod] lib_materials [lib_materials][git]

by kestral » Thu Oct 03, 2019 18:29

Shad,

I thought it would be neat to build a world with biomes placed to match their voronoi diagram. All I needed to do was make the heat and humidity values used by mapgen be linear functions of x and z position respectively. How hard could that be?

Unfortunately, I couldn't figure out how to do this with lua, so I had to hack src/mapgen/mg_biomes.cpp, which isn't my specialty.

I set it to map all the heat and humidity functions I could find in there to give 0 at -500 and 100 at +500. This seems to work, but the biome name goes undefined beyond about ±490, and I haven't tried it with much larger worlds to see what else breaks.

What's also useful is my biome_debug_lite mod, which gives me an active HUD, so I can see the local heat value, humidity value, and biome name as I move around the world.

I'll see if I can clean these up well enough, so I can feel comfortable sharing them with others.

p.s. I am using lib_materials, lib_ecology, and lib_shapes. They didn't seem to do anything when I added them to mtg, so I had to package them together into a game, based on Wuzzy's minimal game post.
 

ThorfinnS
Member
 
Posts: 133
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] lib_materials [lib_materials][git]

by ThorfinnS » Fri Oct 04, 2019 19:02

Sorry I'm such a pill today. ;)

With only lib_materials and unified inventory:

Code: Select all
2019-10-04 13:55:08: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'unified_inventory' in callback environment_Step(): C:\games\mt\latest\bin\..\mods\unified_inventory/api.lua:88: attempt to compare string with number
2019-10-04 13:55:08: ERROR[Main]: stack traceback:
2019-10-04 13:55:08: ERROR[Main]:    C:\games\mt\latest\bin\..\mods\unified_inventory/api.lua:88: in function 'func'
2019-10-04 13:55:08: ERROR[Main]:    C:\games\mt\latest\bin\..\builtin\common\after.lua:20: in function <C:\games\mt\latest\bin\..\builtin\common\after.lua:5>
2019-10-04 13:55:08: ERROR[Main]:    C:\games\mt\latest\bin\..\builtin\game\register.lua:417: in function <C:\games\mt\latest\bin\..\builtin\game\register.lua:401>
2019-10-04 13:55:08: ERROR[Main]: stack traceback:
2019-10-04 13:55:08: ACTION[Main]: Server: Shutting down


Crash back to the launcher/main menu.

Did something change in minetest's data format? What used to be a string is now a number?
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Fri Oct 04, 2019 20:30

ThorfinnS,

With just lib_materials and unified_inv?

There is no game. Nothing would work.

Are you adding these mods to MTG, or another game?

Nothing in that error message even indicates lib_materials, just unified_inv. Chances are, there is something that Unified_Inv expects, that is not present, such as the default mod.

While lib_mat is meant to become a drop in replacement for parts of default, it is by no means a complete replacement. There are parts of the default mod that are not appropriate to this mod.

Can you provide some more details as to what leads to this error? I can certainly help you debug it, even if the issue is in Unified_Inv. If there is an issue with these two mods, I certainly want to solve that.

I don't use unified, preferring sfinv, sfinv_buttons, and the smart_sfinv modpack from bell07.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

ThorfinnS
Member
 
Posts: 133
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] lib_materials [lib_materials][git]

by ThorfinnS » Fri Oct 04, 2019 22:47

Sorry. MTG. Like you say, there wouldn't be much to do without some content.

Starting single player with the launcher, (not the command line), I create a new game, and enable all of the following EXCEPT lib_*, which I think are all yours, crafting (rubenwardy), and crafting_recipes (texmex).
mods.png
Mod Folder
(20.73 KiB) Not downloaded yet


Runs fine, though there are a few warning messages. Apart from the bizarreness of boats no longer working very well, I don't know of any problems in gameplay. Haven't even had any server crashes of note, which seems, um, blessed?

Add lib_materials and I get a mittful of warnings and one error:
Code: Select all
2019-10-03 19:11:32: [Main]: [MOD] lib_materials:  Loading...
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: default:obsidian -> lib_materials:stone_obsidian_glowing
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: default:obsidian -> lib_materials:stone_obsidian_hot
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: aoteara:pounamu -> lib_materials:stone_pounamu_block
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: aoteara:pounamu -> lib_materials:stone_pounamu_brick
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: aoteara:iron_sand -> lib_materials:sand_iron
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: default:snowblock -> lib_materials:snow_brick
2019-10-03 19:11:32: ERROR[Main]: read_schematic_def: incorrect number of nodes provided in raw schematic data (got 12, expected 4).
2019-10-03 19:11:32: [Main]: [MOD] lib_materials:  Successfully loaded.
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_stone -> default:stone
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_water_source -> default:water_source
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_river_water_source -> default:river_water_source
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_lava_source -> default:lava_source
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_dirt -> default:dirt
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_dirt_with_grass -> default:dirt_with_grass
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: mapgen_sand -> default:sand
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: stone -> default:stone
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: dirt -> default:dirt
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: sand -> default:sand
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: glass -> default:glass
2019-10-03 19:11:32: WARNING[Main]: Not registering alias, item with same name is already defined: snow -> default:snow


And before the game starts, it crashes back to the launcher with the messsage:
Code: Select all
2019-10-03 19:11:34: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'unified_inventory' in callback environment_Step(): ...es\Minetest\latest\bin\..\mods\unified_inventory/api.lua:88: attempt to compare string with number
2019-10-03 19:11:34: ERROR[Main]: stack traceback:
2019-10-03 19:11:34: ERROR[Main]:    ...es\Minetest\latest\bin\..\mods\unified_inventory/api.lua:88: in function 'func'
2019-10-03 19:11:34: ERROR[Main]:    C:\Games\Minetest\latest\bin\..\builtin\common\after.lua:20: in function <C:\Games\Minetest\latest\bin\..\builtin\common\after.lua:5>
2019-10-03 19:11:34: ERROR[Main]:    C:\Games\Minetest\latest\bin\..\builtin\game\register.lua:417: in function <C:\Games\Minetest\latest\bin\..\builtin\game\register.lua:401>
2019-10-03 19:11:34: ERROR[Main]: stack traceback:
2019-10-03 19:11:34: ACTION[Main]: Server: Shutting down


If I run ONLY lib_materials and unified_inventory, (in MTG), I get the same set of errors, verbatim. So, yes, it's a matter of compatibility, specifically, attempt to compare string with number. Which is why I wondered if something had changed in the record specification that I could not find. The offending line in unified_inventory is:
Code: Select all
            if max_items_left ~= nil and max_items_left <= 0 then break end


They did not check for string values of max_items_left, so it looks to me as if one or more of the huge number of things you've added or changed has this as a string rather than a numeric. Possibly even a string of zero length, since I think lua treats that as distinct from nil. (I never remember, so have to test that every single time. Though I do remember 0 is not the same as false.)

If I get some time this evening, I'll see about adding a check to that line to break if it's a string. Might be that's all it takes. Though I suspect if I just bypass that, somewhere the code is going to subtract a number from a string and I'll get a runtime crash.


[EDIT]
Sure enough. Adding the line:
Code: Select all
            if type(max_items_left) == "string" then break end
right before what was line 88 lets it finish loading. I have no idea if that's going to be a problem or not...

I'm not a huge fan of just whistling past the graveyard hoping it doesn't mess up something further in the game.
[/EDIT]

[EDIT2]
Incidentally, it throws a mess of warnings and errors related to graphics in lib_materials:
Code: Select all
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile
2019-10-04 17:54:52: ERROR[Main]: generateImage(): Could not load image "lib_materials_stone_gravel.png" while building texture; Creating a dummy image
2019-10-04 17:54:52: ERROR[Main]: generateImage(): Could not load image "lib_materials_stone_gravel.png" while building texture; Creating a dummy image
2019-10-04 17:54:52: ERROR[Main]: generateImage(): Could not load image "lib_materials_stone_gravel.png" while building texture; Creating a dummy image
2019-10-04 17:54:52: ERROR[Main]: generateImage(): Could not load image "lib_materials_stone_gravel.png" while building texture; Creating a dummy image
2019-10-04 17:54:52: ERROR[Main]: generateImage(): Could not load image "lib_materials_stone_gravel.png" while building texture; Creating a dummy image
2019-10-04 17:54:52: ERROR[Main]: generateImage(): Could not load image "lib_materials_stone_gravel.png" while building texture; Creating a dummy image

[/EDIT2]

[EDIT3]
Looks like the dummy images is just a filename error. Did you mean:
Code: Select all
lib_materials_stone_gravel_default.png

instead of:
Code: Select all
lib_materials_stone_gravel.png


The incorrect sRBG profile probably just means you saved it with GIMP or something else using a more recent version of .png specification. I just overwrite my saves using a copy of J-T-L's Ultimate Paint, but really pretty much anything more than about 10 years old works.
[EDIT3]
 

ThorfinnS
Member
 
Posts: 133
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] lib_materials [lib_materials][git]

by ThorfinnS » Sat Oct 05, 2019 02:19

I grant this is a more systematic treatment, but has the potential to break a lot of other mods. I went to several different water sources trying to fill a wooden bucket for farming redo, but because it's now called "lib_materials:liquid_water_source", no soup for you. Looks like if I had a standard steel bucket, or the fired clay pot (your addition? haven't seen that before) it would have worked.

[EDIT]
On second thought, maybe it wouldn't have. The same recipe would have been used for both the default empty bucket and lib_* empty bucket. When the wooden bucket conflicted with wooden bowl from farming redo, it wouldn't act consistently unless one was given an optional dependency on the other. So maybe I'd have crafted the steel bucket that wouldn't work. Who knows?
[/EDIT]

Maybe I'm missing your vision here. Are you seeking to become a standalone game? That mods have to code to your framework rather than to minetests?
 

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

Re: [Mod] lib_materials [lib_materials][git]

by ShadMOrdre » Sat Oct 05, 2019 11:37

ThorfinnS,

You are absolutely correct, in that this "breaks" other mods. As I've added new functionality, I've noticed just how bad this can get. But, it is actually a bit of a goal. Not to break other mods, but to provide an alternate base for other mods, separate and distinct from the MTG and default ecosystem, yet also containing much of it's functionality. I grew tired of so many mod interdependencies, conflicts, or just outright duplicity. I also wanted to consolidate what I considered to be the best of the available content into a single package. I would ultimately have to install up to 15 other mods, some of which just do not work with each other, to have the content that lib_materials alone provides. An additional 20 or so mods for the content packaged in lib_ecology, also coming from source mods that cleared decorations, or overrode some other mod, or were written for MT 0.4.09, and the only updates they've seen are to ensure continued functionality, but not updated to use the new engine features. This list goes on.

The addition of the new bucket types will not work for any mod that assumes there is only a single bucket, (pretty much every mod out there, because there has always only ever been a single bucket). The original bucket mod provided for registering additional liquids, but not additional buckets. The clay pot comes from Dokimi's Earthbuild mod. That mod replicates the bucket code, but renames it to use the clay pot. But no mod outside of Earthbuild actually uses the clay pot. I thought this a waste of a great item. The same is true of the wood bucket. I thought that a single point of reference, and the availability of multiple bucket types would help foster newer uses. Obviously a wood bucket should not be able to transfer lava, and so some of my own code here still needs some fleshing out, but additional game play mechanics and value come from now needing the right bucket for the job.

The issue with the buckets here not working as one expects, is due to other mods making the assumption about the number of buckets. Those mods should be written more modularly so that these types of issues aren't such a problem.

Most mods are written against the MTG game, and many of those mods are hard coded to use item names, instead of groups, use of string.find, or any other method of deriving nodes. In some cases, this is necessary, but in many cases, it is simply avoidable.

As for the issues regarding Unified_Inventory, I'm afraid this might be due to some engine changes since Unified Inv was last updated. Specifically, v5.0 made a change regarding sending inventories, and the change essentially capped the inventory node count. This was found to be a bug, and was patched in 5.0.1. With only lib_materials, and not lib_shapes also, there should not be enough nodes getting defined to reach that limit. I only encountered the limit when fully enabling every possible shape from lib_shapes, and every node from lib_materials and lib_ecology, as well as, from additional mods.

Having read through the last page of UnifiedInvs thread, and knowing that the mod author, RBA, is no longer with us, I assume that Unified Inventory will probably not get updated anytime soon. There may be forks of the mod that have been updated, but again, as I do not use the mod, I am not sure of this.

I still can't see how lib_materials forces Unified Inventory to change values in that way, unless the above mentioned limit is sending text instead of integers. I notice that you have both Toolranks and lib_trm, which should not be. There are other mods that also work with inventory. Can you ensure that the only mods loading are MTG, Unified Inv, and lib_materials. Make sure that the MTG game folder is fresh, and had no additional mods aside from those included in the download. If this continues, can you run this mod setup using sfinv? I run mod heavy, perhaps quite a bit heavier than the mod list you've shown, but I do not use Unified Inv.

As for the aliases, I'm getting those straightened out.

I was unaware of the cause of the .png messages. I'll look into that one for sure. Thanks for the heads up.

And last but not least, yes there is a game concept in the works, but neither mod nor game are dependent on the other. lib_materials and lib_ecology should stand on their own. Games can be written to use them, but the game should be written in such a way the any other mod could also provide nodes.

I have made some updates since I last pushed to Github. I'll try to get those published this weekend. Some issues with aliases, and other small imrovements have been made, mostly to improve performance. Rivers will become a settable option.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 6 guests