QuakeForge's property lists are based on those used in OpenStep.
QuakeForge uses property lists for a wide variety of purposes. This includes saved game data, directory configuration and play-lists.
A property list is a text file that describes a single value. However, that value can be one of the following types:
Dictionary and Array values allow for arbitrarily complex data to be represented by a property list.
In addition, property lists also support comments, both single-line and multi-line. Single-line comments start with //
and continue to the end of the line. Multi-line comments begin with /
*
and end with *
/
, and may span multiple lines, or be contained entirely within a single line, possibly with non-comment text following the comment.
A dictionary is a list of values, each associated with a key. The order of key/value pairs in a dictionary is not preserved.
A dictionary may be empty or have any number of key = value
pairs separated by ;. The final
; before the closing
}
is optional.
The key must be a string, but the value may be of any type, including dictionary or array.
An array is an ordered list of values. The order of the values in an array is preserved.
An array may be empty or have any number of values. Each value may be of any type, including dictionary or array.
QuakeForge's property lists support three types of strings: unquoted, quoted and "long".
An unquoted string may contain most printable characters. This includes the digits 0
to 9
, the letters a
to z
and A
to Z
, and the symbols !
, #
, $
, %
, &
, *
, +
, -
, .,
/
, :,
?,
@
, |,
~
, _
and ^
.
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^
Quoted strings may contain whitespace, C escape sequences, and any printable character. The quote character is "
.
Long strings use triple quotes ("""
) instead of "
as the quote character. This allows the use of unquoted "
characters in the string. And yes, these long strings were inspired by Python's long strings.
Binary data is hex-encoded and contained within angle brackets (<
>
). There must be an even number of hex-digits. That is, while <FF00>
is value, <F00>
is not.