CalculateEncounterLevel - ObjectReference

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.

SyntaxEdit

int Function CalculateEncounterLevel(int aiDifficulty = 4) native

ParametersEdit

  • 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 ValueEdit

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

ExamplesEdit

; 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 AlsoEdit