start a simaltaneous conversation in an entry
Re: start a simaltaneous conversation in an entry
I come up with an idea about the loops. In the custom sequencer command that run the loop, use DialogueManager.PlaySequence("AAA(); BBB()") as the loop body, then I can loop any commands I want. The group message can use this idea too. It will be better if there is a way to pass the contidion as a parameter into the custom command
I have some other questions,
1. How to add my custom response item? It may not be a button of text, but a button prefab with sprite only.
2. The subject parameter of command needs the name of gameObject in the scene, not the actor name in the "Actors" of the database, am I right?
I have some other questions,
1. How to add my custom response item? It may not be a button of text, but a button prefab with sprite only.
2. The subject parameter of command needs the name of gameObject in the scene, not the actor name in the "Actors" of the database, am I right?
Re: start a simaltaneous conversation in an entry
If you use TextMesh Pro, you can use a <sprite> tag to show a sprite in the text.
Yes. It must be the name of a GameObject in the scene or the special keywords 'speaker' or 'listener'.
Re: start a simaltaneous conversation in an entry
How about a more complex prefab that has its own logic. For example, in Disco Elysium, when hover on a selection that requires player's certain skill level, a UI panal will show up to tell us the player's recent skill level and the gap between. This maybe able to achieve if I write some status in the menu text, but what if there is only a sprite.
So I wonder if there is a way to use not the Response Button Template, but instantiate certain prefab for selection, and selectionA and selectionB could be complete different prefabs.
So I wonder if there is a way to use not the Response Button Template, but instantiate certain prefab for selection, and selectionA and selectionB could be complete different prefabs.
Re: start a simaltaneous conversation in an entry
The Dialogue System Extras page has a "Hover Response Button Example" that might be helpful.
Re: start a simaltaneous conversation in an entry
I got it, I can add custom fields to do more things.
If possible, I still want to suggest to add a override response template in the dialogue entry to get more flexibility, I thought about instantiating a custom prefab assigned by custom field to replace the template, but it may need to repeat a lot of initializion, and can't compare to instantiating the desired prefab at the beginning
If possible, I still want to suggest to add a override response template in the dialogue entry to get more flexibility, I thought about instantiating a custom prefab assigned by custom field to replace the template, but it may need to repeat a lot of initializion, and can't compare to instantiating the desired prefab at the beginning
Re: start a simaltaneous conversation in an entry
Hi,
You can already override things by writing an OnConversationResponseMenu() method or subclassing StandardUIMenuPanel and overriding ShowResponses().
You can already override things by writing an OnConversationResponseMenu() method or subclassing StandardUIMenuPanel and overriding ShowResponses().
Re: start a simaltaneous conversation in an entry
I think I understand how to do it by ShowResponses(), could you explain more about the OnConversationResponseMenu() way?
And is there any usecase wo show howto use "Files" Field type?
And is there any usecase wo show howto use "Files" Field type?
Re: start a simaltaneous conversation in an entry
There's not much use for the "Files" type. It's a remnant from Chat Mapper. It's just a string. Typically is contains content such as "[filename; filename; filename;...]" but the Dialogue System doesn't do anything special with this string.
The Dialogue System calls OnConversationResponseMenu() before showing the menu. In the method, you can change the content of each of the Response objects in the array (but you can't resize the array) and/or do other things such as checking the destination entries' field values.
For example, say you want to play a special sound if any of the responses has a Boolean field "Special" that's set to true. You could add this method to a script on the Dialogue Manager:
The Dialogue System calls OnConversationResponseMenu() before showing the menu. In the method, you can change the content of each of the Response objects in the array (but you can't resize the array) and/or do other things such as checking the destination entries' field values.
For example, say you want to play a special sound if any of the responses has a Boolean field "Special" that's set to true. You could add this method to a script on the Dialogue Manager:
Code: Select all
void OnConversationResponseMenu(Response[] responses)
{
foreach (Response response in responses)
{
if (Field.LookupBool(response.destinationEntry.fields, "Special") == true)
{
PlaySpecialSound();
}
}
}
Re: start a simaltaneous conversation in an entry
But how to use OnConversationResponseMenu() to replace the response prefab of certain entry? I know if I subclass StandardUIMenuPanel, then I can overriding ShowResponses() to use a custom InstantiateButton() method. But OnConversationResponseMenu() is before the instantiation.
Re: start a simaltaneous conversation in an entry
To replace the response button prefab, use ShowResponses(). If you want to show an additional prefab (not replace the button) and you don't want to create a subclass of StandardUIMenuPanel, you can use OnConversationResponseMenu().