Skip to main content

Introduction

Stats support formulas and functions, allowing you to reference other Stats and perform operations.

Referencing Other Stats#

To reference another Stat, you need only supply the Id of the Stat to use and any selectors.

Stat Value
7 + otherStatId
Stat Maximum Value
13 - otherStatId:max
Stat Minimum Value
otherStatId:min / 2
Stat Special Value
otherStatId:special * 1.5

Conditions#

Several options allow you to set a conditional value. You can use the following operators on conditions.

OperatorDescription
=Equal
!=Not Equal
>Greater Than
>=Greater Than or Equal
<Less Than
<=Less Than or Equal
||Or
&&And

Functions#

There are several functions built-in to GDTK: Stats, you can also create your own. Below is a list of the functions available by default.

FunctionDescription
absReturns the Absolute value
ceilReturns the Ceiling of a value
classLevelReturns the level of a Class by Id
cosReturns the Cosine of a value
floorReturns the Floor of a value
hasAttribReturns 1 if a specific Attribute is present
hasClassReturns 1 if a specific Class is present
hasPerkReturns 1 if a specific Perk is present
isRaceReturns 1 if the player is a specific Race
logReturns the Logarithm of a value
maxReturns the higher of 2 values
minReturns the lower of 2 values
rndReturns a random float between 2 values
rnd_fReturns a random float between 2 values
rnd_iReturns a random integer between 2 values
rollSimulates rolling X dice each of Y sides
sinReturns the Sine of a value
tanReturns the Tangent of a value