Cataclysm-dda: "Unable to generate a valid stating location, please report this failure."

Created on 26 Mar 2020  路  4Comments  路  Source: CleverRaven/Cataclysm-DDA

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.

(S2 - Confirmed) <Bug> Map / Mapgen Character / Player Scenarios

All 4 comments

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

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.

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:

https://github.com/CleverRaven/Cataclysm-DDA/blob/9466c62255edbeb3d07634101cf1df72ccfa7b1d/src/overmap.cpp#L3179-L3180

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.

Duplicate of #35376.

Was this page helpful?
0 / 5 - 0 ratings