Constants¶
-
ConvertSaveToItempropConstant
(const)¶ Parameters: - const (int) – SAVING_THROW_*
-
ConvertSaveVsToItempropConstant
(const)¶ Parameters: - const (int) – SAVING_THROW_VS_*
-
ConvertImmunityToIPConstant
(const)¶ Parameters: - const (int) – IMMUNITY_TYPE_*
-
GetConstantTable
()¶ Return type: The global constant table.
-
RegisterConstants
(tda, column_label[, extract[, value_label[, value_type]]])¶ Register constant loader.
Parameters: - tda (string) – 2da name (without .2da)
- column_label (string) – Label of the 2da column that contains constant names.
- extract (string) – A lua
string.match
pattern for extracting a constant name. - value_label (string) – Label of the 2da column that contains the constants value. If not passed constant value will be the 2da row number.
- value_type (string) – Constant type. Only used when
value_label
is passed. Legal values: “int”, “string”, “float”
-
RegisterConstant
(name, value)¶ Register constant in global constant table.
Parameters: - name (string) – Constant’s name.
- value – Consants’s value. Can be any Lua object.