Page 1 of 2
Textline - Lobby continuing conversation
Posted: Sat Aug 08, 2020 10:22 am
by kelsington
Hi Tony,
Me again!
I have another question regarding the textline add on.
I have set up a project that has multiple conversants using your lobby option. The general idea is that the user will click on one NPC (i.e. Barbara), and once that conversation is complete they will move onto Adam.
Once this is complete they will move onto Charlie, where there will be a branch of either a successful conversation and continued story (talking to Barbara again in a new conversation), or a bad ending.
My issue is that I can't work out how to link the conversations correctly. I have tried to set the variable, and use the conversation trigger, but this hasn't been successful. I also know I need to lead the user to two separate places depending on a good or bad ending - would the only way be to do this in a Quest? I'd prefer to do it in the dialogue manager if possible.
This is only a narrative told via the textline ui so it doesn't need to be too complicated, but I am a little confused. Please help!
Re: Textline - Lobby continuing conversation
Posted: Sat Aug 08, 2020 3:10 pm
by Tony Li
Hi,
It sounds like the player engages in conversations sequentially. The player
can't start the Barbara conversation, then back out and start the Adam conversation, then back out and resume the Barbara conversation, or start the Charlie conversation, etc.
Is that correct? If so, you don't need the Lobby example. The regular Textline will be fine. Configure the gameplay scene to start the first conversation (e.g., Barbara).
Link the last node of the Barbara conversation to the first node Adam conversation (the one after <START>). To link a node to another conversation, inspect the last Barbara conversation node. Locate the "Links To:" dropdown at the bottom of the Inspector view. From the dropdown, select "(Another Conversation)". Then select the Adam conversation and the first node in the conversation.
Branch to the continued story or bad ending based on the value of a variable. For example, if you insult Barbara, it sets a variable "Insulted_Barbara" and leads to a bad ending. Otherwise Barbara gets you in contact with Adam, and the Adam conversation starts.
Link the last node of the Barbara conversation to two branches:
1. A bad ending on these Conditions: Variable["Insulted_Barbara"] == true
2. Adam's conversation on these Conditions: Variable["Insulted_Barbara"] ~= true ("not equal to true")
For more info about conditions, see the
Conversation Conditions Tutorial.
Re: Textline - Lobby continuing conversation
Posted: Mon Aug 10, 2020 11:26 am
by kelsington
Hi Tony,
I see! I did spot this and attempted to do it using the lobby option but it didnt work - potentially there are existing variables that conflict with the lobby version?
I'll try without the use of the lobby, however I've already built on the lobby so its kind of going backwards to continue with the other version.
Many thanks,
Kelsey
Re: Textline - Lobby continuing conversation
Posted: Mon Aug 10, 2020 12:55 pm
by kelsington
Hi Tony,
I realised that although i was linking from the main conversation end, due to the previous node splitting there were many conversation end points so i had to link to each of the conversation ends.
Although this is all working now, the conversation stays inside the previous text conversation - rather than looking like a new conversation with another person. Is there any way around that?
Re: Textline - Lobby continuing conversation
Posted: Mon Aug 10, 2020 2:36 pm
by Tony Li
Sorry, I misunderstood you. I thought you wanted it to look like one running conversation with different characters jumping in and out of it.
If you want them to be separate conversations, try using the Lobby approach again. (Sorry about steering you wrong on that.) It might be simplest to write a script that runs when you re-enter the Lobby. The script can check if it should immediately start a new conversation with a new character. Or, instead of a script, you could use a bunch of Dialogue System Triggers set to OnStart. Set Conditions on each one so it only starts its conversation if certain conditions are true (e.g., a previous conversation set a variable to a specified value).
Re: Textline - Lobby continuing conversation
Posted: Mon Aug 10, 2020 2:49 pm
by kelsington
Hi Tony,
I don't have the ability to write a script sadly.
Using the conversation trigger script worked well when I tried before, however i could only do 2 for a character before it stopped working.
So I had Barbara - on conversation start > Barbara, on conversation end > Adam, however I couldn't then add >conversation end > Charlie because either it was in Barbara's conversation trigger (and that conversation had already ended), or it was in Adam's (which technically hadn't been started yet). Does that make sense?
As an alternative, I'd be happy to instead have notification style buttons appear to signal the next part of the story, however I can't work out how to tell a button when the conversation has ended and when it can appear.
Re: Textline - Lobby continuing conversation
Posted: Mon Aug 10, 2020 5:09 pm
by Tony Li
Hi Kelsey,
The best way for me to provide a reliable answer is to put together a little example myself. Later today, I'll put together an example that works like this:
1. It opens in the Lobby scene.
2. Only a button for Barbara is visible. If you click it, Barbara's conversation starts.
3. When you complete Barbara's conversation, it automatically returns to the Lobby, where now only Adam's conversation button is visible. If you click Adam's conversation button, it starts Adam's conversation.
4. When you complete Adam's conversation, it automatically returns to the Lobby, where now only Charlie's conversation button is visible.
If you're playing Barbara's conversation and use the Menu button to go back, the Lobby will still show Barbara's conversation button until you finish her conversation. Same for Adam and Charlie.
If that doesn't sound like what you want to happen, please let me know where I got off track.
Re: Textline - Lobby continuing conversation
Posted: Tue Aug 11, 2020 9:18 am
by kelsington
Hi Tony,
That would work perfectly! Thank you so much for your help.
Many thanks,
Kelsey
Re: Textline - Lobby continuing conversation
Posted: Tue Aug 11, 2020 10:39 pm
by Tony Li
Hi Kelsey,
Here's the example:
KelseyLobbyExample_2020-08-11.unitypackage
And here's a patch fix for the SaveSystem's AutoSaveLoad feature, which Textline uses:
SaveSystemPatch_2020-08-11.unitypackage
Please import both packages.
The example includes two files:
- 0 Lobby Kelsey
- Kelsey Example Database
Add these scenes to your build settings:
- Scene 0: Dialogue System Extras/Textline/Kelsey Example/0 Lobby Kelsey
- Scene 1: Dialogue System Extras/Textline/Lobby Example/1 Gameplay
I only made changes to Kelsey Example Database and 0 Lobby Kelsey.
In Kelsey Example Database:
- Added a variable named "CurrentNPC", initially set to "Barbara". This indicates the NPC whose conversation should currently play.
- At the end each conversation, set "CurrentNPC" to the next NPC. For example, the last node in Barbara's conversation sets "CurrentNPC" to "Adam".
In 0 Lobby Kelsey:
- Set the NPC buttons Barbara, Adam, and Charlie inactive.
- Added a Dialogue System Trigger to the Lobby Canvas > Panel. It's set to OnStart. It sets an NPC button active according to the value of "CurrentNPC".
- Made a few other small tweaks to Menu System, including ticking the Auto Save Load component's Load On Start checkbox, and setting the Save Slot Number to zero.
Re: Textline - Lobby continuing conversation
Posted: Wed Aug 12, 2020 11:36 am
by kelsington
Thanks again Tony this is great.
After importing the AutoSave patch onto a system that has the dialogue manager, menu framework and textline already added, I get the following error:
Assets\Dialogue System Extras\Dialogue System Menu Framework\Scripts\SaveHelper.cs(256,13): error CS0433: The type 'SaveSystem' exists in both 'Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'PixelCrushers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Can you advise?