[Mod] Villages for Minetest [mg_villages]
-
- Member
- Posts: 4317
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
[Mod] Villages for Minetest [mg_villages]
The villages for minetest are finally documented, and I think it's time to release them. If you want villages (and/or some lone houses) in your worlds, use this mod. It is a complex mod, and it does contain errors. The code may not exactly act as an example for good code in many areas. Yet the mod is useful. It reaches its full potential in combination with a variety of other mods (cottages, mobf_trader, moresnow, bell, ...).
If you want an easy to use modpack that already includes the most important mods this mod interacts with, get my villages modpack. It'll give you a *lot* more diffrent village types, snow on roofs, traders spawning in the village, and the handle_schematics mod this one depends on. You can combine the modpack with your favorite game.
Extensive documentation can be found in the Wiki.
Download: https://github.com/Sokomine/mg_villages ... master.zip
Browse code: https://github.com/Sokomine/mg_villages
Version: 0.1
Licence: GPLv3
Depends on: handle_schematics, farming, wool and stairs (default)
Recommmends: cottages, moretrees, RealTest, forest, dryplants, cavestuff, moresnow, darkage, ethereal, moreblocks, bell, mobf_trader, docfarming (including farming plusplus), mccompat.
This mod would not have been possible without the works of nore, paramat, hmmm and many others.
If you want an easy to use modpack that already includes the most important mods this mod interacts with, get my villages modpack. It'll give you a *lot* more diffrent village types, snow on roofs, traders spawning in the village, and the handle_schematics mod this one depends on. You can combine the modpack with your favorite game.
Extensive documentation can be found in the Wiki.
Download: https://github.com/Sokomine/mg_villages ... master.zip
Browse code: https://github.com/Sokomine/mg_villages
Version: 0.1
Licence: GPLv3
Depends on: handle_schematics, farming, wool and stairs (default)
Recommmends: cottages, moretrees, RealTest, forest, dryplants, cavestuff, moresnow, darkage, ethereal, moreblocks, bell, mobf_trader, docfarming (including farming plusplus), mccompat.
This mod would not have been possible without the works of nore, paramat, hmmm and many others.
Last edited by Sokomine on Sun Jul 01, 2018 17:52, edited 3 times in total.
A list of my mods can be found here.
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: villages for Minetest [mg_villages]
Ok, so this adds villages to Minetest? Awesome!
Re: villages for Minetest [mg_villages]
Awesome!
I will try this out today.
I will try this out today.
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
- Krock
- Developer
- Posts: 4683
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: villages for Minetest [mg_villages]
Great. This project was long time hidden from most players but now you finally decided to post it here.
Thank you!
Thank you!
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: villages for Minetest [mg_villages]
Is there a way to reduce how close villages spawn to each other?
-
- Member
- Posts: 4317
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] villages for Minetest [mg_villages]
You can set mg_villages.VILLAGE_CHANCE in mg_villages/config.lua to a lower value (default: 28; minimum: 1; maximum: 400). It's pretty much at the end of the config file. Perhaps I ought to put it in a more prominent place.KCoombes wrote: Is there a way to reduce how close villages spawn to each other?
Setting mg_villages.INVERSE_HOUSE_DENSITY to a high value (default: 4) reduces the amount of lone houses spawned.
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: [Mod] Villages for Minetest [mg_villages]
Excellent work, i'm impressed with the amount of time and effort put into this.
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Villages for Minetest [mg_villages]
Thank you for all your time, effort, and patience with creating this, Sokomine. This has been, by far, one of my favourite mods ever created for MT. I have been using this mod for over a year now and find it to be a staple in all of my games, it is a MUST HAVE for Minetest!!!
KUDOS!!!
KUDOS!!!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Villages for Minetest [mg_villages]
I found a weird bug:
2015-11-20 11:13:57: ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
RESOLVED....
Also, having moreblocks installed created this:
So I removed moreblocks and this popped up, from the army mod:
And it keeps doing this with other mods.
Where in villages is it grabbing a random block and placing it on the ground?
EDIT:
it may be in this:
For some strange reason this fixed itself after I deleted the mg_all_villages.data file Unexplainable.
Maybe my map is somewhat broken???
The village is fixed now.
2015-11-20 11:13:57: ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
RESOLVED....
Also, having moreblocks installed created this:
So I removed moreblocks and this popped up, from the army mod:
And it keeps doing this with other mods.
Where in villages is it grabbing a random block and placing it on the ground?
EDIT:
it may be in this:
Code: Select all
-- the flattened land around the village where wheat, cotton, trees or grass may be grown (depending on village type)
elseif( vn <= 80 ) then -- see mg_villages.inside_village_area
village_area[ x ][ z ] = { village_nr, 1};
Code: Select all
mg_villages.village_area_mark_inside_village_area = function( village_area, villages, village_noise, minp, maxp )
-- mark the rest ( inside_village but not part of an actual building) as well
for x = minp.x, maxp.x do
if( not( village_area[ x ] )) then
village_area[ x ] = {};
end
for z = minp.z, maxp.z do
if( not( village_area[ x ][ z ] )) then
village_area[ x ][ z ] = { 0, 0 };
local n_rawnoise = village_noise:get2d({x = x, y = z}) -- create new blended terrain
for village_nr, village in ipairs(villages) do
local vn = mg_villages.get_vn(x, z, n_rawnoise, village);
if( village.is_single_house ) then
-- do nothing here; the village area will be specificly marked later on
-- the village core; this is where the houses stand (but there's no house or road at this particular spot)
elseif( vn <= 40 ) then -- see mg_villages.inside_village
village_area[ x ][ z ] = { village_nr, 6};
-- the flattened land around the village where wheat, cotton, trees or grass may be grown (depending on village type)
elseif( vn <= 80 ) then -- see mg_villages.inside_village_area
village_area[ x ][ z ] = { village_nr, 1};
-- terrain blending for the flattened land
elseif( vn <= 160 and mg_villages.ENABLE_TERRAIN_BLEND) then -- see mg_villages.inside_village_terrain_blend_area
if n_rawnoise > -0.5 then -- leave some cliffs unblended
local blend = (( vn - 80) / 80) ^ 2 -- 0 at village edge, 1 at normal terrain
-- assign a negative value to terrain that needs to be adjusted in height
village_area[ x ][ z ] = { village_nr, -1 * blend};
else
-- no height adjustments for this terrain; the terrain is not considered to be part of the village
village_area[ x ][ z ] = { village_nr, 0};
end
end
end
end
end
end
Maybe my map is somewhat broken???
The village is fixed now.
- Attachments
-
- screenshot_20151120_120457.png (291.59 KiB) Viewed 12148 times
-
- screenshot_20151120_112311.jpg (332.4 KiB) Viewed 12148 times
-
- screenshot_20151120_111456.png (829.93 KiB) Viewed 12148 times
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
-
- Member
- Posts: 4317
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] Villages for Minetest [mg_villages]
Yes, that's right. The village type canadian consists of very special houses that needs mods from Mauvebic in order to be able to spawn. I considered adding alternative nodes for it, but that wouldn't do the buildings any justice. They're best viewed with Mauvebic's mm2 modpack.maikerumine wrote: 2015-11-20 11:13:57: ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
RESOLVED....
Do you have default:snow in your world? Some randomly selected villages do get a snow cover. If you deleted mg_all_villages.data and recreated the map with the same seed, the village still ought to be mostly the same - except for the snow cover which is selected randomly for some villages and which is not deterministic.maikerumine wrote: For some strange reason this fixed itself after I deleted the mg_all_villages.data file Unexplainable.
A list of my mods can be found here.
-
- Member
- Posts: 4317
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] Villages for Minetest [mg_villages]
Another node (probably more likely) that might be missing would be farming:wheat_8. That's what the medieval villages grow on their fields.
A list of my mods can be found here.
-
- Member
- Posts: 3476
- Joined: Sun Jul 12, 2015 22:51
- GitHub: BBmine
- IRC: BBmine
- In-game: Baggins
- Location: USA
Re: [Mod] Villages for Minetest [mg_villages]
I really like this mod! Thanks.
The only problem is that the chests are all empty. Did I forget to enable a mod?
The only problem is that the chests are all empty. Did I forget to enable a mod?
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Villages for Minetest [mg_villages]
Copy and paste the following code in the fill chests lua, over writing the existing code...BBmine wrote:I really like this mod! Thanks.
The only problem is that the chests are all empty. Did I forget to enable a mod?
Try this:
Code: Select all
--the code that works
-- adapted from the Mines mod
local chest_stuff = {
{name="default:apple", max = 3},
{name="farming:bread", max = 3},
{name="default:steel_ingot", max = 2},
{name="default:gold_ingot", max = 2},
{name="default:axe_steel", max = 1},
--{name="default:emerald", max = 5},
{name="default:pick_steel", max = 1},
{name="default:shovel_steel", max = 1},
{name="default:book", max = 3},
{name="default:torch", max = 13},
{name="default:stick", max = 7},
{name="default:coal_lump", max = 4},
{name="bucket:bucket_empty", max = 1},
{name="default:ladder", max = 10},
{name="default:mese_crystal_fragment", max = 2},
{name="vessels:glass_bottle", max = 1},
{name="wool:white", max = 11},
--{name="carpet:white", max = 11},
--{name="quartz:quartz_crystal", max = 5},
--{name="shears:shears", max = 1},
--{name="crops:melon_seed", max = 18},
--{name="mobs:saddle", max = 3},
{name="farming:carrot", max = 3},
{name="farming:corn", max = 3},
{name="farming:melon_slice", max = 3},
{name="farming:potato", max = 3},
{name="farming:raspberries", max = 3},
{name="farming:rhubarb", max = 3},
{name="farming:sugar", max = 3},
{name="farming:tomato", max = 3},
{name="farming:seed_wheat", max = 3},
{name="farming:cucumber", max = 3},
{name="farming:grapes", max = 3},
}
-- get some random content for a chest
mg_villages.fill_chest_random = function( pos, pr, building_nr, building_typ )
local meta = minetest.get_meta( pos )
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
for i=0,pr:next(1,6),1 do
local stuff = chest_stuff[pr:next(1,#chest_stuff)]
local stack = {name=stuff.name, count = pr:next(1,stuff.max)}
if not inv:contains_item("main", stack) then
inv:set_stack("main", pr:next(1,32), stack)
end
end
end
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- StepDevelop
- Member
- Posts: 75
- Joined: Mon May 02, 2016 21:11
- GitHub: StepDevelop
Re: [Mod] Villages for Minetest [mg_villages]
OMG O.o Great mod! For my server is very useful! Thanks, you're a great modder!
Re: [Mod] Villages for Minetest [mg_villages]
I personally don't think that problem is resolved yet. I don't even have that file mg_all_villages.data and i have the message: ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
I have 3 files that mentions that file, but that is it:
/home/cimbakahn/.minetest/mods/villages-for-minetest-modpack/mg_villages/buildings.lua
/home/cimbakahn/.minetest/mods/villages-for-minetest-modpack/mg_villages/init.lua
/home/cimbakahn/.minetest/mods/villages-for-minetest-modpack/mg_villages/mapgen.lua
What do you suggest i do?
I have 3 files that mentions that file, but that is it:
/home/cimbakahn/.minetest/mods/villages-for-minetest-modpack/mg_villages/buildings.lua
/home/cimbakahn/.minetest/mods/villages-for-minetest-modpack/mg_villages/init.lua
/home/cimbakahn/.minetest/mods/villages-for-minetest-modpack/mg_villages/mapgen.lua
What do you suggest i do?
cdb_efde67d3a97d
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Re: [Mod] Villages for Minetest [mg_villages]
I'll give it a shot. Thanks for all your hard work Sokomine.
Re: [Mod] Villages for Minetest [mg_villages]
As to this message:
ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
I have scoured google trying to find these mods. I can find nbu at viewtopic.php?f=13&t=2750
Problem is there is no mod to download on the page. And i couldn't find anything at all on hdb.
ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
I have scoured google trying to find these mods. I can find nbu at viewtopic.php?f=13&t=2750
Problem is there is no mod to download on the page. And i couldn't find anything at all on hdb.
cdb_efde67d3a97d
-
- Member
- Posts: 4317
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] Villages for Minetest [mg_villages]
That's right. hdb and nbu are no longer easily available for download. If you don't have an old copy (and some experience), you ought to not use village_canadian. There are plenty of village types that are easier to use. You can even create your own if you want to.cimbakahn wrote: ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
I have scoured google trying to find these mods. I can find nbu at viewtopic.php?f=13&t=2750
Problem is there is no mod to download on the page. And i couldn't find anything at all on hdb.
A list of my mods can be found here.
Re: [Mod] Villages for Minetest [mg_villages]
It might help if i knew what the letters stood for in hdb and nbu. And which page to find the download. I take nbu stands for nodebox utility, but what does hdb stand for. Is this all some sort of secret or something?
cdb_efde67d3a97d
-
- Member
- Posts: 4317
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] Villages for Minetest [mg_villages]
I don't know either. Those mods where created by Mauvebic. He is no longer participating in Minetest and deleted some of his mods some time ago and then couldn't find a backup.cimbakahn wrote: It might help if i knew what the letters stood for in hdb and nbu. And which page to find the download. I take nbu stands for nodebox utility, but what does hdb stand for. Is this all some sort of secret or something?
A list of my mods can be found here.
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
Re: [Mod] Villages for Minetest [mg_villages]
I pointed this out in another forum so I thought I should post it here. I don't know if this is a known bug or if my copy of mg_villages is screwed up.
I seem to have discovered if you have mg_villages.ENABLE_TERRAIN_BLEND = true; all villages spawn at y=1 or y=2. If you make that false it seems like they spawn at different heights that correspond better to the terrain, but there are also other bugs associated with ENABLE_TERRAIN_BLEND = false such as villages floating on water (you'll have 1 or 2 layers of dirt but then you can swim under the village) and in the mountains I've seen a few villages where the building heights vary and some of the buildings are floating.
I seem to have discovered if you have mg_villages.ENABLE_TERRAIN_BLEND = true; all villages spawn at y=1 or y=2. If you make that false it seems like they spawn at different heights that correspond better to the terrain, but there are also other bugs associated with ENABLE_TERRAIN_BLEND = false such as villages floating on water (you'll have 1 or 2 layers of dirt but then you can swim under the village) and in the mountains I've seen a few villages where the building heights vary and some of the buildings are floating.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod] Villages for Minetest [mg_villages]
i've also seen a big house on a 40 blocks high stone tower, flotin over a layer of snow
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- TheReaperKing
- Member
- Posts: 531
- Joined: Sun Nov 22, 2015 21:36
- Contact:
Re: [Mod] Villages for Minetest [mg_villages]
Great villages!!! One thing I noticed is the license isn't in the git repo. Seems like it might be a good idea to have in there.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids