Ink integration - couple questions (actors etc.)
Re: Ink integration - couple questions (actors etc.)
I think I misunderstood you earlier.
The [ConversationPopup] attribute will not include Ink stories. If it shows a single Ink story in the popup, that's because the string is already set to that story name.
Instead, in your Dialogue Trigger use the [InkEntrypoint] attribute. This will let you pick Ink stories and, optionally, entrypoints in those stories. You can use the code I posted above to split the story name from the knot and stitch.
The [ConversationPopup] attribute will not include Ink stories. If it shows a single Ink story in the popup, that's because the string is already set to that story name.
Instead, in your Dialogue Trigger use the [InkEntrypoint] attribute. This will let you pick Ink stories and, optionally, entrypoints in those stories. You can use the code I posted above to split the story name from the knot and stitch.
Re: Ink integration - couple questions (actors etc.)
Oh my, of course. Sorry for bothering you, that makes perfect sense.
One more question tho - is it possible to set ink variable value via dialogue manager? The context is I want to restore state of the conversation (variables, etc) after loading a save in my game. What is the correct way of doing this?
One more question tho - is it possible to set ink variable value via dialogue manager? The context is I want to restore state of the conversation (variables, etc) after loading a save in my game. What is the correct way of doing this?
Re: Ink integration - couple questions (actors etc.)
Yup, use the Ink Lua functions.
For example, you can set a Dialogue System Trigger to OnTriggerEnter, and select Add Action > Run Lua Code. Then set the Lua Code field to:
This will set the Ink variable "enteredHouse" to true.
Conversely, in an Ink story you can use the integration's external functions to get and set Dialogue System variables.
For example, you can set a Dialogue System Trigger to OnTriggerEnter, and select Add Action > Run Lua Code. Then set the Lua Code field to:
Code: Select all
SetInkBool("enteredHouse", true)
Conversely, in an Ink story you can use the integration's external functions to get and set Dialogue System variables.
Re: Ink integration - couple questions (actors etc.)
Great! Thanks for the explanation and sorry about missing the well-documented feature.
It seems that (again) I am set for now. In the meantime, I've checked that PersistentDataManager also handles Ink integration! Awesome!
It seems that (again) I am set for now. In the meantime, I've checked that PersistentDataManager also handles Ink integration! Awesome!
Re: Ink integration - couple questions (actors etc.)
ah I've might write this a little bit too soon
Since I don't know the correct way to "see" the state of ink story I am using: to preview it. When I play my game it outputs correct values for my variables. Then I save it manually and after that, I'm calling After that, I am calling GetSaveData() once more and I see that the values of my variables didn't change.
Also - is it possible to set ink LIST value from the Dialogue System? I cannot find a way to do so.
Since I don't know the correct way to "see" the state of ink story I am using:
Code: Select all
PersistentDataManager.GetSaveData()
Code: Select all
PersistentDataManager.ApplySaveData(savedData.storyState)
Also - is it possible to set ink LIST value from the Dialogue System? I cannot find a way to do so.
Re: Ink integration - couple questions (actors etc.)
I'll check saving & loading and reply back here by the end of the day.
Currently there's no way to set an Ink List value from the Dialogue System. I can add that to the to-do list. Add/remove/change individual list elements?
Currently there's no way to set an Ink List value from the Dialogue System. I can add that to the to-do list. Add/remove/change individual list elements?
Re: Ink integration - couple questions (actors etc.)
My top priority is to be able to store and restore ink story state completely. If saving/loading work correctly (from my tests I thing there is something off, but my Ink story have a LIST variable. Maybe this is connected somehow) that I should be fine.
But apart from that I think that being able to modify LIST variable would be really handy. I imagine that it would be awesome to cast it to & from array - this way we will be able to do all sorts of modifications.
But apart from that I think that being able to modify LIST variable would be really handy. I imagine that it would be awesome to cast it to & from array - this way we will be able to do all sorts of modifications.
Re: Ink integration - couple questions (actors etc.)
Hi,
Make sure the Dialogue System Ink Integration's Reset State On Conversation Start checkbox is UNticked.
Here's an example:
DS_InkSaveLoadExample_2020-06-19.unitypackage
It has 3 buttons: BBB, CCC, and ShowVar. The Ink story has a variable that defaults to "AAA". If you click BBB, it will set the variable to "BBB". If you click CCC, it will set the variable to "CCC". If you click ShowVar, it will show the current value of the variable. You can press Esc to access a save/load menu.
Here's an updated integration package:
DS_InkSupport_2020-06-19.unitypackage
It just has one small change: The GetInkString() Lua function needed a bug fix.
Make sure the Dialogue System Ink Integration's Reset State On Conversation Start checkbox is UNticked.
Here's an example:
DS_InkSaveLoadExample_2020-06-19.unitypackage
It has 3 buttons: BBB, CCC, and ShowVar. The Ink story has a variable that defaults to "AAA". If you click BBB, it will set the variable to "BBB". If you click CCC, it will set the variable to "CCC". If you click ShowVar, it will show the current value of the variable. You can press Esc to access a save/load menu.
Here's an updated integration package:
DS_InkSupport_2020-06-19.unitypackage
It just has one small change: The GetInkString() Lua function needed a bug fix.
Re: Ink integration - couple questions (actors etc.)
Awesome! I can confirm that it is now working great! Again, thanks for the incredible support!
Re: Ink integration - couple questions (actors etc.)
Glad to help!