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.
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.
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.
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.
These allow Clem lines to get specific, as you can filter which players get to use your line based on certain properties. Please note that there should be a Clem line for every situation,
so it's good practice to have a handful of lines without any filters, so that every edge case is covered. You can also use the not:
or !
prefixes to invert your filter. For example, while player:trait(imaginary_friend)
will apply only to players with an imaginary friend,
not:player:trait(imaginary_friend)
will apply to everyone who does not have an imaginary friend. Simple.
These provide a way for the game world to be affected by the Clem line itself. There are many cases where this is useful, for instance if a Clem line for
entertain.bored
described a player doing target practice, they would have to consume ammo, otherwise this doesn't make sense. So you could add to
the end of that line do:consumer:ammo(1)
.
If on the other hand, you write a line that looks something like this:
entertain.bored | NAME1 finds a revolver in an old car. | do:pickup(revolver)
then you are abusing Clem actions. Remember, the world in Fallout Simulator 2 exists physically, with all objects occupying a certain position in space.
Everything that happens should have regard for the current state of the world, and nothing should appear out of thin air. There is continuity in the world.
If this becomes limiting, propose a change or new feature be implemented into the code of the game itself, do not make shoddy workarounds in Clem files. This will
severly restrict the ability to expand the game as time goes on.
While most decisions are made before displaying Clem lines, sometimes the Clem line is used to make decisions. This is rare, but it can happen. An example of this
is attack.generic
, which allows Clem lines to decide which limb to inflict damage upon. Here is an example of this in action:
attack.generic | NAME1 pops a cap off in NAME2 using HIS1 {weapon}. | item:weapon:handgun/item:weapon:rifle | player:arm | return:limb:head
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!
Keyword | Example Output (Male) | (Female) | (Other) |
---|---|---|---|
NAME1 |
Adam | Eve | God |
HE1 |
he | she | they |
HIS1 |
his | her | their |
HIMSELF1 |
himself | herself | themself |
urban |
suburban |
rural |
melee |
handgun |
rifle |
bow |
Limb class | Checks: |
---|---|
arm |
At least one arm |
arms |
Both arms |
leg |
At least one leg |
legs |
Both legs |
head |
Head |
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. |
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 |