Disable Tags for old response selectively

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
stansison
Posts: 10
Joined: Thu Jun 03, 2021 11:44 pm

Disable Tags for old response selectively

Post by stansison »

Hi Tony,

I’d like to prevent the old response tagging on certain conversations while keeping it enabled for everything else.

How would I change and access the settings dynamically? I guess it can be done during the OnConversationResponseMenu() while filtering the specific conversation that I want the effects disabled for?
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable Tags for old response selectively

Post by Tony Li »

In the next release, I'll add those as options to override in the conversation's properties > Override Display Settings > Input Settings. You'll be able to set them here:

overrideInputSettings.png
overrideInputSettings.png (44.85 KiB) Viewed 339 times

If you're in a time pinch and need to implement it yourself before then, you can add a script to the Dialogue Manager that has OnConversationStart and OnConversationEnd special script methods.

In OnConversationStart, set DialogueManager.displaySettings.inputSettings.emTagForOldResponses. You can define a custom field in your conversation and check it using DialogueManager.lastConversationStarted to get the conversation. Example:

Code: Select all

void OnConversationStart(Transform actor)
{
    var conversation = DialogueManager.masterDatbaase.GetConversation(DialogueManager.lastConversationStarted);
    if (conversation.LookupBool("Disable Old Response Em Tag"))
    {
        DialogueManager.displaySettings.inputSettings.emTagForOldResponses = EmTag.None;
    }
}
In OnConversationEnd, set emTagForOldResponses back to its original value.
stansison
Posts: 10
Joined: Thu Jun 03, 2021 11:44 pm

Re: Disable Tags for old response selectively

Post by stansison »

That’s excellent news, Tony. I have to say, this is one of the best assets that I’ve ever worked with.

Hats off sir!
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable Tags for old response selectively

Post by Tony Li »

Thank you very much!
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable Tags for old response selectively

Post by Tony Li »

Hi,

This patch will let you override em tags for old and invalid responses on a per-conversation basis:

DS_OverrideEmTagsPatch_2022-08-26.unitypackage

Please back up your project before importing, just to be safe.
Post Reply