# Game Data

## Reality Game Data

`Reality Game Data` is the central configuration asset for your game mode.

It defines:

* Game settings
* UI widgets
* Teams and team definitions
* Game phases
* Gameplay events
* Features and attributes
* Preloaded assets

> This asset is required by the GameMode and drives most of the game configuration.

***

## Overview

| Feature         | Description                                  |
| --------------- | -------------------------------------------- |
| Game Settings   | Defines the settings used by the GameMode    |
| UI              | Defines widgets used in the game             |
| Teams           | Defines team classes and overrides           |
| Phases          | Defines the game phase flow                  |
| Gameplay Events | Defines execution logic for events           |
| Features        | Default gameplay features enabled            |
| Requirements    | Conditions required for the game             |
| Loading         | Assets preloaded at game start               |
| Attributes      | Attribute configuration for gameplay systems |

***

## Core Settings

### Properties

| Name               | Type   | Description                                                  |
| ------------------ | ------ | ------------------------------------------------------------ |
| Game Settings Data | Object | GameMode settings preset (must match GameMode configuration) |
| Game Widget Class  | Class  | UI widget used in the game session (tablet/menu)             |
| Wrist Widget Class | Class  | UI widget attached to the player wrist                       |

***

## Requirements System

Requirements define conditions that must be satisfied for the game to run.

### Properties

| Name               | Type  | Description                |
| ------------------ | ----- | -------------------------- |
| Requirement Groups | Array | List of requirement groups |

***

### Behavior

| Rule           | Description                                      |
| -------------- | ------------------------------------------------ |
| Between Groups | AND logic (all groups must pass)                 |
| Inside Group   | Can be AND or OR depending on group mode         |
| OR Mode        | First valid requirement is used (priority order) |

***

## Teams Configuration

### Properties

| Name                      | Type  | Description                                       |
| ------------------------- | ----- | ------------------------------------------------- |
| Team Class                | Class | Team instance class used during gameplay          |
| Team Definitions Override | Map   | Overrides default team definitions per team index |

***

## Phases

### Properties

| Name   | Type  | Description                                  |
| ------ | ----- | -------------------------------------------- |
| Phases | Array | List of game phases executed during gameplay |

***

### Functions

| Name       | Type | Description                           | Outputs |
| ---------- | ---- | ------------------------------------- | ------- |
| Has Phases | Pure | Returns true if phases are configured | Boolean |

***

## Features

### Properties

| Name                 | Type  | Description                                                           |
| -------------------- | ----- | --------------------------------------------------------------------- |
| Default Game Feature | Array | Default features enabled at game start (cannot be removed at runtime) |

***

## Gameplay Event System

This system allows defining logic for gameplay events without code.

### Player Events

| Name         | Type      | Description                                                                  |
| ------------ | --------- | ---------------------------------------------------------------------------- |
| Player Event | Container | Defines execution logic for player-related events (join, spawn, death, etc.) |

***

### GameMode Events

| Name           | Type      | Description                                                                      |
| -------------- | --------- | -------------------------------------------------------------------------------- |
| GameMode Event | Container | Defines execution logic for GameMode events (team creation, score updates, etc.) |

***

### Custom Events

| Name         | Type      | Description                                            |
| ------------ | --------- | ------------------------------------------------------ |
| Custom Event | Container | Defines execution logic for custom user-defined events |

***

## Loading

### Properties

| Name            | Type  | Description                                          |
| --------------- | ----- | ---------------------------------------------------- |
| Pre Load Assets | Array | Assets loaded automatically when the GameMode starts |

***

## Attributes

### Properties

| Name             | Type   | Description                              |
| ---------------- | ------ | ---------------------------------------- |
| Attribute Config | Struct | Defines which attribute sets are enabled |

***

## Map Requirements

### Functions

| Name                | Type | Description                    | Inputs            | Outputs     |
| ------------------- | ---- | ------------------------------ | ----------------- | ----------- |
| Has Map Requirement | Pure | Checks if a requirement exists | Requirement Class | Boolean     |
| Get Map Requirement | Pure | Returns a requirement instance | Requirement Class | Requirement |

***

## Debug

### Functions

| Name     | Type     | Description                                   |
| -------- | -------- | --------------------------------------------- |
| Simulate | Callable | Runs a simulation for debugging (editor only) |

### Properties

| Name  | Type    | Description            |
| ----- | ------- | ---------------------- |
| Debug | Boolean | Enables debug behavior |

***

## Usage Flow

| Step | Description                        |
| ---- | ---------------------------------- |
| 1    | Create a Game Data asset           |
| 2    | Configure Game Settings            |
| 3    | Define Teams and Team Definitions  |
| 4    | Add Phases                         |
| 5    | Configure Gameplay Events          |
| 6    | Assign UI widgets                  |
| 7    | Add preload assets if needed       |
| 8    | Assign this asset to your GameMode |

***

## Typical Use Cases

| Use Case                                  | Recommended Setup                       |
| ----------------------------------------- | --------------------------------------- |
| Create a team-based game                  | Configure Team Class + Team Definitions |
| Create phase-based gameplay               | Define Phases array                     |
| Add UI to players                         | Set Game Widget + Wrist Widget          |
| Handle gameplay logic without Blueprint   | Use Gameplay Event containers           |
| Load assets before game starts            | Add assets to Pre Load Assets           |
| Enable attributes (health, stamina, etc.) | Configure Attribute Config              |

***

## Notes

| Topic               | Note                                                  |
| ------------------- | ----------------------------------------------------- |
| Core Asset          | This is one of the most important assets in your game |
| GameMode Dependency | Must match the GameMode settings class                |
| Team System         | Defines how teams are created and configured          |
| Event System        | Allows logic without modifying GameMode               |
| Modular Design      | Works with features, phases, and requirements         |

***

## Related Pages

| Page                  | Description                           |
| --------------------- | ------------------------------------- |
| Reality GameMode      | Uses this asset to configure gameplay |
| Reality GameMode Base | Core gameplay systems                 |
| Reality Team          | Runtime team instances                |
| Reality Game Phase    | Phase-based gameplay system           |
| Reality Game Feature  | Modular gameplay features             |


---

# 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/game-data.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.
