CalculateEncounterLevel - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

Calculates the reference's encounter level, based on the player's level, the area's level, and the passed-in difficulty.


int Function CalculateEncounterLevel(int aiDifficulty = 4) native


  • aiDifficulty: The difficulty to adjust the counter level for
    • Default: 4 (None)
    • The following values are acceptable:
      • 0: Easy
      • 1: Medium
      • 2: Hard
      • 3: Very Hard
      • 4: None (default)

Return Value

The level of the reference, taking into account the player's level, area's level, and difficulty


; Figure out what level the bandit should be (using his default encounter level)
int calculatedLevel = Bandit.CalculateEncounterLevel()

; Figure out what level the bandit should be if he was 'hard'
int calculatedLevel = Bandit.CalculateEncounterLevel(2)

See Also