Hello! I’m working on a heavily simulationist story set in the Belgian resistance to Nazi occupation in WW2. It includes a lot of procedurally generated NPCs who can speak different languages and belong to one faction or another. Some kinds of clothing are identified with factions; for example, a gendarme’s tunic represents the Belgian police. Also, non-civilians can order one another around; because this is an occupied country, this means that German NCOs can order the police to do things.
Currently I have this implemented as follows:
A language is a kind of value. The languages are French, Dutch, German.
Fluency relates various people to various languages. The verb to be fluent in means the fluency relation.
A faction is a kind of value. The factions are ... [spoilers!]
A uniform is a kind of thing. A uniform is usually wearable. A gendarme's tunic is a kind of uniform. A Feldbluse is a kind of uniform.
Representation relates a uniform to a faction. The verb to represent means the representation relation.
Every gendarme's tunic represents Gendarmerie. Every Feldbluse represents Gestapo.
A soldier is a kind of man. The faction of a soldier is usually Gestapo. A soldier has a number called rank. The rank of a soldier is usually 0.
A gendarme is a kind of soldier. The faction of a gendarme is Gendarmerie. Every gendarme is fluent in French and Dutch. Every gendarme wears a gendarme's tunic.
There are 5 soldiers. There are 2 gendarmes.
And this all works fine. (There are higher ranks of soldier, but I’ve left them out for conciseness.) The problem is, how do I express things about the class of soldiers who aren’t gendarmes? The compiler won’t let me say “Every Gestapo soldier is fluent in German.” If I say “Every non-gendarme soldier is fluent in German,” the compiler accepts it, but when I look at RELATIONS in a debug build, this happens:
>relations
Fluency relates various people to various languages:
You >=> French
Every non-gendarme soldier >=> German
The gendarme >=> French
The gendarme >=> Dutch
The gendarme >=> French
The gendarme >=> Dutch
Which doesn’t look right. If instead I set the fluency relation in the “when play begins” rule that initializes various behind-the-scenes NPC properties, like so:
When play begins:
let L be the list of Gestapo soldiers;
repeat with occupier running through L:
now the occupier is fluent in German;
[other occupier-initialization things].
then I get a much more reasonable-looking list:
Fluency relates various people to various languages:
You >=> French
The soldier >=> German
The soldier >=> German
The soldier >=> German
The soldier >=> German
The soldier >=> German
The gendarme >=> French
The gendarme >=> Dutch
The gendarme >=> French
The gendarme >=> Dutch
It compiles if I create 5 Feldbluses and add “now the occupier wears a random Feldbluse;” after bestowing fluency, but the Representation part of the relations table looks very weird:
Representation relates a uniform to a faction:
The Feldbluse >=> <illegal object number 14>
The Feldbluse >=> <illegal object number 14>
The Feldbluse >=> <illegal object number 14>
The Feldbluse >=> <illegal object number 14>
The Feldbluse >=> <illegal object number 14>
The gendarme's tunic >=> <illegal object number 3>
The gendarme's tunic >=> <illegal object number 3>
It’s not clear to me why I can iterate over “the list of Gestapo soldiers”, but not create an assembly that applies to Gestapo soldiers. Is there a way to refer to a difference of kinds, i.e., all soldiers who are not gendarmes, in this context? If assigning random generic uniforms to random generic grunts one by one is the way to do it, then that’s fine, but either way, what’s going on with the faction values being illegal objects?