Typed-in 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
Flametrooper
Posts: 984
Joined: February 21st, 2006, 11:02 pm
Location: 0x466C616D65

Typed-in options?

Post by Flametrooper »

You know how in option dialog boxes you usually have to pick one out of some number of options? Like it HttT after BoP, you get a dialog box asking you to pick either "walk there" or "sail there". What I'm wondering is, if instead of having a "pick an option" thing a box comes up saying "enter an option" and the user has to type something in. This would be best for passcode-type things, so as to avoid lots of messy option wml: The user could just type the passcode in.
hey.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

That would be cool.


If it is done, another useful feature would be a way to compare a string against a list of strings to see which it is closer to - kind of like spellcheck. And/or, something like you would see in the old, text-based RPGs. You type in something, and it scans it for keywords like "move", "go", etc. That might be too hard to code, though.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
kshinji
Posts: 649
Joined: December 21st, 2005, 7:24 pm
Location: Gdansk, Poland

Post by kshinji »

Impossible - either to hard or to stupid. Better wait for good open source lingu-bots, and simply use them in wesnoth.
User:Kshinji
Probably there's no point for me posting here, but i'll raise my PC to 1337 before leaving again ;P -- just kidding.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

I'd say that the user's input should just be stored in a WML variable. Then one can check in WML whether it equals to something, is greater or smaller to something (when dealing with numbers), and so on. Wouldn't be hard to implement I suspect, and would work well enough for password-type situations.
kshinji
Posts: 649
Joined: December 21st, 2005, 7:24 pm
Location: Gdansk, Poland

Post by kshinji »

@turin:

It might work if you first tell player what options can he use.
User:Kshinji
Probably there's no point for me posting here, but i'll raise my PC to 1337 before leaving again ;P -- just kidding.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Numeric input would work well with this.
Hope springs eternal.
Wesnoth acronym guide.
Flametrooper
Posts: 984
Joined: February 21st, 2006, 11:02 pm
Location: 0x466C616D65

Post by Flametrooper »

scott wrote:Numeric input would work well with this.
Well yeah, I was planning to have a scenario in my campaign where the player has to correctly enter a 3-digit passcode to open a gate.
kjinshi wrote:Impossible - either to hard or to stupid.
Thanks. You're really nice and open-minded, you know that, you should get a medal. :roll:
hey.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Flametrooper wrote:I was planning to have a scenario in my campaign where the player has to correctly enter a 3-digit passcode to open a gate.
uh, I don't see what the point of that is... either the player knows the passcode or he doesn't; otherwise it is just guessing/save/loading. And the WML could determine whether he knew the passcode already anyway... :?
Flametrooper
Posts: 984
Joined: February 21st, 2006, 11:02 pm
Location: 0x466C616D65

Post by Flametrooper »

Passcode would be given to the player via riddles, which he must figure out, and is randomly generated. And anyway, that's beside the point.
hey.
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

Something like this would be nice:

Code: Select all

[set_variable]
name=code
input=_"What code it is?"
[/set_variable]
(Based on Flametroopers code entering example)

In other languages similar commands exist too.
First read, then think. Read again, think again. And then post!
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

Flametrooper wrote:Passcode would be given to the player via riddles, which he must figure out, and is randomly generated.
:!: Depending on the kind of riddle, it may be very difficult to translate them to another language. Especially if the point of riddle is that some word in English has two different meanings, or something like that...
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Well, yes, puns are stupid in general. But other puzzles (for example, mathematical ones) could be done effectively, perhaps.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Post Reply