TL;DR: Unable to do text comparisons with the topic understood of an action because of the type conflict between text and snippets.
While skills are often used implicitly, as in the attacking example from my last thread, a proper skill system should allow the player to use them explicitly, so there needs to be a “use skill” verb, which is apparently very difficult. The basic system:
[code]The school is a room.
A person has a number called the Strength. The strength of a person is usually 3.
A person has a number called the Agility. The agility of a person is usually 4.
A person has a number called the Perception. The perception of a person is usually 5.
A person has a number called the Stamina. The stamina of a person is usually 2.
Table of Skill Difficulties
Skill Ability Difficulty
“Brawl” “Strength” 4
“Dodge” “Agility” 4
“Climb” “Strength” 5
“Spot” “Perception” 6
“Swim” “Stamina” 6
To decide which number is the score of (T - some text) for (P - a person):
if T is “Strength”, decide on the strength of P;
if T is “Agility”, decide on the agility of P;
if T is “Perception”, decide on the perception of P;
if T is “Stamina”, decide on the stamina of P;
decide on 0.
A person has a table name called the skill table. The skill table of a person is usually the Table of Generic Skills.
Table of Generic Skills
Skill Level
“Dodge” 1
“Brawl” 1[/code]
And a skill for using:
Using is an action applying to one topic.
Understand "use [text]" as using.
The trouble begins with the check rules. We want to be able to check if the topic understood is on the skill list at all, if it’s on the player’s skill list specifically, and it would be nice to have arbitrary rules, too, but we can’t do any of those because the topic understood is a snippet, not a text, and can’t be directly compared to texts:
Check using:
if the topic understood is not a skill listed in the table of skill difficulties, say "While I'm sure [the topic understood] is a fascinating field of study, it is not featured in this game." instead;
if the topic understood is not a skill listed in the skill table of the player, say "In your youthful foolishness, you failed to pay attention during [the topic understood] class." instead;
if the topic understood is "Toaster Repair", say "What, are you expecting to find broken toasters everywhere you go?" instead.
The first two check rules can be fixed by changing the Skill columns of the tables to Topic columns:
[code]Table of Skill Difficulties
Topic Ability Difficulty
“Brawl” “Strength” 4
“Dodge” “Agility” 4
“Climb” “Strength” 5
“Spot” “Perception” 6
“Swim” “Stamina” 6
A person has a table name called the skill table. The skill table of a person is usually the Table of Generic Skills.
Table of Generic Skills
Topic Level
“Dodge” 1
“Brawl” 1
Using is an action applying to one topic.
Understand “use [text]” as using.
Check using:
if the topic understood is not a topic listed in the table of skill difficulties, say “While I’m sure [the topic understood] is a fascinating field of study, it is not featured in this game.” instead;
if the topic understood is not a topic listed in the skill table of the player, say “In your youthful foolishness, you failed to pay attention during [the topic understood] class.” instead.[/code]
But we’ve still lost the toaster rule. More importantly, it’s just kicking the problem down the road: since the table columns are now snippets instead of text, now all the other rules that compare text to the skill tables won’t work, such as this:
[code]To decide if (P - a person) has mastered (T - some text):
if there is a skill of T in the skill table of P, decide yes;
decide no.
When play begins:
if the player has mastered “Dodge”, say “Dodging!”;
if the player has mastered “Climb”, say “Climbing!”[/code]
(Changing “a skill of T” to “a topic of T” makes it compile, but it still won’t work.) Solutions?