ofp:modeling:tokennamevaluetypes
Differences
This shows you the differences between two versions of the page.
ofp:modeling:tokennamevaluetypes [2007/07/06 02:25] – created tokennamevaluetypes initial page snakeman | ofp:modeling:tokennamevaluetypes [2007/07/09 00:02] (current) – renamed tokennamevaluetypes page snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Token Name Value Types ====== | ||
- | **Token Name values** | ||
- | |||
- | The ofp engine, and specifically, | ||
- | |||
- | < | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | Everything that can be stated in a config.cpp, a description.ext, | ||
- | |||
- | ====== Boolean ====== | ||
- | |||
- | Separately, a **fifth** type exists called boolean. | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | //In fact// the engine only stores and ' | ||
- | |||
- | < | ||
- | # | ||
- | # | ||
- | | ||
- | </ | ||
- | |||
- | A **boolean** as such, //does not exist// in binarised (raP) files. It is an integer. It is //only// a poetic licence for an author when creating text (config.cpp) files. | ||
- | |||
- | ====== Integers ====== | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | integer values are signed values held in four bytes of memory when raPified. | ||
- | |||
- | **Degrees** | ||
- | |||
- | a signed integer between -360 and +360. There is no degrees type. It is simply a poetic licence in well written config.cpp' | ||
- | |||
- | ====== Floats ====== | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | float values are held in four bytes of memory when raPified. Note that this automatically means it is not, in C terms a double. | ||
- | |||
- | ====== Strings ====== | ||
- | |||
- | **__Anything__** enclosed in quotes ( " | ||
- | |||
- | **MathFormula** | ||
- | |||
- | A catch to the unwary is | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | this is **not** binarised into an integer (or a float), but remains 'in string' | ||
- | |||
- | See At the End of the Day for what actually happens to this ' | ||
- | |||
- | ====== Arrays[]={...}; | ||
- | |||
- | Arrays are of unrestricted content in terms of what ' | ||
- | |||
- | Arrays, can be (and often are) embedded within arrays. | ||
- | |||
- | Arrays can have mixtures of type in the same array | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | Quite frequently a specific array will have a fixed number of dimensions. For instance | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | The fact is, the color array as used by the ofp engine, has, 4 values. (all of them floats) | ||
- | |||
- | However consider this | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | the number of elements in this array, happens to be 3, and happens to describe a Medic bmp that can carry three soldiers! | ||
- | |||
- | Other models carry more (or less). | ||
- | |||
- | ====== At the End of the Day ====== | ||
- | |||
- | The engine will always look at its raPified (binarised) data in the context it wants. A config.cpp - generally a text file - will always be processed into an internal config.bin (raPified) before use by the engine. | ||
- | |||
- | Thus, while a value is stated to be a float | ||
- | |||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | it is only the **TokenName** that is of interest to the engine initially. | ||
- | |||
- | Thus | ||
- | |||
- | < | ||
- | | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | **all** represent the floating value **1.0**. | ||
- | |||
- | The engine will massage the token name to relevence. | ||
- | |||
- | In config.cpp, and thus its raPified equivalent config.bin, it is a matter of convenience and an ease in processing load to write the TokenName in the ' | ||
- | |||
- | For examples of this duality see CfgVehicles Config Reference (coming soon snakenote)! |
ofp/modeling/tokennamevaluetypes.1183688728.txt.gz · Last modified: 2007/07/10 09:52 (external edit)