IncrementStat - Game

From the Fallout4 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:

  • Animals Killed
  • Armor Improved
  • Assaults
  • Backstabs
  • Bobbleheads Collected
  • Brotherhood of Steel Quests Completed
  • Caps Found
  • Chems Crafted
  • Chems Taken
  • Chests Looted
  • Computers Hacked
  • Corpses Eaten
  • Creatures Killed
  • Critical Strikes
  • Days Passed
  • Dungeons Cleared
  • Food Cooked
  • Food Eaten
  • Fusion Cores Consumed
  • Holdups
  • Hours Slept
  • Hours Waiting
  • Institute Quests Completed
  • Items Pickpocketed
  • Items Scrapped
  • Items Stolen
  • Junk Collected
  • Locations Discovered
  • Locks Picked
  • Main Quests Completed
  • Mines Disarmed
  • Minutemen Quests Completed
  • Misc Objectives Completed
  • Most Caps Carried
  • Murders
  • Mysterious Stranger Visits
  • Objects Built
  • Pants Exploded
  • Paralyzing Punches
  • People Killed
  • Plants Harvested
  • Pockets Picked
  • Quests Completed
  • Rad-X Taken
  • RadAway Taken
  • Railroad Quests Completed
  • Robots Disabled
  • Robots Killed
  • Sandman Kills
  • Side Quests Completed
  • Skill Books Read
  • Sneak Attacks
  • Speech Successes
  • Stimpaks Taken
  • Synths Killed
  • Times Addicted
  • Trespasses
  • Turrets Killed
  • Weapons Disarmed
  • Weapons Improved
  • Workshops Unlocked

See Also[edit | edit source]