IncrementStat - Game

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Game Script

Modifies the specified misc stat by the given amount.

Syntax[edit | edit source]

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

Parameters[edit | edit source]

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

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; 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[edit | edit source]

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[edit | edit source]