Skip to main content
 Warning: Unmaintained Version
Version: 0.5.1
Difficulty: Normal

Facts

Facts are essentially variables. They store information that can be modified by other entries. All facts are numbers and are treated as such.

The Basic Adapter encompasses numerous facts available for use. However, it's important to note that adapters have the capability to further augment the array of available facts.

Why Use Facts?

Facts play a crucial role in dynamic content creation and system behavior customization. Here are some reasons to consider using facts:

  • Dynamic Quests: Track player progress in quests by using facts to store and modify completion status.

  • Customization: Personalize player experiences by utilizing facts to adjust in-game parameters, such as difficulty levels or character attributes.

  • Interactive Storytelling: Enhance narrative elements by employing facts to remember player choices and actions, shaping the evolving story.

  • Achievement Systems: Implement achievement tracking by using facts to record specific milestones and accomplishments.

Types of facts

Facts have two types: readable and writable.

  • Readable Facts: Used in the criteria of an entry. For example, checking if a player has a certain item in their inventory.
  • Writable Facts: Used in modifiers to modify the fact's value. For instance, updating a player's quest progression.
 info

Some facts are both readable and writable. For example, the permanent fact can be used in both criteria and modifiers. But some facts are only readable. For example, the inventory item count fact can only be used in criteria.

Groups

In a fact you can select a group. There are 3 types of groups:

  • Global: Sets a fact for all players.
  • World: Sets a fact for all players in a specific world.
  • Player: Sets a fact for a specific player.

Fields

In some entries, there are fields that influence the way facts are handled.

Criteria and modifiers fields

Criteria

Criteria is the condition for an entry, e.g., if fact = 10 then.... It controls whether an entry will occur.

Criteria field

When using criteria, follow these steps:

  1. Select the fact to check.
  2. Choose the operator.
  3. Insert the value for the operator to check.

Modifiers

Modifiers, as the name suggests, modify a fact.

Modifier field

When using modifiers, follow these steps:

  1. Select the fact to modify.
  2. Select the operator. You can change the value directly (=) or add to it (+).
  3. Insert the value for the operator to modify.
 warning

Modifiers only run when the entry is executed. If the entry has criteria and one of the criteria is false, then the entry won't be executed, and the fact won't be modified.

Tutorial

To get you started with facts, we will use a permanent fact to track progression in a quest.

  1. Create a new page and select it as static. Give it the name Playerprogress
  2. Click on the + icon and select Add Permanent Fact. Rename it to Playerprogress and give it a nice comment.
    Static page button
  3. Select the player group.
  4. On the sequence page, click on an action.
    • Set a Criteria: Check if Playerprogress == 0.
    • Set a Modifier: If criteria are met, update Playerprogress to 1.
  5. Create additional actions to represent different quest stages, modifying Playerprogress accordingly.

Examples

There are many possibilities with the fact's system. Here are some examples:

Objective: A player talks to an NPC and needs to gather items.

Fact Used:

Scenario:

  1. The player talks to the NPC.
  2. Check the criteria using the Inventory Item Count Fact to verify if the player has the required items.
 tip

To see all the available facts, check out the Adapters section.