Outer-Wilds-New-Horizons / new-horizons

A tool for modifying or creating new planets, dialogue, ship logs, and more for Outer Wilds.
https://nh.outerwildsmods.com/
MIT License
42 stars 15 forks source link

consider checking InConversation() to avoid unnecessary CharacterDialogueTree.EndConversation() calls #859

Closed Ixrec closed 1 month ago

Ixrec commented 2 months ago

What Happened?

Currently, having New Horizons installed causes any "(X) Do Stuff" interaction to invoke EndConversation() on dozens of NPCs/notes/recorders throughout the game (I don't think it's every interactable in the solar system, but it feels like it). We believe this is caused by CharacterDialogueTreePatches.cs which we believe is the implementation of "Fix a vanilla bug where being in a conversation and then getting attached to something traps you in dialogue.".

This probably isn't a bug in the strict sense, as it only affects other mods with patches on EndConversation() that are not themselves checking InConversation(). And arguably we all should be checking InConversation() in our own mods, since even the vanilla game makes spurious EndConversation() calls. But this did cause an issue for me when I was experimenting with NH mod compat for my randomimzer, and xen asked me to open an issue about it after seeing my questions about it on Discord.

What was supposed to happen?

CharacterDialogueTree.InConversation() could be checked in https://github.com/Outer-Wilds-New-Horizons/new-horizons/blob/main/NewHorizons/Patches/DialoguePatches/CharacterDialogueTreePatches.cs#L25 to avoid unnecessary EndConversation() calls.

Platform

None

Mods

No response

Logs

No response