The format of a Property Description line is:
"token" type num "Name" [optional stuff] "help"
The Token, Name, and Help serve the same purposes as in the Chunk line described above.
Type refers to the type of value stored in this property. Valid values are String, Int, Float, Boolean, and Chunk (a property that stores the names of other ConfigChunks).
Num refers to the number of values that this Property can store. Usually this is 1. A coordinate in 3d space might be stored with 3 float values. A value of -1 in this field means that the property can have a variable number of values (useful for lists of available components, directory search paths, etc.).
There are also two optional fields in a PropertyDesc line, either or both of which can be placed between the Name and Help fields of the line.
Enumerations
Sometimes a given Property will have a small number of possible values. For example, in configuring a C2-like device, we might have a description for a Property called "ActiveWalls":
ActiveWalls String -1 "Active Walls" ""
Since cubes have six sides, that's probably the total number of possible values we have. We can build that information into the Property definition like so:
ActiveWalls String -1 "Active Walls"
vj_enumerations { "front" "back"
"floor" "ceiling" "left"
"right" } ""The advantage of doing this is that the GUI can prevent someone with a list of the valid options for this property.
For int and double Properties, enumerations can match descriptive names with numbers, like so (assuming that our application identifies walls with integers instead of strings):
ActiveWalls Int -1 "Active Walls"
vj_enumerations { "front=1" "back=3"
"floor=2" } ""Note that the entries can be put in any order, and that it is possible for multiple names to refer to the same value.
If you are editing a ChunkDesc file by hand, you can leave off the "=x" part of the enumeration entries. In this case the loader will automatically assign the values 0, 1, 2... (or 0.0, 1.0, 2.0...) to the entries as they are read.
Frankly, you're better off just using the editor.
Value Labels
Consider this Property definition:
Orientation Float 3 "Orientation" ""
It apparently defines an orientation in 3D space, but how? Euler angles? Azimuth, elevation and roll? Looking at this in the VjControl GUI, it would be nice to have individual labels next to each of the values so we know what's what. Value labels let us do that, like so:
Orientation Float 3 "Orientation"
vj_valuelabels { "azimuth"
"elevation" "roll" } ""Now we know that the first value in Orientation represents the azimuth, the second is elevation, etc. The GUI can display the value labels next to the values' fields.