SimStatus check with Dialog[thisID] throws an error

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
_marc
Posts: 69
Joined: Mon Nov 05, 2018 5:44 am

SimStatus check with Dialog[thisID] throws an error

Post by _marc »

Hi Tony,

I'm struggling on an error related to SimStatus. I've tried everything, I can't find where the problem is :(
I'm using simstatus checks everywhere in the game, but in THIS specific case, it logs an error and the dialogue entry is skipped:
error.png
error.png (97.23 KiB) Viewed 788 times
My dialogue setup looks like this:
database.png
database.png (59.21 KiB) Viewed 788 times
Nothing special, only a simstatus check in the condition field of the 3rd response choice.

Lua throws an error when running this code:

Code: Select all

return Dialog[thisID].SimStatus ~= Variable["SimStatus.WasDisplayed"]
The "Variable["SimStatus.WasDisplayed"]" is a string variable with value "WasDisplayed".
But as you can see in the error message, the problem is in fact that lua can't find the Dialog[thisID] element. The ID variable has been set to "12" previously, though, as you can in see in the logs.
During this conversation, if I run the code manually in the lua console:

Code: Select all

return Conversation[54].Dialog[12].SimStatus ~= "WasDisplayed"
-> works fine, lua finds the element

Code: Select all

return Dialog[12].SimStatus ~= "WasDisplayed"
-> error

Can you see a situation where the "shortcut" dialog[id] could points to the wrong conversation ID? I've tried to find the piece of code handling this, but I can't find where it is :/

I hope you'll find what's wrong here (you always do, don't you?) ;)

Marc
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus check with Dialog[thisID] throws an error

Post by Tony Li »

Hi Marc,

What DS version are you using? If it's not 2.2.44.1, can you back up your project, update to the current version, and then test it again?

Are there any cross-conversation links that lead to this dialogue entry?

Double check that Variable["SimStatus.WasDisplayed"] is still valid.

As another test, if you change the Conditions to:

Code: Select all

Dialog[12].SimStatus ~= "WasDisplayed"
does it still throw an error?
_marc
Posts: 69
Joined: Mon Nov 05, 2018 5:44 am

Re: SimStatus check with Dialog[thisID] throws an error

Post by _marc »

Hi Tony,

Thanks for the advice!
I've found where the problem came from: the option "allow barks during conversations" was true. So, when my main conversation (ID 54) starts, the lua variable Dialog is correctly set to 54. But when another character tries to Bark during the conversation, the Dialog value is set to the ID of the bark conversation (ID 55, in this case). That's why in my main conversation, when I have the Dialog[thisID].SimStatus check, the Dialogue System is looking for a node in the Bark Conversation, and it doesn't find it.

So it looks that it's a bad idea to combine "allow barks during conversations" and SimStatus checks with Dialog[ID].
I don't know if this is expected. As far as I'm concerned, I don't need barks during conversations, so I have just to untick the option. I let you see if there is something to do or not :) Maybe just a warning in the documentation?

Have a nice weekend,

Marc

P.S: the access to the download of the articy:draft localization importer seems to be private in the extras, is it normal?
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus check with Dialog[thisID] throws an error

Post by Tony Li »

Good point -- I'll add a warning to the documentation.

I fixed the warning about the articy localization importer. The download link specified http://. I just needed to update it to https://
_marc
Posts: 69
Joined: Mon Nov 05, 2018 5:44 am

Re: SimStatus check with Dialog[thisID] throws an error

Post by _marc »

Thank you! I can see that the download link for the localization plugin starts by https:// but I'm still redirected on a "no access" page :?
_marc
Posts: 69
Joined: Mon Nov 05, 2018 5:44 am

Re: SimStatus check with Dialog[thisID] throws an error

Post by _marc »

Second link works fine! (I still have no access with the first one).
I was trying to get it on that page: https://www.pixelcrushers.com/dialogue- ... em-extras/

Thank you!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus check with Dialog[thisID] throws an error

Post by Tony Li »

Thanks for letting me know. That helped me figure out the issue. The Wordpress download manager had marked the download button as "members only" for some reason, so the link that goes through Wordpress wasn't working. It should be fixed now.
_marc
Posts: 69
Joined: Mon Nov 05, 2018 5:44 am

Re: SimStatus check with Dialog[thisID] throws an error

Post by _marc »

Yep, it works well now!
Thank you for the articy localization plugin update, I've tested it out, perfect! :)
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: SimStatus check with Dialog[thisID] throws an error

Post by Tony Li »

Great! Thanks for letting me know about the broken download link.
Post Reply