Ink integration - couple questions (actors etc.)
Re: Ink integration - couple questions (actors etc.)
Hi,
I'll try to get those implemented next week.
I'll try to get those implemented next week.
Re: Ink integration - couple questions (actors etc.)
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:
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:
You don't have to use InkEntrypoint, but you might find it handy.
It adds an [InkEntrypoint] attribute that you can use in your scripts like this:
Code: Select all
[InkEntrypoint] public string s;
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"
You don't have to use InkEntrypoint, but you might find it handy.
Re: Ink integration - couple questions (actors etc.)
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)
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)
Re: Ink integration - couple questions (actors etc.)
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:
If the stitch is an empty string (i.e., no stitch selected), then just use entryPoint.knot.
Code: Select all
[InkEntrypoint]public s;
...
InkEntrypoint entrypoint = InkEntrypoint.FromString(s);
DialogueSystemIntegration.SetConversationStartingPoint(entryPoint.knot + "." + entryPoint.stitch);
DialogueManager.StartConversation(entryPoint.story);
Re: Ink integration - couple questions (actors etc.)
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.
One more thing - the conversation popup doesn't always list Ink stories. I am attaching an example screenshot from my project.
Re: Ink integration - couple questions (actors etc.)
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.
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.
Re: Ink integration - couple questions (actors etc.)
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
Re: Ink integration - couple questions (actors etc.)
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.
Re: Ink integration - couple questions (actors etc.)
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
let me know If that leads you onto the issue or if you need my source ink file
Re: Ink integration - couple questions (actors etc.)
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.