[Mod] Structures [git] [minetest_mods_structures]

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structure I/O & mapgen mod

by MirceaKitsune » Wed Jun 17, 2015 21:30

I believe today was the final important day for this mod. I went through the new code and made the final fixes and adjustments that were needed. The new mapgen was merged into master and is now default, so simply checkout the mod from Github to get it. I've also separated the structure system and the default town into two mods, simply enable the modpack to get both working. Lastly, I documented the town definition and scripting API, making it easier for people to build their own towns now... note that there might still be changes and rewrites to the functions.

Testing would be welcome at this stage... feel free to grab the mod and try it yourself! Report any bugs you find here or on IRC (to Taoki). Please note however that floating or buried buildings are not bugs! The perlin map of each town must be synced with the perlin map of the biome it spawns in, and this mod should really be used with custom biomes for this exact purpose.

From my perspective, the mod is ready and at a usable stage now. I kindly request this topic to be moved from "WIP mods" to "Mod Releases". To end this massive series of updates, here are a two screenshots of a town that spawned in a snow biome... has a pretty Christmasy feel to it :)

Image
Image
 

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

Re: [Mod] Structure I/O & mapgen mod

by Sokomine » Wed Jun 17, 2015 23:36

MirceaKitsune wrote:I believe today was the final important day for this mod. I went through the new code and made the final fixes and adjustments that were needed. The new mapgen was merged into master and is now default, so simply checkout the mod from Github to get it. I've also separated the structure system and the default town into two mods, simply enable the modpack to get both working.

Congratulations! I'm glad you get it to work the way you wanted. It's always good when a mod gets finished.

MirceaKitsune wrote:Lastly, I documented the town definition and scripting API, making it easier for people to build their own towns now... note that there might still be changes and rewrites to the functions.

You don't by any chance want to write the documentation for the API for my mg_villages? :-))))

MirceaKitsune wrote:Please note however that floating or buried buildings are not bugs! The perlin map of each town must be synced with the perlin map of the biome it spawns in, and this mod should really be used with custom biomes for this exact purpose.

What do you recommend then in order to avoid floating/burried buildings? Embedding them into the terrain and making that look natural is a lot of work.

The roads with sewers below and lamps on top are very decorative. Using multiple layers so that a building can be diffrent each time (diffrent amount of floors) is also very intresting, especially for towns. I'm not sure if your buildings are the right ones for something that can be called "town" - but maybe they're just too diffrent from the styles of houses found around where I live. For a town, a higher density of buildings per area would be good. That also helps any towngen as it's easier to place smaller buildings than larger ones. On the other hand, more diffrent types will be needed so that it doesn't look repetitive. I'm thinking of something like Karsthafen.
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structure I/O & mapgen mod

by MirceaKitsune » Thu Jun 18, 2015 11:22

Sokomine wrote:Congratulations! I'm glad you get it to work the way you wanted. It's always good when a mod gets finished.


Thanks! Even more so in this case, since I started the mod about 2 years ago. Back when I was testing out the first mapgen system (didn't even have roads) I was already thinking of what the mod could do when it got to this stage. And yesterday, it finally did! Obviously though, a mod that's still being maintained is never fully ready and there are always new changes, but it has reached the point where I consider it v1.0.

Sokomine wrote:You don't by any chance want to write the documentation for the API for my mg_villages? :-))))


Even if I had the energy to learn the API and do some writing again, one thing I've learned is that it takes a lot of working with a mod and code to fully understand all of its features, bugs, abilities, etc. and document everything properly.

Sokomine wrote:What do you recommend then in order to avoid floating/burried buildings? Embedding them into the terrain and making that look natural is a lot of work.


The group and its buildings use a perlin noise map to determine height now, exactly what mapgens use to generate the base terrain. So you simply need to have the same noise parameters (offset, scale, resolution, etc) as the perlin noise used by the mapgen... more specifically the biome you have your town spawning on. Unfortunately this means there is no way to prevent floating / buried structures in mgv6, but if your world has custom biomes you should be able to make structures sync with the terrain. Like I said, this mod should normally only be used with custom biome definitions for this exact reason.

Sokomine wrote:The roads with sewers below and lamps on top are very decorative. Using multiple layers so that a building can be diffrent each time (diffrent amount of floors) is also very intresting, especially for towns. I'm not sure if your buildings are the right ones for something that can be called "town" - but maybe they're just too diffrent from the styles of houses found around where I live. For a town, a higher density of buildings per area would be good. That also helps any towngen as it's easier to place smaller buildings than larger ones. On the other hand, more diffrent types will be needed so that it doesn't look repetitive. I'm thinking of something like Karsthafen.


The current buildings are pretty much there so there is a default town that looks like a town, has the basic features needed for testing, and is not too horrible looking. I haven't put quite that much work into them... the game I plan to use this mod for shall have much better towns and cities, with many more buildings and road types.
 

metaspy
New member
 
Posts: 7
Joined: Fri Jun 12, 2015 03:17

Re: [Mod] Structures [git] [minetest_mods_structures]

by metaspy » Thu Jun 18, 2015 18:47

This mod looks amazing!
I am going to test it out right now. Thank you for all the hard work you have put into it!!!

and got an error straight away:
Code: Select all
14:49:01: ERROR[main]: Failed to load and run script from
14:49:01: ERROR[main]: D:\Downloads\minetest-0.4.12-win64-msvc\minetest-0.4.12\bin\..\mods\structures\structures_groups_default\init.lua:
14:49:01: ERROR[main]: ...4.12\bin\..\mods\structures\structures/structures_io.lua:15: attempt to call field 'serialize_schematic' (a nil value)
14:49:01: ERROR[main]: stack traceback:
14:49:01: ERROR[main]:    ...4.12\bin\..\mods\structures\structures/structures_io.lua:15: in function 'io_get_size'
14:49:01: ERROR[main]:    ...\bin\..\mods\structures\structures/structures_mapgen.lua:28: in function 'group_size'
14:49:01: ERROR[main]:    ...\bin\..\mods\structures\structures/structures_mapgen.lua:277: in function 'register_group'
14:49:01: ERROR[main]:    ...in\..\mods\structures\structures_groups_default\init.lua:33: in main chunk
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Thu Jun 18, 2015 23:47

Yesterday I thought I was done with this mod for some time... turns out this was not the case. I asked on IRC how I could obtain the perlin noise used to generate a biome's terrain, and was surprised to hear that terrain isn't based exclusively on perlin noise like I thought it was... in other words you can't. However, there is a mapgen object which returns the heightmap of the last generated area, and it can be used from on_generate. It even works with all mapgens and biomes!

So as you might have expected, this means an unforseen rewrite took place; Building height is no longer based on perlin noise, but on the heightmap exclusively. Indeed, buildings are now always placed at ground level and align with the terrain, for the first time since the new mapgen system was introduced! Obviously a parameter was left in for roads to limit by how much they can deviate per segment... currently this is a little buggy, as intersections are not accounted and roads are still disproportional.

Image

metaspy wrote:This mod looks amazing!
I am going to test it out right now. Thank you for all the hard work you have put into it!!!

and got an error straight away:


That's a weird error, never had it here. I can only assume your version of Minetest doesn't contain minetest.serialize_schematic, which might make sense since I think it was added rather recently (I run MT only from GIT).
 

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

Re: [Mod] Structures [git] [minetest_mods_structures]

by Sokomine » Fri Jun 19, 2015 03:51

MirceaKitsune wrote:The current buildings are pretty much there so there is a default town that looks like a town, has the basic features needed for testing, and is not too horrible looking. I haven't put quite that much work into them... the game I plan to use this mod for shall have much better towns and cities, with many more buildings and road types.

The buildings arn't bad, except for the hotel. The other houses work fine, fit together in style and can be used as single houses or as part of a village. It may be an advantage for quite a lot of players that the houses are not furnished. It's also easier for mobs to move around inside mostly empty buildings. It's just not a very town-like house style, that's all :-). If you ever come up with good buildings using your seperate floor system (like with the hotel), I'd love to use them as well and extend mg_villages accordingly.
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Fri Jun 19, 2015 22:29

Today I ironed out the final bugs I could find, marking the mod stable and ready again. Important highlights include:

- The centering system was reworked to use customizable linear interpolation again, and averages to the height of the first structure that spawned. This fixes road intersections deviating from some segments and leaving gaps.

- Ground level is now detected much more aggressively per structure; Instead of checking the center, each point within the structure's radius is scanned and the lowest one is chosen. This drastically reduces the chances of structures still having parts not touching the ground, although they might occasionally get buried more than normally needed.

- Areas (mapgen cubes) are only activated when the chunk is within the height of any structure group, not always. This prevents someone who is exploring at very hight / low heights making a town never spawn in the same horizontal area once it's explored at ground level. It also improves performance, by not trying to generate towns for people at distant heights who will never see them.

As with every update announcement, here are a few more screenshots for you to enjoy. They primarily show the patterns roads generate now that they're free to stretch over great lengths... sometimes they even create bridges over water between distant islands.

+ Spoiler
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Sat Jun 20, 2015 18:36

Since working on this mod made it a pretty straining week, I wanted to do something simpler and more fun today. You all probably know about the Creatures mod, which is the second major mod for Minetest I'm working on. Since communication between mods is something I've wanted to try out, I now added support for the default creatures to the default structures.

More precisely: If you have both the Structures and Creatures mod packs installed and enabled, people (humans and anthros) will be spawned by the structures, both indoor and outdoor. This means that when a new town is generated, there's a chance that you will find people in houses, gardens, on the street, and even in the sewers!

Note however that this causes a few more mobs than usual to spawn and activate, so your sever will use a greater amount of CPU and RAM. With both mods enabled, Minetest reached up to 2 GB of RAM and 25% CPU usage... which probably can't be improved much Lua side. Also mobs are bad at wandering around in towns... they don't know how to open doors (yet) and will also jump off high places (like roofs) and hurt themselves foolishly. In any case, the environment is certainly a lot more lively. Here are some screenshots of towns with mobs:

+ Spoiler
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Sat Jun 27, 2015 22:55

I have a great update to share today, related to the mod's road planning system; Although most users probably never noticed this problem, Structures had a major limitation ever since roads were implemented years ago: Roads would always branch from a single point, which was placed at a random position within the group's area. This meant that you couldn't get disconnected roads appearing in the same town, that roads would be more dense around a specific part of the town, and now that heightmaps were added it also meant the town's entire road system appeared at one height.

This all changed today, after I finished a series of rewrites to the road calculation mechanism. The most important change is that roads have multiple starting points, which are placed randomly inside evenly distributed areas divided across the town's surface. The count and number of branches can be configured per road type, as well as the minimum and maximum branch distance. Additionally, structures can now be part of multiple layers (collision groups) and layers are also accounted when calculating the size of a town or how road starting points are distributed.

The changes you will see in practice are essentially new road patterns: There will be multiple stretches of roads not connected to each other. Further more, every road segment is flattened around the height of the starting point it spawned from, no longer at a global height... meaning each road system in the town will adapt to the height of the terrain it spawned on, and you'll see roads at various heights. This is a huge improvement, and the last important feature that needed to be added to Structures.

Here are some screenshots showing examples of independent road systems, spawned at different locations and heights:

+ Spoiler
 

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

Re: [Mod] Structures [git] [minetest_mods_structures]

by Krock » Sun Jun 28, 2015 08:23

Comparing to the previous road system is this one a great improvement.
Good job!
>> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Sun Jun 28, 2015 12:01

A heads-up: I have re-licensed the code from WTFPL to LGPL. This mod has grown into a pretty large project, and as such I think it needs a clearer and less controverted license. Since LGPL is the license Minetest itself is released under, while I exclusively want all of my code to be free but always remain open-source, I am happy with this move.
 

dannyplaysminetest
Member
 
Posts: 37
Joined: Sun Jun 28, 2015 19:20
In-game: Danny

Re: [Mod] Structures [git] [minetest_mods_structures]

by dannyplaysminetest » Sun Jun 28, 2015 19:28

Thanks for this Mod, installed it yesterday not used it yet, but wil be very useful in future city building projects.. ^_^
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Sun Jun 28, 2015 23:02

dannyplaysminetest wrote:Thanks for this Mod, installed it yesterday not used it yet, but wil be very useful in future city building projects.. ^_^


No problem, and glad that people are liking this mod! Make sure to update to latest GIT master... I found and fixed some minor bugs and crashes soon after implementing and announcing the new features yesterday.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Fri Apr 21, 2017 14:34

My... this sure has been dead for a long time. I've been away from Minetest since RealBadAngel died, as lack of motivation kept me from working on this and other mods. I am however still interested in maintaining both this and the Creatures mod... ideally perfecting both and making them work together, such that complex and unique worlds can be created with each!

Has anyone tried adding this mod to a server, and seeing how it works in multiplayer? Is the mod itself still working well against latest Git master of Minetest, in fact? I've been waiting to see more test cases ever since I created this city generator, but unfortunately no one's ever tried setting up a mainstream server for it to this day.
 

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

Re: [Mod] Structures [git] [minetest_mods_structures]

by Sokomine » Fri Apr 21, 2017 19:32

MirceaKitsune wrote:Has anyone tried adding this mod to a server, and seeing how it works in multiplayer? Is the mod itself still working well against latest Git master of Minetest, in fact? I've been waiting to see more test cases ever since I created this city generator, but unfortunately no one's ever tried setting up a mainstream server for it to this day.

Most servers are dedicated to players who want to build there. Servers that place more emphasis on survival and fighting for mobs also exist. Those are more likely to want pre-generated structures. I know none that uses the structures directly. A few smaller servers (experimental AdventureTest server, Maikaumines old Test server, some very few smaller ones) use my mg_villages mod which does also produce villages of type "taoki" with your structures.

The structures-mod seems to work well with latest MT and MTG. There are some adjustments you'll have to do so that all will work again. Doors where changed some time ago into two node high meshes. They work diffrent from the old ones. Your old doors spawn now as unkown nodes. Torches where changed as well. There's a special type for beeing fixed to a wall. "Normal" old torches look odd if placed that way. But that's about all I could find and ought to be not too much work to adjust.

Houses are often embedded inside stone and not really integrated into the landscape. Getting down to a building can be tricky. Roads cannot be walked on as there seems to have been an earthquake which moved parts of the roads up and others down, leaving too high walls to jump.

Those multi-floor houses of varying height are very nice to have.

Hope you'll be working on your mod again. Mine isn't really finished either - there are still situations where bugs cause single houses to spawn above villages, and the main road is too often cut off at the end of the village. My current project is a mod that supports citybuilding - something where the player founds a city and decides where structures ought to be built.
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Fri Apr 21, 2017 20:05

Sokomine wrote:Most servers are dedicated to players who want to build there. Servers that place more emphasis on survival and fighting for mobs also exist. Those are more likely to want pre-generated structures. I know none that uses the structures directly. A few smaller servers (experimental AdventureTest server, Maikaumines old Test server, some very few smaller ones) use my mg_villages mod which does also produce villages of type "taoki" with your structures.

The structures-mod seems to work well with latest MT and MTG. There are some adjustments you'll have to do so that all will work again. Doors where changed some time ago into two node high meshes. They work diffrent from the old ones. Your old doors spawn now as unkown nodes. Torches where changed as well. There's a special type for beeing fixed to a wall. "Normal" old torches look odd if placed that way. But that's about all I could find and ought to be not too much work to adjust.

Houses are often embedded inside stone and not really integrated into the landscape. Getting down to a building can be tricky. Roads cannot be walked on as there seems to have been an earthquake which moved parts of the roads up and others down, leaving too high walls to jump.

Those multi-floor houses of varying height are very nice to have.

Hope you'll be working on your mod again. Mine isn't really finished either - there are still situations where bugs cause single houses to spawn above villages, and the main road is too often cut off at the end of the village. My current project is a mod that supports citybuilding - something where the player founds a city and decides where structures ought to be built.


Thank you for the useful info! The door and torch problems make sense, and it sounds like I'll need to update the schematics sometime. However this will be very tricky, as I need to create a new world and import then re-export every structure... if only Minetest schematics could be edited by hand. Perhaps I should take this opportunity to create new and better buildings altogether, I don't know.

Other than that however, it sounds like all else is working fine! I was worried important functionality might have changed, which could break reading of mapgen terrain or per-chunk spawning. Sounds like Minetest has been keeping its API steady, and not mindlessly deprecating or changing important functions that would break existing mods... this is always relieving to hear for a mod creator!

Houses cutting through stone is normal, and not much can be done about it; Last time I worked on the mod, I used every possible approach I could come up with, in order to achieve the perfect balance between cutting into terrain versus leaving parts of a structure floating. Roads being offset by one unit was the best compromise; It's the only way to allow road systems to climb up and down somewhat, with the only alternative being perfectly straight roads everywhere. There's only so much that can be done when the world is made of 1-meter voxels, but personally I'm happy with the final patterns.

And yes: Structures as well as Creatures are intended for survival based servers, especially adventure and story based worlds. A server meant for players to build their own things would not have much use for them, and they would in fact be an annoyance. Still there should be a good distribution of each genre, and perhaps someone would like to try my mod's approach to survival based worlds.

Also, if you're working on a village / town / city mod as well... perhaps you can take a more in-depth look at what I did with mine, and see if it might already offer the functionality you need! Obviously you'd know best, as your mod likely has features mine can't support... however this does aim to offer every mechanic and bit of flexibility one could need, when it comes to procedurally generated cities. Players demolishing or creating buildings however is a bit different: I'm not sure if I could ever support that with schematics... although the mod does allow players with a special privilege to use the structure I/O machine and spawn or despawn buildings in-world.
 

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

Re: [Mod] Structures [git] [minetest_mods_structures]

by Sokomine » Fri Apr 21, 2017 21:30

MirceaKitsune wrote:Thank you for the useful info! The door and torch problems make sense, and it sounds like I'll need to update the schematics sometime. However this will be very tricky, as I need to create a new world and import then re-export every structure... if only Minetest schematics could be edited by hand. Perhaps I should take this opportunity to create new and better buildings altogether, I don't know.

Maybe my handle_schematics mod can be of use here. It applies the necessary changes to doors and torches already. After all I had the same problem with my old buildings and didn't want to manually edit them all. It's just not that easy to store the modified copy. Placing it with the handle_schematics:build build-chest is no problem (apart from some upside-down rotated stairs sometimes...), but the chest has no way to store the edited schematic yet. You'd have to get rid of the chest by using WorldEdit (can't dig it if it has spawned a schematic) and then place new build-chests for saving (or just use WorldEdit for that part). I'm afraid that a store-and-overwrite-existing-filename menu option might be accidently clicked. Renaming the old version in order to keep a backup might fail due to mod_security.

New houses are of course always welcome :-)

MirceaKitsune wrote:Sounds like Minetest has been keeping its API steady, and not mindlessly deprecating or changing important functions that would break existing mods... this is always relieving to hear for a mod creator!

There are some deprecated functions now and then and there have been plans to make newer client versions not backwards-compatible for servers running a version older than two years. In general the MT api is very modder-friendly :-)

MirceaKitsune wrote:Houses cutting through stone is normal, and not much can be done about it; Last time I worked on the mod, I used every possible approach I could come up with, in order to achieve the perfect balance between cutting into terrain versus leaving parts of a structure floating. Roads being offset by one unit was the best compromise; It's the only way to allow road systems to climb up and down somewhat, with the only alternative being perfectly straight roads everywhere. There's only so much that can be done when the world is made of 1-meter voxels, but personally I'm happy with the final patterns.

Yes, it's very tricky. Your project is a lot more ambitious in that part than mine. Good to have diffrent solutions around :-) But maybe you can at least remove the nodes above your buildings so that they're not burried. There are mapgens which may make that very tricky (insanely high and steep mountains). Fortunately, not all mapgens and areas on the map are like that.

MirceaKitsune wrote:Also, if you're working on a village / town / city mod as well... perhaps you can take a more in-depth look at what I did with mine, and see if it might already offer the functionality you need! Obviously you'd know best, as your mod likely has features mine can't support... however this does aim to offer every mechanic and bit of flexibility one could need, when it comes to procedurally generated cities. Players demolishing or creating buildings however is a bit different: I'm not sure if I could ever support that with schematics... although the mod does allow players with a special privilege to use the structure I/O machine and spawn or despawn buildings in-world.

There's a bit more that might be needed for such city-building experiments. I'll base it on my handle_schematics mod as that already comes with a spawn chest. But don't worry - your mod is also an inspiration for what I do, and it's great to be able to look into other mods and see how common problems are approached and solved there. Your houses have already been copied to mg_villages a long time ago and form nice villages there. The multi-story-houses are something I hope to get on eventually as well. Not all buildings are suitable for such an approach, and it's not yet supported in the villages code at all. The same approach that could handle patchwork houses could also be applied to mines with more complex tunnels. But that's for the future.
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Sat Apr 22, 2017 13:53

Does handle_schematics permanently replace specific nodes with other nodes, and update the mts file? I don't want to implement a hacky solution, which replaces deprecated nodes with other nodes per structure spawn... I'd rather fix everything permanently and correctly.

If I'm to make new buildings, I need to think carefully about how I'll be doing it: I don't want to work twice, so if anything I might create the buildings I intend to use for my game project altogether! However they will use completely new materials and item definitions, some of which might be placed in other mods that I'd rather not make a dependency of the default buildings mod. It will take some thinking to figure this one out.

Sadly there's no easy way to fix buildings digging themselves into the ground: Perhaps I could make it so that anything above a structure is cut away by the mapgen... however that would be overkill, performance costly, tricky to code, plus it could cut other things like floating islands. Instead I plan to fix buildings digging themselves into the ground in two different ways:

1 - Having only large normal buildings, while making small structures boxed in so that they look good both buried and out in the open: This might pose an artistic limitation, as you can't have small things like sheds and so on... still it's the right way to go. The problem with the current ones is that I didn't leave enough room around the sides, and exported the buildings with the smallest height possible.

2 - Only spawning towns on special biomes: Structures cut through terrain because they spawn on the edges of mountains or inside caves. Normally they need their own biome, which is flat (0 to 10 nodes maximum height difference) and has no trees or other large decorations. I even considered creating cement biomes for this purpose... however cities spawning is a probabilistic event, so they also need to look okay as a natural landscape. This in fact how the mod is intended to be used... however I didn't want to include custom biomes with the default buildings and limit flexibility, so I set them to spawn on all and any biome.

And I'm glad to hear my buildings are being of use to your mod! Since I might replace them in mine, perhaps keep them for the villages then. Please share a few screenshots as well, I'm curious how that looks like.
 

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

Re: [Mod] Structures [git] [minetest_mods_structures]

by Sokomine » Mon Apr 24, 2017 02:55

MirceaKitsune wrote:Does handle_schematics permanently replace specific nodes with other nodes, and update the mts file? I don't want to implement a hacky solution, which replaces deprecated nodes with other nodes per structure spawn... I'd rather fix everything permanently and correctly.

handle_schematics does not use minetest.place_schematic. Instead, it reads the .mts file and places that using voxelmanip. While doing so some changes are applied - notably those made necessary due to changes in MTG (doors, torches etc). A schematic loaded using handle_schematics will have its doors and torches placed correctly. You don't have to manually update them all. I'd loose my mind if I had to change all schematics every time something changed in MTG. I've added a new option to store changed buildings. With that you can load your houses from your world, click on "proceed", inspect the house and apply any further changes you want, and then just click on "Save current building as..", accept the filename, click on "Save" and proceed to the next house. Think of it as a schematics editor (without the option to handle probability).

MirceaKitsune wrote:If I'm to make new buildings, I need to think carefully about how I'll be doing it: I don't want to work twice, so if anything I might create the buildings I intend to use for my game project altogether! However they will use completely new materials and item definitions, some of which might be placed in other mods that I'd rather not make a dependency of the default buildings mod. It will take some thinking to figure this one out.

The schematic functions inside MT can handle replacements. That might come in handy in such a case. handle_schematics allows to set replacements manually.

MirceaKitsune wrote:2 - Only spawning towns on special biomes: Structures cut through terrain because they spawn on the edges of mountains or inside caves. Normally they need their own biome, which is flat (0 to 10 nodes maximum height difference) and has no trees or other large decorations. I even considered creating cement biomes for this purpose... however cities spawning is a probabilistic event, so they also need to look okay as a natural landscape. This in fact how the mod is intended to be used... however I didn't want to include custom biomes with the default buildings and limit flexibility, so I set them to spawn on all and any biome.

A special biome might be a good solution. Some of your higher buildings worked quite well in the desert they spawned in. If the sand would have reached one block further and directly to the wall, the city might have claimed to have been covered by sand dunes.

MirceaKitsune wrote:And I'm glad to hear my buildings are being of use to your mod! Since I might replace them in mine, perhaps keep them for the villages then. Please share a few screenshots as well, I'm curious how that looks like.

You can create those villages very easily. Just install handle_schematics and mg_villages and set mg_villages.FIRST_VILLAGE_TYPE = 'taoki' in mg_villages/config.lua. Then start a new world and you'll stand in one of your villages. Each village will have its own replacements. Some use iron, copper or even gold blocks. This here is a particulary nice one using wood:
Image
Attachments
taokitown.jpg
(324.26 KiB) Not downloaded yet
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Mon Apr 24, 2017 12:08

Very nice, thanks for sharing! Material replacements per village type are a nice idea... possibly something I might add to my mod as well someday, though that's currently not a thing for it.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Sun Jan 13, 2019 20:23

Alright. I've updated Minetest and am now thinking of taking another look at both Structures and Creatures, to at least bring them up to date with the latest code after 4 years since I last touched them.

I have a small favor I'd like to ask if anyone has a few minutes to spare: Could you please list to me all of the deprecated functions this mod still uses, and ideally also what I need to replace every function with? You can find the code of the core structures systems over here:

https://github.com/MirceaKitsune/minete ... structures
 

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

Re: [Mod] Structures [git] [minetest_mods_structures]

by Sokomine » Wed Jan 16, 2019 23:35

I'm glad you're working on your mods again and am curious to see how the'll develop. I didn't have much time for my own mods in the past months. Regarding outdated functions...don't they show up in the log? Perhaps it'd be best to take a look at the messages in the logfile.
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Wed Feb 13, 2019 19:02

I've began working on new structures to replace the old town early this year, shortly after fixing up the code and adding some crucial performance improvements. Here are a few images showing some of the new roads. Buildings are still a work in progress and will require new code fixes. Multiple road types are now included, each containing various types of underground tunnels as well as suspended rails.

Image
Image
Image
Image
Image
Image
Image
Image
 

User avatar
MirceaKitsune
Member
 
Posts: 850
Joined: Sat May 21, 2011 22:31
Location: Romania, Bucharest
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: [Mod] Structures [git] [minetest_mods_structures]

by MirceaKitsune » Wed Feb 13, 2019 19:07

Forgot to mention that I've also redesigned the import / export node. The node is now constant, no more connecting / disconnecting when placing the markers... this fixes some annoyances and should also improve performance. Node replacements can also be specified directly in the I/O formspec. I've also added some better looking and more useful textures, which help you see exactly which direction is which.

Image
Image
 

Previous

Return to Mod Releases



Who is online

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