Author Topic: Could not generate overmap with current settings  (Read 686 times)

Offline stk2008

  • Survivor
  • ***
  • Posts: 491
    • View Profile
Could not generate overmap with current settings
« on: April 04, 2017, 02:32:49 PM »
Hi all I think I read about this some where but want to clarify.
So I have a few mods running here and when I create a new world I see this error

Whats the best thing to do

Retry (Never seems to end)
Generate unlimited map (also never seems to end)
Change settings (does nothing no matter what settings I use)
Allow current invalid map (this works but I assume most of the map items wont spawn which kind of sucks as I want all of the cool mod assets).

So whats one to do :(

thanks in advance :)

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3754
    • View Profile
Re: Could not generate overmap with current settings
« Reply #1 on: April 04, 2017, 04:16:26 PM »
Look at which specials aren't spawning and adjust city size for them. Try setting city size and city spacing to 4 - it works for most specials.

It may be just that mods are incompatible.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5502
  • I code dead people.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #2 on: April 04, 2017, 05:52:25 PM »
Prompting the player to make a decision during mapgen is not ok and will have to be eliminated before 0.D.

For now what Coolthulu said is the workaround, but we'll be removing this prompt as soon as we can address some related issues.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline stk2008

  • Survivor
  • ***
  • Posts: 491
    • View Profile
Re: Could not generate overmap with current settings
« Reply #3 on: April 04, 2017, 06:20:42 PM »
Nope

No settings allow all spawns so i went into optoins and disabled the prompt for it so I assume not all spawns will work but at least I aint getting nagged

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3754
    • View Profile
Re: Could not generate overmap with current settings
« Reply #4 on: April 04, 2017, 06:26:03 PM »
Prompting the player to make a decision during mapgen is not ok and will have to be eliminated before 0.D.

Regardless of player settings or just for defaults?

It is impossible to guarantee full mapgen on non-default settings in the mapgen in current master. We'd need to redesign an important part of overmap generation to ensure that.

Offline Random_dragon

  • Survivor
  • ***
  • Posts: 6391
  • Psycho bored dragon.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #5 on: April 04, 2017, 08:22:34 PM »
Given even in pure vanilla defaults I've had this issue before, it seems like "can't prevent this from occurring" is a bad way to look at it. Mapgen seems annoyingly sensitive to non-optimal conditions to the point where even the norm is error-prone, which is a sign that some form of overhaul is going to be needed in the future.

Chances are the best for now is finding the overmaps that cause the most problems and unfucking them as best as possible within the existing system before 0.D, then looking into what source magic needs to be done afterwards.

Offline stk2008

  • Survivor
  • ***
  • Posts: 491
    • View Profile
Re: Could not generate overmap with current settings
« Reply #6 on: April 04, 2017, 11:29:44 PM »
Did notrealise this also happend in non4 modded games.

I assumed it was because i have lots of mods.

Offline Random_dragon

  • Survivor
  • ***
  • Posts: 6391
  • Psycho bored dragon.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #7 on: April 04, 2017, 11:50:02 PM »
There was previously a big issue with cemeteries breaking generation right outta the box due to being too swole to spawn. I think they've fixed it but unsure, haven't updated in a little while.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5502
  • I code dead people.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #8 on: April 05, 2017, 12:39:33 AM »
Prompting the player to make a decision during mapgen is not ok and will have to be eliminated before 0.D.

Regardless of player settings or just for defaults?
For 0.D for defaults, which we don't currently have.
This will likely require something like pruning the list of "guaranteed" map features to one per type that is required by a quest.
Later we will want to overhaul mapgen to make it impossible for this failure mode to occur no matter how many map features it requires, which will require spreading overflow across multiple overmaps.
It is impossible to guarantee full mapgen on non-default settings in the mapgen in current master. We'd need to redesign an important part of overmap generation to ensure that.
I agree, unless it's easier than anticipated to stick quest targets on adjacent overmaps.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3754
    • View Profile
Re: Could not generate overmap with current settings
« Reply #9 on: April 05, 2017, 09:10:35 AM »
Later we will want to overhaul mapgen to make it impossible for this failure mode to occur no matter how many map features it requires, which will require spreading overflow across multiple overmaps.

I don't see how would that work. Adjacent overmaps have their own unspawned mandatory specials.

On github, I have suggested getting rid of the "sector grid" by first mapping all possible locations, then assigning specials to them. This would be rather hard to implement to be fast, but brute force approach could be enough. Plus, with the current implementation, many specials get 20 attempts at placement per sector, so what we have is effectively brute force anyway.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5502
  • I code dead people.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #10 on: April 06, 2017, 02:22:04 AM »
Later we will want to overhaul mapgen to make it impossible for this failure mode to occur no matter how many map features it requires, which will require spreading overflow across multiple overmaps.

I don't see how would that work. Adjacent overmaps have their own unspawned mandatory specials.
Mandatory specials are a hack to insure that certain pieces of terrain exist in order to use as anchors for quests, if we instead have a per-world or per-region list of specials, it eliminates the pressure of trying to cram every potentially necessary special onto every overmap.
On github, I have suggested getting rid of the "sector grid" by first mapping all possible locations, then assigning specials to them. This would be rather hard to implement to be fast, but brute force approach could be enough. Plus, with the current implementation, many specials get 20 attempts at placement per sector, so what we have is effectively brute force anyway.
Might be reasonable, not sure, but the root of the problem is cramming every special onto every overmap, if we get rid of that assumption the problem becomes fairly trivial, because each "retry" at least makes progress by creating an overmap populated with some of the mandatory specials, and the next attempt has a smaller list it needs to find spots for.  In principle that doesn't even need to happen at game start, it can trigger on overmap reveal based on player movement, or on mission creation that wants a target.  In the latter case we could even move the desired special to the top of the list to insure it is created immediately.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3754
    • View Profile
Re: Could not generate overmap with current settings
« Reply #11 on: April 06, 2017, 02:41:05 AM »
Mandatory specials are a hack to insure that certain pieces of terrain exist in order to use as anchors for quests, if we instead have a per-world or per-region list of specials, it eliminates the pressure of trying to cram every potentially necessary special onto every overmap.

I'd rather avoid per-world specials: they could be fragile and could scale badly (unless crammed into (0,0) or have their coords saved separately). For example, if per-world special couldn't be placed in desired overmap, it could require generating many more (possibly infinite, if settings were bad) and searching for this special would need to remember where it is without grabbing all the overmaps from HD (which is one of the slower parts of loading).
Per region could work, but enforcing it could be pretty complex: currently consistency between separate overmaps is really bad because the only aggregating structure is overmapbuffer, which is more of an interface than "parent".

Quote
the root of the problem is cramming every special onto every overmap

On default settings, most specials fit just fine. There are just 3-4 specials which cause problems, with bandit camp causing like 90% of those (those pesky bandits).
In weird settings (16 city size), some specials may not fit on any overmap, so overflow wouldn't fix that.

We should probably privilege the default settings here. Without a big redesign, extreme settings simply won't ever generate a truly proper overmap.

Offline Random_dragon

  • Survivor
  • ***
  • Posts: 6391
  • Psycho bored dragon.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #12 on: April 06, 2017, 03:10:43 AM »
Would a suitable dirty hack be to make the area considered as one overmap to a bigger size, making specials more widely-dispersed but giving more room to spawn?

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5502
  • I code dead people.
    • View Profile
Re: Could not generate overmap with current settings
« Reply #13 on: April 06, 2017, 03:38:44 AM »
Mandatory specials are a hack to insure that certain pieces of terrain exist in order to use as anchors for quests, if we instead have a per-world or per-region list of specials, it eliminates the pressure of trying to cram every potentially necessary special onto every overmap.

I'd rather avoid per-world specials: they could be fragile and could scale badly (unless crammed into (0,0) or have their coords saved separately). For example, if per-world special couldn't be placed in desired overmap, it could require generating many more (possibly infinite, if settings were bad) and searching for this special would need to remember where it is without grabbing all the overmaps from HD (which is one of the slower parts of loading).
Those are problems that need resolution, but they are all very tractible problems, and cramming an arbitrary number of specials onto a finite map is not. Additionally, spreading the specials across overmaps is a desirable feature in of itself, we should have features that encourage players to make long trips, and if our mapgen tries to put every special on every overmap, there is very little incentive to do so.
Per region could work, but enforcing it could be pretty complex: currently consistency between separate overmaps is really bad because the only aggregating structure is overmapbuffer, which is more of an interface than "parent".
The overmapbuffer as an interface was just a first step, it's totally reasonable to have a region entity that aggregates something between dozens and hundreds of overmaps and imposes structure on them, as well as providing a place to cache region-wide data, like the location of key specials.
Quote
the root of the problem is cramming every special onto every overmap

On default settings, most specials fit just fine. There are just 3-4 specials which cause problems, with bandit camp causing like 90% of those (those pesky bandits).
In weird settings (16 city size), some specials may not fit on any overmap, so overflow wouldn't fix that.

We should probably privilege the default settings here. Without a big redesign, extreme settings simply won't ever generate a truly proper overmap.
"Most fit just fine" is not an ok state to be in, and neither is "if we're careful the defaults will work, but non-defaults will break unpredictably".  If it takes a big redesign, a big redesign it is.

Let's lay out the stakes here:
Missions need key terrain types they can target
 Failure to generate key terrain breaks missions unpridictably
  The number of missions targeting different terrain types will continue to increase.

The goal is to have a compatible terrain available when a mision needs it, not to fix the mandatory specials list.  If we prune the mission specials out of the mandatory specials list and use it just to structure overmaps, and add some other mechanism to place mission specials, that would be fine too, but no matter what we do, attempting to place specials over and over (leading to too-long overmap generation times), and prompting the player to decide between continuing to wait on a too-long mapgen process and possibly breaking future missions is not an acceptible solution to the problem.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3754
    • View Profile
Re: Could not generate overmap with current settings
« Reply #14 on: April 13, 2017, 03:57:10 AM »
If it takes a big redesign, a big redesign it is.

You mean for 0.D or after?

The sectorless generation would fix it. Without defaults, anything smaller than sectorless will not be enough.