Twine import bug

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Nevrak
Posts: 8
Joined: Fri Apr 16, 2021 7:51 pm

Twine import bug

Post by Nevrak »

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?
Image

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!
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: Twine import bug

Post by Tony Li »

Hi,

You don't need the player nodes. Try formatting your Twine story like this:

twine1.png
twine1.png (8.4 KiB) Viewed 644 times

It will generate Twison JSON like this:
Spoiler

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
twine2.png (13.21 KiB) Viewed 644 times
Nevrak
Posts: 8
Joined: Fri Apr 16, 2021 7:51 pm

Re: Twine import bug

Post by Nevrak »

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?
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: Twine import bug

Post by Tony Li »

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

Re: Twine import bug

Post by Nevrak »

Hey Tony,
I really need the script to be ON the "Okay" response such as:

Image

this is because the response in my conversations such that it could say for example:

Image

Where the script would embed that bottom "Action" "Each player must discard" onto the button for the game's functionality to work properly.
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: Twine import bug

Post by Tony Li »

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

Re: Twine import bug

Post by Nevrak »

Hey Tony,
Thank you so much, that sounds wonderful!
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: Twine import bug

Post by Tony Li »

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

Re: Twine import bug

Post by Nevrak »

Hey Tony,
This worked perfectly, thank you so much!
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: Twine import bug

Post by Tony Li »

Glad to help! Thanks for the suggestion.
Post Reply