Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Question about Parsing with Mr./Mrs.

A topic by Quizlock created Dec 21, 2020 Views: 121 Replies: 6
Viewing posts 1 to 5
Submitted

I've got a room with a person named Mr. Maple. I have a command if the player tries to TALK TO MR. MAPLE. The command works if the player types TALK TO MR MAPLE or TALK TO MAPLE, but not if they use the period: TALK TO MR. MAPLE. I can't figure out how to allow the possibility of the player typing MR. in the input ? Any one else ever run into this problem?

Submitted

Mr is a contaction, not an abbreviation, so it shouldn't have a period at the end. Ditto for Ms, Mrs, Dr and Pr (for Professor). When Adventuron sees the period, it thinks it's the end of the sentence. In case you didn't realise it, you can type multiple sentences on one line. So, Adventuron sees this as TALK TO MR, followed by MAPLE. It acts on the first sentence, then tells you that 'The game does not require use of the word "maple".', as maple is not a verb that it recognises. The solution is to correct your English and not use "Mr." in your text so that you don't give players a false impression of what the game expects. Other than that, I can't think of a simple solution.

Submitted

Thanks, I was thinking that I should just get rid of the Mr. in text so they wouldn't type it.

Host

Adventuron can also do a search and replace for the user entered words.

vocabulary {
   :experimental_replace text = "mr. jones" with = "jones" ;
}
Host

Adventuron can also do a search and replace for the user entered words.

vocabulary {
   :experimental_replace text = "mr. jones" with = "jones" ;
}
Submitted

Oh thanks, I'm gonna try this out!

Submitted

Ooh, that's nice to know. So you can include punctuation in experimental_replace. Can you include punctuation in experimental_matching_text_sequences as well?