[Mod] lib_materials [lib_materials][git]

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

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

by ThorfinnS » Post

ShadMOrdre wrote:I grew tired of so many mod interdependencies, conflicts, or just outright duplicity.
Duplication? Or do you think duplicity is involved?
ShadMOrdre wrote: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.
Ambitious goal. It's just very beefy. On some of the older school machines, lib_ecology and lib_materials takes a couple minutes to load, and a couple of them with not much RAM actually crash. Adding in lib_shapes is completely out of the question. The crashing can be dealt with by disabling some aspects (making variant water and variant shapes optional in a massive settingtypes.txt, for example) but that may not speed load times very much.
ShadMOrdre wrote: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.
It's been subsumed into the minetest-mods crew, and there are updates from this year.
ShadMOrdre wrote: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.
Exactly.
ShadMOrdre wrote:I notice that you have both Toolranks and lib_trm, which should not be.
Right. When I'm testing out lib_trm, I disable toolranks. But because lib_trm is giving errors, I've been disabling that, and enabling toolranks. One or the other, never both.
ShadMOrdre wrote: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.
Of course. I did all that before mentioning anything.I unzipped it to a new directory, then git cloned the two, and only the two. It does not throw the problem unless I enable UI. But some of the kids vastly prefer Unified, so a couple of the servers we're running use that.

Think I'll throw in some debugging statements and see if I can figure out exactly which are being stored as strings.

Later this evening when I get to a good internet connection, I'll see if your pushes are live.

Thanks!

--Steph

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

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

by ThorfinnS » Post

OK, here's what I'm getting. Brand new download of everything, minetest (sfan5's latest build), unified inventory, unified inventory plus, lib_ecology, lib_materials. Enable all. Start MTG.

The line I added to Unified Inventory was

Code: Select all

				if type(max_items_left) == "string" then minetest.log(name..'*'..max_items_left..'*') break end
Debug.txt shows:

Code: Select all

2019-10-05 21:48:51: [Server]: lib_ecology:coral_brain**
2019-10-05 21:48:51: [Server]: lib_ecology:coral_brown**
2019-10-05 21:48:51: [Server]: lib_ecology:coral_dragon_eye**
2019-10-05 21:48:51: [Server]: lib_ecology:coral_orange_01**
2019-10-05 21:48:51: [Server]: lib_ecology:coral_sponge**
2019-10-05 21:48:51: [Server]: lib_ecology:plant_pineapple_plant**
2019-10-05 21:48:51: [Server]: lib_ecology:plant_weed_eye**
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_bamboo*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_brown*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cold*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_humid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_humid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_humid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_humid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semiarid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semiarid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semiarid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semiarid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semihumid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semihumid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semihumid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_semihumid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_temperate_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_temperate_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_temperate_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_cool_temperate_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_crystal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_dry*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_fiery*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_gray*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_green*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_grove*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_humid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_humid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_humid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_humid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semiarid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semiarid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semiarid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semiarid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semihumid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semihumid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semihumid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_semihumid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_temperate_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_temperate_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_temperate_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_hot_temperate_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_jungle_01*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_mushroom*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_prairie*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_humid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_humid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_humid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_humid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semiarid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semiarid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semiarid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semiarid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semihumid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semihumid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semihumid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_semihumid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_temperate_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_temperate_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_temperate_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_temperate_temperate_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_humid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_humid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_humid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_humid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semiarid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semiarid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semiarid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semiarid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semihumid_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semihumid_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semihumid_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_semihumid_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_temperate_coastal*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_temperate_highland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_temperate_lowland*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_grass_warm_temperate_shelf*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_coniferous*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_fungi*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_leaf_01*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_leaf_02*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_rainforest*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_stones*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_litter_vine*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_snow*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_soil*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_soil_wet*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_stone*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_stone_cobble*1*
2019-10-05 21:48:51: [Server]: lib_materials:dirt_peat_with_stone_desert_cobble*1*
2019-10-05 21:48:51: [Server]: lib_materials:ore_quartz_with_gold**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_aluminum**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_copper**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_gold**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_iron**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_lead**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_silver**
2019-10-05 21:48:51: [Server]: lib_materials:ore_stone_with_tin**
2019-10-05 21:48:51: [Server]: lib_materials:sand_with_rocks**
2019-10-05 21:48:51: [Server]: lib_materials:stone**
2019-10-05 21:48:51: [Server]: lib_materials:stone_basalt_01*1*
2019-10-05 21:48:51: [Server]: lib_materials:stone_chalk**
2019-10-05 21:48:51: [Server]: lib_materials:stone_desert**
2019-10-05 21:48:51: [Server]: lib_materials:stone_gneiss_01*1*
2019-10-05 21:48:51: [Server]: lib_materials:stone_gravel*1*
2019-10-05 21:48:51: [Server]: lib_materials:stone_rhyolitic_tuff*1*
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_desert**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_desert_block**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_desert_brick**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_old_red**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_old_red_block**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_old_red_brick**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_white**
2019-10-05 21:48:51: [Server]: lib_materials:stone_sandstone_white_brick**
2019-10-05 21:48:51: [Server]: lib_materials:stone_savanna**
2019-10-05 21:48:51: [Server]: lib_materials:stone_savanna_with_ore_coal**
2019-10-05 21:48:51: [Server]: lib_materials:stone_savanna_with_ore_iron**
2019-10-05 21:48:51: [Server]: lib_materials:stone_slate_01**
2019-10-05 21:48:51: [Server]: lib_materials:stone_tuff*1*
As you see, only a small fraction of the nodes you add (127 out of whatever) had strings for that field. In most cases, the string was "1", but there are a small minority of zero length strings. I spent time going through your code trying to see where these were getting defined and made no progress. I thought they were being built by parsing your nodes.csv file, but since the base name of the node in that file would appear to be "dirt_with_grass_pete_moss" (note spelling) while the node shows up as "dirt_peat_with_grass", (rearranged and spelling corrected) I'm guessing that must be what you were talking about making it easy to add future node types.

Anyway, I thought you could probably look at the list and say, "Oh, I know what those things have in common."

Incidentally, I played that for a bit in creative mode, gave myself a stack of buckets, and was unable to fill one with what sure looked and acted and sounded like water. I'll attach a screenshot if you would like, but since this is still seriously WIP, you most likely already know that.

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

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

by ThorfinnS » Post

ThorfinnS wrote:It's just very beefy. On some of the older school machines, lib_ecology and lib_materials takes a couple minutes to load, and a couple of them with not much RAM actually crash. Adding in lib_shapes is completely out of the question. The crashing can be dealt with by disabling some aspects (making variant water and variant shapes optional in a massive settingtypes.txt, for example) but that may not speed load times very much.
Had a thought.

Your long-range plan is to use the csv files to load all the node data, right? That might be a good way to select groups of nodes. For example, all the nodes that come with MTG could be grouped into nodes_mtg.csv. The ones you added from ethereal could be in nodes_ethereal.csv. Or since ethereal is so vast in the first place, maybe it's broken up into nodes_mushroom.csv etc. That way, settingtypes.txt could be used to enable groups of related nodes as desired. It would be reasonably easy to design a world to your tastes that meets your machine requirements.

Second, what are you using to create the .csv? I'm no expert, but I don't see how to tell LibreOffice (for instance) how to use the piping character (|) as the delimiter. A spreadsheet would be a lot easier to maintain than counting a bunch of vertical bars, hoping you get the field you want in the right spot.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

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

by ShadMOrdre » Post

ThorfinnS,

One of my To Do's for this project, was to get the .csv file into a better structured format, that could accommodate essentially all node definitions. I only need to move data into an already formatted new .csv file, and then update the node_registration.lua file to reflect the changes. This won't take long, I just hadn't planned on doing it yet.

In the process of this, I wanted to simply add some fields into the .csv that would be used internally in a manner you describe, wherein I can choose the "default" set, the "ethereal" set, the "moretrees" set, and so forth. This change would also be made to lib_ecology, for the same purpose.

You are absolutely correct in seeing the potential of the .csv format for loading, not just node defs, but all defs. It is all data, data that currently has been locked into the respective mods, but that could be just as easily handled from a spreadsheet, or even a database app.

I use Lubuntu 18, but have never gotten around to installing one of the office apps. So for a spreadsheet, I use Gnumeric. After years of MS Excel, and having to configure text output options on a variety of databases, I am actually enjoying the simplicity of Gnumeric, in that I can set the output options when I export the data.

I prefer to use the pipe, ( | ), character simply because it is not frequently used in general, whereas many text fields include quotation marks, either single or double. Commas and semicolons also appear with enough frequency in a variety of datasets as to make them rather unusable as a delimiter. However, if you notice, they get great use within fields as delimiters, allowing fields within fields, if you will.

One of the things I did implement, was settings to enable the rivers, water_dynamics, and other processing heavy code. One of my goals has been to enable this in an efficient enough way to allow older PCs to build worlds with these mods in a game enjoyable timeframe. I set my view distance to 80m - 120m, so that as I walk around, the world is generated without waiting. I'm also patient enough, (not really), to walk slow enough to allow that. I use older PCs, and I want decent frame rates and little lag. I also have to leave enough room for mods like mesecons, pipeworks, advtrains, and all the mobs_redo mobs, which are quite heavy in themselves.

That was one of the motivations in preferring to use the .csv format. All the code, and data, that was being loaded into RAM, leaving less and less available to actually use at runtime. While server start might be a little slower, and client loading times are unaffected by this, there is certainly more RAM available for all the other heavy mods to continue processing. As such, I'm extending this concept to all of my mods, using .csv files for data input, thus removing all the associated code previously being loaded.

As a side tip, I prefer not to run MT as a single server/client instance. I typically run a server in a terminal window, and use a separately installed client to access the server. The client has no games or mods installed, and the server has no interface overhead, so performs slightly better. This also splits the processing into world_gen, and client rendering. In a single server/client instance, you only get a single core to do all the processing, so on a multi core chip, there is unused potential. By running a standalone server, even on a client PC for singleplayer, I can force the setup to use at least 2 cores. Mapgen is faster, as is client rendering. Just a tip.

In short, I plan to restructure the .csv file, to include full node def properties, and for internal fields such as defining and enabling node "sets", as you have outlined.

This will take me a little time to accomplish, and at the moment, time is a little short. I hope to have this completed soon, as this is essentially the final piece to actually releasing lib_materials and lib_ecology as a nonWIP mod and to put it on the CDB.

Thank you for your input, feedback, testing, breaking, and all the other stuff you've been assisting with. The suggestions have been useful.


Shad

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

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

by ThorfinnS » Post

ShadMOrdre wrote:In the process of this, I wanted to simply add some fields into the .csv that would be used internally in a manner you describe, wherein I can choose the "default" set, the "ethereal" set, the "moretrees" set, and so forth. This change would also be made to lib_ecology, for the same purpose.
Only reason I suggested separate files is minimizing errors, i.e., typing "m0retrees" or "moretreees" instead of "moretrees" and reducing processing time, i.e., instead of parsing a data file with potentially thousands of entries when you just want the default set, you'd parse only those files you want.

[EDIT]
My thinking was that for the basic type of mod, adding nodes, recipes, etc., it would be no more involved than dropping a few .csv files into the directory. It wouldn't involve splicing together nodes.csv and newnodes.csv, for example.
[/EDIT]
ShadMOrdre wrote:You are absolutely correct in seeing the potential of the .csv format for loading, not just node defs, but all defs. It is all data, data that currently has been locked into the respective mods, but that could be just as easily handled from a spreadsheet, or even a database app.
Saw that. I was trying to decide if I had the time to do something similar for recipes, but using rubenwardy's new crafting mod. texmex has already done the heavy lifting -- I think I could pretty easily output a file using an on load mod with all the recipes texmex pulled, including base mod, for either a field in the csv or a filename, depending on overall vision of the project. I'm leaning towards the latter, because adding new stuff becomes a matter of adding new files rather than modifying existing ones. There's no reason you would even have to edit "settingtypes.txt' -- simply parsing the directory would let you rewrite "settingtypes.txt", either enabling or disabling the new files depending on what your base option you had chosen.

[EDIT2]
I'm still hashing through the details in my head. My thought was if one loads his mod, rubenwardy's crafting,, texmex's crafting_recipes, and the hypothetical crafting_recipes_csv mod, then exit, you should be left with a file or files ready to drop into your lib_materials mod, or whatever you end up calling it when it's fully integrated..
[/EDIT2]
ShadMOrdre wrote:...Gnumeric...
Got that on my old laptop. I'll have to look.

ShadMOrdre wrote:As a side tip, I prefer not to run MT as a single server/client instance...
Oh, I do that too, with running games. With testing, I find its faster to load from the launcher, and as I add mods to check compatibility, it's easier to see the dependencies and optional dependencies.

Red_King_Cyclops
Member
Posts: 324
Joined: Sun Jun 16, 2019 20:17
Location: x=123, y=120, z=534

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

by Red_King_Cyclops » Post

ShadMOrdre,
I'm wondering if you would be interested in adding in another fluid to lib_materials. My mods space_travel and rocket together add in the following liquids:
  • Rocket fuel
  • Liquid hydrocarbon
  • Sulfuric acid
  • Cryolava
  • Two kinds of coloured, extraterrestrial water (due to bacteria and/or reflected light)
These liquids are also included, but they are not exactly new:
  • Oil (borrowed from lib_materials)
  • Europa water (looks identical to normal water, only included for a technical purpose)
  • Space lava (looks identical to normal lava, only included for a technical purpose)
Currently working on new mods.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

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

by ShadMOrdre » Post

UPDATE: 2019 - 10 - 12
Trimmed the number of nodes available in creative.
Disabled rivers, water_dynamics, waterfalls by default.
Added additional vessels, glass jug, jar, mug, others.
Updated mapgen aliases.
Created aliases between shapes and stairs / slabs

ThorfinnS,

As I thought about the idea for a while, I realized, it wouldn't make sense to use only sets of nodes, as that would essentially require a rework of biomes, ores, ecosystems, and would wreak havoc on lib_ecology.

As an alternative, and something I should have already done, I've simply removed the bulk of the nodes from creative. All of the grass covers multiplied by all the dirts, meant a large number of nodes. Now, just the basic dirt types, and the basic ground cover grasses. The shaped nodes should be craftable using the shapes, instead of being available in creative. These two changes greatly reduced the number of nodes showing up in creative. I have not tested with unified_inventory, but I'm thinking that UI manages in such a way that it imposes the limit on the number of nodes, or simply can't handle the shear volume of nodes. This maybe should be investigated from that end, since lib_materials only crashes when that mod is enabled.

Please let me know if my updates have any affect, either way.

Again, thank you for your feedback.



Red-King_Cyclops,

Let me take a look at them. The rocket fuel, liquid hydrocarbon, sulfuric acid all sound like good additions. I'm willing to consider any other liquids you create for the space mods, like liquid nitro, hydrogen, etc.

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

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

by ThorfinnS » Post

I'd have taken this to PM, but you must have disabled that.

How is the csv thing working out? The group I'm mentoring wants to do some major work re: farming, and it seems to me this would be a really good way to add new stuff. My question is what kind of things have come up that you needed to work around? How would you do it differently knowing what you know now? Suggestions re: variable records, like variable numbers of drops? Etc.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

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

by ShadMOrdre » Post

ThorfinnS,

Using .csv files to load the data actually works better than expected. Again, simply removing all the node defs from code, and funneling the .csv data through a well vetted function seems to have improved performance, in general. But this could be subjective to my own opinion/experience.

For dealing with things like drops, I preferred to only store the actual values used, and then inputting those values in a predefined "drops" definition. The same is true for liquid textures, and some other fields, where the particular definition for that node property is variable.

This same idea can be extended to even allow customizable functions. How? Like this.

In the .csv file, in the appropriate field, (for example, let's use the on_punch definition). For the on_punch code, I simply use a dofile, calling the appropriate on_punch lua file. You'll end up with lua files for each unique "on_punch" definition, but because the code is store single in a lua file, you can set the name of the file to call in the .csv file, in the on_punch field.

When my function reads the .csv file, for each record, it will call the named lua file, for the corresponding event. For each node, this will mean each "event" will have to reside singularly in a lua file. While I could also embed the actual function, or a function name, I have not yet figured out how to call a function from a text string. However, the dofile statement accepts a text string file name, making events still "programmable" from data loaded from a .csv file.

I hope that doesn't sound too confusing. I've not actually yet implemented the 'event' code, mainly because most of the nodes I define use rather generic, modular functions, that accommodates my use cases. However, I am working on other mods, where this functionality will be more apparent.

I have intended to add farming, xocean, australia, and aoteara mods to lib_ecology, and have laid most of the groundwork for this already, in lib_materials. You'll see, in the most recent update, that aoteara, australia, and farming nodes are already included across the two mods.

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

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

by kestral » Post

Shad,

An update on my voronoi biome experiments.

I did upload my voronoi_biome_patch. I'd like to get it to read the minetest.conf, but I haven't been successful so far. Right now any changes require editing the source code and recompiling.
https://github.com/kestral246/voronoi_biome_patch

I also uploaded my display_biome mod. This gives a HUD that displays temperature, humidity, and biome name (using text though rather than gages).
https://github.com/kestral246/display_biome

Red_King_Cyclops
Member
Posts: 324
Joined: Sun Jun 16, 2019 20:17
Location: x=123, y=120, z=534

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

by Red_King_Cyclops » Post

I found some slime liquids in a mod called underch: viewtopic.php?f=11&t=20384
Currently working on new mods.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

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

by twoelk » Post

:(
crashes with Minipeli
some hidden dependency?

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

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

by ShadMOrdre » Post

twoelk,

It would be helpful if you provided more info. paramat's very new minipelli minimal game might be missing something also. There can be no expectation that an older published mod that works, is compatible with a game that was just released in the last few days.

Having said that, what, specifically is happening? Does it crash out? Or do the biomes not show? If crashing, please provide the debug.txt output, and if missing biomes, ensure that minipelli isn't clearing biomes.

Please let me know, since lib_mat / lib_eco, with most of the content of minipelli and modified by me, are essentially what I am currently using.

I resorted, long ago, to what I believe is burlis' discection of default, into player_api, gui, hands, and other mods, just as what minipelli seems to now be doing.


Shad

User avatar
pilcrow
Member
Posts: 25
Joined: Thu Sep 12, 2013 09:10

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

by pilcrow » Post

I tried with Minipeli too, and it's a confusing issue. The server segfaults shortly after a player joins, with no error messages before-hand or any notable information in debug.txt; the last entry is "Pilcrow [127.0.0.1] joins game. List of players: Pilcrow" followed immediately by a segmentation fault.

I'm running Minetest 5.2.0 stable, compiled from source. Minipeli (unmodified) works flawlessly by iteself, but adding just lib_materials (also unmodified) into the 'mods' folder and configuring a brand new world to use it causes the segfault (which only happens after a player joins -- the server seems to run perfectly fine with no players). Looks like it happens after the first chunk is generated, at least; when I log in I can see lib_materials:dirt_permafrost_with_snow, some water, and various rocks around me before the client times out.

Note that I'm running the server and client separately for testing purposes, and using "Minipeli" as the seed. I can provide more information (irrlicht version, my OS, system specs, etc) if needed.

EDIT: Looks like the behavior is identical when using MiniBASE as well.

EDIT2: Looks like lib_materials does work fine with Minetest Game, though I notice that there's not actually very many lib_materials nodes in the environment; the stone is lib_materials:stone, but the surface nodes are default:dirt_with_grass, default:sand, etc.

TheFourthPlace
Member
Posts: 13
Joined: Mon Jan 23, 2017 03:45

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

by TheFourthPlace » Post

Removed.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

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

by ShadMOrdre » Post

Updated for efficiency. Includes minimal new content.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

Hi ShadMOrdre,
Just trying to get lib_ecology up and running and not having a lot of success. With both base MTG and Devtest I'm getting the below error, have I missed a dependancy somewhere or a setting maybe?

Thanks for the help

Code: Select all

2021-03-08 20:13:10: WARNING[Main]: Undeclared global variable "lib_mg_continental" accessed at ...etest-5.3.0-win64 (2)\bin\..\mods\lib_materials\init.lua:28
2021-03-08 20:13:10: ERROR[Main]: ModError: Failed to load and run script from C:\Users\sirro\Minetest\minetest-5.3.0-win64 (2)\bin\..\mods\lib_materials\init.lua:
2021-03-08 20:13:10: ERROR[Main]: ...etest-5.3.0-win64 (2)\bin\..\mods\lib_materials\init.lua:28: attempt to index global 'lib_mg_continental' (a nil value)
2021-03-08 20:13:10: ERROR[Main]: stack traceback:
2021-03-08 20:13:10: ERROR[Main]: 	...etest-5.3.0-win64 (2)\bin\..\mods\lib_materials\init.lua:28: in main chunk
2021-03-08 20:13:10: ERROR[Main]: Check debug.txt for details.
2021-03-08 20:13:10: ACTION[Main]: Server: Shutting down
I tried to check the problem out and it just looks like its trying to reference the intllib from somewere? I tried a couple of quick work arounds but those failed not surprisingly.

line28

Code: Select all

lib_mg_continental.intllib = S
Thanks for the help

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

got it just added

lib_materials.intllib = S

init.lua >>line28

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

Still having some issues but while I got the mods to load I did get the below image errors as missing, not sure if I might be using an old version? Although fresh downloaded from Git.

list of image names - hopefully I've removed all duplicates (few at the bottom are from ecology but thought best to keep the list intact in one spot)
Spoiler
lib_materials_stone_gravel.png
lib_materials_stone_claystone_02.png
lib_materials_stone_claystone_02_block.png
lib_materials_stone_claystone_02_brick.png
lib_materials_stone_cobble_road.png
lib_materials_stone_concrete.png
lib_materials_stone_concrete_block.png
lib_materials_stone_concrete_brick.png
lib_materials_stone_conglomerate_02.png
lib_materials_stone_conglomerate_02_block.png
lib_materials_stone_conglomerate_02_brick.png
lib_materials_stone_gravel_01.png
lib_materials_stone_gravel_02.png
lib_materials_stone_limestone_03.png
lib_materials_stone_limestone_03_block.png
lib_materials_stone_limestone_03_brick.png
lib_materials_stone_limestone_coquina.png
lib_materials_stone_limestone_coquina_block.png
lib_materials_stone_limestone_coquina_brick.png
lib_materials_stone_pounamu.png
lib_materials_stone_pounamu_block.png
lib_materials_stone_pounamu_brick.png
lib_materials_stone_sandstone_gravel.png
lib_materials_stone_sandstone_desert_stone.png
blox_stone_square while building texture.png
lib_materials_stone_sandstone_desert_stone_brick.png
lib_materials_stone_sandstone_desert_cobble.png
lib_materials_stone_schist_02.png
lib_materials_stone_schist_02_block.png
lib_materials_stone_schist_02_brick.png
lib_materials_stone_sea.png
lib_materials_stone_sea_brick.png
lib_materials_stone_sea_cobble.png
lib_materials_stone_sea_carved.png
lib_materials_stone_sea_circular.png
lib_materials_stone_sea_lantern.png
lib_materials_stone_sea_pillar.png
lib_materials_siltstone.png
lib_materials_siltstone_block.png
lib_materials_siltstone_brick.png
lib_materials_stone_terracotta_tile_brown.png
lib_materials_stone_terracotta_tile_floor.png
lib_materials_sand2_default.png
lib_materials_sand_iron.png
lib_materials_sand_volcanic2.png
lib_materials_seashells.png
lib_materials_glass_obsidian.png
lib_materials_ore_quartz_with_gold.png
lib_materials_dirt_mud_02.png
lib_materials_fluid_lava_bw_source.png
lib_materials_fluid_lava_bw_flowing_animated.png
lib_materials_fluid_lava_bw_source_animated.png
lib_materials_fluid_acid_source.png
lib_materials_fluid_acid_flowing_animated.png
lib_materials_fluid_acid_source_animated.png
lib_materials_fluid_water_grey_source.png
lib_materials_fluid_water_grey_flowing_animated.png
lib_materials_fluid_water_grey_source_animated.png
lib_materials_grass_peat_moss_top.png
lib_materials_grass_peat_moss_side.png
lib_materials_dirt_clay.png
lib_materials_dirt_peat.png
lib_materials_dirt_silt_03.png
lib_materials_dirt_trail.png
lib_materials_grass_humid_top.png
lib_materials_grass_semihumid_top.png
lib_materials_grass_temperate_top.png
lib_materials_grass_semiarid_top.png
lib_materials_flame_large_basic_animated.png
lib_ecology_mushroom_cap_green.png
lib_ecology_mushroom_cap_cyan.png
lib_ecology_mushroom_cap_red.png
lib_ecology_mushroom_cap_yellow_spotted2.png
lib_ecology_plant_dead.png
lib_ecology_tree_acacia_leaves_blooms.png
lib_ecology_tree_aspen_leaves_red.png
lib_ecology_tree_aspen_leaves_orange.png
lib_ecology_tree_aspen_leaves_yellow.png
lib_ecology_tree_leaves_green_pale.png
lib_ecology_tree_leaves_orange.png
lib_ecology_tree_lumin_spore_leaves.png
lib_ecology_tree_lumin_spore_sapling.png
lib_ecology_tree_lumin_spore_trunk_top.png
lib_ecology_tree_lumin_spore_trunk.png
lib_ecology_tree_lumin_spore_wood.png
Also having problems getting the ecology decs and biomes to register even on a blank new world (5.3), but ill try a few more things then post on the ecology thread.

Edit1
Okay the biomes are registering, just not appearing I'll try and check the mapgen...hmm nope cant be the mapgen as these are just registering for use by the default v7 mapgen.....

Code: Select all

2021-03-21 08:32:33: [Main]: temperate_humid_mountain
2021-03-21 08:32:33: [Main]: temperate_temperate_strato
2021-03-21 08:32:33: [Main]: temperate_temperate_beach
etc....
2021-03-21 08:32:33: [Main]: hot_arid_ocean
2021-03-21 08:32:33: [Main]: cold_temperate_beach
2021-03-21 08:32:33: [Main]: cool_humid
Edit2
Okay, think I got it I added default back as an optional dependency under mod.conf inside lib_material, fairly sure default was loading second and blowing all the custom biome data away and replacing it with default. Figured that out by loading a quick little mod that depended on all 3 that just outputted registered biome names.

Code: Select all

name=lib_materials
description=A collection of naturally occuring materials, including: sand, clay, dirt, stone, ore, metals, glass, various water types, oil, lava, grease, liquid soils, and decorative stones.
depends=
optional_depends=default,game,lib_shapes,lib_slopes
Before teying the below I refreshed my version of lib_materials back to standard and just replaced line 28 with the above mentioned and added default to mod.conf.

So it loads in but the whole engine crashes after about 5 seconds. (lib_materials only) I'm not even getting an error message in debug. However even from just that 5secs of rendering I can tell the biomes are correct...not even sure were to look for an errorless crash...I have a pile of reported errors prior to the crash but it had singleplayer joined okay:

Code: Select all

2021-03-21 11:23:06: ERROR[Main]: generateImage(): Could not load image "lib_materials_grass_temperate_top.png" while building texture; Creating a dummy image
2021-03-21 11:23:06: ERROR[Main]: generateImage(): Could not load image "lib_materials_grass_semiarid_top.png" while building texture; Creating a dummy image
2021-03-21 11:23:06: ERROR[Main]: generateImage(): Could not load image "lib_materials_flame_large_basic_animated.png" while building texture; Creating a dummy image
2021-03-21 11:23:07: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer


I'll have another poke around but not knowing even were to start looking...maybe an older engine version might work....

Edit3
Yep version issue for me at least, lib_materials wont work in any version above minetest 5.01, I'll see if I can see anything in the change log.

Now to see if I can lib_ecology work as well :)

Edit4
Success

Image
Attachments
screenshot_20210321_114308.png
screenshot_20210321_114308.png (406.07 KiB) Viewed 1257 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

I tried eliminating bits of lib_materials until it worked under 5.3 but that turned into a major headache as to much is dependant on each other (internally to the mod).

So I flipped it and had a look at what might have been different between 5.0.1 and then later versions and I'm not sure why but it looks to be the little caves checkbox that is causing some issue for lib_materials (see screenshot below). If I have that unticked then lib_materials and lib_ecology seem to run fine (with my other minor tweaks above). As soon as I check the caves checkbox on and have lib_materials enabled minetest will crash everytime.

I dont know were in the lib_materials code there might be a conflict or vice-versa some assumption in the caves function? I'm hoping when Shad is back this will give him a starter of were to look to fix the issue. For those wanting to try lib_materials out under 5.3 dont select caves :).

Make sure caves unticked for 5.3:
Image

EDIT
Just tested and same fix works for Minetest 5.4 - Sorry I am month behind :).
I have no idea how to do that for 5.1/5.2 as they have no tickbox....
Attachments
lib_mat caves off.png
lib_mat caves off.png (95.14 KiB) Viewed 1257 times

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

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

by Imk » Post

unified_inventory + lib_materials = Help

viewtopic.php?p=428204#p428204

AsyncErr: Lua: Runtime error from mod 'unified_inventory' in callback environment_Step(): ...netest-5.7.0-win64\bin\..\mods\unified_inventory/api.lua:101: attempt to compare string with number
stack traceback:
...netest-5.7.0-win64\bin\..\mods\unified_inventory/api.lua:101: in function 'func'
...+++\minetest-5.7.0-win64\bin\..\builtin\common\after.lua:20: in function <...+++\minetest-5.7.0-win64\bin\..\builtin\common\after.lua:5>
...++\minetest-5.7.0-win64\bin\..\builtin\game\register.lua:446: in function <...++\minetest-5.7.0-win64\bin\..\builtin\game\register.lua:432>
Last edited by Imk on Fri Sep 01, 2023 17:05, edited 1 time in total.

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

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

by Imk » Post

EDIT
Just tested and same fix works for Minetest 5.4 - Sorry I am month behind :).
I have no idea how to do that for 5.1/5.2 as they have no tickbox....

спасибо страдал сейчас пробую на 5.8 )

did not help ((
ModError: Failed to load and run script from C:\+++MT\MT_5.8\+++\minetest-5.7.0-win64\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'
...++\minetest-5.7.0-win64\bin\..\mods\lib_ecology\init.lua:94: in main chunk
Подробная информация в debug.txt.

Josselin2
Member
Posts: 102
Joined: Thu May 28, 2020 15:32
GitHub: axcore
In-game: Josselin
Location: Tunnelers' Abyss

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

by Josselin2 » Post

All versions of lib_materials are incompatible with unified_inventory.

Perhaps you didn't know, the project has been renamed: viewtopic.php?t=27377

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

lmk: It looks like a missing dependency. But I don't know why it would work when apparently it's broken according to sirrobzeroone and incompatible according to Josselin2. What are you using lib_materials for? I would probably help you better if I had your whole modpack in git like pandorabox-mods or aussieforks-modpack.
Spoiler
Arbitrary milestone: this my 1234th post :P
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Josselin2
Member
Posts: 102
Joined: Thu May 28, 2020 15:32
GitHub: axcore
In-game: Josselin
Location: Tunnelers' Abyss

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

by Josselin2 » Post

lib_shapes is here: https://github.com/ShadMOrdre/lib_shapes.

I have tweaked several versions of lib_materials and lib_ecology in order to "fix" problems like this, and I could upload them if required, but still none of them are compatible with unified_inventory.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests