Ink integration - couple questions (actors etc.)

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 21069
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink integration - couple questions (actors etc.)

Post by Tony Li »

Hi,

I'll try to get those implemented next week.
User avatar
Tony Li
Posts: 21069
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink integration - couple questions (actors etc.)

Post by Tony Li »

The Dialogue System Extras page has an updated Ink integration package. It's inside the "Updated for 2.2.7" foldout, but it should work with any recent version of the Dialogue System.

It adds an [InkEntrypoint] attribute that you can use in your scripts like this:

Code: Select all

[InkEntrypoint] public string s;
This will show the string 's' as a dropdown from which you can choose any stories, knots, or stitches from stories assigned to the scene's DialogueSystemInkIntegration component.

It also adds a utility class named InkEntrypoint. This class has 3 string variables: story, knot, and stitch.

The static method InkEntrypoint.FromString(string s) returns an InkEntrypoint object (containing 3 strings: story, knot, and stitch) from a string of any of these formats:
  • "story"
  • "story/knot"
  • "story/knot.stitch"
The corresponding InkEntrypoint.ToString() method returns the string representation of an InkEntrypoint object.

You don't have to use InkEntrypoint, but you might find it handy.
nehvaleem
Posts: 93
Joined: Tue Sep 10, 2019 4:52 am

Re: Ink integration - couple questions (actors etc.)

Post by nehvaleem »

Thanks, Tony!
But let me ask you a question :) Is it compatible with `SetConversationStartingPoint`? Because I don't think that it will work with the output from this picker (I mean with the story name prepended)
User avatar
Tony Li
Posts: 21069
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink integration - couple questions (actors etc.)

Post by Tony Li »

Use an InkEntrypoint object to split the "story/knot.stitch" into its component parts: "story", "knot", and "stitch". Then pass the knot and stitch to SetConversationStartingPoint:

Code: Select all

[InkEntrypoint]public s;
...
InkEntrypoint entrypoint = InkEntrypoint.FromString(s);
DialogueSystemIntegration.SetConversationStartingPoint(entryPoint.knot + "." + entryPoint.stitch);
DialogueManager.StartConversation(entryPoint.story);
If the stitch is an empty string (i.e., no stitch selected), then just use entryPoint.knot.
nehvaleem
Posts: 93
Joined: Tue Sep 10, 2019 4:52 am

Re: Ink integration - couple questions (actors etc.)

Post by nehvaleem »

Ah, right! That is indeed the way :)

One more thing - the conversation popup doesn't always list Ink stories. I am attaching an example screenshot from my project.

Image
User avatar
Tony Li
Posts: 21069
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink integration - couple questions (actors etc.)

Post by Tony Li »

Are those stories assigned to the Dialogue System Ink Integration's "Ink JSON Assets"?

If so, please try navigating away from the Dialogue Trigger inspector and then back to it. This should refresh the internal cache of stories, knots, and stitches that the custom popup has recorded.
nehvaleem
Posts: 93
Joined: Tue Sep 10, 2019 4:52 am

Re: Ink integration - couple questions (actors etc.)

Post by nehvaleem »

yes, the story is assigned to the Dialogue System Ink Integration as it is displayed on the left side of the screen (inside the second inspector). Unfortunately, I cannot find a way to refresh the cached data. I am unable to make it to do a refresh and show ink stories in the conversation popup :(
User avatar
Tony Li
Posts: 21069
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink integration - couple questions (actors etc.)

Post by Tony Li »

It looks like one .ink file is assigned to the DialogueSystemInkIntegration script. The popup is only finding 2 stories/knots/stitches in the .ink file. Can you PM me the file or email it to tony (at) pixelcrushers.com? It's possible that the others are in a format that the popup drawer currently can't identify. I may need to update the way it identifies them.
nehvaleem
Posts: 93
Joined: Tue Sep 10, 2019 4:52 am

Re: Ink integration - couple questions (actors etc.)

Post by nehvaleem »

no, I am working with my database that exists way before I've added ink integration. So those 2 entries in a popup are from the regular Dialogue System database. The weird thing is that the story from ink file shows up in the popup sometimes, but it isn't for most of the time.

let me know If that leads you onto the issue or if you need my source ink file
User avatar
Tony Li
Posts: 21069
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink integration - couple questions (actors etc.)

Post by Tony Li »

Ah, got it. That makes more sense. I'll check why it's not consistently picking up the stories. I added an optimization that caches the stories, and it may not be refreshing the cache when it should.
Post Reply