I have a situation where I want to map a whole bunch of topics to a relatively small set of responses, to minimize the “guess the topic” aspect of a particular NPC interaction. I know this can be done with a condition in a rule like “Instead of asking Alice about " A” or “” or …", but I wanted to make it a little easier to understand the complete set of choices when searching through them.
I thought up the idea of a structure similar to the following:
[code]“Problem” by Otis
Someplace is a room.
Alice is a woman in Someplace.
Instead of asking Alice about a topic listed in the Table of Remapped Subjects (this is the switch player questions to target topics rule):
let changed subject be a topic;
now changed subject is substitution entry;
say “[line break](topic ‘[the topic understood]’ remapped to ‘[substitution entry]’)”;
try asking Alice about changed subject instead.
Table of Remapped Subjects
Topic Substitution (text)
“tigers/lions/leopards/pumas/cheetahs/jaguars” “big cats”
Instead of asking Alice about “cats”, say “‘Oh, I adore all cats.’”
Instead of asking Alice about “big cats”, say “‘Well, maybe not quite so big as that.’”
test me with “actions / ask Alice about cats / ask Alice about Morris”[/code]
While this compiles (in 6G60), it doesn’t quite work, as you can see if you try the test me command. It looks like the “try asking…” statement results in a new question with the same topic as before, but I don’t understand why.
Is there something wrong with the code I’m not seeing? Is there a better way to do this that allows me to keep the remapping table structure?
Thanks in advance.