[Mod] Structures [git] [minetest_mods_structures]
Got this error:
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:62: Name structures:manager_disabled does not follow naming conventions: "modname:" or ":" prefix required
19:33:34: ERROR[main]: stack traceback:
19:33:34: ERROR[main]: [C]: in function 'error'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:98: in function 'register_item'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:158: in function 'register_node'
19:33:34: ERROR[main]: ...ents\minetest-0.4.7\bin\..\mods\mods_structures\init.lua:170: in main chunk
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:62: Name structures:manager_disabled does not follow naming conventions: "modname:" or ":" prefix required
19:33:34: ERROR[main]: stack traceback:
19:33:34: ERROR[main]: [C]: in function 'error'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:98: in function 'register_item'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:158: in function 'register_node'
19:33:34: ERROR[main]: ...ents\minetest-0.4.7\bin\..\mods\mods_structures\init.lua:170: in main chunk
- thefamilygrog66
- Member
- Posts: 170
- Joined: Mon Jul 09, 2012 19:08
- Location: Ontario, Canada
JBR: Try changing the folder name to just structures - that worked for me.JBR wrote:Got this error:
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:62: Name structures:manager_disabled does not follow naming conventions: "modname:" or ":" prefix required
19:33:34: ERROR[main]: stack traceback:
19:33:34: ERROR[main]: [C]: in function 'error'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:98: in function 'register_item'
19:33:34: ERROR[main]: ...ocuments\minetest-0.4.7\bin\..\builtin/misc_register.lua:158: in function 'register_node'
19:33:34: ERROR[main]: ...ents\minetest-0.4.7\bin\..\mods\mods_structures\init.lua:170: in main chunk
Cool mod - it worked really well except when I tried it in a flat world, in which no structures spawned, for some reason.
My Mods: Living Room Furniture [lrfurn] / Lava Lamps / Mob Spawn Eggs [spawneggs] / Bring Me The Head [heads] / Hedge Maze [maze] / Magic Beans / Coloured Beds [Beds fork]
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
JBR: Yes, you must name the mod folder "structures".
thefamilygrog66: That's probably because the default structures are set to only spawn from 5 nodes up (in some cases even higher). They'd spawn too close to water which looked ugly without that. Also note that the default buildings only spawn on grass_with_dirt, so make sure that's what the flat floor is made of.
thefamilygrog66: That's probably because the default structures are set to only spawn from 5 nodes up (in some cases even higher). They'd spawn too close to water which looked ugly without that. Also note that the default buildings only spawn on grass_with_dirt, so make sure that's what the flat floor is made of.
Last edited by MirceaKitsune on Sun Jun 09, 2013 20:05, edited 1 time in total.
it works! I love the map gen, not really sure how to save a building yet..MirceaKitsune wrote:JBR: Yes, you must name the mod folder "structures".
thefamilygrog66: That's probably because the default structures are set to only spawn from 5 nodes up (in some cases even higher). They'd spawn too close to water which looked ugly without that. Also note that the default buildings only spawn on grass_with_dirt, so make sure that's what the flat floor is made of.
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
It is not a mod one would like to use on a server that's mostly building-orientated. On servers used for building, the space is needed for structures built by the players themshelves. It might be a good mod for servers who are more survival-orientated, and where players rarely build anything large/lasting.MirceaKitsune wrote: Anyway, it's been a while. Any news on this? Was hoping more people would put it on their server and could offer more input. Maybe see how it works with their own buildings and ideas. Any server use it yet?
The mod is very well suited for singleplayer. Last time I tried, the spawned structures seemed a bit too large and a bit too many, but the general idea is very nice (I do something similar in my mod), and the buildings are good.
A list of my mods can be found here.
- thefamilygrog66
- Member
- Posts: 170
- Joined: Mon Jul 09, 2012 19:08
- Location: Ontario, Canada
Ah, that makes sense. I wonder if the mod can check to see if "flat" is indicated in the map generation attributes in the minetest.conf file, and if so, lower the minimum height at which to spawn.MirceaKitsune wrote:thefamilygrog66: That's probably because the default structures are set to only spawn from 5 nodes up (in some cases even higher). They'd spawn too close to water which looked ugly without that. Also note that the default buildings only spawn on grass_with_dirt, so make sure that's what the flat floor is made of.
Anyway, which line of code is that specified, so I can try it out in the flatlands? Thanks!
My Mods: Living Room Furniture [lrfurn] / Lava Lamps / Mob Spawn Eggs [spawneggs] / Bring Me The Head [heads] / Hedge Maze [maze] / Magic Beans / Coloured Beds [Beds fork]
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
Doubt I can do that, and I like the current implementation as it is (code's already complex enough).thefamilygrog66 wrote: Ah, that makes sense. I wonder if the mod can check to see if "flat" is indicated in the map generation attributes in the minetest.conf file, and if so, lower the minimum height at which to spawn.
Anyway, which line of code is that specified, so I can try it out in the flatlands? Thanks!
I don't suggest editing the script either. Instead, edit the minimum spawn height of structures in mapgen.txt. I think that's the third parameter counting from the end to left (5 for most buildings and 25 for the tower). Setting it to 0 should do the trick.
- thefamilygrog66
- Member
- Posts: 170
- Joined: Mon Jul 09, 2012 19:08
- Location: Ontario, Canada
Great, thanks! I'll try it out.MirceaKitsune wrote:Doubt I can do that, and I like the current implementation as it is (code's already complex enough).thefamilygrog66 wrote: Ah, that makes sense. I wonder if the mod can check to see if "flat" is indicated in the map generation attributes in the minetest.conf file, and if so, lower the minimum height at which to spawn.
Anyway, which line of code is that specified, so I can try it out in the flatlands? Thanks!
I don't suggest editing the script either. Instead, edit the minimum spawn height of structures in mapgen.txt. I think that's the third parameter counting from the end to left (5 for most buildings and 25 for the tower). Setting it to 0 should do the trick.
My Mods: Living Room Furniture [lrfurn] / Lava Lamps / Mob Spawn Eggs [spawneggs] / Bring Me The Head [heads] / Hedge Maze [maze] / Magic Beans / Coloured Beds [Beds fork]
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
This is a nice mod. It could be used alongside peaceful_npc to spawn villages in maps.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Spawning entire villages is pretty difficult. Even a 80x80 map of a village proved problematic. I hope it will get better with the new mapgen. MirceaKitsune wrote a function to improve spawning, but other developers where apparently working on something similar. I hope the needed function to set multiple nodes at a time will be available soon.
A list of my mods can be found here.
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
Spawning whole villages (pretty large ones too) works surprisingly well with the latest mod. Partly because I optimize the loops and actions so nothing is wasted. It still takes a lot until all buildings are spawned however (I'd estimate over 30 seconds per group instance) and there are still incomplete / malformed spawns occasionally. Still, it can safely work and do its thing... especially for normal sized houses and the like.Sokomine wrote:Spawning entire villages is pretty difficult. Even a 80x80 map of a village proved problematic. I hope it will get better with the new mapgen. MirceaKitsune wrote a function to improve spawning, but other developers where apparently working on something similar. I hope the needed function to set multiple nodes at a time will be available soon.
My biggest issue with the mod at this moment is the spawning pattern. Randomly searching for origins and avoiding buildings is both slower and uglier. I'm hoping to figure out a matrix system which can analyze building sizes and distances and calculate all origins in an uniform grid before spawning begins. I shall get around to that too soon enough.
Other improvements done yesterday include fixing buildings that were supported by leafs or water. Only nodes with drawtype "normal" are calculated for ground roughness, and if they aren't found the building doesn't spawn.
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
I'm happy to announce the biggest improvement since the creation of this mod. I've been working on a new spawn pattern, together with a major rewrite of the mapgen system. The latest code has a much more optimal and cheap architecture and results in a way better spawn pattern.
Previously, a radius was given and buildings would randomly choose a location within it, doing expensive checks to avoid other buildings. The new system arranges buildings into columns and rows, then jigsaws them into place under an uniform pattern. There are no more avoidance checks, and each building knows exactly where it goes before the system begins spawning anything. Buildings are now placed in line and as little space as possible is wasted between them, resulting dense and nice looking cities.
The new architecture also moves the hard work (position checks, trigger node search, terrain roughness checks) to a new function which simply returns the structure list and parameters. Spawning only begins after this list is received and we know where everything goes. Previously the dirty work was done per-building, resulting in laggy checks each time and resource intensive spawns. Performance improvement with the current architecture is visibly noticeable.
Here are some screenshots of how towns look with the new code:
Thanks to the better density, I was able to generate the largest town so far during one of the tests. Although it might seem scary when you think of all the nodes being spawned, it actually worked pretty quickly on my machine (single player). When the voxel manipulator will be ready, spawning of large and numerous structures will be a ton faster. This is the big town I got so far:
Previously, a radius was given and buildings would randomly choose a location within it, doing expensive checks to avoid other buildings. The new system arranges buildings into columns and rows, then jigsaws them into place under an uniform pattern. There are no more avoidance checks, and each building knows exactly where it goes before the system begins spawning anything. Buildings are now placed in line and as little space as possible is wasted between them, resulting dense and nice looking cities.
The new architecture also moves the hard work (position checks, trigger node search, terrain roughness checks) to a new function which simply returns the structure list and parameters. Spawning only begins after this list is received and we know where everything goes. Previously the dirty work was done per-building, resulting in laggy checks each time and resource intensive spawns. Performance improvement with the current architecture is visibly noticeable.
Here are some screenshots of how towns look with the new code:
Thanks to the better density, I was able to generate the largest town so far during one of the tests. Although it might seem scary when you think of all the nodes being spawned, it actually worked pretty quickly on my machine (single player). When the voxel manipulator will be ready, spawning of large and numerous structures will be a ton faster. This is the big town I got so far:
Wow, is this using the new schematics stuff? Those look really well placed, blends right into the landscape.
I bet it would look a bit better if it set the lower nodes to dirt with grass instead of leaving the stone visible.
I bet it would look a bit better if it set the lower nodes to dirt with grass instead of leaving the stone visible.
WorldEdit 1.0 released
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
No, it uses its own original system to spawn stuff. I'm not sure if schematics would be most appropriate here. I might consider using that though... if it wouldn't be too painful to switch the I/O system to their format.Temperest wrote:Wow, is this using the new schematics stuff? Those look really well placed, blends right into the landscape.
I bet it would look a bit better if it set the lower nodes to dirt with grass instead of leaving the stone visible.
Anyway, I fixed and adapted more things during the last days. Merged the ground level detection and terrain roughness checks into one formula, which yields in better centered buildings. Also made group radius be detected automatically, and now groups can spawn very close to each other if they don't collide. Here's screenshots of two neighboring towns:
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
The spawning of towns/villages, or, as you call it, group spawning, looks already quite well. I hope the *schematic functions will get extended with rotation (that's planned according to hmmm) and a way to easily replace nodes. In that case, much of the work could be done with those schematics.
A list of my mods can be found here.
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
I already added support for schematics today. Initially it works, and it's sure a lot faster. But of course it's disabled by default for now because:Sokomine wrote:The spawning of towns/villages, or, as you call it, group spawning, looks already quite well. I hope the *schematic functions will get extended with rotation (that's planned according to hmmm) and a way to easily replace nodes. In that case, much of the work could be done with those schematics.
- As you said, you can only spawn at one rotation. Nothing can be done until the function supports 0 / 90 / 180 / 270 rotations too.
- Inability to measure the area which the schematic would take up. I need a safety check to assure that importing a structure doesn't go out of the bounds specified with markers. If anyone knows of a way tell me... all I'd need is to know the X Y and Z size of the schematic before creating it.
- Waiting for the furnace crash to be fixed. Currently importing a schematic which contains a furnace crashes Minetest due to the fuel parameter.
Last edited by MirceaKitsune on Wed Jun 26, 2013 17:07, edited 1 time in total.
-
- New member
- Posts: 4
- Joined: Tue Jul 03, 2012 16:38
Hi MirceaKitsune,
I suggest you to focus on the spawning of structures by the user, as the natural spawning of structures by mapgen is currently being taken care by me, which shall have much higher performance in core rather than lua.
What im doing is aimed at very large structures, such as towns, or very big structures in general, like floating spaceships, boats, etc...
I encourage people to use your format, and build such type of structures, since im using your format for schematic import.
People can even design structures from other games, such as command and conquer that would be nice
I suggest you to focus on the spawning of structures by the user, as the natural spawning of structures by mapgen is currently being taken care by me, which shall have much higher performance in core rather than lua.
What im doing is aimed at very large structures, such as towns, or very big structures in general, like floating spaceships, boats, etc...
I encourage people to use your format, and build such type of structures, since im using your format for schematic import.
People can even design structures from other games, such as command and conquer that would be nice
-
- New member
- Posts: 4
- Joined: Tue Jul 03, 2012 16:38
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
I don't think anything better than the schematics system can be done for spawning buildings. With that, the Lua code for this mod only handles detecting ground level, terrain nodes and level, and generating the structure pattern (considering I later plan on adding roads too... someday somehow). Doubt a system that specific would get accepted in the code upstream. But good luck with that idea, it could be very usefulsweetbomber wrote:Hi MirceaKitsune,
I suggest you to focus on the spawning of structures by the user, as the natural spawning of structures by mapgen is currently being taken care by me, which shall have much higher performance in core rather than lua.
What im doing is aimed at very large structures, such as towns, or very big structures in general, like floating spaceships, boats, etc...
I encourage people to use your format, and build such type of structures, since im using your format for schematic import.
People can even design structures from other games, such as command and conquer that would be nice
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
hmmm fixed the facedir rotations for schematics, while PilzAdam explained how to fix the furnace crash. As a result, the I/O system has been defaulted to schematics and the default buildings converted from txt to mts. The clear function as well as the function to generate structure floors were switched to use the voxel manipulator instead.
Spawning structures is a lot less resource intensive and more fast now! It's also safer as there are no more incomplete spawns caused by the Lua <-> C++ lag. There are some minor issues left which I'll hopefully figure out in time... mostly floors being built incorrectly.
The text-file system will still exist for a while for compatibility. It will eventually be removed, so if you have any txt structures convert them to mts.
Spawning structures is a lot less resource intensive and more fast now! It's also safer as there are no more incomplete spawns caused by the Lua <-> C++ lag. There are some minor issues left which I'll hopefully figure out in time... mostly floors being built incorrectly.
The text-file system will still exist for a while for compatibility. It will eventually be removed, so if you have any txt structures convert them to mts.
Who is online
Users browsing this forum: No registered users and 27 guests