Naming conventions, biomes, registering

Post Reply
jolpar
New member
Posts: 3
Joined: Sun Dec 04, 2022 13:50

Naming conventions, biomes, registering

by jolpar » Post

Hi everbody.
It's my first post in this forum, and it's a Lua-question !

I'm currently working on a project for a game. It would be for educative purposes. I would like to be able to create "roman" or "greek" or even "egyptian" antic worlds. I know there has been a lot of various proposals around these topics (eg Greek mod, facade mod, roman bath map, etc), but no extensive modpack/game.
Once the modpack/game created, one would be able to use it with students/classes, in order to : reproduce antic monuments in minetest, create short/little games for students/schools in antic towns (like an investigation, with historical NPCs to ask).

The steps are as follows :
- Create coherent environments (=use only biomes that one could really find in the latium, eg)
- Create NPCs for each civ (roman, greek, egyptian)
- Use a coherent set of existing mods with architectural items
- Create missing items and objects / delete items that didn't exist
- Provide some maps as examples

For the moment, my problem is :
I'm on step 1.
I use default MTG biomes + naturalbiomes (viewtopic.php?f=9&t=28390)
I only want a selection of the biomes they provide.

No problem with default MTG :
I created a mod, anticbioms that does the following :
I clear biomes, then register a selection of biomes, then register ores / deco with default.register_ores() etc. Easy.

Problems with naturalbiomes :
I clear biomes, then register the biomes I'm interested in, alpine and mediterranean (with a simple copy paste). But i cannot register ores and decorations of naturalbiomes.
I tried to call the naturalbiomes/alpine.lua file with a dofile. But it doesn't work because of naming convention (i'm in my anticbiomes mod, so I cannot register something that begins with "naturalbiomes:" !). I tried to create in naturalbiomes/alpine.lua a function "register_alpine()", like the default "register_ores()", but same naming problem...

So : Is there a way I could re-register all the nodes of an other mod that have been cleared ? (I don't want to rewrite or copy/paste the whole alpine/mediterranean mod
Thanks for your help, I'm slowly learning Lua, and I may have missed something.

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

Re: Naming conventions, biomes, registering

by firefox » Post

i've been too long away to know why exactly this doesn't work, but here's some random stuff:

- dofile can only load files within the same directory as itself, so no importing files from other mods
- you can add other mods as dependencies so they load before yours and their provided items can be used in yours
- if certain names are unavailable it's probably because they are defined globally, meaning they exist everywhere and there can only be one
✨🏳️‍🌈♣️✨

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

Re: Naming conventions, biomes, registering

by Blockhead » Post

I believe the word you're looking for in English is antique, related words antiquated and antiquity. An antic is a silly behaviour :P

What you are asking for, using only specific biomes from Minetest Game and from Natural Biomes isn't quite as nice as it could be with the current implementation of Natural Biomes (and Minetest Game). You will need to write specialised mods that deregister biomes from them that you don't want.

First, you will want to configure Natural Biomes to disable clearing biomes and then you need to implement that in your own mod, where you remove just the biomes, ores and decorations from Minetest Game biomes that you don't want. This mod should only depend on default.

Second, Natural Biomes should add support for enabling/disabling individual biomes. In the mean time, you can write a mod that depends on Natural Biomes and then removes the biomes, ores & decorations that you do not want from it. Other mods like ethereal and Australia: AussieForks edition support disabling specific biomes, removing the need for a disabler mod.

This should give you just the biomes you want, by removing the ones you don't want.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

jolpar
New member
Posts: 3
Joined: Sun Dec 04, 2022 13:50

Re: Naming conventions, biomes, registering

by jolpar » Post

Thanks for the detailed answer !
Indeed, antic was probably some home-made german-french mix, but certainly not the right english word ! ^^ Thanks for the advice :)

Anyway : I found the unregister functions and I'm using it. It works nice. The drawback of this solution is, that it will only unregister a given list of biomes, and I always have to take care of which mods are enabled and which are not.

So the best solution would actually be to have such register/unregister functions for Natural Biomes - I'll wait for that.

Well, now I have another question :
I've seen this interesting topic about MTG it's development and it's (no) future :
https://github.com/minetest/minetest_game/issues/2710

What game/basic conf would you now suggest to use as a reliable basis for mods ? There is of course MTG, since it's still maintained. But is there some consensual modpack that would be a long-term good alternative with all the basic bricks for standard crafting, player api, mobs, etc ? Mineclone2/5 ? Should I keep MTG as a basis for my project, with a mod selection like those of survivetest ?

Astrobe
Member
Posts: 577
Joined: Sun Apr 01, 2018 10:46

Re: Naming conventions, biomes, registering

by Astrobe » Post

jolpar wrote:
Mon Dec 05, 2022 15:06
What game/basic conf would you now suggest to use as a reliable basis for mods ? There is of course MTG, since it's still maintained. But is there some consensual modpack that would be a long-term good alternative with all the basic bricks for standard crafting, player api, mobs, etc ? Mineclone2/5 ? Should I keep MTG as a basis for my project, with a mod selection like those of survivetest ?
MTG is/was said to be basis for modding. Other games will probably add too much unwanted things, and/or no other game than MTG offers as much "long term support" guarantees. Also, there are far more mods for MTG than for any other game. So I'd recommend to stick with it.

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests