UDN
Search public documentation:

MOBAKitStats
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Unreal Development Kit Gems > MOBA Starter Kit > Stats

MOBA Starter Kit - Stats


Last tested against UDK May, 2012

Overview


Most MOBA games feature a "lite" RPG system which allows heroes to level up as they gain experience from killing enemy creeps, heroes and towers.

UDKMOBAStatsModifier


This object is created and assigned to all heroes and some other Actors. This object handles the storing of the stat data and also the calculations. It was designed this way so that it would be a flexible system and could be used by many classes. It was also designed to be an extendable system, as it allows you to create new stat types and specific ways that they should be calculated.

Functions

  • AddStatChange() - Creates and adds a stat change for a given stat, optionally with an expiry time.
  • AddToBuffs() - Adds a given buff to the list, so it gets bundled into all of the other calculations.
  • CalculateStat() - Calculate all the changes that affect a stat and returns the result.
  • CalculateMultipliedChanges() - Find multiplicative changes, and multiplies them together.
  • CalculateChangesDiminishingly() - Find changes, and multiply them together in a diminishing fashion (multiplying them as percentages). For example, this makes 0.5f multiplied by 0.5f become 0.75f.
  • FindSmallestChange() - Find changes of the given stat, and return the smallest only (used for some non-stacking stats like slows). Only really makes sense for additive and multiplicative changes.
  • FindLargestChange() - Find changes of the given stat, and return the largest only (used for some non-stacking stats like evasion). Only really makes sense for additive and multiplicative changes.
  • CalculateAbsoluteChanges() - Find absolute changes, and add them together.
  • CalculateAssignedChanges() - Find assigned (locked) changes, and apply them.
  • CalculatePreLockCaps() - Apply any caps to the range of a stat before locks (assignments) - caps stats within a sensible range.
  • CalculateFinalCaps() - Apply any caps to the range of a stat after locks (assignments) - stops stats from being invalid values.
  • RemoveExpired() - Remove old expired buffs from the buffs list.
  • ResetForDeath() - Remove all buffs that don't carry across on death from the buffs list.