IncrementStat - Game

From Creation Kit
Jump to: navigation, search

Member of: Game Script

Modifies the specified misc stat by the given amount.

Syntax

Function IncrementStat(string asStatName, int aiModAmount = 1) native global

Parameters

  • asStatName: The name of the MiscStat
  • aiModAmount: How much to alter the stat by
    • Default: 1

Return Value

None.

Examples

; Increment the "Houses Owned" stat by 1
Game.IncrementStat("Houses Owned")


; Increment the "Standing Stones Found" stat by 3
Game.IncrementStat("Standing Stones Found", 3)

Notes

IncrementStat can be used to modify any misc stat that the game tracks. However, its main use is to increment stats that only the designers have knowledge of, i.e. that have no clear representation in the codebase. Those stats are listed below and calls to IncrementStat need to be included in any scripts would alter them:

  • Standing Stones Found
  • Horses Owned
  • Houses Owned
  • Stores Invested In
  • Persuasions
  • Bribes
  • Intimidations
  • Necks Bitten
  • Vampirism Cures
  • Werewolf Transformations
  • Questlines Completed
  • Brawls Won
  • Wings Plucked
  • Nirnroots Found
  • Side Quests Completed

See Also