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 find and assign mission target s_air_term #3730

Closed
tjlaxs opened this issue Nov 21, 2023 · 3 comments · Fixed by #3732
Closed

Unable to find and assign mission target s_air_term #3730

tjlaxs opened this issue Nov 21, 2023 · 3 comments · Fixed by #3732
Labels

Comments

@tjlaxs
Copy link

tjlaxs commented Nov 21, 2023

Describe the bug

First run after building the game from upload-branch. Run into a missing mission target.

Steps To Reproduce

  1. Create character with mission: MISSION_ASSASSINATION

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.22621.2715 (22H2)
  • Game Version: 0f77009 [64-bit]
  • Graphics Version: Tiles
  • LAPI Version:
  • Game Language: []
  • Mods loaded: [
    Bright Nights [bn],
    Disable NPC Needs [no_npc_food],
    Simplified Nutrition [novitamins],
    No Rail Stations [No_Rail_Stations],
    Elevated bridges [elevated_bridges],
    Prevent Zombie Revivication [no_reviving_zombies],
    Limit Fungal Growth [limit_fungal_growth]
    ]

Additional context

Debug log:

DEBUG : Unable to find and assign mission target s_air_term.

FUNCTION : std::optional<coords::coord_point<tripoint, coords::origin::abs, coords::scale::overmap_terrain> > find_or_create_om_terrain(const tripoint_abs_omt&, const mission_target_params&)
FILE : src/mission_util.cpp
LINE : 238
VERSION : BN 0f77009

If I understood correctly it seems like this s_air_term doesn't exist anywhere.
https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/npcs/missiondef.json#L842

@tjlaxs tjlaxs added the bug label Nov 21, 2023
@chaosvolt
Copy link
Member

Dafuq? It's still in the JSON right here: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/overmap/overmap_special/specials.json#L6890

@Vollch may have done something in their overmap generation code that's causing a scenario mission to no longer be able to find locations, possibly?

@Vollch
Copy link
Contributor

Vollch commented Nov 21, 2023

I can't actually reproduce it, but looking at code i think i see how that's possible.
When game can't find goal it firstly spawn in:

const bool placed = overmap_buffer.place_special( *params.overmap_special, origin_pos,
params.search_range );

And then searches for exact OMT:
target_pos = overmap_buffer.find_closest( origin_pos, find_params );

(Later on it'll try to spawn special once again, giving second chance to spawn special properly, and dodge debug message)

And here the catch - place_special doesn't accept and process find_params which among other thing specifies min range. So, apparently it's possible that it'll spawn special too close to find it later. That seems to be very old bug.

@Vollch
Copy link
Contributor

Vollch commented Nov 21, 2023

And yeah, i actually reproduced it at x0 specials:
image
Game spawned 2 airports, but they too close for "min_distance": 45 requirements, which gave me same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants