Skip to content

Variables page

The Variables page makes the values your story keeps track of: gold, trust, a mood. Each variable has a type, an owner and a default value. The idea is in Variables.

  • You need a new value, such as gold for every actor or a year counter for the whole world.
  • You want to see which variables are used, or change what an owner starts with.
  • You want only the personality values that traits move.

Open the Page menu and choose Variables. There are no tabs. The page is one table, and its header row has the title Variables, a count, the strip All and Personality, a search field, a ⋮ menu and New.

Column What it shows
Name The variable’s name.
Type Text, Integer, Float, Bool, Asset, Enum, Actor, Clan, Family or Actor List.
Belongs To Each Actor, Each Relationship, Each Clan, Each Family or World.
Personality The two words at the ends of the bar, such as Craven – Brave.
Default The default value with its limits, such as 50 [0 – 100].
Used By How many places use it. Read only.

Click a column title to sort. Select a row and edit it in the Element Inspector.

Click New. You get NewVariable, an Integer that belongs to Each Actor, with its name field ready to type in. Names take letters and digits only, and two variables cannot share one, whatever the case.

Then set Type and Belongs To in the inspector. An Actor List cannot belong to Each Relationship, so the inspector does not offer that choice, and it works the other way round too: pick the owner first and the types that cannot live there drop out of the list. Changing Belongs To while nodes use the variable asks first in a dialog titled Change Owner: those nodes show an error until you pick the variable again. Changing the type resets the default value, and when nodes or actors depend on the variable, a dialog titled Change Variable Type says what will be lost and asks you first.

The variable’s ID never changes when you edit it.

Description says what the variable means and shows as a tooltip in pickers. In the Multiplayer section, Who Sees It is Everyone, Owner only or Host only.

Under Default Value, type what every owner starts with. A number can also have Limits (Minimum and Maximum) and named Levels. A value is at the highest level it has reached.

One actor or clan can start with its own value. Open it on the People page or in the clan settings: its Starting values section lists every variable of Each Actor (or Each Clan), and dimmed values are the default.

Turn on Show as a personality bar for a number that belongs to Each Actor, then fill Low word and High word. The Personality strip then lists only these.

Press Ctrl+D (Cmd+D on a Mac) to duplicate the selected row, or Delete (or Ctrl+Backspace, Cmd+Backspace on a Mac) to delete it. A row’s right-click menu has Duplicate and Delete… too. The dialog counts the places that use it. The ⋮ menu offers Duplicate Selected and Delete Selected…. To undo, use Edit > Undo.

The Used By column is also in the inspector as Used By, with Go there buttons, or Nothing refers to this variable yet.

You come from Home. The code side is Variables from code. A node that writes a value is Set Variable. Traits that move a personality value are on Traits.

None in the settings list. The All or Personality choice is kept until you close Unity.

A name does not work in a text. A name with ., {, } or | shows a warning, and so does a name that an actor or clan property already uses.

Message What to do
The variable has no name. Type a name.
Another variable is also called “X”. Pick a different name.
The default value is outside the limits; holders start at the nearest limit. Move the default inside the limits.