Cataclysm-dda: Suicidal NPCs

Created on 22 Dec 2016  路  7Comments  路  Source: CleverRaven/Cataclysm-DDA

  1. Debug-spawn an NPC.
  2. If the NPC isn't wielding a ranged weapon, kill him/her and go back to 1.
  3. Debug-spawn a size 2 horde of amoebic molds centered on the NPC.
  4. Wait 1 turn.
  5. If you didn't get a debug message (npcname tried to commit suicide), go back to 3. It shouldn't take more than a few tries.
<Bug> NPC / Factions

Most helpful comment

I dunno, committing suicide when surrounded by amoebic molds is a perfectly reasonable choice. (It's probably the aiming code failing to choose a target and defaulting to pointing at the shooter).

All 7 comments

The situation appears to be synthetic (I mean, it didn't occur during normal play, didn't it?). Though, it's clearly a bug.

An NPC is already synthetic

Yeah, I found it while testing #19831.

I dunno, committing suicide when surrounded by amoebic molds is a perfectly reasonable choice. (It's probably the aiming code failing to choose a target and defaulting to pointing at the shooter).

Spawning a monster group centered on the NPC creates a monster on the same tile as the NPC.

The debug message (EDIT: for me) comes from Creature::projectile_attack(...) in ranged.cpp:161 - the NPC targets the same tile as it's standing on, because there's a blob there.

Same happens if spawning a single monster on the same tile as the NPC (no need to spawn a monster group).

There's a check (and appropriate debug message) not to spawn monsters on the same tiles as other monsters. Guess: there's no such check for NPCs?..

Guess: there's no such check for NPCs?..

@keyspace Good find. That seems to be the case (the debug message comes from Creature_tracker::add).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nexusmrsep picture nexusmrsep  路  64Comments

railmonkey picture railmonkey  路  43Comments

Coolthulhu picture Coolthulhu  路  64Comments

Firestorm01X2 picture Firestorm01X2  路  59Comments

Nioca picture Nioca  路  49Comments