ZionGames Docs

Home / Zion Modules / Zion Stats

๐Ÿงฉ Zion Stats

Health, Stamina, Mana & XP Module for ZionTPS

Zion Stats โ€” HUD Setup

Zion Stats supports both UI Toolkit and uGUI HUDs. The generated HUD can display Health, Stamina, optional Mana and optional XP according to the selected preset.

UI Toolkit HUD

The UI Toolkit option creates a UIDocument and connects it to StatsHudBinderUIToolkit.

  • ZionStatsHUD.uxml
  • ZionStatsHUD.uss
  • ZionStatsPanelSettings.asset
  • UIDocument
  • StatsHudBinderUIToolkit

uGUI HUD

The uGUI option creates a Canvas-based HUD with Image fill bars and connects it to StatsHudBinder. It is useful for projects that already use uGUI or do not want to depend on UI Toolkit assets.

Preset-Aware HUDs

Health and Stamina are available in every preset. Mana and XP appear when they are enabled by the selected preset. The HUD binders listen for stat-change events and update the matching bar and value label automatically.

Replacing Existing HUDs

Enable Replace existing Zion Stats HUD to remove a previous generated HUD before creating a replacement. This prevents duplicate HUD roots in the active scene.

Optional Play Mode Test Controls

When StatsHudHealthTester is attached, it shows an on-screen guide and provides the following default controls:

  • H โ€” Damage player
  • J โ€” Heal player
  • K โ€” Drain Stamina
  • L โ€” Restore Stamina
  • U โ€” Spend Mana
  • I โ€” Restore Mana
  • X โ€” Gain XP
  • Z โ€” Reset XP

The keys and amounts can be changed in the helper component Inspector. Mana and XP controls are relevant only when the selected preset includes those stats.