Items to track

From Infinite Worlds
Jump to navigation Jump to search


Overview[edit]

This feature is designed to allow you to specify things that the AI should keep careful track of. These could be numbers, bits of text, lists or even complex data structures.

Some examples are how much money the player has, how many hit points they have left, or what items they are carrying.

Name[edit]

The name of a tracked item can be very important in helping the AI understand what it's dealing with, not to mention making it easier to understand as an author or player. A short, descriptive name can help the Storyteller AI know what an item is and how to use it, with little further input by an author (though using the description is still recommended).

Data Type[edit]

The type of data that is being tracked. It can be Text, Number, or XML.

  • Text
    • Used for words, comma-separated lists, etc. For example, "Name of next target" or "Inventory".
  • Number
    • Useful for quantities or scores.
    • Can be used to track complex number structures such as time of day (rotates from 12/24 to 0), but careful instruction is required for the AI to understand.
  • XML
    • Used to track more complex data. For example, the effects of all the spells you know.
    • This is only recommended for more advanced users and requires a basic understanding of XML.

Description[edit]

The description of what the tracked item signifies (e.g. "How many gold coins I have")

This is useful to give the AI context of what it's actually keeping track of.

  • Examples
    • The name of my next assassination target.
    • A list of all the items currently in my possession.
    • A score out of 10 for how tired I currently am.
    • XML data detailing the effects of each of my spells.

Visibility[edit]

Tracked items can be visible to the player, the AI, neither, or both.

Items which are visible to the AI may affect its behaviour.

Items which are invisible to the player may still be seen if the player enables Storyteller Mode.

Update Instructions[edit]

Tells the AI when and how to change the value. For example "Update whenever I gain, earn, spend or lose gold.", or "Decrease by 1 whenever I am injured."

Some more examples:

  • Update whenever I am given a new assassination target.
    • You can specify "add" or "subtract" (or similar) to only append or deduct from a list.
  • Update the list whenever I acquire or lose an item.
  • Change the score to reflect my new level of fatigue whenever I have been in a fight, or whenever I rest.
  • ALWAYS increase this counter by 1 every turn.
  • Decrease by 5 or more when I am hit.
  • Add a new entry whenever I learn a new spell, detailing the spell's effects.

You may choose here to disable automatic updating of this item. This may be desirable if you intend to control it entirely via Trigger events. If you do not disable this, it is possible that the tracked items AI may try to update it even if you leave the update instructions blank.

Currently, items which are invisible to the AI cannot be automatically updated, even though the options are separate.

Initial value at start of game[edit]

The initial value for this item can be set here, or it can be set to depend upon the chosen character. If character dependent, the value is set for each character within the Player Characters Options where it can either be pre-defined on a per-character basis, selected using a combobox of predefined options, or left for the player to set entirely for themselves.

Menu Selection[edit]

Item List Example

It is possible to give the player the option to select a value of tracked item from a list during character creation. To do so the tracked item has to have "Initial value depends on which character the player chooses " option selected. Then in the Player Character Options for each Character there is a checkbox "Players can choose value from a list of options". Selecting it replaces the default text input field with a list of allowed values.

Details[edit]

Tracked items have a 10,000 character output limit. Items can be influenced using Main Instructions, such as describing common data structures between several tracked items, or giving the AI more detailed instructions about conditions of usage, update, or synthesizing several tracked items that all track different kinds of information about a more complicated concept, such as having multiple tracked items for appearance, clothing, personality, and opinions of a character. Further, although the description of an item is the best place to describe what an item is and what it's used for, one can always explicate further, in more detail, and with greater granularity in the wider span of instructions generally.

Items can be referenced directly using the replacement text syntax by encapsulating the fully lower-case name of the item, with spaces replaced by underscores (_), in double angle brackets, <<item_name>>. This will replace that segment of text with the content of the item, so an item Character Name storing the text John Smith could be called like so:

[...] <<character_name>> [...]

Which would result in:

[...] John Smith [...]

See Also[edit]

  • Variable Names

Using SecretInfo Instead of Tracked Items[edit]

Because of the way tracked items work, they have certain limitations. If you want to do more advanced things with them, one approach is to simulate tracked items yourself using secretInfo. The main AI can be told that a variable or tracked item exists, and how to update it; in order for it to keep track of it, you then tell it to write it to secretInfo. Since secretInfo is passed back to the AI each turn, it will be able to see the previous value and update appropriately. Being explicit about both the variables and the format they should be written to secretInfo in seems to help ensure reliability.

If you also need the functionality of tracked items, for example because you want to trigger Trigger events off them, you can create an actual tracked item and simply tell it to update each turn to be the value of the relevant variable recorded in secretInfo.