SimStatus & variables suddenly stopped working

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
manlyghostcake
Posts: 8
Joined: Mon Mar 20, 2017 2:16 pm

SimStatus & variables suddenly stopped working

Post by manlyghostcake »

Hi!

I was creating a new quest for my game today and suddenly realized that it threw this error message every time when I put in variables or sim statuses:

Dialogue System: Lua code 'return Dialog[1].SimStatus == "Untouched"' threw exception 'Lookup of field 'SimStatus' in the table element failed because the table element itself isn't in the table.'

To be sure I replicated the dialogue from this post:

viewtopic.php?f=3&t=931

Didn't work. It may have something to do with something I changed, though there wasn't much if anything.
Was there an update I missed or could it be the Unity mechanics?
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus & variables suddenly stopped working

Post by Tony Li »

Hi,

That inscrutable error message means the Dialogue System thinks the current conversation doesn't have a dialogue entry node with ID '1'. Did you perhaps accidentally change the ID of that node? If so, can you change it back to '1'? Alternatively, you can update the Conditions field to reference the new ID number, such as Dialog[42].SimStatus if the new ID is 42. In general, though, you shouldn't manually change IDs.

If that doesn't help, please feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.
manlyghostcake
Posts: 8
Joined: Mon Mar 20, 2017 2:16 pm

Re: SimStatus & variables suddenly stopped working

Post by manlyghostcake »

Thanks, I can work with that.
I changed the IDs, it worked. I changed them back and it still worked. I ran the dialogue multiple times, and the links between the nodes got deleted seemingly at random. Sometimes the variables don't get triggered.
It works in general, it just acts a little dodgy. It could be Unity. I don't know what's wrong with it recently, or maybe it's my system. I'm keen to know if it improves when the new version gets released.
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus & variables suddenly stopped working

Post by Tony Li »

Hi,

Are there any errors or warnings in the Console window? Do the links get deleted in the editor, or are they not working at runtime?

If you'd like to send a reproduction project to tony (at) pixelcrushers.com, I'll be happy to take a look.
manlyghostcake
Posts: 8
Joined: Mon Mar 20, 2017 2:16 pm

Re: SimStatus & variables suddenly stopped working

Post by manlyghostcake »

The links get deleted in the editor. There's no discernable pattern, it just happens.
There are no console warnings regarding the links. Just the one message I mentioned above.
Sim statuses have stopped working, the variables are still usable.

I can send you either the unitypackage file or the finished game file, or both; with the relevant dialogues. Is that alright?
I'm sorry, I've never actually done this.
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus & variables suddenly stopped working

Post by Tony Li »

If you change IDs manually, it would make sense for links to disappear. Links are defined as "from this ID --> to that ID". So it's usually a good idea to leave IDs alone.

If you can identify a conversation whose links are broken now, right-click on the dialogue database and select Export Package.... Then save it as a .unitypackage file, email it to tony (at) pixelcrushers.com, and let me know what version of Unity you're using and which conversations/links are broken.

If you ever want to send an entire project, just zip up the Assets and ProjectSettings folders and email the zipfile. But in this case I think you can just send the dialogue database.
Post Reply