[Mod] Villages for Minetest [mg_villages]

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

[Mod] Villages for Minetest [mg_villages]

by Sokomine » Mon Nov 16, 2015 02:27

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.

Image
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, bell.

This mod would not have been possible without the works of nore, paramat, hmmm and many others.
Last edited by Sokomine on Mon Nov 16, 2015 21:57, edited 2 times in total.
A list of my mods can be found here.
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

Re: villages for Minetest [mg_villages]

by benrob0329 » Mon Nov 16, 2015 03:42

Ok, so this adds villages to Minetest? Awesome!
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: villages for Minetest [mg_villages]

by Don » Mon Nov 16, 2015 13:28

Awesome!
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
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: villages for Minetest [mg_villages]

by twoelk » Mon Nov 16, 2015 14:12

Hurray !
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: villages for Minetest [mg_villages]

by Krock » Mon Nov 16, 2015 17:23

Great. This project was long time hidden from most players but now you finally decided to post it here.
Thank you!
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: villages for Minetest [mg_villages]

by KCoombes » Mon Nov 16, 2015 18:01

Is there a way to reduce how close villages spawn to each other?
 

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

Re: [Mod] villages for Minetest [mg_villages]

by Sokomine » Mon Nov 16, 2015 18:57

KCoombes wrote:Is there a way to reduce how close villages spawn to each other?

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.

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
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: [Mod] Villages for Minetest [mg_villages]

by paramat » Tue Nov 17, 2015 05:42

Excellent work, i'm impressed with the amount of time and effort put into this.
 

User avatar
maikerumine
Member
 
Posts: 946
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Villages for Minetest [mg_villages]

by maikerumine » Tue Nov 17, 2015 15:07

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!!!
 

User avatar
maikerumine
Member
 
Posts: 946
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Villages for Minetest [mg_villages]

by maikerumine » Fri Nov 20, 2015 16:29

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:
Image


So I removed moreblocks and this popped up, from the army mod:
Image

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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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};


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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


For some strange reason this fixed itself after I deleted the mg_all_villages.data file Unexplainable.

Image

Maybe my map is somewhat broken???

The village is fixed now.
Attachments
screenshot_20151120_120457.png
screenshot_20151120_120457.png (291.59 KiB) Viewed 7521 times
screenshot_20151120_112311.jpg
screenshot_20151120_112311.jpg (332.4 KiB) Viewed 7521 times
screenshot_20151120_111456.png
screenshot_20151120_111456.png (829.93 KiB) Viewed 7521 times
 

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

Re: [Mod] Villages for Minetest [mg_villages]

by Sokomine » Fri Nov 20, 2015 19:09

maikerumine wrote:2015-11-20 11:13:57: ERROR[Main]: mod "village_canadian" has unsatisfied dependencies: "hdb" "nbu"
RESOLVED....

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:For some strange reason this fixed itself after I deleted the mg_all_villages.data file Unexplainable.

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.
A list of my mods can be found here.
 

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

Re: [Mod] Villages for Minetest [mg_villages]

by Sokomine » Fri Nov 20, 2015 19:20

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.
 

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

Re: [Mod] Villages for Minetest [mg_villages]

by BBmine » Mon Dec 07, 2015 20:02

I really like this mod! Thanks.

The only problem is that the chests are all empty. Did I forget to enable a mod?
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 

User avatar
maikerumine
Member
 
Posts: 946
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Villages for Minetest [mg_villages]

by maikerumine » Tue Dec 08, 2015 14:59

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?

Copy and paste the following code in the fill chests lua, over writing the existing code...
Try this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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


I use it to fill all the chests on the servers. If you dont have tenplus1's farming installed, you can replace the other items if you like.
 

User avatar
StepDevelop
Member
 
Posts: 75
Joined: Mon May 02, 2016 21:11
GitHub: StepDevelop

Re: [Mod] Villages for Minetest [mg_villages]

by StepDevelop » Tue May 17, 2016 23:16

OMG O.o Great mod! For my server is very useful! Thanks, you're a great modder!
 

cimbakahn
Member
 
Posts: 36
Joined: Sat Aug 29, 2015 20:03
IRC: cimbakahn
In-game: cimbakahn

Re: [Mod] Villages for Minetest [mg_villages]

by cimbakahn » Wed May 18, 2016 19:57

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?
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [Mod] Villages for Minetest [mg_villages]

by philipbenr » Wed May 18, 2016 22:58

I'll give it a shot. Thanks for all your hard work Sokomine.
 

cimbakahn
Member
 
Posts: 36
Joined: Sat Aug 29, 2015 20:03
IRC: cimbakahn
In-game: cimbakahn

Re: [Mod] Villages for Minetest [mg_villages]

by cimbakahn » Fri May 20, 2016 19:45

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.
 

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

Re: [Mod] Villages for Minetest [mg_villages]

by Sokomine » Fri May 20, 2016 19:56

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.

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.
A list of my mods can be found here.
 

cimbakahn
Member
 
Posts: 36
Joined: Sat Aug 29, 2015 20:03
IRC: cimbakahn
In-game: cimbakahn

Re: [Mod] Villages for Minetest [mg_villages]

by cimbakahn » Fri May 20, 2016 22:07

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?
 

cimbakahn
Member
 
Posts: 36
Joined: Sat Aug 29, 2015 20:03
IRC: cimbakahn
In-game: cimbakahn

Re: [Mod] Villages for Minetest [mg_villages]

by cimbakahn » Fri May 20, 2016 22:36

Ok, i now have nbu, but not hdb.
 

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

Re: [Mod] Villages for Minetest [mg_villages]

by Sokomine » Sat May 21, 2016 01:33

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?

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.
A list of my mods can be found here.
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: [Mod] Villages for Minetest [mg_villages]

by BrandonReese » Tue Aug 30, 2016 16:21

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.
 

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

Re: [Mod] Villages for Minetest [mg_villages]

by azekill_DIABLO » Wed Aug 31, 2016 10:40

i've also seen a big house on a 40 blocks high stone tower, flotin over a layer of snow
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Villages for Minetest [mg_villages]

by TheReaperKing » Sun Sep 18, 2016 19:47

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.
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
 

xisd
Member
 
Posts: 42
Joined: Sun Oct 02, 2016 22:38
GitHub: xisd

Re: [Mod] Villages for Minetest [mg_villages]

by xisd » Sat Oct 08, 2016 21:22

Added support for Internationalization Library (intllib) and french translation
Pull request is there : https://github.com/Sokomine/mg_villages/pull/11

I verified everything as much as I could and everything should be ok but since I'm not using all the mods supported I can't be really sure

I might also open an other branch to fix ugly text overlaying on small screens (French translation having some longer strings, this is even worse)
(EDIT there it is : formspec fix )

And I might also soon add intllib support to handle_schematic mod as this is the one setting the first infotext meta for the plot marker
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] Villages for Minetest [mg_villages]

by hajo » Sun Dec 04, 2016 03:58

How to add new buildings and villagetypes to this mod ?
And how to get them 'approved' and included in this mod ?

E.g. a wild-west-themed village would need some buildings
like saloon, bank, staples, stores, post office, sheriff's office/jail etc.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
Spaghetti Developer
Member
 
Posts: 32
Joined: Sun Dec 04, 2016 14:01
GitHub: SpaghettiDeveloper
In-game: Spaghetti Developer

Re: [Mod] Villages for Minetest [mg_villages]

by Spaghetti Developer » Sun Dec 04, 2016 14:57

Very interesting! I hope that the development of this mod continue. It would be very nice to make new multiplayer worlds by adding generated villages within it. The mod is very beautiful, the villages are very detailed and extensive, great job! Do not abandon this masterpiece please.
 

User avatar
Andrey01
Member
 
Posts: 431
Joined: Wed Oct 19, 2016 15:18
In-game: Andrey01

Re: [Mod] Villages for Minetest [mg_villages]

by Andrey01 » Sun Dec 04, 2016 15:30

Spaghetti Developer wrote:Very interesting! I hope that the development of this mod continue. It would be very nice to make new multiplayer worlds by adding generated villages within it. The mod is very beautiful, the villages are very detailed and extensive, great job! Do not abandon this masterpiece please.

I like that mod, but it isn`t the most interesting mod.Probably, do you use mods are more interesting than that one:
1.Home Decor 2.Ethereal 3.Not So Simple Mobs (together with Not So Simple Buildings) 4.Vehicles 5.Advanced Trains
6.City Scapes 7.Plantlife 8.Space
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] Villages for Minetest [mg_villages]

by hajo » Mon Dec 05, 2016 01:51

I started a game with mg_villages, and I'm still on a tour to see all the buildings.

Some notes:
* In the info-dialog of the plot-markers, the placing of the price
is too close to the text that comes before it, so it overlaps.
* Also, the range of prices for buildings seems unbalanced
* The protection is broken:
the player can dig holes into houses, remove blocks from road,
and can harvest the wheat on the fields,
but is not allowed to re-plant seeds.
* Looking at /vmap, the order of the list quite random
and some numbers/buildings seem to be missing.
* maybe this map should have scrolling/pageup/pagedown ?

Also, how are the village-names generated ?
A sign with the village-name at both ends of the main road would be nice.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

Next

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron