Data Types

Data types are handled somewhat oddly by the game code written in QuakeC. Since these values matter when entering numbers or text onto key|values in a map editor, I am providing this for reference and to help avoid typical pitfalls. Please note that the Readme Data type is how the variable is intended to be used and now how it is actually handled by the code. Most of these can have floating point values assigned to them, but the behavior is undefined and is not recommended.

Readme Data TypeQuakeC TypeInitial ValueRange/ValuesNotes
booleanfloat00,1Only 0 is false, any other value, including negatives is true and treated as a value of 1 in QuakeC
trileanfloat0-1,0,1This is not technically a data type as far as the QC is concerned. Merely an integer used like a 3 value variable as an aid to the mapper to force certain conditions by using -1.
integerfloat0-8388608 to 8388608Whole numbers used for countable quantities or for bitmasks. Assigning a fractional value is possible, but would mess up the bits on a bit mask and might provide a wrong count, such as for trigger_counter which could break map progression.
floatfloat0-8388608.0 to 8388608.0Numbers capable of having fractional portions after the decimal separator. Technically should be able to go higher in maximum value using exponents, but QuakeC isn't exposed to the exponent portion of floats.
stringstring""abc...123...etc.These characters require backslashes before them: \n for newline, \' for single quote, \b for "bold" orange text.

Backlinks