I just discovered something rather unexpected.
[code]Include Epistemology by Eric Eve
A scene can be surprising.
The Spanish Inquisition is a surprising scene. “‘No one expects the Spanish Inquisition!’” The Spanish Inquisition begins when the turn count is 2.
Last when a surprising scene begins:
Now every unseen visible thing is seen.
Living Room is a room.
The inquisitor is a man.
When The Spanish Inquisition begins:
say “[bracket]Rule ‘When The Spanish Inquisition Begins’ is not mentioned when rules tracing is switched on.[close bracket]”;
Now the inquisitor is in the location.
test me with “rules/z/showme inquisitor/epistat inquisitor”[/code]
First of all, I don’t understand why the “When The Spanish Inquisition begins” rule is not mentioned when rules tracing is switched on. But more importantly, I don’t understand how “when a scene begins” rulebooks are organized. I assumed that they’d all be in one rulebook, but it appears there’s a separate rulebook for each scene that runs after any nonspecific “when a scene begins” rulebooks. Why is that, and how can I make a nonspecific rule that runs AFTER all “when a specific scene begins” rules?
You can type ‘scenes’ to switch on scene monitoring.
I’m guessing that by their nature, scenes are generally (hehe) expected to be specific. If the scene isn’t specific, it could have been set up as recurring.
What I would do in your case is make the common part an action, and drop it in at the start of each scene definition.
[code]To abracadabra:
Now every unseen visible thing is seen.
When The Spanish Inquisition begins:
abracadabra;
Now the inquisitor is in the location.[/code]
Admittedly ‘abracadabra’ isn’t that much shorter than the thing it replaces here, but it’s easier to type and remember.
You can use adjectives on scenes:
A scene can be major or minor. When a major scene begins:
To answer your final question, you can also insert rules into the scene-changing rulebook. However, that rulebook runs multiple times in a row, and doesn’t necessarily say whether it changed anything or not.
Well, that would do exactly the same thing my code does now. What I want is to recognize any new objects that have arrived as a result of the scene change:
When the Spanish Inquisition begins:
Now the inquisitor is in the location;
Now every unseen visible thing is seen.
I must say I’m not a fan of that scene mechanism. They could at least have run all the specific scene changing rules before the general ones, like the rest of the rulebooks are organized. But maybe it would be easier to hook into the “move [something] to [somewhere]” rule:
[code]To move (item - a thing) to (place - an object):
Now item is in place;
If item is visible:
Now item is seen;
Now every unseen visible thing enclosed by item is seen.
When the Spanish Inquisition begins:
Move the inquisitor to the location.[/code]
I’ve got an even better idea.
[code]Appearance-making relates various things to various scenes. The verb to appear in (etc.) implies the appearance-making relation.
The inquisitor appears in The Spanish Inquisition.
When a scene (called the act) begins:
Now everything that appears in the act is in the location;
Now every unseen visible thing in the location is seen.[/code]
By the way, why can’t you create a kind of scene? It would certainly reduce the memory usage of this particular approach.