CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.62k stars 4.17k forks source link

Fatima (NPC) will offer to train you but gives no refund if no training is done #49471

Open pjf opened 3 years ago

pjf commented 3 years ago

Describe the bug

Fatima (Refugee Centre NPC) will offer to teach you, with a fee of 5 Merch plus the cost of training.

However if no training is selected, she keeps the 5 Merch.

It's not possible to see what can be trained and the prices without handing over the 5 Merch first.

Steps To Reproduce

  1. Load the attached save.
  2. Note you start with 45 Merch.
  3. examine 4west and talk
  4. a a d to reach the training dialogue
  5. a Here's your money (lose 5 Merch)
  6. Exit the trade
  7. BUG: Observe you're down to 40 Merch, even though no training happened.

Expected behavior

The 5 Merch fee is only charged if training happens, or is refunded if it does not.

Versions and configuration

Additional context

Fatima also won't accept exact payment for training, but this is fixed in #49470.

I-am-Erk commented 3 years ago

Hmm, that makes sense. It isn't trivial to fix. I wonder if we can get a way to check if you needed training or not and only charge the merch after. the trade interface used for training is not very connected to dialogue.

pjf commented 3 years ago

If the purpose of the extra fee is to make sure the player learns about Merch, then I'd look at moving it to a one-time fee to cover costs in setting up a learning environment, or some other hand-waving excuse. Training from that point onwards can proceed as usual, and I believe would be possible with our current chat system.

If the extra fee is to make Fatima a consistently more expensive teacher, then some attribute of the NPC or conversation that modifies prices in the skill-trade window sounds desirable, and would also allow other NPCs to be implemented as cheap/expensive trainers.

I-am-Erk commented 3 years ago

The trade window is really hard to deal with currently, but yes, what we'd want there is the ability for her to require 5 merch and ____$ instead of just _____$. Or, even better, she'd just demand merch of equivalent value to the training you want.

fwiw, all the NPCs in the center that trade currently charge a few merch plus barter as far as I recall, and their dialogue flags it as such ("Let's say, 5 merch for a teaching session, plus a bit in trade depending on how in-depth you're looking for?) The problem is I don't think I have the tools to only charge you on a successful training.