Articy Issues

Announcements, support questions, and discussion for the Dialogue System.
DLRyy
Posts: 20
Joined: Fri Aug 12, 2022 12:02 pm

Re: Articy Issues

Post by DLRyy »

I am curious though, what is it about saving that would be missing at this point? I ask because I have been watching tutorials. The possible conflict with AC's own save system got me confused.
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy Issues

Post by Tony Li »

Hi,

Regarding saving, nothing should be missing. It's just a good idea to get as much technical setup out of the way early so you can focus solely on writing content later on.

If you're planning to use Adventure Creator (AC), use their save system as the main save system, and let the Dialogue System's save system feed its data into that. To do this, you'll set up the Dialogue System's save system and then add a Remember Dialogue System component to the Dialogue Manager GameObject. This component will allow AC's save system to save and restore Dialogue System data by controlling the Dialogue System's save system.
DLRyy
Posts: 20
Joined: Fri Aug 12, 2022 12:02 pm

Re: Articy Issues

Post by DLRyy »

Oh yeah, that. Yep I followed the integration tutorial and have been checking all my test branching paths. Works like a charm.
There is one thing I can't get to work, sorry for the repeat topic. Just need to clear this up.
So my current understanding of variables is that I add them, same name, on AC's variable tab. I've done this.
Now, on the ActionList that triggers the conversation using the third party action, do I place a Lua check and the script before or after? Both? Is that how it's done?

Usually you'd be able to check variables by changing their value on AC's tab on play mode. I haven't been able to do this, only through Dialogue System's Editor, on the variable tag. It works, but I don't think it's the intended workflow. What should I do? If it works like this I don't mind, just need to double check.
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy Issues

Post by Tony Li »

Hi,

There are two ways to work with AC variables in DS:

1. Let the bridge script automatically copy the AC values to DS variables when a conversation starts, and then copy the DS values back to AC when the conversation ends. This is convenient because you can treat the AC variables like DS variables as you're writing your conversation. But it has two caveats:
  • During conversations, you shouldn't modify the AC variables because DS will overwrite the changes at the end of the conversation when it copies the DS values back onto AC.
  • The copying happens on conversation start and end. The DS & AC variables aren't guaranteed to be sync until the conversation starts. So if you want to check variable values before starting a conversation, you'll probably want to use AC's Var Check action.
2. The other way to work with variables is to turn off the automatic copy/sync by unticking the bridge component's checkboxes. Then let your DS conversations directly access AC values using the integration's Lua functions such as acGetBoolean() to get the value of a Boolean AC variable.
  • Pro: You only have one copy of the variable (the AC copy).
  • Con: You need to use the Lua functions instead of treating them as DS variables.
DLRyy
Posts: 20
Joined: Fri Aug 12, 2022 12:02 pm

Re: Articy Issues

Post by DLRyy »

I've been reading the documentation but I'm not getting some stuff, apologies.

Out of these two methods, considering Articy, which one would you recommend?
Sounds like 1 might be the easier way but I'm not sure if I'm getting my point across. Besides I'm not fully getting it, I'll continue reading the scripting part of the documentation.
So with the Articy export (btw there is this huge string variable with Articy info) I can test it out and play it on DS. DS is linked to AC. I can play the interactions just fine and they're saving and everything works on that end.
It's just I can't control the variables from the AC side right now. Variables related to a conversation made on Articy work with DS. On their action list the conversation can branch from many factors, but that's internal. There's at the time no way for me to set those variables in a seamless way.
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy Issues

Post by Tony Li »

Hi,

Variables defined in Articy end up as Dialogue System variables. In an AC actionlist, you can these two actions: Dialogue System Lua and Dialogue System Check.

You'll typically use Dialogue System Check in an actionlist if you want to check the current value of a DS/Articy variable. Specify an expression such as:

Code: Select all

Variable["Globals.MyVariable1"] == false
And you'll typically use Dialogue System Lua to set the value of a DS/Articy variable. Set the Lua Code to something like:

Code: Select all

Variable["Globals.MyVariable1"] = true
DLRyy
Posts: 20
Joined: Fri Aug 12, 2022 12:02 pm

Re: Articy Issues

Post by DLRyy »

I've been trying to make this seamless but I really have no way, I don't know what I'm doing wrong.
If I place a Lua action after the conversation node on the actionlist, return variable, well it doesn't work. Blocks out the name and leaves just return in there. Store Result and the AC variable ID, it's not storing the value.

It works with the second Lua action and just setting the value out of the blue, but that doesn't really allow for a conversation to change things in game, What am I doing wrong here?
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy Issues

Post by Tony Li »

Try this workflow:

1. In articy:draft, let's say you define a variable group named "Globals" with a variable named "Mood". In your articy dialogue(s), you check and modify this variable.

2. When you import this into the Dialogue System, the dialogue database will have a variable named "Globals.Mood".

3. Add a Dialogue Manager GameObject to your scene, and assign the dialogue database to it.

4. Add an Adventure Creator Bridge component. Click "Copy DS Vars To AC". This will create an AC global variable named "Globals.Mood". Keep these checkboxes ticked: Sync Settings > Copy AC Variables To Dialogue System and Copy Dialogue System To AC Variables. (Side note: You'll probably also add other components to the Dialogue Manager such as a Remember Dialogue System component, but we can disregard that for now.)

5. In an actionlist, add the action Third Party: Dialogue System Conversation. Specify your articy dialogue conversation. Keep "Wait until finish?" ticked. When this action starts, it will copy the value of the AC variable "Globals.Mood" to the corresponding Dialogue System variable. The articy dialogue conversation will work with the Dialogue System variable. When the conversation ends, the action will copy of the value of the Dialogue System variable back to the AC variable.

6. If you want to check the value of the Mood variable after the conversation has finished, add a standard AC Variable: Check action. Select the AC global variable "Globals.Mood".
DLRyy
Posts: 20
Joined: Fri Aug 12, 2022 12:02 pm

Re: Articy Issues

Post by DLRyy »

Thanks, the following happened and I think I'll use it like this from now on.
Everything works just fine until we arrive at the AC check. In AC's editor variable tab, it never updates it's value visually.
Using hotspot interactions, quit game if true, item if false. It failed every single time, so it doesn't update functionally BUT what works instead is having a DS Check replace the AC's Variable Check node on the action list, it works just fine.

So I think there won't be any sort of issue by using it like this, right? I mean, it's like a lego block with a different color, it just works.

Thanks for your help!
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy Issues

Post by Tony Li »

Hmm, I'll check that. It sounds like you have a working solution now, but the other way should work, too. When the conversation has ended, the values of the DS variables should be copied over to their AC variable equivalents. One small thing: The variable won't update visually in AC's Game Editor window unless its 'show runtime values' checkbox is ticked.
Post Reply