Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to generate a valid stating location, please report this failure." #39046

Closed
ghost opened this issue Mar 26, 2020 · 4 comments
Closed
Labels
<Bug> This needs to be fixed Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Character / Player Character / Player mechanics (S2 - Confirmed) Bug that's been confirmed to exist Scenarios New Scenarios, balancing, bugs with scenarios

Comments

@ghost
Copy link

ghost commented Mar 26, 2020

Describe the bug

Upon attempting to start a game as a lab patient I am presented with the message in the title of this bug report.

Steps To Reproduce

Set world generation parameters to those in the screenshot below, then attempt to start a game as a Lab Patient with the survivor background (haven't tried other backgrounds or Lab Staff).

Expected behavior

The game to start as usual.

Screenshots

1585259672

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: 1.4; Distributor ID: Artix; Description: Artix Linux; Release: rolling; Codename: n/a;
  • Game Version: 0.D-13426-ge603140 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food]

Additional context

No reference to the failure appears in debug.log or crash.log, here is a world this is occuring in:
Ranchester.zip

This issue does not occur on a world with default worldgen parameters, it does with the parameters set above.

@wapcaplet
Copy link
Contributor

wapcaplet commented Mar 26, 2020

I can reproduce this easily, by changing only the "Size of cities" world setting to 6, and leaving all others at their default values.

For three different worlds with Size of cities = 6, both the "Lab Patient" and "Lab Staff" scenarios fail to start, with the "Unable to generate a valid starting location" error.

Testing in the same worlds with the "Evacuee" scenario, and using the Debug "map / reveal" function, I find that:

  • first world has 2 "lab" (minilab) and 1 "science lab" in the starting overmap
  • second world has 2 "science lab" in the starting overmap
  • third world has 1 "lab" and 3 science labs in the starting overmap

In fact I can also reproduce this in a world with default settings (City size = 8), but not always - 3 out of 6 worlds have given the error.

Here is zip of a world with city size = 6, and known labs, which cannot generate a location for a new Lab Start scenario:

Harmon64-failed-lab-start.zip

@wapcaplet
Copy link
Contributor

After exploring this more and discussing with other developers, I think one big factor here is the default starting location for lab starts is "Experiment Cell" - and these are just too rare, even with several labs in the overmap.

The starting location is indicated (and may be changed) from the last page of the character-creation menu by pressing /:

image

By selecting any other starting location besides "Experiment Cell", I had no trouble getting a successful lab start at city size = 6.

My understanding is that solving this properly would involve significant changes to the infrastructure of map generation, or searching a larger area for a starting location, but the quickest and most direct fix for now is to make "Experiment Cell" not be the default, and instead make "Science lab" the default.

@mlangsdorf mlangsdorf added (S2 - Confirmed) Bug that's been confirmed to exist <Bug> This needs to be fixed Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Character / Player Character / Player mechanics Scenarios New Scenarios, balancing, bugs with scenarios labels Mar 27, 2020
@wapcaplet
Copy link
Contributor

wapcaplet commented Mar 27, 2020

I have been digging into this a little more, and am particularly interested in this part of overmap.cpp that I think is deciding whether to place any lab_escape_cells - and only if there is no train or finale:

Cataclysm-DDA/src/overmap.cpp

Lines 3179 to 3180 in 9466c62

// 4th story of labs is a candidate for lab escape, as long as there's no train or finale.
if( prefix.empty() && p.z == -4 && train_odds == 0 && numstairs > 0 ) {

In every test world I've created with City Size = 6, the only eligible labs always have fewer than 4 floors, or have trains and/or finales - thus, no cells, and no possible starting location for a true lab escape.

@Night-Pryanik
Copy link
Contributor

Duplicate of #35376.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Character / Player Character / Player mechanics (S2 - Confirmed) Bug that's been confirmed to exist Scenarios New Scenarios, balancing, bugs with scenarios
Projects
None yet
Development

No branches or pull requests

3 participants