# Teams System

## Reality Team Index

`Reality Team Index` is the stable numeric identifier used to represent a team slot.

Instead of relying on team asset references, many gameplay systems use this index to identify teams consistently.

This makes it possible to:

* map custom team definitions to a known slot,
* keep spawn routing stable,
* support team-based systems without depending on asset identity.

> Use `Reality Team Index` whenever you need to identify a team in gameplay logic.

***

## Overview

| Feature           | Description                                                           |
| ----------------- | --------------------------------------------------------------------- |
| Stable Team ID    | Each team slot has a fixed numeric identity                           |
| Spawn Routing     | Spawn systems can use team slots safely                               |
| Asset-Independent | Team logic does not depend on a specific team asset reference         |
| Broad Usage       | Used by GameMode, Team instances, team definitions, and spawn systems |

***

## Available Values

| Name    | Description      |
| ------- | ---------------- |
| None    | No team assigned |
| Team 1  | Team slot 1      |
| Team 2  | Team slot 2      |
| Team 3  | Team slot 3      |
| Team 4  | Team slot 4      |
| Team 5  | Team slot 5      |
| Team 6  | Team slot 6      |
| Team 7  | Team slot 7      |
| Team 8  | Team slot 8      |
| Team 9  | Team slot 9      |
| Team 10 | Team slot 10     |
| Team 11 | Team slot 11     |
| Team 12 | Team slot 12     |
| Team 13 | Team slot 13     |
| Team 14 | Team slot 14     |
| Team 15 | Team slot 15     |
| Team 16 | Team slot 16     |
| Team 17 | Team slot 17     |
| Team 18 | Team slot 18     |
| Team 19 | Team slot 19     |
| Team 20 | Team slot 20     |
| Team 21 | Team slot 21     |
| Team 22 | Team slot 22     |
| Team 23 | Team slot 23     |
| Team 24 | Team slot 24     |
| Team 25 | Team slot 25     |
| Team 26 | Team slot 26     |
| Team 27 | Team slot 27     |
| Team 28 | Team slot 28     |
| Team 29 | Team slot 29     |
| Team 30 | Team slot 30     |
| Team 31 | Team slot 31     |
| Team 32 | Team slot 32     |

***

## Usage

### Typical Use Cases

| Use Case                   | Example                                               |
| -------------------------- | ----------------------------------------------------- |
| Assign a player to a team  | Set a player to Team 1 or Team 2                      |
| Get a team instance        | Request the team object linked to a team index        |
| Configure team definitions | Associate a Team Definition with Team 1, Team 2, etc. |
| Route team spawn points    | Spawn players based on their team index               |
| Score handling             | Update score for a specific team slot                 |

***

## Validation Rules

| Rule              | Description               |
| ----------------- | ------------------------- |
| None              | Represents no valid team  |
| Team 1 to Team 32 | Valid gameplay team slots |

***

## Best Practices

| Recommendation                          | Description                                       |
| --------------------------------------- | ------------------------------------------------- |
| Use Team Index for gameplay logic       | Prefer team indexes when routing gameplay systems |
| Use None for unassigned state           | Useful for players or objects without a team      |
| Keep team definitions mapped to indexes | Makes team setup predictable                      |
| Use the same indexes across systems     | Helps keep spawns, teams, and scoring aligned     |

***

## Notes

| Topic                     | Note                                                    |
| ------------------------- | ------------------------------------------------------- |
| Stable Identifier         | Team Index is intended to be consistent and predictable |
| Not a Runtime Team Object | This is an identifier, not the team instance itself     |
| Not a Team Definition     | This does not contain team data or visuals              |
| Main Purpose              | Used to connect team-related systems together           |

***

## Related Pages

| Page                    | Description                                   |
| ----------------------- | --------------------------------------------- |
| Reality Team            | Runtime instance associated with a team index |
| Reality Team Definition | Configuration data mapped to a team index     |
| Reality GameMode        | Uses team indexes to create and manage teams  |
| Reality Game Data       | Can override team definitions per team index  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beyond-sandbox.gitbook.io/realitysdk/documentation/gamemode/teams-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
