[Mod] Settlements [settlements]

User avatar
FreeGamers
Member
 
Posts: 501
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod] Settlements [settlements]

by FreeGamers » Thu Feb 06, 2020 04:53

It is now happening consistently so this is fix is much welcomed, thanks.
 

FaceDeer
Member
 
Posts: 462
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Settlements [settlements]

by FaceDeer » Fri Feb 07, 2020 20:17

I just pulled the trigger on splitting this mod into two separate repositories:

  • settlements, the core API library mod
  • settlements_fantasy, a modpack containing the various example/default settlements that were previously bundled with the core API.

I didn't change any code or rename any mods in the process of doing this, so if you've got an existing world then just dropping settlements_fantasy into your mods folder should let everything continue functioning as before when you update. I generated a test map and everything seems to be in order.
 

User avatar
texmex
Member
 
Posts: 1725
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Settlements [settlements]

by texmex » Fri Feb 07, 2020 22:38

Good stuff, FaceDeer! Now if only I can tweak it to become fully reproducibly procedural… =)
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

MoNTE48
Member
 
Posts: 291
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

Re: [Mod] Settlements [settlements]

by MoNTE48 » Fri Feb 07, 2020 22:47

Many thanks from me! Now for those games that need only an API, the use of this mod has been greatly simplified.
What about moving the API to the https://github.com/minetest-mods repository?
 

FaceDeer
Member
 
Posts: 462
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Settlements [settlements]

by FaceDeer » Fri Feb 07, 2020 23:04

Moving it to minetest-mods is the plan, but I just spammed that project with six other mods last night so I figured I'd get those sorted before this.

The minetest-mods project guidelines say "The original author of the Mod should be the one submitting it to the minetest-mods project. Under circumstances (abandoned, author not responsive etc.) we will consider forks." What I'm working on is technically a fork (twice over - originally it was a thing by BlockMen, then by Rochambeau), though at this point I've reworked it so much that very little code is shared with the original. So I also wanted to make sure it's okay to transfer it first, and not seem like I'm trying to bundle it up with all those other mods I just submitted for approval.
Last edited by FaceDeer on Sat Feb 08, 2020 01:56, edited 1 time in total.
 

FaceDeer
Member
 
Posts: 462
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Settlements [settlements]

by FaceDeer » Fri Feb 07, 2020 23:23

texmex wrote:Good stuff, FaceDeer! Now if only I can tweak it to become fully reproducibly procedural… =)


Well, good luck. :) Making the layout of individual buildings within a chunk deterministic is straightforward enough, as discussed previously. I made a conscious decision not to do that right now so that a server admin can see a settlement, go "don't like that, let's try again" and regenerate it with a different layout. Since a settlement is contained entirely within a single map chunk it's safe to do it this way, you don't get half-buildings left at the boundaries. But maybe I could add a seed parameter to an admin command or something, to let them choose which way to go.

For the layout of the settlements in the world, on the other hand, it remains a difficult problem to approach in principle. Not every map chunk can host a settlement, whether it can or not can't be determined until the map chunk is generated, and settlements are spaced out a certain minimum distance from each other so part of that determination depends on what's already been generated.

One possibility that comes to mind would be to pre-generate a Poisson disc sample set for the entire possible map area (it's only 64kmx64km so that's not really that big a set given a reasonable spacing) and then accept that there will be a "hole" in the distribution of settlements if it just so happens that the map chunk that's flagged as being the right place to put a settlement has unacceptable terrain when the time comes to generate it. I haven't actually gathered data on the likelihood that a random map chunk will be suitable for a settlement or not, it would depend on the mapgen. If 90% of map chunks are okay for settlements then something like this would work okay, but if only 10% are suitable you might end up with a bad distribution.
 

User avatar
texmex
Member
 
Posts: 1725
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Settlements [settlements]

by texmex » Sat Feb 08, 2020 17:26

Ah, the Poisson disk sampling seems very apt for this situation. This is the approach I’d use. As for uneven or low settlement distribution because of some seed generating settlement unfriendly topography I think that would be part of the experience: some seeds are better than others.
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

Previous

Return to WIP Mods



Who is online

Users browsing this forum: Nathan.S and 1 guest