Cataclysm-dda: NPC's First Aid use

Created on 5 Apr 2019  路  4Comments  路  Source: CleverRaven/Cataclysm-DDA

Bug/Issue

  • The thresholds for bandaging is about less than 15 HP remaining on limbs for NPCs.
  • NPC bandaging doesn't work well with the new delayed bandage system.
  • And though they have code to bandage the player, they don't have a way to detect that the player is in need of bandaging.

To Reproduce

  1. NPC get's limb with less than 15 HP.
  2. Give Bandage to NPC.
  3. See if it's being used.

Expected behavior

  • Make the threshold number for bandaging settable on a conversation/dialog.
  • Be able to set when the NPC should stop to bandage/first aid himself and player.

    • Detect when player is in need of First Aid.

(S1 - Need confirmation) <Bug> Items / Item Actions / Item Qualities Character / Player NPC / Factions

Most helpful comment

There's a whole mess of bugs here:

  1. Thresholds for healing are 15 HP or less on the limbs, 25 or less on the torso, and 35 or less on the head. Those should be changed to percentage rather than absolute values.
  2. NPCs have an AI action for healing the player, but no way of assessing the player's wounds.
  3. NPCs don't know about the new bandaging system and will repeatedly bandage the same badly wounded limb.
  4. NPCs don't know how to use disinfectant.
  5. NPCs don't know how to use the player activity to perform bandaging.

Proposed solutions (not in order, just things we need to do)

  • [x] Move to a percentage based threshold that takes into account the NPC's first aid skill, altruism, and bravery - altruistic NPCs heal others earlier and themselves later, brave NPCs require more damage before healing anyone, skilled NPCs wait longer to maximize benefits of their skills.
  • [x] Teach NPCs to recognize bandaged limbs and not re-apply bandages.
  • [x] Teach NPCs to use disinfectant.
  • [ ] Teach NPCs to use the bandaging player activity, now that NPC use of player activity is supported.
  • [ ] As part of that, rewrite the bandaging player activity to be NPC friendly and including pathing support.
  • [ ] Add conversation options to control NPC bandaging - "we've got lots of bandages, use them freely" versus "we're running low, make them count."
  • [x] Allow NPCs to heal each other.

All 4 comments

Micromanaging NPCs is never the answer, especially having the player poke around in AI settings.
It should be sufficient to just adjust the threshold to something more reasonable if the bandages work properly once applied.

Bandaging the player is a different and more complex issue, should the npc forcibly halt the player to bandage them, does the player have to actively wait for the action to be done? Etc.

Yes , Here is what i got.

this is one of the NPCs hurt.
8x1

i have a bandage so i tried making him "Hold" it
8x2

Yet nothing happens its in his backpack and he isnt using it.
8x3

i tried making him "Use" it but he thinks its a melee so he refuses and says his weapon is better.

There's a whole mess of bugs here:

  1. Thresholds for healing are 15 HP or less on the limbs, 25 or less on the torso, and 35 or less on the head. Those should be changed to percentage rather than absolute values.
  2. NPCs have an AI action for healing the player, but no way of assessing the player's wounds.
  3. NPCs don't know about the new bandaging system and will repeatedly bandage the same badly wounded limb.
  4. NPCs don't know how to use disinfectant.
  5. NPCs don't know how to use the player activity to perform bandaging.

Proposed solutions (not in order, just things we need to do)

  • [x] Move to a percentage based threshold that takes into account the NPC's first aid skill, altruism, and bravery - altruistic NPCs heal others earlier and themselves later, brave NPCs require more damage before healing anyone, skilled NPCs wait longer to maximize benefits of their skills.
  • [x] Teach NPCs to recognize bandaged limbs and not re-apply bandages.
  • [x] Teach NPCs to use disinfectant.
  • [ ] Teach NPCs to use the bandaging player activity, now that NPC use of player activity is supported.
  • [ ] As part of that, rewrite the bandaging player activity to be NPC friendly and including pathing support.
  • [ ] Add conversation options to control NPC bandaging - "we've got lots of bandages, use them freely" versus "we're running low, make them count."
  • [x] Allow NPCs to heal each other.

The conversation option would be nice. My NPC got Left Leg |\... and first aid 5, but doesn't want to bandage himself, and this is really messed up.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ituluwituluwzev picture ituluwituluwzev  路  3Comments

tinukedaya picture tinukedaya  路  3Comments

busterbogheart picture busterbogheart  路  3Comments

2birdie picture 2birdie  路  3Comments

jeremyshannon picture jeremyshannon  路  3Comments