Background for Fallout 4
Member of the ObjectReference script
intfunctionCalculateEncounterLevel(intaiDifficulty=4)Native

Description

Wiki Description

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

Documentation Comment

Calculate's this references encounter level based on the requested difficulty level
0 - Easy
1 - Medium
2 - Hard
3 - Very Hard
4 - None


Parameters

  1. intaiDifficulty=4

    CK Wiki Description

    The difficulty to adjust the counter level for

    • The following values are acceptable:* 0:Easy
      • 1:Medium
      • 2:Hard
      • 3:Very Hard
      • 4:None (default)

Examples

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

Auto-Generated Example

int myInt__aiDifficulty

int returnedValue = myObjectReference__toCallFunctionOn.CalculateEncounterLevel(myInt__aiDifficulty)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.