villages [WIP]

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Sokomine wrote:Usually, people complain that my buildings are too small and cramped.
Actually, I should say I'm impressed by the way you give the houses so much detail while keeping them small in size. They make me feel at home :3
Sokomine wrote:That's the forge. In order to avoid disaster in case of accidents, it has a well close by. The material the lava is contained in will only be replaced with other solid stone types. Hope this is safe enough?
The forge did get on fire once, but I cannot reproduce it. It seems like a rare condition, perhaps related to some weird problems with the way schematics are placed. It's likely a bug in the engine; it seems place_schematic() sometimes fails to generate new chunks for the placement, or some bug in the priorities (I think the chunk gets loaded, the schematic placed, and then some of the terrain is generated over it).
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Sokomine wrote:... a quadratic shape was cut out from the map. The huge moretrees trees remained half standing, as did part of a hill. Perhaps the area was not entirely loaded.
Yes i had that bug a lot at first, i learned to fly and move around inside a chunk before flattening it. I'll work on an oval area, which is a good idea easily done, with the correct node layers including the water. Once you're happy with the mod i'll write the LVM version.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Sokomine wrote:... below that 2-3 layers of loam.
loam?

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

by Nore » Post

My solution was only a proof-of-concept for now, but could be used to create a better blended surface that the current one.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

The pictures i posted was in Hexxit(a minecraft modpack). Though in minecraft i think villages spawn on the world like a 2d image from above and they go on whatever they land on.
Edit: also those pics I showed were supposed to show how you could fit stuff into terrain and they could be part of villages that have castles.
Last edited by jojoa1997 on Thu Aug 22, 2013 11:10, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

On generated is automatic, faster and more reliable, but also down to chance, i can't see away around that ... perhaps i should add that option in too *is good idea*.

Doing stuff on generated is more reliable because the whole chunk is freshly generated ... there is little chance of bugs other than the cavegen griefing bug.
I may be able to work with perlin noise to automatically choose a good location ... not in a desert, not out at sea ... now looking into it.
Last edited by paramat on Sat Aug 24, 2013 04:40, edited 1 time in total.

User avatar
Neuromancer
Member
Posts: 797
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Please add the land flattening feature (using one of the land flattening mods?) and auto spawning of villages. That way I can just install the mod and wander into villages. Some npcs would be a nice addition as well.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Flatten mod version 0.1.2 released viewtopic.php?id=6959
Now has ellipses of any proportion, irrigation water under flat area in normal biomes, and a choice of flattening on generated chunk or by chat command.

No automatic searching of a suitable location yet ... that's the next challenge.
Last edited by paramat on Sun Aug 25, 2013 02:08, edited 1 time in total.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Sokomine, underground irrigation and the unbroken fields it enables gave me the idea for a 'crop circle' mod, crop squares? Yes i will make crops mysteriously flatten in the night into square shapes.

User avatar
anonymoushamster
New member
Posts: 1
Joined: Tue Aug 27, 2013 01:53

by anonymoushamster » Post

moderror: failed to load and run C:/Minetest/t/bin/./mods/villages-master/init.lua
Check debug.txt for details

O.o

I'm sort of... new and an idiot... I don't understand this.

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

anonymoushamster wrote:moderror: failed to load and run C:/Minetest/t/bin/./mods/villages-master/init.lua
Check debug.txt for details

O.o

I'm sort of... new and an idiot... I don't understand this.
If you rename the folder "villages-master" to "villages" everything should work.
See viewtopic.php?id=6450

Noob 4 life!
My stuff

User avatar
philipbenr
Member
Posts: 1743
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

by philipbenr » Post

philipbenr wrote:

Code: Select all

    -- thanks to sfan5 for this advanced code that reads the size from schematic files
    local read_s16 = function(fi)
        return string.byte(fi:read(1)) * 256 + string.byte(fi:read(1))
    end
    local function get_schematic_size(f)

Code: Select all

10:32:09: ERROR[main]: ServerError: LuaError: error: ...- Copy\bin\..\games\minetest_game\mods\villages\init.lua:289: bad argument #1 to 'byte' (string expected, got nil)
This is an error I got. I'm thinking "What the..." :\ help please?
does anyone know how to fix? I really love this mod, and want to have it.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Sokomine, flatten mod 0.3.0 is released viewtopic.php?id=6959
Not much more to do before i write the vmanip version, i will release 0.3.1 soon with a bugfix and wheatfield option. Optional irrigation water is now hidden inside a 3 node thick layer of stone under 2 nodes of sand / dirt. The flat area is now 3 chunks = 240 nodes across.
Please could you let me know if there is anything else that is essential for using this mod with villages?
Last edited by paramat on Wed Sep 04, 2013 19:41, edited 1 time in total.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Flatten mod version 0.3.1 viewtopic.php?id=6959
Last edited by paramat on Sat Sep 07, 2013 19:30, edited 1 time in total.

User avatar
qwrwed
Member
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Post

When trying to use this on sfan5's latest build, I get this error:

Code: Select all

17:41:15: ERROR[main]: ServerError: LuaError: error: ...netest-0.4.7-2170c99-win32\bin\..\mods\villages\init.lua:289: bad argument #1 to 'byte' (string expected, got nil)
Near the beginning of the debug.txt, there is this as well:

Code: Select all

error:...inetest-0.4.7-2170c99-win32\bin\..\builtin/serialize.lua:168: attempt to index local 'sdata' (a nil value)
error:...inetest-0.4.7-2170c99-win32\bin\..\builtin/serialize.lua:168: attempt to index local 'sdata' (a nil value)
Which only appeared after I installed animalmaterials and plants_lib. The first error appears whether I have the dependencies installed or not.
Last edited by qwrwed on Sun Oct 13, 2013 16:47, edited 1 time in total.

User avatar
THEGGABOOK77
Member
Posts: 140
Joined: Wed Jul 10, 2013 22:17
Location: This Post →

by THEGGABOOK77 » Post

Amazing, and very very informated. |:-)
190.31.223.213 : 30000 Is my Modern House server (Creative) And Totally Free
Join Now!
My Stuff
MY MODS: City Elements-Funny Signs

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Uniflat mod may interest you Sokomine viewtopic.php?id=7701

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Uniflat mod converted to voxelmanip viewtopic.php?pid=123283#p123283

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: villages [WIP]

by paramat » Post

Sokomine, here's a modified version of mg_villages that uses spawner nodes, abm and the non 'mapgen object' voxelmanip, hopefully no griefing by mudflow or cavegen, needs further testing.
This is not a fork, just the mod folder stored in my 'wieldhand' repo https://github.com/paramat/wieldhandsam ... g_villages
Edits:
mapgen.lua: edited 'on generated' function and 'place villages via voxelmanip' function, added abm on spawner node
nodes.lua: new village spawner node

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

Re: villages [WIP]

by Sokomine » Post

paramat wrote: Sokomine, here's a modified version of mg_villages that uses spawner nodes, abm and the non 'mapgen object' voxelmanip, hopefully no griefing by mudflow or cavegen, needs further testing.
Thank you! I've had put that off for now due to other things needing fixing first. The environment of the villages is not quite in the state I wish it to be yet. Your code will certainly come in handy once it's time to generate more..stable...and less griefed villages. I hope to reach that point soon.

Btw, mg_villages is not a direct continuation from my villages mod here. It just aims at the same thing and uses similar algorithms, although there are differences in detail. mg_villages (based on Nores village mapgen, not on mine) will be the more versatile soulution to the problem, while these villages here solve the medieval village problem slightly better. Perhaps it might eventually be time to rename this mod here and give that villages namespace over to mg_villages.
A list of my mods can be found here.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: villages [WIP]

by paramat » Post

I'm just posting this here because you don't have a mg_villages topic.
My edited version had a problem, the spawner nodes were placed at chunk centres, since ABM range is 32 nodes by default players often could not get close enough to trigger the spawners and generate the village because there is a huge vertical wall there at the chunk border. This is why it only worked with 'active block range' increased to 3+ in minetest.conf.
Now solved by using 4 spawner nodes per mapchunk, placed at each mapchunk corner, no need for a non-default active block range. I have also added a basic WIP terrain blend. My version is found here stored in my wieldhand repo https://github.com/paramat/wieldhandsam2 All edited or added code is marked between '-- PM v' and '-- PM ^', there are 4 spawner nodes in nodes.lua and i have edited and added various functions in mapgen.lua.
Last edited by paramat on Mon Aug 25, 2014 06:57, edited 1 time in total.

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

Re: villages [WIP]

by Krock » Post

paramat wrote:I'm just posting this here because you don't have a mg_villages topic.
Interesting but your villages mod has the same problem:
+ Spoiler
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: villages [WIP]

by paramat » Post

No idea i don't get that error.

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

Re: villages [WIP]

by Sokomine » Post

paramat wrote: I'm just posting this here because you don't have a mg_villages topic.
That's ok. I was mostly explaining this to other readers who might not be aware that there are two similar mods, one still under construction :-)
paramat wrote: My edited version had a problem, the spawner nodes were placed at chunk centres, since ABM range is 32 nodes by default players often could not get close enough to trigger the spawners and generate the village because there is a huge vertical wall there at the chunk border. This is why it only worked with 'active block range' increased to 3+ in minetest.conf.
Now solved by using 4 spawner nodes per mapchunk, placed at each mapchunk corner, no need for a non-default active block range. I have also added a basic WIP terrain blend. My version is found here stored in my wieldhand repo https://github.com/paramat/wieldhandsam2 All edited or added code is marked between '-- PM v' and '-- PM ^', there are 4 spawner nodes in nodes.lua and i have edited and added various functions in mapgen.lua.
Thank you! I've downloaded your version some time ago and taken a short look, eventually even figured out the meaning of the -- PM comments. Perhaps it might be possible to work with one spawner node instead of 4. There's param2 which is also easy enough to access inside the abm. But that's not the most urgent for now.

Your terrain blend is also very nice and will improve the villages immensly.

Currently, the main problem I'm facing before I may integrate your code is the problem of how to determine village height. Very large villages work well with a low random value or even 0 or 1 as they cover enough terrain to hit some ocean or lake somewhere. The smaller the village, the more odd such a low height may look. I've written a small function to analyze the height of the terrain at the border of the village (the inside is of no intrest), but there I'm facing a major problem: The current chunk may hold only a tiny fraction of the village border, and each chunk will arrive at a diffrent conclusion at which height might be optimal.
Krock wrote: Interesting but your villages mod has the same problem:
I've no idea why windows builds have trouble reading that particular file. As those buildings concerned will only work with Mauvebics mm2 modpack (which you're not particulary likely to have installed), just comment out all "canadian" buildings in the list of buildings in buildings.lua
A list of my mods can be found here.

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: villages [WIP]

by paramat » Post

LOL there's a bordello as one of the Canadian buildings =)
One spawner node using param2, good idea will do this.
The terrain blend will be non-linear soon and larger, and as in my flattening mods i'll mix in some un-blended cliffs as well. A larger blend area might solve some of your problems of villages isolated in a hole because there will be a walkable slope down to a village that looks like it is in a natural depression. I will also make blending work when the surrounding terrain is lower.
Analyzing the surrounding terrain height in multiple mapchunks could be done by recreating mapgen v6 'elevation at point' in lua, complex but possible. However, if the terrain blend is large enough you may be able to leave all villages near sea level, as villages tend to be built in natural depressions for reasons of shelter, so i'll get working on terrain blend to see if we can avoid the complex solution.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests