Hide a value from other players
Goal: a variable such as a gold count or a secret plot score is known to its owner, or only to the host, and not to the other players.
This matters only in a multiplayer game with the Multiplayer add-on. In a single-player game every value is known and nothing changes.
- Open the Variables page and select the variable.
- Set Who Sees It:
| Choice | Who sees the value |
|---|---|
| Everyone (the default) | Every player. |
| Owner only | The player whose actor holds the value. For a relationship value, the player of the actor who holds it. For a clan or family value, the players whose actors are in it. Nobody sees a World value marked so. |
| Host only | Nobody but the host. Use it for game logic. |
- Mark each variable the same way you would a secret: one by one. There is no switch for all.
You will see: on a player’s machine that may not see the value, the host never sends it. The value reads as its default. Variable.IsKnown is false there. In texts it counts as missing: {target.Gold} prints nothing, and {if target.Gold} is false.
The enum is VariableVisibility in VariableType.cs with the members Everyone, OwnerOnly and HostOnly. The Studio writes it for you.
What hidden does not cover
Section titled “What hidden does not cover”- The database is on every machine. Start values and graphs you wrote are not hidden, only values that appear while the game runs.
- A scheme’s own values have no Who Sees It row. They count as Everyone in texts.
- What your scheme shows a player through a dialogue or an announcement prints as you wrote it, for the player you show it to. You decide who reads a text by whom you show it to.
- The effects of a hidden scheme are public. If a hidden plot changes a public variable, everyone sees that change. Hide such a variable too.
- A requirement that reads a hidden value is summed up for a player as one line, “A condition you cannot see is not met.”, and only when no visible requirement already fails
The scheme itself is hidden from the target unless the scheme’s The Target Knows is on. See Who sees what.
What can go wrong
Section titled “What can go wrong”- A value shows as zero or empty to a player: that is the rule working. The player’s machine reads the default.
- A value that was known stops reading its last value only once the host’s “not known” record arrives, for example after an actor leaves a clan.
- A player claims any character: with the seat rule
AnyFreea player can take any character and read its private values. See Seats.
More: Variables and Multiplayer security.