Dunno if this has been done better, but we’re making a simple extension to restrict the actions of the player and other people in the setting.
Skills by Sunroses begins here.
A person has a list of action names called skills.
The all-skills-list is a list of action names that varies.
Definition: an action name is difficult rather than easy if it is listed in the all-skills-list.
Before doing something (this is the can't do something if unskilled at it rule):
Let V be the action name part of the current action;
If V is difficult and V is not listed in the skills of the player:
Say "[We] [don't] know how to do that." instead.
Persuasion rule for asking someone to try doing something (this is the can't persuade an unskilled person rule):
Let V be the action name part of the current action;
If V is difficult and V is not listed in the skills of the person asked:
Say "[The person asked] [don't] know how to do that.";
Persuasion fails;
To restrict (A - an action name), with player knowing how:
Add A to the all-skills-list;
If with player knowing how:
Add A to the skills of the player;
To teach (A - an action name) to (P - a person):
Add A to the skills of P.
Skills ends here.
You can use the restrict
phrase to make an action require a skill to use. For convenience we also added a phrase option to let the player have that skill by default.
Very silly example usage below.
Story code:
The Foyer is a room. James is a person in the foyer.
The ballroom is east of the foyer.
When play begins:
Restrict the going action, with player knowing how.
Persuasion rule for asking someone to try doing something:
Persuasion succeeds.
Results:
Foyer
You can see James here.
>james, go east
James doesn't know how to do that.
>go east
ballroom
>go west
Foyer
You can see James here.
>