Variables not in Lua environment after loading

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

Variables not in Lua environment after loading

Post by mrcsbmr »

Hello,

we have a problem with variables becoming nil in the Lua environment. We're using Articy and this happens in old savegames when we create new variables in Articy and importing a new dialog database. The newly introduced variable value is not registered in the Lua environment because it only holds the values that were set up in the database the game used in the version of the savegame (or something like that)...
The value of the new variables is nil if we check them using the Lua console.

What's the easiest way to set the value to the default variables value of the DialogueManager in the Lua environment when loading a (Adventure Creator) savegame? Since I'm still terribly bad at the Lua-relevant code, it would be of great help if you could provide a small code snippet.

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

Re: Variables not in Lua environment after loading

Post by Tony Li »

Hi Marcus,

By Tuesday morning, I'll prepare a patch that backfills missing variables when loading saved games. I think that will be the best solution.
mrcsbmr
Posts: 31
Joined: Mon Mar 21, 2016 5:26 am

Re: Variables not in Lua environment after loading

Post by mrcsbmr »

That's great, thank you!
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variables not in Lua environment after loading

Post by Tony Li »

Hi Marcus,

The patch is good the customer download site.
mrcsbmr
Posts: 31
Joined: Mon Mar 21, 2016 5:26 am

Re: Variables not in Lua environment after loading

Post by mrcsbmr »

Where would I find that? I looked here and didn't find anything.

http://www.pixelcrushers.com/dialogue-system-extras/
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variables not in Lua environment after loading

Post by Tony Li »

Sorry, I thought you already had access to the private customer download site. I just now sent you your access info.
mrcsbmr
Posts: 31
Joined: Mon Mar 21, 2016 5:26 am

Re: Variables not in Lua environment after loading

Post by mrcsbmr »

Thank you! Implemented it and it seems to work. :)
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variables not in Lua environment after loading

Post by Tony Li »

Great! Thanks for letting me know.
Post Reply