How can i make structures generate automatically?
-
- Member
- Posts: 157
- Joined: Sat Nov 28, 2020 06:33
- GitHub: W3RQ01
- In-game: Dario23 or W3RQ01
- Contact:
How can i make structures generate automatically?
Hi everyone!
I'm currently in search of a mod that generates random structures across the world but as of now i still haven't found anything so i started thinking about make it on my own.
The problems that I'm facing are multiple and one of them - if not the biggest - is: How can i make the structures generate automatically? How do tell mt to generate that structures only in specific cases?
Any help is appreciated,
W3RQ01
I'm currently in search of a mod that generates random structures across the world but as of now i still haven't found anything so i started thinking about make it on my own.
The problems that I'm facing are multiple and one of them - if not the biggest - is: How can i make the structures generate automatically? How do tell mt to generate that structures only in specific cases?
Any help is appreciated,
W3RQ01
OneUnitedPower
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: How can i make structures generate automatically?
A very big question.
A Question for your Question:
Info around decoration placement is at the below, I'd recommend Wuzzys schematic exporter and using Lua schematics rather than mts format:
https://minetest.gitlab.io/minetest/def ... definition
viewtopic.php?f=11&t=18515
The first have the engine construct things from random blocks, I have no idea best I can think of is replacing the nodes in a predefined schematic with ones specific to a biome - bit like dungeons but it's not hard to do. if it's just random geometric type shapes that's doable....fairly sure theres a lua mapgen that does fractals somewhere. Beyond that I think I remember maybe Sokomine playing around with house shapes being auto-generated rather than schematics but it might have been someone else.
If it is the second your after - rough process:
A Question for your Question:
- By random structures do you mean the structures themselves are randomly created on the fly by the engine or just that the engine picks from an available pool of schematics per biome?
Info around decoration placement is at the below, I'd recommend Wuzzys schematic exporter and using Lua schematics rather than mts format:
https://minetest.gitlab.io/minetest/def ... definition
viewtopic.php?f=11&t=18515
The first have the engine construct things from random blocks, I have no idea best I can think of is replacing the nodes in a predefined schematic with ones specific to a biome - bit like dungeons but it's not hard to do. if it's just random geometric type shapes that's doable....fairly sure theres a lua mapgen that does fractals somewhere. Beyond that I think I remember maybe Sokomine playing around with house shapes being auto-generated rather than schematics but it might have been someone else.
If it is the second your after - rough process:
- create a simple build in mtg, export using wuzzy's schematic exporter
- create a simple mod for mtg and have that decoration randomly placed in say grassland biome
- Once above works add more schematics and decoration configuration
- Add code improvements for example use same schematic but replace wood planks for trees native to that biome - this is easier with lua schematics from my limited knowledge :)
-
- Member
- Posts: 157
- Joined: Sat Nov 28, 2020 06:33
- GitHub: W3RQ01
- In-game: Dario23 or W3RQ01
- Contact:
Re: How can i make structures generate automatically?
Is possible the make the game auto-generate them?sirrobzeroone wrote: ↑Wed Aug 17, 2022 00:15A very big question.
A Question for your Question:
- By random structures do you mean the structures themselves are randomly created on the fly by the engine or just that the engine picks from an available pool of schematics per biome?
OneUnitedPower
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: How can i make structures generate automatically?
In theory anything is possible, whether it's worth the time and effort in coding is another question - there's no in built function so you would be creating everything from scratch but people have created maze builders and other things I mentioned so it's possible.
I'm not sure you would get much more flexibility than say creating schematic files for a dozen various things and then replacing the nodes on place with biome specific ones.
- Skamiz Kazzarch
- Member
- Posts: 613
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: How can i make structures generate automatically?
This mod might be interesting to you: Structure generator
Re: How can i make structures generate automatically?
There are a couple of mods that do this like this one:
viewtopic.php?t=7200
There's also a couple more than generate roads.
But they are rather old.
viewtopic.php?t=7200
There's also a couple more than generate roads.
But they are rather old.
Re: How can i make structures generate automatically?
That's sort of what Blockmen's ruins generator I mentioned above does, except it doesn't use schematics.sirrobzeroone wrote: ↑Wed Aug 17, 2022 00:15The first have the engine construct things from random blocks, I have no idea best I can think of is replacing the nodes in a predefined schematic with ones specific to a biome
I have integrated and evolved this mod in my game, see https://gitlab.com/Astrobe/minefall/-/t ... mods/ruins if you are interested in that approach.
This is an old version, I have since used the method you described for placement - I hijack the decorations generation to have the mapgen select locations for me, rather than using the heavy find_node_in_area() method.
-
- Member
- Posts: 157
- Joined: Sat Nov 28, 2020 06:33
- GitHub: W3RQ01
- In-game: Dario23 or W3RQ01
- Contact:
Re: How can i make structures generate automatically?
Ok thanks everyone!
If you have more advices please let me know, i'm kinda noob in this
If you have more advices please let me know, i'm kinda noob in this
OneUnitedPower
- FreeLikeGNU
- Member
- Posts: 280
- Joined: Tue Oct 28, 2014 02:50
- GitHub: FreeLikeGNU
- IRC: freelikegnu
- In-game: FreeLikeGNU
Re: How can i make structures generate automatically?
My witches mod generates randomized cottages over dungeons close to the surface using the dungeon generation event in the mapgen. Link in my signature.
Who is online
Users browsing this forum: No registered users and 10 guests