Skip to content

mapgen resolves terrain ids to int_id before all terrains are loaded #82974

@Standing-Storm

Description

@Standing-Storm

Describe the bug

While working on #82965, when loading into the game I got a message that t_rock_copper was invalid terrain. Which is a lie because it's defined right here:

(Same with the other subsurface terrain in that file)

Attach save file

N/A, happens on new game.

Steps to reproduce

  1. Use data from the above PR
  2. Load game
  3. Error message appears

Expected behavior

The game does not tell me that terrain which very definitely exists does not exist

Screenshots

Image

Tests on the PR show the following error:

Image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.26100.6584 (24H2)
  • Game Version: cdda-experimental-2025-09-21-0054 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Innawood [innawood]
    ]

Additional context

Renech suggested this may be a problem of loading underground before loading modded terrain, and indeed when I replaced the innawood vein terrain with vanilla terrain like t_rock_red the game loaded with no error messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    (S2 - Confirmed)Bug that's been confirmed to existMap / MapgenOvermap, Mapgen, Map extras, Map displaySpawnCreatures, items, vehicles, locations appearing on map

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions