Skip to content

[Bug/Design] Immobile pawns unable to respond to dialogue (Stuck in Pending) #78

@winteryu21

Description

@winteryu21

Overview

Currently, pawns with 0% Moving capacity (e.g., legs lost, spine shattered) are unable to respond to normal conversations initiated by others. Their generated dialogue requests remain stuck in the Pending state.
While combat monologues (Urgent type) work fine, normal chat responses (Chitchat type) are silently discarded by the system.

Current Logic & Issues

  1. The Root Cause (Filtering):
    In TalkService.DisplayTalk(), there is logic to suppress casual talk when a pawn is in danger:

    if (pawn.IsInDanger())
    {
        // Ignores all responses EXCEPT Urgent and User types
        pawnState.IgnoreAllTalkResponses([TalkType.Urgent, TalkType.User]); 
    }

    Problem: Immobile pawns are always considered "In Danger", so they immediately discard any normal response.

  2. The "Danger" Definition Dilemma:
    PawnUtil.IsInDanger() defines danger as:

    if (pawn.Downed) return true; // [A]
    if (!pawn.health.capacities.CapableOf(PawnCapacityDefOf.Moving)) return true; // [B]

    Initially, I thought removing line [B] would fix it. However, in RimWorld, 0% Moving capacity automatically results in IsDowned = true. So even if we remove [B], they will still be caught by [A].

Actual Cases (Observed)

  • Case 1: Combat Monologue (Working)

    • A hostile pawn with 0% movement can speak a monologue during combat.
    • Reason: Combat monologues are TalkType.Urgent, which bypasses the danger filter.
  • Case 2: Specific Interaction (Broken)

    • Pawn B (Healthy) talks to Pawn A (Legless/Immobile).
    • AI generates a Chitchat response for Pawn A.
    • Pawn A is Downed (due to no legs) -> IsInDanger() == true.
    • The Chitchat response is filtered out and never shown.
  • Case 3: Group Cell Deadlock (Broken)

    • Simultaneous conversations occur among prisoners in a shared cell.
    • The conversation queue reaches a pawn with movement paralysis (0% Moving).
    • Result: Because the immobile pawn discards the response but holds the turn, the queue stalls. All subsequent dialogues from other prisoners remain stuck in the Pending state indefinitely.

Expected Behavior

A pawn should be considered "safe enough to talk" if they are conscious, even if they are downed due to physical disability.

  • Scenario A: Pawn downed by pain shock/unconsciousness -> Silence (Correct)
  • Scenario B: Pawn immobilized by missing legs but fully conscious -> Can Chat (Currently Broken)

Proposed Solution Direction

We need to refine IsInDanger() to allow conscious downed pawns to speak.
Instead of just checking pawn.Downed, we should check if they are capable of Consciousness(or Communication?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions