villages [WIP]
- kidmondo
- Member
- Posts: 130
- Joined: Sun May 11, 2014 07:56
- IRC: kidmondo
- In-game: kidmondo
- Location: New Zealand
Re: villages [WIP]
Dose this mod spawn the town and can the town turn into a city?
Re: villages [WIP]
Sure, just build a cathedral ;)kidmondo wrote:Dose this mod spawn the town and can the town turn into a city?
Re: villages [WIP]
You're right - the mod really needs its own topic soon. There was some bigger progress recently: Paramat has written some nice terrain blending code for individual houses. They can now be spawned and look quite natural. This is far better than the version I came up with :-) Paramat is a genius with mapgens.4aiman wrote: Hey, Sokomine, could you post a list of features, please?
I know we've discussed a lot within Ethereal topic, but how's business going?
Listing all the features and doing some screenshots will be quite a lot of work I'm afraid.
That depends on what you consider to be a city. I call them villages because the..settlement...is not very structured. For each village type and each schematic, it's possible to declare how often this house ought to appear in relative and absolute terms. Real cities are a bit more structured than that. Plus you'd probably want other schematics for the houses of a town/city. The village type "canadian" consists of houses that might be found in a canadian town. Those where built by LadyMacBest and require a modpack from Mauvebic.kidmondo wrote: Dose this mod spawn the town and can the town turn into a city?
A list of my mods can be found here.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: villages [WIP]
Sokomine, the error is due to the 'mg villages grow a tree' function, you had too many variables being passed to 'default grow tree' / ' default grow jungletree'. Here's the code that works:
I found some buildings away from the villages, adds a very nice touch to an already amazing mod.

Code: Select all
mg_villages.grow_a_tree = function( pos, plant_id, minp, maxp, data, a, cid, pr )
-- a normal tree; sometimes comes with apples
if( plant_id == cid.c_sapling and default.grow_tree ) then
default.grow_tree(pos, math.random(1, 4) == 1)
return true;
-- a normal jungletree
elseif( plant_id == cid.c_jsapling and default.grow_jungletree ) then
default.grow_jungletree(pos)
return true;
-- a savannatree from the mg mod
elseif( plant_id == cid.c_savannasapling and add_savannatree) then
add_savannatree( data, a, pos.x, pos.y, pos.z, minp, maxp, pr)
return true;
-- a pine tree from the mg mod
elseif( plant_id == cid.c_pinesapling and add_pinetree ) then
add_pinetree( data, a, pos.x, pos.y, pos.z, minp, maxp, pr)
return true;
end
return false;
end

Re: villages [WIP]
I've used minetest_next during the development of the villages mod. Seems minetest_game is diffrent regarding the growing of trees. Unfortunately, the grow functions you mentioned cannot be used as well as the old one. There's a reason for why I passed those parameters on. The new function reads the map data, changes it (more or less as before) and writes it back. The only part that's needed for the villages is doing the actual changes to the data structure - a datastructure which has been read already. Perhaps the functions can be extended so that extra parameters are understood again. Else I'll probably have to copy that code over.paramat wrote: Sokomine, the error is due to the 'mg villages grow a tree' function, you had too many variables being passed to 'default grow tree' / ' default grow jungletree'. Here's the code that works:
Thanks! Those buildings look only so well-blended due to your code :-) The sand on top of it is deliberate. I'm not using any height limitations for it and just raise or lower whatever terrain will be at a place.paramat wrote: I found some buildings away from the villages, adds a very nice touch to an already amazing mod.
A list of my mods can be found here.
Re: villages [WIP]
Sokomine, any suggestions on where to get MM2? I've had no luck locating it. My kids love mg_villages btw, daughter spent an hour just pilfering chests. Can't wait for actual villagers.
- Krock
- Developer
- Posts: 4589
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: villages [WIP]
It looks much better than some months ago.
The terrain is much smoother now. (Talking about the mg version mg_villages)
The terrain is much smoother now. (Talking about the mg version mg_villages)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: villages [WIP]
There's been some progress, but there's also a bug I'm still trying to hunt down and which prevents me from releasing the mg_villages mod. Single houses sometimes spawn inside villages or get otherwise placed in a broken fashion.
A list of my mods can be found here.
- Hybrid Dog
- Member
- Posts: 2781
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: villages [WIP]
you're generating griefer housesSokomine wrote:Single houses sometimes spawn inside villages or get otherwise placed in a broken fashion.
Re: villages [WIP]
Almost :-) It looks more odd than griefed. Griefed is what you get when cavegen had a go at the houses. At least that damage is undone for the villages.Hybrid Dog wrote: you're generating griefer houses
A list of my mods can be found here.
- Hybrid Dog
- Member
- Posts: 2781
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: villages [WIP]
This was the well built spawn of globis' server, it became griefed:Sokomine wrote:Almost :-) It looks more odd than griefed. Griefed is what you get when cavegen had a go at the houses. At least that damage is undone for the villages.Hybrid Dog wrote: you're generating griefer houses
it's more than just cave attack
the iron stonebrick was the roof of the entrance to the train station
- Attachments
-
- overview.png
- (2.82 MiB) Not downloaded yet
Re: villages [WIP]
Sad to see a picure of such a griefed server. I've heared a lot of good things about that server (while it lasted and wasn't griefed).
This is what I'm fighting against:

...and this is a lumberjack village which has specialized on the new pine trees:

This is what I'm fighting against:

...and this is a lumberjack village which has specialized on the new pine trees:

A list of my mods can be found here.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: villages [WIP]
The pinewood houses look so good!
- Hybrid Dog
- Member
- Posts: 2781
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: villages [WIP]
glomie/globis accidentally removed the original server, as far as l know there are just some video(s) remaining. The new servers he begun didn't last long.Sokomine wrote:Sad to see a picure of such a griefed server. I've heared a lot of good things about that server (while it lasted and wasn't griefed).
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: villages [WIP]
This is my suggestion for separating villages from houses.
In 'villages at point' change the 'noise1' threshold for villages to > 0.4, then place houses when noise1 < -0.4.
Increase 'VILLAGE_CHANCE' to compensate for the smaller area defined by the new noise threshold of > 0.4.
For a good separation noise1 should have 2 octaves, and persistence should be 0.4 for smooth variation.
If houses and villages are still too close increase the spread of noise1 (currently 256), but this will increase the average distance between villages.
In 'villages at point' change the 'noise1' threshold for villages to > 0.4, then place houses when noise1 < -0.4.
Increase 'VILLAGE_CHANCE' to compensate for the smaller area defined by the new noise threshold of > 0.4.
For a good separation noise1 should have 2 octaves, and persistence should be 0.4 for smooth variation.
If houses and villages are still too close increase the spread of noise1 (currently 256), but this will increase the average distance between villages.
Re: villages [WIP]
The villages are progressing. Even though I think that I've eliminated the error that lead to strange overlapping of single houses and villages, there's still a lot to do, especially code cleanup and oter issues.
Btw, this is how it looks if you use mg_villages with a singlenode mapgen:

Btw, this is how it looks if you use mg_villages with a singlenode mapgen:
- Attachments
-
- screenshot_885619316.png
- (1003.31 KiB) Not downloaded yet
A list of my mods can be found here.
Re: villages [WIP]
That looks cool!
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!
A list of my mods can be found here
A list of my mods can be found here
Re: villages [WIP]
Sokomine!... Outstanding mod! Much props to you, Paramat, and anyone else whose fingers have been part of this. I am currently using the mg mapgen on my kid's server but this is going to replace it as mg is so slow and this mod is ultra fast. I have a couple of questions though...
INVERSE_HOUSE_DENSITY: according to the comments, 0 (zero) disables lone buildings outside of villages, default is 4 (four)... Increase or decrease the value to make less lone buildings? (INVERSE_ has confused me)
VILLAGE_CHANCE: is commented out. Is this option not functional? I am looking for a way to increase the rarity of villiages as there are too many being spawned for my taste. If it is functional what is the meaning of the value? (percentage out of 100?
I will play with these two values to see what happens but confirmation on what I find would be great.
Thanks for your time.
INVERSE_HOUSE_DENSITY: according to the comments, 0 (zero) disables lone buildings outside of villages, default is 4 (four)... Increase or decrease the value to make less lone buildings? (INVERSE_ has confused me)
VILLAGE_CHANCE: is commented out. Is this option not functional? I am looking for a way to increase the rarity of villiages as there are too many being spawned for my taste. If it is functional what is the meaning of the value? (percentage out of 100?
I will play with these two values to see what happens but confirmation on what I find would be great.
Thanks for your time.
Re: villages [WIP]
In theory, mg ought to be as fast as mg_villages. I've done some optimizations and do more complicated landscape changes at other ends, but in general mg_villages is based on mg. It ought to work with almost any mapgen.blert2112 wrote: Sokomine!... Outstanding mod! Much props to you, Paramat, and anyone else whose fingers have been part of this. I am currently using the mg mapgen on my kid's server but this is going to replace it as mg is so slow and this mod is ultra fast. I have a couple of questions though...
Increase the value in order to decrease the amount of lone houses (thus, inverse). Every 1/INVERSE_HOUSE_DENSITY th mapchunk (area of 80x80 nodes) receives a lone house, provided there's nothing that keeps it from spawning (like i.e. a village that is too close by).blert2112 wrote: INVERSE_HOUSE_DENSITY: according to the comments, 0 (zero) disables lone buildings outside of villages, default is 4 (four)... Increase or decrease the value to make less lone buildings? (INVERSE_ has confused me)
Don't forget to add the other mods so that you'll get all possible village types. I really need to make a modpack so that it's easier to grab them all in one go...
It is set to 28 at another place in the config file. That was an experiment with diffrent values. Decrease the value in order to get less villages. A value between 1 and 400 ought to do. It may not boil down to percentages exactly as there's noise involved. In general, that part of the code is more or less still the same as the one in mg written by Nore.blert2112 wrote: VILLAGE_CHANCE: is commented out. Is this option not functional? I am looking for a way to increase the rarity of villiages as there are too many being spawned for my taste. If it is functional what is the meaning of the value? (percentage out of 100?
Playing with these values might be best. It's very difficult to decide how many villages and/or houses are enough. It also depends on factors such as walking speed (run or slow walk?) and amount of area you intend to explore.blert2112 wrote: I will play with these two values to see what happens but confirmation on what I find would be great.
A list of my mods can be found here.
Re: villages [WIP]
In theory, I don't doubt that at all. In practice, things are a bit different under certain conditions... for instance: Using mg on my server, if you log in and immediately run to a door and open it, it will literally take many many seconds for the door to open. Using mg_villages plus mgv6, do the same and the door opens right away. Since mgv6 is my preferred mapgen (I just don't need a dozen different multi-colored biomes) I see this as a huge performance improvement. Granted, though I just upgraded my server hardware, it is still relatively very old hardware.Sokomine wrote:In theory, mg ought to be as fast as mg_villages. I've done some optimizations and do more complicated landscape changes at other ends, but in general mg_villages is based on mg. It ought to work with almost any mapgen.
Pretty much what I found while messing with the values. I think I found some settings I like (8 and 20).Sokomine wrote:Increase the value in order to decrease the amount of lone houses (thus, inverse). Every 1/INVERSE_HOUSE_DENSITY th mapchunk (area of 80x80 nodes) receives a lone house, provided there's nothing that keeps it from spawning (like i.e. a village that is too close by).
Don't forget to add the other mods so that you'll get all possible village types. I really need to make a modpack so that it's easier to grab them all in one go...
It is set to 28 at another place in the config file. That was an experiment with diffrent values. Decrease the value in order to get less villages. A value between 1 and 400 ought to do. It may not boil down to percentages exactly as there's noise involved. In general, that part of the code is more or less still the same as the one in mg written by Nore.
Playing with these values might be best. It's very difficult to decide how many villages and/or houses are enough. It also depends on factors such as walking speed (run or slow walk?) and amount of area you intend to explore.
I have had the additional (extra materials and "blueprints") since the beginning. Again... Loving this mod.
-
- Member
- Posts: 119
- Joined: Tue Sep 23, 2014 11:37
Re: villages [WIP]
Is there an option to decrease the number of villages and/or random buildings or increase the space between them?
I found mg_villages.VILLAGE_CHANCE in config.lua and it seems, increasing the value helped with the villages. But for my taste, there are still too many single houses on the map.
Can't walk 50 blocks without seeing another building. There is no more real wilderness without civilization. :-)
Anyway, i really love this mod!!
I found mg_villages.VILLAGE_CHANCE in config.lua and it seems, increasing the value helped with the villages. But for my taste, there are still too many single houses on the map.
Can't walk 50 blocks without seeing another building. There is no more real wilderness without civilization. :-)
Anyway, i really love this mod!!
Re: villages [WIP]
Just set mg_villages.INVERSE_HOUSE_DENSITY = 40 in order to decrease the amount of single houses by factor 10. The normal value is 4 - meaning on average one house per four mapchunks (80x80 blocks). The higher you set it, the less single houses there will be.Rochambeau wrote: Is there an option to decrease the number of villages and/or random buildings or increase the space between them?
I found mg_villages.VILLAGE_CHANCE in config.lua and it seems, increasing the value helped with the villages. But for my taste, there are still too many single houses on the map.
They're conquering the wilderness and bringing civilization :-) But you're right. Balancing the values so that the amount of houses feels right is not easy. For my testworlds, I tend to use values of 1 (maximum amount of single houses) so that they are more common and bugs become more obvious.Rochambeau wrote: Can't walk 50 blocks without seeing another building. There is no more real wilderness without civilization. :-)
A list of my mods can be found here.
- Hybrid Dog
- Member
- Posts: 2781
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: villages [WIP]
l tried the mod (Aug. 2013) and didn't find a house.
Re: villages [WIP]
The date suggests that you actually took my old villages mod - which is a pretty old version by now. In that old mod, villages had to be spawned using a special chat command.The thread has moved to cover mg_villages instead, which does spawn villages and single houses and is based on Nores villages code for Nores mg mapgen. I really ought to start a new thread for it...it's just that there's always a lot more that can be done and a lot of documentation to do, which frightens me a bit...Hybrid Dog wrote: l tried the mod (Aug. 2013) and didn't find a house.
A list of my mods can be found here.
Who is online
Users browsing this forum: No registered users and 4 guests