Using metatables and metamethods on system tables

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using metatables and metamethods on system tables

Post by Tony Li »

Thanks. I'll double-check the scene and include the prefab in an updated version later today.
User avatar
liisi.laasik
Posts: 13
Joined: Tue Oct 03, 2017 9:15 am
Location: Tallinn, Estonia

Re: Using metatables and metamethods on system tables

Post by liisi.laasik »

I've been playing around with the code, fixed a lot of bugs I've made and I think the meta tables and listening to Variable table changes is mostly working now. An extended testing period will follow - fingers crossed...

I've had to replace DialogueLua.DoesVariableExist(varName) calls with gueLua.DoesTableElementExist(metatableName, varName) calls. I suspect that making Exists functions take metatables into account would be too much of an overhead.

I'll post here if and when I discover anything new, but I think all the abnormalities were due to my own mistakes.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using metatables and metamethods on system tables

Post by Tony Li »

Sounds good. I still plan to publish a patch at the end of this week (Sunday). In the current version, when using NLua the Dialogue System doesn't save SimStatus in a compressed form. The patch adds that. This can reduce saved game sizes by up to 90%.
User avatar
liisi.laasik
Posts: 13
Joined: Tue Oct 03, 2017 9:15 am
Location: Tallinn, Estonia

Re: Using metatables and metamethods on system tables

Post by liisi.laasik »

Thanks. That patch will make a huge difference for us.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using metatables and metamethods on system tables

Post by Tony Li »

I'll be publishing the patch later today. One last-minute, unrelated UI fix needed to be added.
Post Reply