Nuclide
Software Development Kit for id Technology (BETA)
Constants

Constants macro loader. More...

Detailed Description

Constants macro loader.

Scripters and level designers are able to define parameters through the use of name-based lookups, so they can change them later in one convenient place.

In the game directory, they are defined within scripts/constants.txt. An example file looks like this:

// render modes
RM_NORMAL 0
RM_COLOR 1
RM_TEXTURE 2
RM_GLOW 3
RM_SOLID 4
RM_ADDITIVE 5
RM_FULLBRIGHT 6
RM_ADDFRAC 7
RM_WORLDGLOW 9
RM_DONTRENDER 10

Within EntityDefs files, you will then be able to set a given key to the value of one of the defined constants by prefixing the name with a $ symbol. That would look something like this:

"rendermode" "$RM_ADDITIVE"

The same applies to data read within level files and most routines related to parsing key/value pairs, so it is not limited to usage within EntityDef.

Classes

class  ncConstantManager