> For the complete documentation index, see [llms.txt](https://bizachi-dev.gitbook.io/bullethell-elemental-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bizachi-dev.gitbook.io/bullethell-elemental-template/user-interface-menus/game-instance.md).

# Game Instance

<figure><img src="/files/28Vpes8IHoOPc8Umj4sp" alt=""><figcaption></figcaption></figure>

### 1. Core Game Data (Scriptables)

| Field                       | Type                  | Purpose                                                           |
| --------------------------- | --------------------- | ----------------------------------------------------------------- |
| **Currency Data**           | `CurrencyData[]`      | Defines every currency (ID, icon, rarity, max amount).            |
| **Character Data**          | `CharacterData[]`     | Stats, visuals, skills, unlock costs for all playable characters. |
| **Icon Items**              | `IconItem[]`          | Player profile icons.                                             |
| **Frame Items**             | `FrameItem[]`         | Avatar frames for profiles and leaderboards.                      |
| **Inventory Items**         | `InventoryItem[]`     | Equippable items that modify character stats.                     |
| **Character Types**         | `CharacterTypeData[]` | Elements / classes with advantage / weakness relationships.       |
| **Map Info Data**           | `MapInfoData[]`       | Metadata for maps (scene name, theme, rewards).                   |
| **Quest Data**              | `QuestItem[]`         | Daily / weekly / story quests: objectives and rewards.            |
| **Coupon Data**             | `CouponItem[]`        | Redeemable promo codes.                                           |
| **Shop Data**               | `ShopItem[]`          | Items & bundles sold in the in‑game shop (IAP or soft currency).  |
| **Battle Pass Data**        | `BattlePassItem[]`    | Tier rewards for the current season.                              |
| **New Player Reward Items** | `RewardItem[]`        | One‑time starter pack for brand‑new accounts.                     |
| **Daily Reward Items**      | `RewardItem[]`        | Login streak rewards.                                             |

***

### 2. PvP Configuration

| Field         | Type            | Notes                                                                                                                                                              |
| ------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Pvp Modes** | `PvpModeData[]` | References to `Arena1x1`, `Arena2x2`, `Arena3x3`, `TdmBattle`, `BattleRoyaleModeData`. Each asset contains time limit, score target, team size, map rotation, etc. |

***

### 3. Authentication Settings

| Setting                       | Description                                                |
| ----------------------------- | ---------------------------------------------------------- |
| **Min / Max Password Length** | Hard limits enforced on account creation.                  |
| **Complexity Flags**          | Booleans for uppercase, lowercase, numbers, special chars. |

#### Name Change Settings

| Setting                | Default | Description                               |
| ---------------------- | ------- | ----------------------------------------- |
| **Ticket Currency ID** | `TKN`   | Currency consumed when changing nickname. |
| **Min / Max Length**   | 3 / 20  | Allowed character count.                  |
| **Tickets Required**   | 1       | Amount of tickets charged per rename.     |
| **Need Ticket?**       | ☑       | Toggle free vs. paid rename.              |

***

### 4. Battle Pass Settings

| Setting                             | Value | Meaning                                         |
| ----------------------------------- | ----- | ----------------------------------------------- |
| **Max Level**                       | 100   | Highest tier obtainable.                        |
| **Base EXP**                        | 1 000 | XP required for tier 1.                         |
| **EXP Increase / Level**            | 0.1   | 10 % additional XP per next tier.               |
| **Season Length (Days)**            | 30    | Season duration.                                |
| **Pass Currency ID**                | `DM`  | Currency used to purchase premium track.        |
| **Pass Price**                      | 1 000 | Cost of premium pass.                           |
| **BattlePass EXP Reward in Battle** | 210   | Extra XP awarded on match victory.              |
| **BattlePass duration in days**     | 60    | Grace period to claim rewards after season end. |

***

### 5. Account Levels

The template supports global account experience separate from character mastery.

| Setting                 | Default      | Description                                                                               |
| ----------------------- | ------------ | ----------------------------------------------------------------------------------------- |
| **Max Level**           | 50           |                                                                                           |
| **Initial / Final Exp** | 100 → 10 000 | Range for the EXP curve.                                                                  |
| **Progression Method**  | Exponential  | Curve used to auto‑fill the `Account EXP Per Level` array (button provided in Inspector). |

***

### 6. Gameplay Defaults

| Setting                          | Purpose                                                 |
| -------------------------------- | ------------------------------------------------------- |
| **Map Name MainMenu**            | Scene shown on first load.                              |
| **Scene to return after Battle** | Where the game returns post‑match (default: `Home`).    |
| **Currency Reward in Battle**    | Soft currency ID granted for completing a match (`GO`). |

***

### 7. Elemental Combat Modifiers

| Variable                      | Default | Description                                       |
| ----------------------------- | ------- | ------------------------------------------------- |
| **Advantage Damage Increase** | 0.4     | +40 % damage when attacker has element advantage. |
| **Weakness Damage Reduction** | 0.4     | −40 % damage when attacker is weak.               |

***

### 8. Character Mastery

| Setting                 | Default                   | Description                                                             |
| ----------------------- | ------------------------- | ----------------------------------------------------------------------- |
| **Max Level**           | 20                        |                                                                         |
| **Initial / Final Exp** | 20 → 1 000                |                                                                         |
| **Progression Method**  | Linear                    | Used for per‑character mastery progression. Auto‑fill button available. |
| **Mastery Levels**      | `CharacterMasteryLevel[]` | Optional array with custom names / icons per tier.                      |

***

### 9. Platform & Prefab References

| Field                    | Description                                                                       |
| ------------------------ | --------------------------------------------------------------------------------- |
| **Controller Reference** | Drag your `CharacterEntity` prefab/script here so `GameplayManager` can spawn it. |
| **Platform Type**        | `PC` or `Mobile` – switches default control scheme.                               |
| **World Type**           | `World 3D` or future `World 2D`.                                                  |
| **Mobile Gameplay UI**   | Prefab for on‑screen joystick / buttons.                                          |
| **Desktop Gameplay UI**  | Prefab with keyboard / mouse hints.                                               |

***

#### Best Practices

* Always add new currencies or items here **before** referencing them in other scriptable objects.
* Keep `GameInstance` on a bootstrap scene object tagged **DontDestroyOnLoad**; destroying it will break cross‑scene references.
* After editing shop or reward data, remember to export JSON again if you use the WebSocket backend.

***

Need additional fields explained? Ping us on Discord: <https://discord.com/invite/EGGj77g3eQ>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://bizachi-dev.gitbook.io/bullethell-elemental-template/user-interface-menus/game-instance.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.
