CleverRaven / CleverRaven/Cataclysm-DDA
portal storms can teleport turrets out of position
- Dominant language
- C++
- Stars
- 13.1k
- Forks
- 4.6k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 200
Description
### Describe the bug
i camped out at the artisans overnight, and a portal storm hit while i was sleeping. during which, some of the turrets got relocated multiple times.
### Steps to reproduce
1. be at a location with turrets
2. have a portal storm occur
3. have whatever in portal storms that teleports things do so
4. end up with migrated turrets
### Expected behavior
genuinely immobile things shouldn't be getting moved around by the portal storm effects.
also, it occurs to me if NPCs get moved and they don't know to move back to their original location (or can't), it might very well irreversibly break the NPC.
### Screenshots
debug clairvoyance to show the layout of the artisan base aftermath. three destroyed turrets, two misplaced turrets. (obviously, destroyed turrets are only unfortunate, not bug-shaped behavior)

the migrated locations of the western most and northwestern most turrets. note this is not where they ended up immediately; there was more than one teleport event for them.

### Versions and configuration
- OS: Linux
- OS Version: Distributor ID: Debian; Description: Debian GNU/Linux 11 (bullseye); Release: 11; Codename: bullseye;
- Game Version: ba5e863 [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
eso_ui_bits_msx [eso_ui_bits_msx],
No Fungal Growth [no_fungal_growth],
Magiclysm [magiclysm]
]
### Additional context
of note, i seem to regularly get 'invalid alpha talker' errors during portal storms. this happens when i'm at my base away from everything else, but i never got around to posting anything. it also happened here during the turret teleporting nonsense:
```
14:32:40.526 ERROR GAME : src/do_turn.cpp:413: game:monmove: custom plated turret can't move to its location! (57:72:0),
covered pit
14:32:41.829 ERROR GAME : src/do_turn.cpp:413: game:monmove: custom plated turret can't move to its location! (54:69:0),
pavement
14:32:41.830 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:49.040 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:49.563 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:49.983 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:50.279 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:50.857 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
[ Previous repeated 28 times ]
14:32:50.880 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:50.891 ERROR GAME : src/do_turn.cpp:413: game:monmove: custom plated turret can't move to its location! (51:66:0),
grass
14:32:50.894 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
[ Previous repeated 245 times ]
14:32:50.957 ERROR : src/npctalk.cpp:1650 [talker* dialogue::actor(bool) const] Tried to use an invalid alpha talker.
14:32:50.967 ERROR GAME : src/do_turn.cpp:413: game:monmove: custom plated turret can't move to its location! (50:95:0),
grass
```
full debug log:
[debug.log](https://github.com/CleverRaven/Cataclysm-DDA/files/8413424/debug.log)
based on what @Ramza13 put in a comment in #55726 it _seems_ like the alpha talker thing and the teleport thing *might* be related, just inadequately fixed? i dunno. i just play here.
i don't expect the save file to be useful, but here it is just in case. (this is absolutely not me using github as an off-site save backup mechanism, nope, nuh-uh)
[dry_run.zip](https://github.com/CleverRaven/Cataclysm-DDA/files/8413450/dry_run.zip)
also also if i'm following the issue that led to that PR correctly, portal storms can spontaneously teleport you even if you're indoors? i'd like to register an objection to that, if that's still the case. if even being inside doesn't protect you, there's basically no counter play there. you just get screwed. that's not good gameplay.
Contributor guide
Research direction
Start with the supplied save and debug log, then inspect the portal-storm movement reported in src/do_turn.cpp and the invalid alpha-talker errors from src/npctalk.cpp. Reproduce the turret relocation and determine whether the related NPC and indoor-teleport concerns belong to the same fix. Done means immobile turrets are not relocated by portal storms and the relevant errors no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100