Page 2 of 2

Re: Using metatables and metamethods on system tables

Posted: Tue Oct 10, 2017 10:15 am
by Tony Li
Thanks. I'll double-check the scene and include the prefab in an updated version later today.

Re: Using metatables and metamethods on system tables

Posted: Fri Oct 13, 2017 10:05 am
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.

Re: Using metatables and metamethods on system tables

Posted: Fri Oct 13, 2017 10:25 am
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%.

Re: Using metatables and metamethods on system tables

Posted: Mon Oct 16, 2017 2:34 am
by liisi.laasik
Thanks. That patch will make a huge difference for us.

Re: Using metatables and metamethods on system tables

Posted: Mon Oct 16, 2017 8:51 am
by Tony Li
I'll be publishing the patch later today. One last-minute, unrelated UI fix needed to be added.