Roles
Named powers a game declares, who holds them by default, and how rooms and people hand them out.
A role is a named power a game checks before it lets someone do
something, such as host (start matches and set the teams) or referee.
Each role has a default holder:
| Default | Who holds it |
|---|---|
| Everyone | every player |
| Owner | the room owner |
| Nobody | no one, until the game, the room or a person gives it |
Who holds a role is decided in this order:
Room code, such as "admins are hosts".
A person in the room, in the Room management modal.
The game itself, while it runs.
The default.
Rooms have roles of their own too, such as Admin. Room roles are powers over the room (kick, ban, options); games never see them.
The Menu and HUD use roles directly: a control can require one, and players without it see the control disabled. Rules can test them with {player} has {role}.
In the Studio, roles live on the Roles page.
In code, a game declares them with game.role(...); see
Roles and moderation for how rooms decide.