Game Creator
  • Welcome to Game Creator!
  • Quickstart
    • Get Started
    • Setup
    • Tutorials
  • Game Creator
    • Game Creator
      • Actions
      • Conditions
      • Triggers
      • Hotspots
      • Characters
        • Player
        • Markers
        • Gestures
        • States
        • Advanced
          • IK in custom Animations
      • Camera
        • Camera Motors
      • Variables
        • Global Variables
        • Local Variables
        • List Variables
    • Systems
      • Localization
      • Event System
      • Timeline
      • UI
      • Module Manager
      • Game Creator Toolbar
      • Pool System
      • Game Creator API
        • Custom Actions
        • Custom Conditions
        • Custom Triggers
        • Custom Hooks
        • Custom Save & Load
        • Variables Access
        • Custom Module
  • Dialogue
    • Dialogue
      • Anatomy
      • Actors
      • Dialogue UI
      • API
  • Inventory
    • Inventory
      • Inventory Window
        • Catalogue
        • Recipes
        • Types
        • Settings
      • Merchants
      • Containers
      • Loot Tables
      • Equip Items
      • Actions
      • Conditions
      • Custom Inventory UI
  • Quests
    • Quests
      • Quests Overview
      • Create Quests
      • Quests UI
        • Custom UI
  • Stats
    • Stats
      • Stats Overview
        • Stat
        • Attributes
        • Status Effects
        • Formulas
        • Stat Modifiers
      • Stats UI
      • Common Use Cases
        • Simple Health Bar
        • Regenerative Mana
        • Poison Status Effect
        • Levels and XP
        • Strength and Armor
        • Lockpicking
  • Behavior
    • Behavior
      • Behavior Graph
        • Nodes
        • Blackboard
      • Perception
  • Shooter
    • Shooter
      • Weapons
      • Ammunition
      • Interaction
      • Examples
        • Example 1 - Get Started
        • Example 2 - Pick Weapons
        • Example 3 - Top Down
        • Example 4 - Side Scroll
        • Example 5 - First Person
        • Example 6 - Combat
      • Advanced
        • Custom Crosshairs
        • Shooter API
  • Melee
    • Melee
      • Weapons
        • Blade Component
      • Shields
      • Melee Clips
      • Combat
  • Traversal
    • Traversal
      • Obstacles
      • Climbables
      • Built-in Elements
  • Annex
    • Roadmap
    • FAQ
Powered by GitBook
On this page
  • In Preferences Window
  • In Stats Component
  • Stats in Runtime
  • Actions
  • Conditions

Was this helpful?

  1. Stats
  2. Stats
  3. Stats Overview

Stat

Strength, Wisdom, Agility and... Luck!

PreviousStats OverviewNextAttributes

Last updated 6 years ago

Was this helpful?

A Stat is a numeric value that represents a particular characteristic of a character or object. For example, how strong a character is or what is his maximum amount of health.

Stats are defined in the Preferences Window and then used in the Stats component on any Game Object.

In Preferences Window

You define the name, icon, color and different visual properties of a Stat. You also define the default value it will have (base value) and the Formula that will calculate its final value.

In Stats Component

The Stats component is a container for all Stats and Attributes a character or object has, plus any Status Effects and Stat Modifiers.

You can modify the default values and/or Formula assets in the Stats component

Stats in Runtime

The Stats module has a set of Actions, Conditions and Triggers that allow you to retrieve the value of a Stat. Its value is the result of applying an fixed number of steps:

Let's take for example, the player wants to hit tree. In order to calculate the damage the tree takes, we need to calculate the player's strength stat:

  • (A) The default value of the stat strength and the formula are retrieved from the Preferences Window.

  • (B) The Stats component might have overwritten the default value and/or the Formula object for that particular Stat. If so, those are the values that will be used. The Formula expression is then evaluated with the value as input.

  • (C) The result of evaluating the Formula is then given as the input of the rest of Stat Modifiers (which might be from Status Effects or because the character is wearing a certain weapon), which will increase/decrease the value accordingly.

  • (D) The result is the final value of the strength stat.

There's a clear distinction between the base value of a Stat and its final result

Actions

There are some Actions that let you interact and query stats values and states.

  • Change Stat: Allows you to change the base value of a stat. The value can come from a variable of be a constant value

  • Sync Stat to Variable: Assigns the current value of a Stat to a specific global or local variable.

  • Debug Stat: Prints the value of a Stat in the console

Conditions

Same as Actions, Conditions with stats allow to use the Stats features outside of the module, such as in the Inventory, Dialogue modules or even your own custom systems

  • Stat Value: Returns the final value of a Stat and compares it to another constant or variable number.

These concepts are better off explained with examples. We've gathered a bunch of where we believe this might be easier to understand.

common case scenarios
(vitality, wisdom, strength, agility and luck are all stats)
(Cycle of calculating the value of a Stat)