Upgrade

Key Features

  • Manages Progression: Tracks current active progressions (supports Turn-Base updates)

  • UI Handling: Reusable component for managing UI and state of the control action.

  • Visuals: Support showing progress bar over an entity/unit or action button itself.

  • Upgrade Entity: Allows upgrading of a single entity.

  • Progression Research: Allows upgrading multiple entities for player through research.


Structure

  • Upgrade Module - Easy access to starting or cancelling upgrade on specific entity.

    • InPlace - Default replacement strategy which updates entity/unit data and its components. If visuals are different, they are changed internally based on setup.

    • Replacement - Alternative replacement strategy which destroys and creates new entities instead. Experimental β€” tasks are currently not restarted.

  • Upgrade Capability: Defines capability of an entity to upgrade, supports 1-N options allowing entities to branch out with their upgrades (e.g. villager β†’ militia β†’ villager or swordsman).

  • Upgrading Entity: Component for managing current upgrading options of an entity and its upgrade progress.

  • Upgrade Visuals: Provides component for simple setup in Editor for switching between visuals based on completed upgrade (UpgradeEntityVisuals).

  • Upgrade Entity Action: Write something here? UpgradeEntityVisuals

  • Upgrade Events: Global events for tracking upgrading processes: start, cancelled, completed, entity replaced and entity upgraded.


Usage Examples

Upgrade Entity - with progress

When you would like to start upgrading entity to a specific option. This snippet is taken from the Upgrade Entity Action used by Upgrade Entity. UI Handler.

Upgrade Entity - Instantly

Or upgrade entity instantly instead.

Upgrade multiple entities - Instantly

Upgrade entities globally for the player. If no such entities exist, nothing happens.

Last updated