[MOD] Better Mapgen Settings [bettermapgensettings]

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

[MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Sat Dec 09, 2017 17:47

This is a mod that adds a new tab to the main menu of Minetest. It takes a little bit more work to install it, but once you do you will get a new tab called "Mapgen" In this new tab there are settings for getting rid certain things like decorations, biomes, schematics, etc.

This is all based on this post, https://forum.minetest.net/viewtopic.php?f=47&t=15272&start=400#p302138.


Github: https://github.com/CoderForTheBetter/bettermapgensettings

Latest version download: https://github.com/CoderForTheBetter/bettermapgensettings/archive/master.zip

Installation (read this, different than normal): https://github.com/CoderForTheBetter/bettermapgensettings/blob/master/README.md

License (LGPL-3.0): https://github.com/CoderForTheBetter/bettermapgensettings/blob/master/LICENSE.txt

Depends: default and flower

Picture of the new tab: https://imgur.com/a/gV2rr
Image

TODO:
  • Add biome selection
  • Add profiles

WARNING: If you enable this mod on a server or world then new terrain will be generated with these settings. Also, generating a world with specific settings, and then changing them, means the world will be generated with the new settings. Wait until profiles are added before getting serious with this mod.

I don't assume any responsibility if your world is destroyed by this mod.
 

Chem871
Member
 
Posts: 871
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Nyx Serris

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Chem871 » Sat Dec 09, 2017 19:29

Ooooohh! Customisable mapgen??! Are you able to determine the size of each biome? To have tiny biomes would be epic, no more traveling for 40+ minutes to get something!
What is SCP-055 again? I forgot.
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Sat Dec 09, 2017 19:53

Chem871 wrote:Ooooohh! Customisable mapgen??! Are you able to determine the size of each biome? To have tiny biomes would be epic, no more traveling for 40+ minutes to get something!


Unfortunately, I don't think the size of biomes can be adjusted. I would be able to do that if I handled all terrain generation with my own LUA code but that is a lot slower. This mod is really only for picking and choosing the biomes that exist or defining one with a custom top layer surface and stone material.

Who knows, maybe I will find a way to adjust the biome size, it seems unlikely though.

EDIT: I stand corrected (by myself), it seems there is a way to adjust the biome size (pertains to all biomes): https://forum.minetest.net/viewtopic.php?f=6&t=16226. There is also some more info about this stuff here https://forum.minetest.net/viewtopic.php?f=47&t=11603#p174045. I guess biomes are more customizable than I thought.

EDIT2: Are these biomes small enough for you?
https://imgur.com/a/pkCKQ
Image

The settings for defining this are not implemented yet, I'll work on it when I can.
 

User avatar
BirgitLachner
Member
 
Posts: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by BirgitLachner » Mon Dec 11, 2017 08:10

Tiny small biomes :-)

Another question ... what will happen if I create a world/map at my homecomputer and then upload it to server. Would it be a problem without having you code on the server or do I need to activate the mod?

And can I use the "deleteblocks" command to regenerate an area?
 

User avatar
Codesound
Member
 
Posts: 202
Joined: Thu Jun 09, 2016 14:56
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Mon Dec 11, 2017 16:22

BirgitLachner wrote:Tiny small biomes :-)

Another question ... what will happen if I create a world/map at my homecomputer and then upload it to server. Would it be a problem without having you code on the server or do I need to activate the mod?

And can I use the "deleteblocks" command to regenerate an area?


For the terrain to generate according to my mod, then you would have to activate my mod on the server. The only problem right now is that I don't think the settings will carry over with the mod since those will be stored somewhere where Minetest is installed. I'm working on profiles right now that will all be saved to a file, so once I get that done you can move that file over and pick a profile to generate with.

In short, it will probably be a problem. You may have to wait until I have profiles ready to use.

EDIT: Also, I'm not sure about regenerating areas yet. I may be able to make a setting that deletes areas you have explored already and replace it with the new settings. I'm absolutely not sure yet though.
Last edited by Devy on Mon Dec 11, 2017 19:10, edited 1 time in total.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by azekill_DIABLO » Mon Dec 11, 2017 16:44

What a nice idea! It should really be added as it's easier to use that than to tweaks params manually!
 

User avatar
BirgitLachner
Member
 
Posts: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by BirgitLachner » Mon Dec 11, 2017 17:07

Devy wrote:For the terrain to generate according to my mod, then you would have to activate my mod on the server. The only problem right now is that I don't think the settings will carry over with the mod since those will be stored somewhere where Minetest is installed. I'm working on profiles right now that will all be saved to a file, so once I get that done you can move that file over and pick a profile to generate with.

In short, it will probably be a problem. You may have to wait until I have profiles ready to use.


No problem ... the best is that you started this Mod.

Thanks, Birgit
 

User avatar
Codesound
Member
 
Posts: 202
Joined: Thu Jun 09, 2016 14:56
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Mon Dec 11, 2017 20:14

Codesound wrote:Hi,

I inform you that with the latest develop (Minetest 0.5.n), this mod crashes Minetest...
just to warn...

Thanks again

R

Image


Thanks, Codesound. I have only had time to test this on 0.4.16. I'll have to debug this. Also, 0.5.0 is still being developed so maybe it isn't my fault. Most likely not though.

EDIT:
Code: Select all
2017-12-11 15:21:59: ERROR[Main]: GUIEngine: execution of menu script failed: Failed to load and run script from /home/user/Downloads/minetest/bin/../builtin/init.lua:
2017-12-11 15:21:59: ERROR[Main]: cannot open /home/user/Downloads/minetest/bin/../builtin/mainmenu/store.lua: No such file or directory
2017-12-11 15:21:59: ERROR[Main]: stack traceback:
2017-12-11 15:21:59: ERROR[Main]:    [C]: in function 'dofile'
2017-12-11 15:21:59: ERROR[Main]:    .../Downloads/minetest/bin/../builtin/mainmenu/init.lua:39: in main chunk
2017-12-11 15:21:59: ERROR[Main]:    [C]: in function 'dofile'
2017-12-11 15:21:59: ERROR[Main]:    ...ome/user/Downloads/minetest/bin/../builtin/init.lua:45: in main chunk
2017-12-11 15:21:59: ERROR[Main]: No future without main menu!
Aborted (core dumped)


I think the difference is that they added stuff to the main menu init.lua file and the file me and you were using were the files from 0.4.16.

EDIT2: I was right, the init.lua file has changed since 0.4.16. I'll include two init.lua files in the mod, one for 0.4.16 and one for 0.5.0. If you want to make it work for now, then just paste this line into the init.lua (in the "builtin/mainmenu") that comes with 0.5.0:
Code: Select all
tabs.mapgen = dofile(minetest.get_modpath("bettermapgensettings") .. "/bettermapgensettings/mapgen_init.lua")
. I pasted that line on line number 55 in the file.

BUT You'll also need to paste this line:
Code: Select all
tv_main:add(tabs.mapgen)
at line number 142 for the tab to show up.


Anyone reading this that might be scared of how hard it sounds to install this, don't be, I'm only putting this stuff here since I expect that file to change more before 0.5.0 is released. 0.4.16 works fine right now.
Last edited by Devy on Mon Dec 11, 2017 20:39, edited 9 times in total.
 

Chem871
Member
 
Posts: 871
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Nyx Serris

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Chem871 » Mon Dec 11, 2017 20:22

Cool! Maybe not that small, just not massive is what I'm looking for.
What is SCP-055 again? I forgot.
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Mon Dec 11, 2017 20:37

Chem871 wrote:Cool! Maybe not that small, just not massive is what I'm looking for.


Great! I'm still working on adding those settings to the GUI. However, I have finals to study for, so don't expect anything new until about Friday.
 

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

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Gael de Sailly » Mon Dec 11, 2017 21:51

Looks interesting. I must take a look at this when I will have the time. Do you use noise parameters (like mg_biome_np_heat) to change the properties of biomes?
You can nearly completely customize the mapgen, this works for biomes, but also for terrain shape (but more complicated), with noise parameters. The problem is that these parameters are unreadable for the regular user, and something I wanted to do some time ago was to find some simply understandable parameters like "mountain height", "river width", "hills slope" (just giving random things to show what I mean) and automatically translate them in terms of noise parameters.
Contributor of Minetest and OpenStreetMap, on Ubuntu 16.04. ~ ~ ~ Meet me on MinetestForFun, VanessaE's Basic, Capture the Flag and Inside the Box.
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Mon Dec 11, 2017 22:08

Gael de Sailly wrote:Looks interesting. I must take a look at this when I will have the time. Do you use noise parameters (like mg_biome_np_heat) to change the properties of biomes?
You can nearly completely customize the mapgen, this works for biomes, but also for terrain shape (but more complicated), with noise parameters. The problem is that these parameters are unreadable for the regular user, and something I wanted to do some time ago was to find some simply understandable parameters like "mountain height", "river width", "hills slope" (just giving random things to show what I mean) and automatically translate them in terms of noise parameters.


That is exactly what I do. If you look on the Github page and in the init.lua file you can see the functions. I'm having luck modifying the biomes but it doesn't like to accept the flags I give it. If I use things like "nocave", or "nodungeon" it still generates them.

It would be very nice to be able to modify select parameters like the ones you mentioned. I'll have to play around with the noise settings and see what happens.

First, though, I'll have to get the basics worked out. Thanks for your interest.
 

User avatar
Codesound
Member
 
Posts: 202
Joined: Thu Jun 09, 2016 14:56

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Codesound » Mon Dec 11, 2017 22:50

Hi, thank you for your fast response!!!!


I try to insert the code that you have posted... but the problem persist:

I downloaded the latest "bettermapgensettings-master";
I edit the "bettermapgensettings-master/mainmenu/init.lua" file with your code (see image below);
I renamed the .../Minetest/minetest-0.5.0-f470cb7-win64\builtin\mainmenu/init.lua already present in this folder like backup.init.lua;
I copy/paste in this directory the "bettermapgensettings-master/mainmenu/init.lua" file;
I start Minetest, but the problem persist...


what I wrong? (please be patient.....)

Thanks again,

R

Image
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Devy » Mon Dec 11, 2017 22:58

Codesound wrote:Hi, thank you for your fast response!!!!


I try to insert the code that you have posted... but the problem persist:

I downloaded the latest "bettermapgensettings-master";
I edit the "bettermapgensettings-master/mainmenu/init.lua" file with your code (see image below);
I renamed the .../Minetest/minetest-0.5.0-f470cb7-win64\builtin\mainmenu/init.lua already present in this folder like backup.init.lua;
I copy/paste in this directory the "bettermapgensettings-master/mainmenu/init.lua" file;
I start Minetest, but the problem persist...


what I wrong? (please be patient.....)

Thanks again,

R

Image


I see. Get rid of the "init.lua" file you have in the "builtin/mainmenu" folder. After that is gone, rename your "backup.init.lua" file back to "init.lua". Then make the edits I suggested.

Also, just in case, after you rename "backup.init.lua" and before you make the line edits, make another backup of the "init.lua". You could name it something like "backup2.init.lua" just so you know how many times you have made backups of it.

If you get lost, you could redownload the latest version of Minetest again and then make a backup and do the line edits.

See, you were supposed to edit the "/Minetest/minetest-0.5.0-f470cb7-win64\builtin\mainmenu/init.lua" file and not rename it. You want to edit the "init.lua" file that came with 0.5.0

I hope that helps!
 

User avatar
Codesound
Member
 
Posts: 202
Joined: Thu Jun 09, 2016 14:56

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Codesound » Tue Dec 12, 2017 00:26

Hi,

Works! Thanks...

I unzip and put in the Minetest/mods folder one new "bettermapgensettings" mod and
I simply edit the "../minetest-0.5.0-f470cb7-win64\builtin\mainmenu\init.lua" file adding your code (se image below).

Thanks a lot also for your great support....

R
Image

Image
 

Skulls
Member
 
Posts: 84
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by Skulls » Thu Jan 18, 2018 21:36

Devy wrote:Also, I'm not sure about regenerating areas yet. I may be able to make a setting that deletes areas you have explored already and replace it with the new settings. I'm absolutely not sure yet though.


From the discussion at https://forum.minetest.net/viewtopic.php?f=10&t=16699&p=271344&hilit=regenerate#p271344 it looks like World Edit's //deleteblocks (which calls minetest.delete_area(pos1, pos2) ) triggers the block to be regenerated.

So maybe so? I'm assuming the noise params are deterministicly generated.
 

User avatar
srifqi
Member
 
Posts: 549
Joined: Sat Jun 28, 2014 04:31
Location: Indonesia
GitHub: srifqi
IRC: srifqi
In-game: srifqi

Re: [MOD] Better Mapgen Settings [bettermapgensettings]

by srifqi » Fri Jan 19, 2018 14:08

Reminds me of PR #2561.
I'm from Indonesia! Saya dari Indonesia!
Terjemahkan Minetest!
Mods by me. Modifikasi oleh saya.

Pronounce my nick as in: es-rifqi (IPA: /es rifˈki/)
 


Return to WIP Mods



Who is online

Users browsing this forum: Google [Bot] and 0 guests