CleverRaven / Cataclysm-DDA

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

Adding permanent effects via npctalk no longer functional #28129

Closed Noctifer-de-Mortem closed 5 years ago

Noctifer-de-Mortem commented 5 years ago

Describe the bug
Regarding npctalk, for both npc_add_effect and u_add_effect, if the duration assigned is permanent, the effect will instantly remove itself after exiting conversation, resetting any facets of conversation intended to evolve as they tend to track evolution via applying effects permanently.

This can be seen with vanilla NPC backstories that evolve using this method (example: BGSS_Lost_Partner_2) but is difficult to test as not all NPC background conversations are able to evolve, and applying a desired background trait to a test NPC is awkward as all the backstory traits use the same name (mutate menu only shows the ID when toggling the mutation on or off, unlike the wish menu).

To Reproduce
Steps to reproduce the behavior:

  1. Find an NPC with an evolving backstory (alternatively, assign the desired backstory trait to a recruitable NPC).
  2. Recruit this NPC.
  3. Trigger the effect placement that permanently evolves the conversation.
  4. Exit conversation.
  5. Talk to them again and return to the section of conversation that's supposed to have changed.

Expected behavior
Permanent effects on npctalk should allow conversation evolution with NPCs.

Versions and configuration: Tested in windows tiles build 0.C-37210-ge6e1890 (build 8489) and windows curses build 0.C-37320-g2a8c342 (build 8505).

Additional context
This effects vanilla and any mod using permanent NPC effects such as tracking what missions the player has done for the NPC.

SunshineDistillery commented 5 years ago

I can confirm. I haven't gotten PERMANENT to work even with the standard TEST_TALK question. On the last version I tried, 8475, I think the u_add_effect worked but not the NPC version.

I-am-Erk commented 5 years ago

They're working fine in 8467, so this seems to be a recently introduced problem. Don't have time to download a newer build to find when it started being an issue. Tested both u_add_effect and npc_add_effect with permanent duration.

kevingranade commented 5 years ago

Fixed by #28220