Announcements, support questions, and discussion for the Dialogue System.
Nevrak
Posts: 8 Joined: Fri Apr 16, 2021 7:51 pm
Post
by Nevrak » Mon Aug 02, 2021 7:06 pm
Hey there,
I'm getting some weird behavior when trying to import a dialogue from twine. For whatever reason my links are becoming extra dialogue?
Is the result from the output of the twine JSON which is
https://drive.google.com/file/d/1wppWn5 ... sp=sharing
I'd really appreciate any and all advise on how to format my twine correctly or my import so that I can have the proper conversation importing!
Tony Li
Posts: 23438 Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li » Mon Aug 02, 2021 10:18 pm
Hi,
You don't need the player nodes. Try formatting your Twine story like this:
twine1.png (8.4 KiB) Viewed 1619 times
It will generate Twison JSON like this:
Code: Select all
{
"passages": [
{
"text": "NPC: Hello This is a Dialogue\n[[Okay]]\n[[Exit]]",
"links": [
{
"name": "Okay",
"link": "Okay",
"pid": "2"
},
{
"name": "Exit",
"link": "Exit",
"pid": "3"
}
],
"name": "Start",
"pid": "1",
"position": {
"x": "860",
"y": "383.5"
}
},
{
"text": "After player clicks Okay",
"name": "Okay",
"pid": "2",
"position": {
"x": "785",
"y": "533.5"
}
},
{
"text": "After player clicks Exit",
"name": "Exit",
"pid": "3",
"position": {
"x": "935",
"y": "533.5"
}
}
],
"name": "Responses",
"startnode": "1",
"creator": "Twine",
"creator-version": "2.3.14",
"ifid": "04B7E898-C24B-4E9C-93A6-D2C1CE2167E3"
}
And a Dialogue System conversation like this:
twine2.png (13.21 KiB) Viewed 1619 times
Nevrak
Posts: 8 Joined: Fri Apr 16, 2021 7:51 pm
Post
by Nevrak » Tue Aug 03, 2021 1:05 pm
Hey Tony,
is there at all a way for the Okay and Exit on yours to have scripted values? Because right now I'm not seeing a way to add that to the player responses such that the response will have a script on it rather than the node that the response leads to?
Tony Li
Posts: 23438 Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li » Tue Aug 03, 2021 1:36 pm
If you put the scripted values on the destination node (e.g., "After player clicks Okay"), they'll play as soon as the player clicks Okay.
The exception is if you've ticked the Dialogue Manager's Subtitle Settings > Show PC Subtitle During Line and UNticked Skip PC Subtitle After Response Menu. In this case, you can link to a player node that runs the script and immediately continues. Add a Script: block with the Lua code you want to run, and add a Sequence: block containing just "Continue()" (without quotes).
Nevrak
Posts: 8 Joined: Fri Apr 16, 2021 7:51 pm
Post
by Nevrak » Tue Aug 03, 2021 1:42 pm
Hey Tony,
I really need the script to be ON the "Okay" response such as:
this is because the response in my conversations such that it could say for example:
Where the script would embed that bottom "Action" "Each player must discard" onto the button for the game's functionality to work properly.
Tony Li
Posts: 23438 Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li » Tue Aug 03, 2021 2:02 pm
Got it. I'll make that addition and try to post a patch here by the end of tomorrow (or sooner if possible).
Nevrak
Posts: 8 Joined: Fri Apr 16, 2021 7:51 pm
Post
by Nevrak » Tue Aug 03, 2021 2:36 pm
Hey Tony,
Thank you so much, that sounds wonderful!
Tony Li
Posts: 23438 Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li » Wed Aug 04, 2021 9:48 pm
Hi,
Please try this patch:
DS_TwineImportPatch_2021-08-04.unitypackage
If a link connects to a node whose text is exactly the same as the link in Twine, then in the Dialogue System they'll be treated as the same node instead of duplicating.
Nevrak
Posts: 8 Joined: Fri Apr 16, 2021 7:51 pm
Post
by Nevrak » Thu Aug 05, 2021 3:35 pm
Hey Tony,
This worked perfectly, thank you so much!
Tony Li
Posts: 23438 Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li » Thu Aug 05, 2021 3:57 pm
Glad to help! Thanks for the suggestion.