Clem Templating Language Documentation

Clem statements are broken up into three sections: the prompt, the text, and the extras. Here's an example of what a Clem line may look like:
entertain.bored | NAME1 gets bit by a snake <and is <now> poisoned>. <That's what you get.> | not:player:countdown(poison) | do:countdown(poison, traits.poison.die, 10)
Let's break down the components of a Clem line.

The Prompt

This is the action that the game has decided was appropriate to execute. For example, if a player was dehydrated and about to die, but without any water in their inventory, they'll drink from a nearby puddle, river, or pond if available in order to survive. Now that the game has decided to do that, it carrys out the effects that go along with that action, such as lowering the player's thirst. Now it needs the user to know what it's done, and that's where the Clem prompt comes in. In this example, the game would ask for a line with the prompt drink.desperation. Note that the decision on what the player's doing has already been made, the Clem lines are there just to provide different ways to convey this information to the player.

In other words, while Clem lines can be used to effect the game world, they are primarily designed to illustrate changes already made, and should not be abused.

The Text

This is the part that will be displayed to the user. Notice in the example how there are green sections wrapped in <> angle brackets; these are optionals. By default, text within an optional has a 50/50 chance of being displayed. If an optional contains one or more sections as divided by / forward slashes, it will choose exactly one to include in the final output. These should be used as frequently as desired, since they help break up the monotony of having your character repeat actions. If you're nesting your optionals more than 2 levels deep, consider just using multiple lines as to improve the readability of the file.

The proper noun and pronoun formatting has remained unchanged from Fallout Simulator 1, as it works just fine in all reasonable situations.

Variables can also be introduced into the text section of a Clem line using {} curly braces. It should be noted that the code has to be aware of this, and provide the variable to fill in. This is reserved for a few specific applications, such as when a player travels to another location or biome.

The Extras

Every section after the text section is some sort of extra. There can be none of these, and there can be 9999 of these, there is no set length. The contents of these sections can be one of three things, a filter, an action, or a return. We'll briefly go over each of those commands now.

Is that it?

Yes and no. That's all you need to know to start writing for the game, however this page will continue on with a direct list of all currently possible keywords so you're better prepared to do things effeciently. Thanks for reading, I hope you found this to be helpful!


Full Clem Reference Tables

Warning: This doesn't format well on mobile.

Proper Nouns/Pronouns
Keyword Example Output (Male) (Female) (Other)
NAME1 Adam Eve God
HE1 he she they
HIS1 his her their
HIMSELF1 himself herself themself
Biomes
urban
suburban
rural
Weapon Types
melee
handgun
rifle
bow
Limbs
Limb class Checks:
arm At least one arm
arms Both arms
leg At least one leg
legs Both legs
head Head
Filters
Filter (Braces represent parts to be replaced) Passes when:
not: Following filter is false
! Following filter is false
{Filter A} / {Filter B} / {etc} Any one filter passes
biome:{biome} Player is in biome specified.
item:weapon:{weapontype} Chosen item is a weapon of {weapontype}. Only applicable if game passes {item} variable.
weapon:{weapontype} Player has a weapon of {weapontype}.
weapon:loaded:{weapontype} Player has a weapon of {weapontype} and the required ammo.
player:{limb} Player has functioning limb of type {limb}
player:limbless Player has no functioning limbs, excluding the head.
player:trait({name}) Player has trait of {name}. Traits include countdowns.
Actions
Action (Braces represent parts to be replaced) Result
do:consume:ammo({amount: integer}) Consumes ammo type matching {item} provided, otherwise random ammo type. If {amount} is greater than 1, this may crash the game in its current state.
do:trait({name: string}) Adds trait of {name} to player.
do:trait({name: string}):remove Removes trait of {name} to player.
do:countdown({name: string}, {finish_prompt: string}, {days: integer}) Adds countdown of {name} to player. After {days}, it will trigger a Clem line of {prompt}.
do:countdown({name: string}):add(days: integer) Adds {days} to player's countdown of {name}.
do:countdown({name: string}):subtract(days: integer) Subtracs {days} from player's countdown of {name}.
do:countdown({name: string}):remove Removes countdown of {name} from player.
do:player:die Causes the player to die.
do:achievement({achievement}) Grant achievement through whatever game service the real-life user is running the game on. (Steam, Itch, Gamejolt, etc) NYI