I don’t understand your question completely, but I may have an answer…
For scenes in the game there’s two ways you can do this. Make different tables for different scenes or you can make a big table with different scenes contained in it for different topics. I haven’t tested this code and I can’t promise it’ll work, but it’ll give you idea for options. I used Complimentary Peanuts as a structure for these.
Way #1
Instead of speech when the noun is Jim:
if scene is breakfast begin;
repeat through Table of Jim’s breakfast commentary:
if the topic understood includes topic entry:
say “[commentary entry][paragraph break]”;
rule succeeds;
say “‘Hmmf,’ says Jim.”;
otherwise;
if scene is dinner begin;
repeat through Table of Jim’s dinner commentary:
if the topic understood includes topic entry:
say “[commentary entry][paragraph break]”;
rule succeeds;
say “‘Hmmf,’ says Jim.”;
end if.
Way #2
[I used text from merlin to put this together, sloppy, but it can work well if you clean it up just a little and reformat it into your quip-based communication. There are slightly better ways of implementing this stuff, but this works.]
Understand “remember [text]” as remembering.
Remembering is an action applying to one topic.
Carry out remembering:
say “Nothing comes to mind.”.
Breakfast is a scene. Breakfast begins when play begins. Dinner is a scene. Breakfast ends when Dinner begins.
Instead of waiting:
now the scene is dinner.
Instead of remembering a topic listed in the Table of Recollections:
if the scene is breakfast begin;
say “[breakfast entry][paragraph break]”;
end if;
if the scene is dinner begin;
say “[dinner entry][paragraph break]”;
end if.
Table of Recollections
Topic Breakfast Dinner
“Orange” “A good idea” “Not particularly fond of those at this time”
“Steak” “Ok with eggs” “Perfect with A1”
“Cherry/cherries” “Too sweet” “Great on cheesecake!”
The Inadequate Shelter is a room.
For specific quips that change based on specific past/current events or conditions, code them individually.
Instead of talking to Jim about cherries:
if the player carries a cherry begin;
say “Jim replies, ‘I am interested in your offer sir!’”;
otherwise;
say “Jim says ‘I really have a craving for those right now.’”;
end if.
I hope this helps.