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

Game attempts to place followers underground #75428

Closed
Terrorforge opened this issue Aug 3, 2024 · 7 comments · Fixed by #75459
Closed

Game attempts to place followers underground #75428

Terrorforge opened this issue Aug 3, 2024 · 7 comments · Fixed by #75459
Labels
(S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Terrorforge
Copy link
Contributor

Terrorforge commented Aug 3, 2024

Describe the bug

Set up one of those "anywhere" bases in a hunting lodge, recruited a pair of NPCs and told them to go back there.

When I arrived back there myself, the game threw two "Failed to place NPC" errors. The error suggested it had tried to place them one Z-level below ground, and using debug to take control of them revealed that they were in fact stuck in the bedrock.

Apparently the game tried to place them in the lodge's basement, which is odd. I did not create the camp in the basement, and the bulleting board is above ground.

Attach save file

New Mind-trimmed.tar.gz

Steps to reproduce

  1. Create basecamp in hunting lodge
  2. Tell NPC to go there from some distance again

Expected behavior

NPCs spawn above ground, in places it is possible for them to be

Screenshots

image
Go here

image
Location of base. Note bulleting board

Screenshot 2024-08-03 23 47 35
The error

image
Brigitte stuck in the bedrock

image
Von Barone too

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4651 (22H2)
  • Game Version: 09410b2 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Mind Over Matter [mindovermatter],
    Bionic Slots [cbm_slots],
    Stats Through Kills [stats_through_kills],
    My personal mod [terror_mod]
    ]

Additional context

No response

@Terrorforge Terrorforge added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Aug 3, 2024
@Terrorforge
Copy link
Contributor Author

Terrorforge commented Aug 3, 2024

I fixed the problem with my save archives and have now included a proper save archive in the OP.

I think in this version of the save only one NPC has arrived; the other is still en route.

@Terrorforge
Copy link
Contributor Author

After dicking around with backups for testing purposes, I loaded a save close to the provided archive, and went back to just playing. I went back home and found Von Barone trapped underground as described.

I then went and did some crafting before bed, and while I was doing that Brigitte LaCroix arrived without incident. So either it's fine if you're actually there when the NPC shows up, or it's just inconsistent.

@Terrorforge
Copy link
Contributor Author

... but when I load the save, they just get shunted underground again.

@Terrorforge
Copy link
Contributor Author

Had to load a backup again, and this time when Brigitte shows up while I'm there, it doesn't place her properly. It throws the same error over and over:
image

image
Faction screen suggests she's above ground, some 15 map tiles to the east.

image
And indeed I found her there.

@PatrikLundell
Copy link
Contributor

PatrikLundell commented Aug 4, 2024

Trying to reproduce.

  • Some private mod missing.
  • Report about excessive error repetition about "failed to convert variable "npctalk_var_nether_attunement_power_scaling" with value "0.75" to a number" when trying to walk to the base (as the bugger refuses to use the car). This seems to hang the game.

Trying again and teleporting back resulted in:
DEBUG : Failed to place NPC in a valid location near (83,65,-1)

FUNCTION : place_on_map
FILE : C:\Cataclysm-DDA\src\npc.cpp
LINE : 1051
VERSION : 0.G-11130-g1fc1e9a0ea-dirty

Von Barone was indeed placed within the soil.

/Confirmed

Edit:
Debugging indicates the companion is placed underground a few movements after teleporting back to base. However, the faction menu "#" claims the companion is at the ground level after one teleport to a location still outside of the reality bubble, but below ground directly after teleporting to the lodge (i.e. before turns trigger the actual placement), so the misplacement seems to happen immediately when coming into range (don't think I can test that, given the excessive errors and subsequent hanging).

Edit2:
Setting a breakpoint and then teleporting to the lodge I get this partial call stack:

  • debug_menu::teleport_long
  • game::place_player_overmap
  • game::load_npcs
  • overmapbuffer::get_npcs_near_player
  • overmap_buffer::get_npcs_near
    where overmap_buffer::get_overmaps_near return has the following data:
    Single map, i.e. [0]
    npcs [11] is Von Barone (Character info), and location is (-961, 6305, -1) (Creature info).
    This indicates the location is already bugged in this data, but I don't know where this info comes from, as I couldn't find where his coordinates were stored in the save file (I found his name, but after spending 10 minutes or so trying to scroll the single line the data was crammed onto I gave up, and searching for "6305," didn't give anything that looked like character coordinates either.

I have to give up here, as waiting for the other companion to return before teleporting back (to see if she too ends up underground, and thus whether this is caused by damage in the save or something that's active) is foiled by the excessive errors.

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Aug 4, 2024
@Terrorforge
Copy link
Contributor Author

Whoops, forgot about the private mod. I was just dicking around with some difficulty settings that didnt turn out to matter, so it shouldn't change anything, but I'll remove it from my world to prevent future mishaps.

@PatrikLundell
Copy link
Contributor

No longer needed, I've found the bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants