Lua Problem on Linux?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mrcsbmr
Posts: 31
Joined: Mon Mar 21, 2016 5:26 am

Lua Problem on Linux?

Post by mrcsbmr »

Hi,

we're using Adventure Creator and DialogueSystem and we let the variables of the different systems sync at the end of each dialogue. We're experiencing some weird behavior on Linux machines now. Apparently, the sync is in some way not working correclty. I haven't figured out if you need to save/load the game yet, since we're still setting up a Linux computer to test it ourselves and currently only have players feedback. But I can look into their savegames.

What happens definitely is that DialogueSystem loses the changes of its variables. A var once set to "true" und suddenly "false" again, destroying the whole game logic. This is happening for both the variables used only by DialogueSystem and for the ones also used by AC. I can see in the AC database that changes in variables are stored there correclty. However, they are wrong in the Lua environment.
For example: Variable A got set to true IN the dialogue. It then seems to have synced to the AC system correctly. It is true in AC. But it is false when I return it via the Lua console. I don't know yet if one has to save and return to the game or if that happens instantly yet.

It is only happening on Linux. Maybe you already have an idea what might cause that?

Thanks
Marcus
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lua Problem on Linux?

Post by Tony Li »

Hi Marcus,

What version of the Dialogue System are you using?

Does it only happen in a Linux build, or also in the experimental Unity editor for Linux?

What version of Unity are you using?

Are you using .NET4.6 by any chance? There was an issue with Lua and .NET4.6 when playing in a language that uses "," for decimal instead of ".". By default, .NET4.6 observes the local OS language settings for number format, whereas .NET3.5 uses the language invariant format. A patch is available if this is the issue.

If it only happens in a build, please try this:

1. Temporarily set the Dialogue Manager's Debug Level to Info.

2. Make a new build.

3. Run the build and reproduce the problem. Then review the log file or email it to tony (at) pixelcrushers.com.

~/.config/unity3d/CompanyName/ProductName/Player.log

Would you also please post (or email me) a screenshot of the inspector view of your AC Bridge component?
mrcsbmr
Posts: 31
Joined: Mon Mar 21, 2016 5:26 am

Re: Lua Problem on Linux?

Post by mrcsbmr »

Phew, this took me a bit. I didn't manage to get the Editor on Linux running with the project. But in various tests I found out that the problem occurs when saving/loading a game. And that we can solve the problem by deactivating "Instantiate Database" in the DialogueManager.

Can you say if that will cause us any problems? I've read (in another forum post) that changes in the Editor during Playmode might cause changes in the .asset file? I've seen no problems when playtesting with that setting in the Editor however.
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lua Problem on Linux?

Post by Tony Li »

It will only cause changes in the .asset file if your code explicitly modifies the database during play. For example:

Code: Select all

DialogueManager.masterDatabase.actors.Clear(); // Don't do this!
The Dialogue System itself loads info from the dialogue database into the Lua environment and makes changes only in the Lua environment.

So unless your code modifies the database, you're safe.

If you want to get to the bottom of the "Instantiate Database" issue, please let me know what version of Unity and the Dialogue System you're using, and what .NET compatibility you're building for. If you need to just move on to other tasks on your game now, no need to reply.
Post Reply