Is it possible to specify a time-limit for dialogue options?

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
WhiteWolf
Forum Regular
Posts: 370
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Is it possible to specify a time-limit for dialogue options?

Post by WhiteWolf » May 26th, 2018, 12:15 pm

Hello,

I was wondering whether it's possible to add a time-limit to [message][option] tags, so that the player has only a specified time to decide between options, and if it expires, the choice is made randomly.
I'm not absolutely sure whether this idea is that great, and it would certainly come in handy only in some very specific, strongly story-driven campaigns. The only way to see, if it's an exciting addition, or would be rather annoying is to try it... :) Any way to make this possible in WML or Lua? (I know very little about Lua).
Spoiler:
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now published!

User avatar
octalot
Code Contributor
Posts: 202
Joined: July 17th, 2010, 7:40 pm

Re: Is it possible to specify a time-limit for dialogue options?

Post by octalot » May 26th, 2018, 12:51 pm

In co-operative multiplayer, this would be quite useful for flavour-text messages that don't have options. As in, when one player has triggered dialogue that's shown to all players, but the host (not expecting to be playing for the next 3 minutes) is sitting on the loo, and the AI gets stuck waiting for the host to press a button.

User avatar
WhiteWolf
Forum Regular
Posts: 370
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Is it possible to specify a time-limit for dialogue options?

Post by WhiteWolf » May 26th, 2018, 1:47 pm

Yeah, that would be another useful case too :)
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now published!

User avatar
Celtic_Minstrel
Developer
Posts: 1199
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Is it possible to specify a time-limit for dialogue options?

Post by Celtic_Minstrel » May 27th, 2018, 4:42 pm

There's currently no way to do this. There used to be a timeout option in [message] but it stopped working a long time ago (before 1.12, maybe even earlier than that), and I think it only worked for messages with no options. It could be brought back, of course, but that's not going to happen in the near future. Still, feel free to open an issue on the GitHub to remind us. (Unless there already is an issue, I haven't looked.)

GUI2 dialogs do have a timeout option, so it might be possible to do something like this with a Lua custom dialog; however, I suspect the timeout option isn't usable from Lua.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

Post Reply