Databrain Documentation
databrain.ccDiscord
  • Welcome
  • Installation / Update
  • Interface
  • DataObject Property Drawer
    • No GUI Implemented - FIX
  • Getting started
  • Guides
    • Add data objects
    • Add data objects at runtime
    • Get initial data
    • Get/Set runtime data
    • Serialize DataObjects
    • Runtime Save & Load
    • Use custom serializer
    • Import
    • Search
    • Custom GUI
    • Custom GUI with Odin Inspector
    • Hierarchy Template
  • Separate DataObjects
  • Using Version Control
  • Attributes
    • DataObject attributes
    • Field attributes
  • API
    • DataLibrary
    • DataObject
  • FAQ
    • Databrain - FAQ
  • Add-ons
    • Events
    • Blackboard
    • Logic
      • Interface
      • Create Graph
      • Execute graph
      • Control flow execution in groups
      • Custom Nodes
        • Asynchronous execution
        • Node Attributes
      • Scene Components
      • Graph Events
      • Finite State Machine
        • Create custom Actions
        • Examples
        • State Machine Nodes
    • Stats
      • Achievements
      • Modifiers
      • Values
      • Progressions
      • Components
      • Nodes
    • Progress
      • Progress Settings
      • Progress Graph
      • Progress Resources
      • Runtime UI Setup
      • API
        • ProgressController
    • Techtree (LEGACY)
      • Techtree Manager
      • Techtree
      • TechtreeResource
      • Techtree UIBuilder
        • Custom Techtree Node Button
        • Tooltip
      • API
    • Localization
      • Localization Manager
      • Localization
      • Examples
      • Components
      • Import
      • API
    • Inventory
      • Getting started
      • Demo
      • Data setup
        • Inventories
        • Slot IDs
        • Items
          • Blueprints
          • Item rarities
        • Money
        • Loot tables
        • Events
      • Runtime UI
        • Setup
    • Dialogue
      • Getting Started
        • Demo
      • Dialogue runtime setup
      • Actors
        • Emotions
      • Localization
      • Audio
      • Animation
      • Variables
      • Custom theme
      • Import
      • Nodes
      • API
        • DialogueController
        • IDialogueUIControl
  • Changelog
    • Databrain - Changelog
      • 1.4.0
      • 1.3.2
      • 1.3.1
      • 1.3.0
      • 1.2.0
      • 1.1.0
      • 1.0.10
      • 1.0.9
      • 1.0.8
      • 1.0.7
      • <= 1.0.6
Powered by GitBook
On this page
  1. Add-ons
  2. Stats

Modifiers

PreviousAchievementsNextValues

Last updated 2 years ago

using Databrain.Stats;

public class StatsModifier : DataObject{}

Modifiers can modify a StatsValue depending on the modifier type.

Value

The value of the modifier

Type

The type of the modifier

Type: Flat

Adds the modifier value to the base value: Stats Value: 5

Modifier 1: 5

Modifier 2: 5

-------------

New Stats Value = 15

Type: Percent Add

Adds all modifier values of type PercentAdd before multiplying the base stats value with the sum of it:

Stats Value: 10

Modifier 1: 0.5

Modifier 2: 0.5 --------------- New Stats Value = 20 (Rounded) 10 * (0.5 + 0.5) = 10 -> 10 + 10 = 20

Type: Percent Mult

Multiplies the base value with the modifier value: Stats Value: 10 Modifier1: 0.5 Modifier2: 0.5

---------------

New Value = 23 (Rounded)

10 * 0.5 = 5 -> 5 + 10 = 15 -> 15 * 0.5 = 7.5 -> 7.5 + 15 = 22.5

Stackable

If enabled, multiple modifiers of this type can be added at the same time.

Order

Define in which order modifiers are being added to the stats value

Has Duration

If true, this modifier is active for a certain duration. After that, it gets removed from the stats value automatically.

Duration

The duration a modifier stays active.

Add a modifier

Please read the stat value section to know how to add a modifier to a stat value.

Values