[Mod] Experimental mapgen [mg]

Sokomine
Member
 
Posts: 3886
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Experimental mapgen [mg]

by Sokomine » Tue Sep 23, 2014 03:20

dm42 wrote:Is there any way to "scout" what materials are/will be availalbe in that area before the village is created? For example, if it's going to be a log-cabin type village - is there a way to find out what wood is "naturally" in the area? Or even base it on what biome you're in (and make some assumptions about what's available)? Just curious. Haven't checked out the pack yet, but will be very soon.

Not really. The mods installed (especially tree and wood types) determine what will be considered as building material. When it comes to placing a town, random materials are selected. Basing that decision on the biome present wouldn't be trivial at all, and it might not work very well anyway. Most biomes are pretty small. Their borders will in many cases be inside the village. Ground types (grass, snow, dirt, dirt from ethereal, ...) are kept, so you can see where those borders wander through the village. Giving each house individual materials would be possible, but it won't be a good idea. The villages need some common style in order to look well. With towns, that might be diffrent.
A list of my mods can be found here.
 

User avatar
Fritigern
Member
 
Posts: 43
Joined: Mon Sep 29, 2014 11:01
Location: Spokane, WA
In-game: Fritigern

by Fritigern » Fri Oct 17, 2014 04:43

So for the past weeks, I was stumped why my static_spawnpoint wasn't being used. Finally figured out that mg was to blame for this.

From init.lua, lines 714-739
Code: Select all
local function spawnplayer(player)
   local noise1 = minetest.get_perlin(12345, 6, 0.5, 256)
   local min_dist = math.huge
   local min_pos = {x = 0, y = 3, z = 0}
   for bx = -20, 20 do
   for bz = -20, 20 do
      local minp = {x = -32 + 80 * bx, y = -32, z = -32 + 80 * bz}
      for _, village in ipairs(villages_at_point(minp, noise1)) do
         if math.abs(village.vx) + math.abs(village.vz) < min_dist then
            min_pos = {x = village.vx, y = village.vh + 2, z = village.vz}
            min_dist = math.abs(village.vx) + math.abs(village.vz)
         end
      end
   end
   end
   player:setpos(min_pos)
end

minetest.register_on_newplayer(function(player)
   spawnplayer(player)
end)

minetest.register_on_respawnplayer(function(player)
   spawnplayer(player)
   return true
end)


This is so not cool, all mods should honor minetest.conf's settings, unless the user somehow indicates that they don't wish to use the static_spawnpoint, for instance by leaving static_spawnpoint empty, or by setting a config option on the mod's settings but no such provision was made in this mod's code!!!

Not cool guys, seriously not cool.
--
This is NOT a sig.
 

Sokomine
Member
 
Posts: 3886
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Experimental mapgen [mg]

by Sokomine » Fri Oct 17, 2014 15:39

Fritigern wrote:This is so not cool, all mods should honor minetest.conf's settings, unless the user somehow indicates that they don't wish to use the static_spawnpoint, for instance by leaving static_spawnpoint empty, or by setting a config option on the mod's settings but no such provision was made in this mod's code!!!

The reason for a spawn point beeing set by the mod is that prior to that change, people used to spawn embedded in stone or dirt when joining a world. Which is very confusing and looks like something's broken. Now players are placed at the center of the next available village - which is a far better starting point.

Beeing able to override that automatic spawning may indeed be intresting for servers. Perhaps I'll consider it in my mg_villages mod. A /spawn command couldn't hurt in singleplayer either...
A list of my mods can be found here.
 

User avatar
Fritigern
Member
 
Posts: 43
Joined: Mon Sep 29, 2014 11:01
Location: Spokane, WA
In-game: Fritigern

Re: [Mod] Experimental mapgen [mg]

by Fritigern » Fri Oct 17, 2014 21:09

Here's an idea in pseudo-code, because i don't know Lua:

Code: Select all
trigger_on_spawning_new_player
{
  while(node.above.head != air && node.at.head.level != air )
  {
     player_pos.z = player_pos.z + 2
  }
}


This will not prevent players from spawning in caves or tiny pockets of air, but at least it will prevent them from spawning inside solid nodes and be trapped there.
Better yet, make sure there's air all around so that the player can dig out if needed, but as long as the spawn point is obstructed, move them up by 2 nodes because moving up by a single node may still lead to the player spawn with their head buried.
--
This is NOT a sig.
 

Sokomine
Member
 
Posts: 3886
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Experimental mapgen [mg]

by Sokomine » Fri Oct 17, 2014 21:31

Fritigern wrote:Here's an idea in pseudo-code, because i don't know Lua:

IMHO the spawning in the next village is a very good thing. That way, you know what this mapgen can do, and have a more intresting starting point than those random ones. It's just when servers change the spawn point which ought to be honored. Of course, all this beeing open source, you can change it all according to your liking and don't have to wait upon what someone else likes :-)
A list of my mods can be found here.
 

User avatar
Fritigern
Member
 
Posts: 43
Joined: Mon Sep 29, 2014 11:01
Location: Spokane, WA
In-game: Fritigern

Re: [Mod] Experimental mapgen [mg]

by Fritigern » Fri Oct 24, 2014 16:32

Sokomine wrote:IMHO the spawning in the next village is a very good thing. That way, you know what this mapgen can do, and have a more intresting starting point than those random ones.


There are two big issues with your statement
ISSUE #1
Before you can spawn in a village, the following two conditions have to be met:
1 - The world must have generated far enough to have spawned a village, or you will simply spawn at 0,0,0
2 - The user must have died *after* condition 1 became true.

ISSUE #2
I will illustrate this issue with an example. Imagine, if you will, the following (single player) scenario:
Jimmy creates a new world using a random seed and found that this time he did not spawn in water, a rare occasion indeed. He waits a little and sees that 0,0,0 is actually a great spot to set up his base.
So Jimmy starts building and building, he remembered to do /sethome so that he is certain to spawn inside his awesome base should anything happen. He also put down a bed (he has the beds mod) and even set his home in Unified Inventory. Nothing can go wrong!
And Jimmy builds higher and higher, he keeps going until he accidentally falls off his building. No sweat, he has set a home so he should spawn right there!
But hey! A village? Why did I spawn here, Jimmy wonders, I was supposed to spawn inside my base! This is when Jimmy finds out the difference between a spawnpoint and a home. And which way is my home again? And how far?
So okay, Jimmy goes and sets 0,0,0 as his static_spawnpoint in minetest.conf because that should work.
Only, it doesn't, because Sokomine thought it was a good idea to override the static_spawnpoint, causing unexpected behavior in the game.

See the problem with an overridden static_spawnpoint?
--
This is NOT a sig.
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Fri Oct 24, 2014 17:22

Fritigern wrote:ISSUE #1
Before you can spawn in a village, the following two conditions have to be met:
1 - The world must have generated far enough to have spawned a village, or you will simply spawn at 0,0,0

Wrong. The code looks for where a village will spawn and spawns the player there.

Fritigern wrote:Only, it doesn't, because Sokomine thought it was a good idea to override the static_spawnpoint, causing unexpected behavior in the game.

See the problem with an overridden static_spawnpoint?

Overriding static_spawnpoint was unintended behaviour, as I never use this feature. It has been fixed in the latest version.
 

Sokomine
Member
 
Posts: 3886
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Experimental mapgen [mg]

by Sokomine » Tue Oct 28, 2014 01:59

Fritigern wrote:So okay, Jimmy goes and sets 0,0,0 as his static_spawnpoint in minetest.conf because that should work.

If your Jimmy's experienced enough to get that done, he'll maybe know about other ways of getting where he wants to.

Fritigern wrote:Only, it doesn't, because Sokomine thought it was a good idea to override the static_spawnpoint, causing unexpected behavior in the game.

And I still think it is a far better idea than to spawn players embedded in dirt :-)

Nore wrote:It has been fixed in the latest version.

Thanks! I've added that fix to mg_villages as well.
A list of my mods can be found here.
 

User avatar
Krock
Developer
 
Posts: 4392
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] Experimental mapgen [mg]

by Krock » Sun Nov 16, 2014 09:57

There's an issue with the leafdecay:

Image

Please add
Code: Select all
trunk = "mg:pinetree",

to the pine (and savanna tree) leaves definition to support the subgames BASE and Voxelgarden.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs
 

User avatar
Fritigern
Member
 
Posts: 43
Joined: Mon Sep 29, 2014 11:01
Location: Spokane, WA
In-game: Fritigern

Re: [Mod] Experimental mapgen [mg]

by Fritigern » Fri Nov 21, 2014 03:33

Hey guys, the latest Git version of minetest checks for uninitialized globals and the mg mod has proven to have a lot of them. I have taken the liberty of fixing them on my system, see my fixes below.
These fixes have stopped the warnings and all is honky dory now. In fact, it seems to have improved the speed of /mg_regenerate, but that could be either coincidence or even the power of suggestion.
P.S. This took me all day, i barely knew what i was doing, but i think i have learned a thing or two about Lua...
P.P.S. If i knew how to make a diff, i probably would have...

+ mg/init.lua lines 747 and 759
+ mg/init.lua line 118
+ mg/init.lua Lines 458-460
+ mg/init.lua Line 649
+ mg/ores.lua lines 12, 35, 94 and 95
+ mg/villages.lua Line 164
+ mg/villages.lua Lines 252-255 (244-247)
+ mg/villages.lua Line 278 (270)
+ mg/villages.lua Lines 284 (272)
+ mg/villages.lua Lines 306 (294)
+ mg/we.lua Line 15
+ mg/rotate.lua Line 22, 43
--
This is NOT a sig.
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Sun Nov 23, 2014 13:14

Ok, those leaking globals should be fixed now.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: [Mod] Experimental mapgen [mg]

by wcwyes » Mon May 04, 2015 01:41

I'm having what seems to be a bug in the mapgen code farming:cotton_seed seems to be referenced as farming:seed_cotton when placed in a chest I can't seem to find the reference though
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Mon May 04, 2015 05:50

These are in the we schematics of the mods; I will see if I can fix that.
 

User avatar
Wayward_One
Member
 
Posts: 108
Joined: Tue Jun 10, 2014 18:44
Location: Kolene, Corellia
GitHub: Wayward1
IRC: Wayward_One Wayward1
In-game: Wayward_One

Possible Addition

by Wayward_One » Fri May 15, 2015 21:18

Hello :) I'm not sure how hard it would be to implement this, but I would really like to see abandoned mines in addition to villages, like the ones from this mod: viewtopic.php?f=11&t=6307 or this one: viewtopic.php?f=9&t=10225

Maybe they could even be made to spawn under and/or near villages as well :D
 

Sokomine
Member
 
Posts: 3886
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Experimental mapgen [mg]

by Sokomine » Tue May 19, 2015 03:05

Wayward_One wrote:Hello :) I'm not sure how hard it would be to implement this, but I would really like to see abandoned mines in addition to villages, like the ones from this mod: viewtopic.php?f=11&t=6307 or this one: viewtopic.php?f=9&t=10225

The trouble with the mines is that it's hard to find them if they're entirely underground.

Wayward_One wrote:Maybe they could even be made to spawn under and/or near villages as well :D

A miner's village might be something. The entrance could either be a drop-shaft with a small tower on top, or a ground-level entrance with some mining shafts going straight through the next mountain. Making that look good and working would require quite some work I'm afraid.
A list of my mods can be found here.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: [Mod] Experimental mapgen [mg]

by wcwyes » Sat Jul 04, 2015 06:43

Nore wrote: It has been fixed in the latest version.
It still a little buggy
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Sun Jul 05, 2015 10:45

wcwyes wrote:
Nore wrote: It has been fixed in the latest version.
It still a little buggy

You mean the static_spawnpoint thing?
 

User avatar
swordpaint12
Member
 
Posts: 191
Joined: Sat Aug 22, 2015 00:50
Location: Foobass, isle of Atlantis, castle of Bardvendelle
In-game: [swordpaint12][Belching_Balladeer]

Re: [Mod] Experimental mapgen [mg]

by swordpaint12 » Mon Aug 24, 2015 18:17

I just got this error:

14:13:46: ERROR[main]: Server: Failed to load and run C:\Users\<my user>\Desktop\minetest-0.4.12-win64-msvc\minetest-0.4.12\bin\..\mods\mg_biomes\init.lua
14:13:46: ERROR[main]: ModError: ModError: Failed to load and run C:\Users\<my user>\Desktop\minetest-0.4.12-win64-msvc\minetest-0.4.12\bin\..\mods\mg_biomes\init.lua
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Mon Aug 24, 2015 21:14

Could you try to rename the folder to "mg" please ?
 

User avatar
swordpaint12
Member
 
Posts: 191
Joined: Sat Aug 22, 2015 00:50
Location: Foobass, isle of Atlantis, castle of Bardvendelle
In-game: [swordpaint12][Belching_Balladeer]

Re: [Mod] Experimental mapgen [mg]

by swordpaint12 » Tue Aug 25, 2015 13:34

Thanks, I did and it cleared up. Thank you!
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Tue Jan 26, 2016 20:50

Hello all!
The mod was moved to minetest-mods, so you can expect more frequent updates or bugfixes now ;), even if mg is starting to get deprecated...
 

redblade7
Member
 
Posts: 280
Joined: Sun Feb 15, 2015 07:14
IRC: redneonglow redblade7
In-game: redblade7 redblade7_owner

Re: [Mod] Experimental mapgen [mg]

by redblade7 » Fri Jan 29, 2016 01:02

Nore wrote:Hello all!
The mod was moved to minetest-mods, so you can expect more frequent updates or bugfixes now ;), even if mg is starting to get deprecated...


Is it safe to remove this mod from a server which used it from the beginning? Are the villages and biomes already in existence or does this generate them on the fly?
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
 

Nore
Developer
 
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Re: [Mod] Experimental mapgen [mg]

by Nore » Fri Jan 29, 2016 07:32

redblade7 wrote:
Nore wrote:Hello all!
The mod was moved to minetest-mods, so you can expect more frequent updates or bugfixes now ;), even if mg is starting to get deprecated...


Is it safe to remove this mod from a server which used it from the beginning? Are the villages and biomes already in existence or does this generate them on the fly?

If you remove this mod from a server, this will not affect the part of the map which has already been generated. However, there will be discontinuities at chunk borders where the map was not previously generated and is generated by another mapgen instead of mg if you remove it.
 

redblade7
Member
 
Posts: 280
Joined: Sun Feb 15, 2015 07:14
IRC: redneonglow redblade7
In-game: redblade7 redblade7_owner

Re: [Mod] Experimental mapgen [mg]

by redblade7 » Sat Jan 30, 2016 00:14

Nore wrote:
redblade7 wrote:
Nore wrote:Hello all!
The mod was moved to minetest-mods, so you can expect more frequent updates or bugfixes now ;), even if mg is starting to get deprecated...


Is it safe to remove this mod from a server which used it from the beginning? Are the villages and biomes already in existence or does this generate them on the fly?

If you remove this mod from a server, this will not affect the part of the map which has already been generated. However, there will be discontinuities at chunk borders where the map was not previously generated and is generated by another mapgen instead of mg if you remove it.


I don't understand, can you please explain?

I just want to make sure that this mod won't become/isn't broken with new versions of Minetest and then everything everyone's built has to be erased.
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: Majestic-12 [Bot] and 15 guests