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.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.
[Mod] Experimental mapgen [mg]
Re: [Mod] Experimental mapgen [mg]
A list of my mods can be found here.
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
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.
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)
Not cool guys, seriously not cool.
--
This is NOT a sig.
This is NOT a sig.
Re: [Mod] Experimental mapgen [mg]
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.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!!!
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.
Re: [Mod] Experimental mapgen [mg]
Here's an idea in pseudo-code, because i don't know Lua:
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.
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
}
}
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.
This is NOT a sig.
Re: [Mod] Experimental mapgen [mg]
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 :-)Fritigern wrote: Here's an idea in pseudo-code, because i don't know Lua:
A list of my mods can be found here.
Re: [Mod] Experimental mapgen [mg]
There are two big issues with your statementSokomine 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.
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.
This is NOT a sig.
Re: [Mod] Experimental mapgen [mg]
Wrong. The code looks for where a village will spawn and spawns the player there.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
Overriding static_spawnpoint was unintended behaviour, as I never use this feature. It has been fixed in the latest version.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?
Re: [Mod] Experimental mapgen [mg]
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: So okay, Jimmy goes and sets 0,0,0 as his static_spawnpoint in minetest.conf because that should work.
And I still think it is a far better idea than to spawn players embedded in dirt :-)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.
Thanks! I've added that fix to mg_villages as well.Nore wrote: It has been fixed in the latest version.
A list of my mods can be found here.
- Krock
- Developer
- Posts: 4577
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: [Mod] Experimental mapgen [mg]
There's an issue with the leafdecay:

Please add
to the pine (and savanna tree) leaves definition to support the subgames BASE and Voxelgarden.

Please add
Code: Select all
trunk = "mg:pinetree",
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: [Mod] Experimental mapgen [mg]
Last edited by Nore on Fri Jul 24, 2015 09:40, edited 1 time in total.
Re: [Mod] Experimental mapgen [mg]
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...
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...
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
+
Spoiler
--
This is NOT a sig.
This is NOT a sig.
Re: [Mod] Experimental mapgen [mg]
Ok, those leaking globals should be fixed now.
Re: [Mod] Experimental mapgen [mg]
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
Re: [Mod] Experimental mapgen [mg]
These are in the we schematics of the mods; I will see if I can fix that.
- Wayward_One
- Member
- Posts: 108
- Joined: Tue Jun 10, 2014 18:44
- GitHub: Wayward1
- IRC: Wayward_One Wayward1
- In-game: Wayward_One
- Location: Kolene, Corellia
- Contact:
Possible Addition
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
Maybe they could even be made to spawn under and/or near villages as well :D
Re: [Mod] Experimental mapgen [mg]
The trouble with the mines is that it's hard to find them if they're entirely underground.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
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.Wayward_One wrote: Maybe they could even be made to spawn under and/or near villages as well :D
A list of my mods can be found here.
Re: [Mod] Experimental mapgen [mg]
It still a little buggyNore wrote: It has been fixed in the latest version.
Re: [Mod] Experimental mapgen [mg]
You mean the static_spawnpoint thing?wcwyes wrote:It still a little buggyNore wrote: It has been fixed in the latest version.
- swordpaint12
- Member
- Posts: 191
- Joined: Sat Aug 22, 2015 00:50
- In-game: [swordpaint12][Belching_Balladeer]
- Location: Foobass, isle of Atlantis, castle of Bardvendelle
Re: [Mod] Experimental mapgen [mg]
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
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.
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.
Re: [Mod] Experimental mapgen [mg]
Could you try to rename the folder to "mg" please ?
- swordpaint12
- Member
- Posts: 191
- Joined: Sat Aug 22, 2015 00:50
- In-game: [swordpaint12][Belching_Balladeer]
- Location: Foobass, isle of Atlantis, castle of Bardvendelle
Re: [Mod] Experimental mapgen [mg]
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.
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.
Re: [Mod] Experimental mapgen [mg]
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...
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...
-
- Member
- Posts: 312
- Joined: Sun Feb 15, 2015 07:14
- IRC: redneonglow redblade7
- In-game: redblade7 redblade7_owner
Re: [Mod] Experimental mapgen [mg]
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?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...
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
Re: [Mod] Experimental mapgen [mg]
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 wrote: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?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...
-
- Member
- Posts: 312
- Joined: Sun Feb 15, 2015 07:14
- IRC: redneonglow redblade7
- In-game: redblade7 redblade7_owner
Re: [Mod] Experimental mapgen [mg]
I don't understand, can you please explain?Nore wrote: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 wrote: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?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...
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)
Who is online
Users browsing this forum: No registered users and 6 guests