Page 1 of 3

Ink Integration: Knots

Posted: Sun Oct 13, 2019 11:40 am
by wilg
It's really cool there's an Ink integration for Dialogue System, but I am having trouble figuring out the easiest way to work with Ink.

It seems to me it would make more sense for a "Conversation Trigger" to not launch an entire story but to be able to specify a specific Ink "Knot" to move to within the context of a single story. Individual NPC interactions or whatever are more like scenes/knots than full stories. This is possible with the runtime (https://github.com/inkle/ink/blob/maste ... ular-scene) but the dialogue system integration is pretty complicated. Maybe this can be added? Or maybe someone has some pointers on how I could add it?

Similarly, perhaps "Barks" with Ink can just be running a special "bark" knot in the story.

Being able to interact with ink at the Knot level instead of the story level allows you to keep a lot more of the story state in Ink and use more of its features.

Also, the UX of specifying a story is not great with Ink. Ideally, when the Ink integration is installed the dropdown menu lists all the possible stories or knots, or just lets me type one in.

Re: Ink Integration: Knots

Posted: Sun Oct 13, 2019 1:25 pm
by Tony Li
Hi,

Thanks! Those are good suggestions. I'll plan to get them into the next update barring any unforeseen obstacles.

Re: Ink Integration: Knots

Posted: Mon Oct 14, 2019 10:00 pm
by wilg
Awesome! Let me know if I can help beta test!

Re: Ink Integration: Knots

Posted: Tue Oct 15, 2019 7:57 am
by Tony Li
Will do. Thanks!

Re: Ink Integration: Knots

Posted: Wed Oct 16, 2019 11:45 am
by jrbourne
I really like your idea, Wilg... I've been looking at how to call Knots and stitches from Behavior Designer. I imagine more integrations similar to the Start Conversation/Stop Conversation actions in Behavior Designer could be used by adding a knot and stitch specification to the action. I'd like to look into this more; probably Tony has some ideas in the meantime on how to add knot and stitch access..... :D

Re: Ink Integration: Knots

Posted: Wed Oct 16, 2019 12:34 pm
by Tony Li
Hi John,

Once the Dialogue System's Ink integration supports starting at knots and stitches in Dialogue System Trigger components, you'll be able to trigger those Dialogue System Trigger components from Behavior Designer.

Re: Ink Integration: Knots

Posted: Sat Oct 19, 2019 9:49 am
by Tony Li
This is the updated Ink Support package for folks to test prior to its release in version 2.2.2:

DS_Ink_Support_2019-10-19.unitypackage

Instead of using a Dialogue System Trigger component, use a Dialogue System Ink Trigger component. This adds dropdowns at the bottom of the Bark and Start Conversation actions from which you can select a knot and/or stitch to start at (or just a story). The stories must already be assigned to the Dialogue Manager's Dialogue System Ink Integration component.

To start a knot or stitch manually from code:

Code: Select all

DialogueSystemInkIntegration.SetConversationStartingPoint("admitted_to_something");
DialogueManager.StartConversation("TheIntercept");

Re: Ink Integration: Knots

Posted: Thu Nov 21, 2019 9:35 am
by jrbourne
Thanks to Tony for improvements in ink integration! I like the ability to specify knots in the conversation trigger.
I have another question:

I've tried to test out the calling of External Functions from the ink integration information. Seems to work fine from the example provided using story.ink -- for example in:

- I looked at Monsieur Fogg # Actor=PlayerSpeaker
* ... and I could contain myself no longer.
'What is the purpose of our journey, Monsieur?' # Actor=PlayerSpeaker
'A wager,' he replied. { SetQuestState("The Wager", "active") } { ShowAlert("Quest: The Wager") }
* * 'A wager!'[] I returned.
He nodded.
* * * 'But surely that is foolishness!'

The ShowAlert above works fine and one sees "The Wager" in the game view at the appropriate time. However, if I add another {ShowAlert ("this is an alert") } on another line of the dialogue, the message doesn't show up in the game view when I get to that line of dialog. Are there additional steps I need to take to get new External Function calls to be recognized by Dialogue System?

Thanks for your insights....

JB

Re: Ink Integration: Knots

Posted: Thu Nov 21, 2019 10:49 am
by Tony Li
Hi,

Is this in the same story, or a different story?

Make sure to declare the EXTERNAL functions at the top of your story, such as:

Code: Select all

EXTERNAL ShowAlert(x)                 // ShowAlert("message")
(See the top of the example scene's story.ink for reference.)

When the conversation gets to the line with your ShowAlert, are there any warnings or errors in the Console window?

Note that if the Dialogue Manager's Alert Settings > Allow Alerts During Conversations checkbox is unticked, alerts will not appear during conversations. The default is unticked.

Re: Ink Integration: Knots

Posted: Thu Nov 21, 2019 1:02 pm
by jrbourne
Hi Tony:

Ok, thanks! Finding the alert checkbox was the secret - it works with that checked - no problem.

John