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

The place to post your WML questions and answers.

Moderator: Forum Moderators

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 Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

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

Post by WhiteWolf »

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:
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
octalot
General Code Maintainer
Posts: 783
Joined: July 17th, 2010, 7:40 pm
Location: Austria

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

Post by octalot »

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 Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

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

Post by WhiteWolf »

Yeah, that would be another useful case too :)
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

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

Post by Celtic_Minstrel »

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.
Former maintainer of Steelhive.
Post Reply