Editable Stored Actions by Ron Newcomb

Version 10

This extension extends section 12.20 of Writing With Inform. The individual parts of a stored action -- actor, noun, second noun, action name -- can be changed directly. Also exposes new parts: request, text, participle, preposition, number, and each kind of value.

This extension allows us to directly change the parts of a stored action.

The standing orders are a stored action that varies.
The soldier on point is a person that varies.
Guarding it from is an action applying to one room and one direction.

change the action name part of the standing orders to the guarding it from action;
change the actor part of the standing orders to the soldier on point;
change the noun part of the standing orders to the battlefield;
change the second noun part of the standing orders to north;

This extension also exposes a few new parts of a stored action. The request and numerical parts can be changed in the same way as the earlier four. The rest can only be read.

request part of S
text part of S
preposition part of S
participle part of S
number part of S
second number part of S

The request part is an either/or property that differentiates between "Bob jumping" and "asking Bob to try jumping". (The latter rule, if executed, would first consult the persuasion rules. It is not referring to either of the asking actions in the Standard Rules "asking it for" nor "asking it about".)

The text part is only of interest to actions which apply to a topic. The text part stores the player's entire command, not just the topic part. If the action name part of a stored action is changed, this obviously invalidates the text part.

The preposition part returns the preposition used between the two nouns, for those actions that apply to two nouns. For example, the "telling it about" action has "about" as its preposition. Similarly, the participle part would be "telling". These two parts may be used on just the action name (such as "the giving it to action") in addition to a stored action.

The number and second number part are for actions that apply to a number or kind of value. Actions can only apply to a single number or kind of value, never two, but if an action also applies to an object, the number part may be first or second. We can test if a noun or second noun is an object by the phrases.

if the noun part of (a stored action) is an object,
if the second noun part of (a stored action) is an object,

For the phrases that return the participle, preposition, or whether or not a noun is an object, we may also use an action name instead of a stored action. This is because the returned information is constant, not depending upon a particular instance. For example:

say "[the preposition of the asking it for action]";

unless the second noun part of the dialing it for action is an object:
     say "[the second number part of the current action]";

A final, small feature: we may ask if a stored action involves a particular action name (i.e., if it involves a particular verb). There are easier, more direct ways to do this, except if the action name is in a variable.

let the possibility be a random action name;
if the best idea yet involves the possibility:
     say "And suddenly, a hope; a connection. [The best idea yet] may fall within your realm of possibilities.";

The phrasebook of the index lists these phrases succinctly.


A
 Example The Ultimate Puzzle Solution

A kind of value's not-so-kind example


B
 Example Editable Stored Actions

Allowing our player a CHANGE command similar to the author's