To avoid all the difficulty of dialog with a character (called Chris in the example below), my idea is to have the character speak an unfamiliar language. Ideally, typing “Chris, hello,” or “Chris, follow me,” or “Chris, what time is it?” or “Ask Chris about the leaflet,” or “Tell Chris about my political views” will all result in Chris responding with some random text that looks like a foreign language (instead of “There is no reply,” which is what I’m currently getting).
So far, I have accomplished this with:
Instead of asking Chris about something,
Say “Chris says, ‘[one of]Ази у sø. Яеей фшaw pthęq[or]Юoìf ein ябillл, üxîb oo[or]Awжå? Kān ф íllüprœл[then at random].’”
How can I do this with all things the player might say to Chris, or at least with a broader range of things?
“Asking someone about something,” “telling someone about something,” “answering someone that something,” (this is the weird syntax around things like SAY HI TO CHRIS) and “asking someone to try doing something” (this is all forms of CHRIS, TAKE AN ACTION) I think will probably catch like 99% of cases that folks will try.
You might be able to streamline this a bit by defining the behavior, which would help with the randomization (so you wouldn’t get the exact same response twice in a row if you tried to ask Chris something and then tell him something) by defining interacting with characters as a kind of behavior, like so:
Asking someone about something is unintelligible behavior. Answering someone that something is unintelligible behavior. Telling someone about something is unintelligible behavior.
Instead of unintelligible behavior:
Say "[noun] says something unintelligible."
The trouble is that you can’t define asking someone to try doing something as a kind of behavior as far as I’m aware (since action patters and actor-independent) so it only reduces the kludginess so much – perhaps someone with deeper knowledge has better ideas for streamlining!
Hi Ryan, welcome to the forum.
If you compile your game then type ‘Actions’, Inform will then tell you what actions it is attempting when you type in things you want to intercept, such as ‘Chris, Hello’.
This should give you the information you need to write a full set of ‘Instead’ rules to intercept each of these.
The neatest way to intercept would be to divert each of them into the one action you have already written code for, e.g.
Instead of answering Chris that something, try asking Chris about "xyzzy".
Instead of asking Chris to try doing something, try asking Chris about "xyzzy".
The “xyzzy” here is just a random meaningless topic of conversation, to complete the new action we’re diverting into.
Thanks! Those were both very helpful. The “unintelligible” conversation is working as intended now.