{"id":15002198,"url":"https://github.com/treer/structure_generator","last_synced_at":"2026-03-02T08:34:31.017Z","repository":{"id":78165441,"uuid":"396354052","full_name":"Treer/structure_generator","owner":"Treer","description":"Procedural building generation for Minetest","archived":false,"fork":false,"pushed_at":"2021-08-29T03:02:06.000Z","size":499,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T15:38:16.249Z","etag":null,"topics":["minetest","minetest-mod","minetest-mods","procedural-generation"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Treer.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-15T13:09:52.000Z","updated_at":"2024-12-08T08:01:44.000Z","dependencies_parsed_at":"2023-02-28T05:45:45.731Z","dependency_job_id":null,"html_url":"https://github.com/Treer/structure_generator","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"a1dcda5d3488ba48af71b25b5bbf1ef7c0af4bc1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Treer/structure_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treer%2Fstructure_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treer%2Fstructure_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treer%2Fstructure_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treer%2Fstructure_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Treer","download_url":"https://codeload.github.com/Treer/structure_generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treer%2Fstructure_generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267213525,"owners_count":24053912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minetest","minetest-mod","minetest-mods","procedural-generation"],"created_at":"2024-09-24T18:34:10.884Z","updated_at":"2026-03-02T08:34:30.983Z","avatar_url":"https://github.com/Treer.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Structure Generator for Minetest\r\n\u003cimg src=\"https://raw.githubusercontent.com/wiki/treer/amidstest/screenshots/150px-Minetest-logo.png\" align=\"right\" /\u003e\r\n\r\n[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)\r\n[![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by-sa/4.0/)\r\n\r\n*(A work in progress, but feedback and use and prefab artistry will help)*\r\n\r\nFunction for mods to procedurally generate \r\n* fortresses\r\n* Elven treehouse villages\r\n* strongholds\r\n* floating villages (on water)\r\n* ruins, dungeons\r\n* end-cities, Kowloon Walled cities\r\n* temples, pyramid interiors\r\n* mines, sewers, mazes, etc.\r\n\r\ni.e. these can do so much more than just dungeons, but I was in a hurry so the example structure is unfortunately just a dungeon.\r\n\r\nA non-Minetest [video explaining the general concept is here](https://www.youtube.com/watch?v=rfKcpp8UDQ0), not Minetest but it's the same concept of creating prefab parts with sets of connection points and probabilities. (That guy is also doing a dungeon, I swear these can create more than that!)\r\n\r\nThe mod has two main parts:\r\n* Prefab creation tools (chat-commands)\r\n* The `structure_generator_lib.lua` library you copy into your mod\r\n\r\nA demo magic wand that builds structures is also provided - use a map with a dummy backend if you're going to play with the wand, or a map you don't care about. With great power comes great responsibility.\r\n\r\nThe prefab creation tools are used to create the structure data and make it easy to edit your schematics inside Minetest and be able to export them. You would copy the generated data into your mod along with `structure_generator_lib.lua` to enable the mod to create large procedural structures (once there's better documentation).\r\n\r\nScaffolding commands to quickly turn [a Lua list of rooms and decorations](https://github.com/Treer/structure_generator/blob/master/example_ready_to_scaffold.lua) into an editable Minetest world that can be automatically exported to a folder of .mts schematics:\r\n\r\n![Scaffolding](scaffolding.gif)\r\n\r\n[Those pink things in the last frame are connection-point markers, so the connection point coords can be exported]\r\n\r\nThen call `build_structure()` from within your Lua code, or create havoc with the magic wand.\r\n![Generated structures](screenshot.jpg)\r\n\r\n[Pretend this is a screenshot of something grander than a dungeon]\r\n\r\nThe example uses nodes from Minetest game, but structure_generator_lib.lua doesn't have any dependencies, nor do the prefab scaffolding commands.\r\n\r\nTo try it out\r\n* Create a new flat world, set it to Creative, and enable this mod in it. \r\n* `/grantme all`\r\n* Stand near 0, 0\r\n* `/scaffold_prefabs`\r\n* `/fill_floors default:sandstone`\r\n* `/fill_ceailing default:sandstone_block`\r\n* `/fill_walls default:sandstonebrick`\r\n* In the Creative inventory, search for \"struct\" to bring up all the nodes this mod provides\r\n* Edit the \"prefab\" sections of your structure, add doors etc.\r\n  * Add Connection marker nodes to specify where these prefabs may join to other,\r\n  * Add Decoration marker nodes to specify where decorative prefabs should be placed,\r\n* `/export_prefabs`\r\n\r\nNow the world you created has a `/schems` directory containing schematics for all the prefabs you created, and an `example_ready_to_build.lua` file to register them with the structure generator.\r\n\r\nThe example lua file it generates in your world/schems directory is not 100% ready to build with, you'll need to decide which prefabs can connect to what, with what probabilities, specify types for connection points (e.g. so a 3x3 doorway doesn't connect to a 1x2 hallway), etc. Look to the `example_ready_to_build.lua` file in this mod for a registration file that actually works (it powers the magic wand).\r\n\r\nThe example Lua file it generates in your world/schems directory is not 100% ready to build with, you'll need to decide which prefabs can connect to what, with what probabilities, specify types for connection points (e.g. so a 3x3 doorway doesn't connect to a 1x2 hallway), etc. and I haven't written documentation yet. Look to the [example_ready_to_build.lua](https://github.com/Treer/structure_generator/blob/master/example_ready_to_build.lua) file in this mod for a finished registration file that actually works (it powers the magic wand).\r\n\r\nThis is still very Work In Progress, it needs much better documentation, and there are lots of advanced features it'd be nice to add, IMO the scaffolding system is good enough now to start creating the building pieces, once you get the hang of it.\r\n\r\n**Tips:**\r\n* `/scaffold_prefabs` will apply any .mts files that were saved, so keep those up to date with `/export_prefabs`\r\n* Most of the scaffolding functions will avoid overwriting blocks (`/cleararea` is an exception), so you can still `/scaffold_prefabs` after you've started building - just make sure any .mts files are up to date.\r\n* Add new buildings to the end of the scaffold.lua file to avoid `/scaffold_prefabs` changing which buildings are where - as the map won't change.\r\n\r\n**Documentation:** Currently in the [wiki](https://github.com/Treer/structure_generator/wiki).\r\n\r\n**Forum:** [thread](https://forum.minetest.net/viewtopic.php?t=27173)\r\n\r\n**License:**\r\n[LGPL v3](https://www.gnu.org/licenses/lgpl-3.0) for code \u0026 config, [Attribution-ShareAlike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/) for text and media. Other licenses available on request.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreer%2Fstructure_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreer%2Fstructure_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreer%2Fstructure_generator/lists"}