Since you want characters to be able to speak on multiple topics, I think a table containing rules to be checked is a good way to go here, probably better than rulebooks per se. It gives you an organisational handle on responses to multiple topics, for one character, in one place.
Consider the case of using a straight up rulebook as both the code and the organisational structure, without a table. The rules in it are run in order. You can cancel the process during the rulebook and mark the result as success or failure (if you care about success or failure in Inform’s terms). This way could work handily if you only had one topic. e.g. You’d create a weather rulebook for Tom. First rule checks if weather is sunny, and if it is, says ‘I love sunny days’, and stops the rulebook. If that rule doesn’t fire, second rule checks if weather is rainy, and if it is, says ‘I hate rain.’ And then… what do you want to have happen if neither applies? You may want a fall-through rule that always fires in last place in your weather rulebook. This is something you need to think about, or program, no matter what way you do this.
But what if the player doesn’t want to talk about weather? Well, you might end up making a rulebook like this for each topic for each character. That’s not impossible, but gets into that organisational ickiness you wanted to avoid.
I’ve created an example that shows my approach. Basically, individual rules are checked in an order determined by their appearance in the table, not by grouping them together in a rulebook. If a rule is checked and its conditions match, we end it with ‘rule succeeds’, which results in the corresponding text from the table being printed. If it doesn’t succeed, the next rule for the topic is checked. This continues until a rule activates and prints something, or we’re out of rules, at which point Wendy says she knows nothing about the topic.
Wendy can also be ‘indifferent’ if she’s tapped out on a topic, but I don’t actually make this happen in the example; the conditions causing the topic choices never change, here, and the rules are never deactivated. But I put it in to show how it could work when conditions do change, or when no relevant conditions apply any more for a topic.
This whole thing is kind of a cheapo version of the conversation system in my WIP. I’ve written it around the kind of table you were using, with the response texts in the table. Though consider that if you put the saying of the response text in the rules themselves, you can also run any printing-out code you want in those rules, too, making the mechanism more powerful for producing variable text. And you can put other game-state-changing code in anyway. For instance, when Wendy comments on the sunny weather in the wendy-sunny rule, you could then throw in a flag changing bit of code as part of that rule to set the weather to rainy, and print a message about a storm arriving.
Summary
"Wendy, world's greatest conversationalist. NOT" by Wade.
Cabin is a room.
Wendy is a woman in cabin.
weather is initially 0. [0 is sunny, 1 is rainy, 2 is neither]
the time of day is 7:30 pm.
When play begins:
say "[italic type]Our story begins at [the time of day]...[roman type][line break]";
table of wendy
topic response test condition
"weather" "I love sunny days." wendy-sunny rule
"weather" "I hate the rate." wendy-rainy rule
"weather" "I'm ambivalent about the rain." wendy-weather ambivalent rule
"food" "It's breakfast time." wendy-breakfast rule
"food" "It's lunch time." wendy-lunch rule
"food" "DINNER TIME!" wendy-dinner rule
"life" "Don't talk to me about life." wendy-life rule
The block asking rule does nothing.
Check asking wendy about something:
if the topic understood is not a topic listed in the table of wendy:
instead say "Wendy says, 'I don't know anything about that.";
Carry out asking wendy about something:
let SPOKE-FLAG be false;
repeat through table of wendy:
if the topic understood matches topic entry:
follow test condition entry;
if rule succeeded:
say "Wendy says, '[response entry]'[line break]";
now SPOKE-FLAG is true;
break;
if SPOKE-FLAG is false:
say "Wendy looks at you indifferently.";
This is the wendy-sunny rule:
if weather is 0:
rule succeeds;
This is the wendy-rainy rule:
if weather is 1:
rule succeeds;
This is the wendy-weather ambivalent rule:
if weather is 2:
rule succeeds;
This is the wendy-breakfast rule:
if time of day is before 10 am:
rule succeeds;
This is the wendy-lunch rule:
if time of day is before 5 pm:
rule succeeds;
This is the wendy-dinner rule:
rule succeeds;
This is the wendy-life rule:
rule succeeds;
Test me with "ask wendy about dogs/ask wendy about weather/ask wendy about tesseracts/ask wendy about food/ask wendy about life".
-Wade