Data types
This page describes common binary data types used by Cities: Skylines, and most modern day computer applications, internally.
Properties[edit | edit source]
Endianness[edit | edit source]
All data stored in computers are stored in single, small unit of data called a "byte". Larger units of data are split into multiple bytes. The order in which sequential bytes are assembled together to form a larger unit of data is referred to as it's "endianess". All data saved locally by Cities:Skylines is stored in "little"-endian format. For more information about endianness, please see the Wikipedia entry.
Signedness[edit | edit source]
Another property of data types is it's signedness. Please see the wikipedia entry. Data types without a u- prefix are signed, and those marked with a u- prefixed are unsigned. The type of signedness is generally abstracted away though native API methods.
Numeric Data Types[edit | edit source]
uint16[edit | edit source]
2 byte long unsigned integer type. Also referred to as a "short".
uint32[edit | edit source]
4 byte long unsigned integer type. Also referred to as a "int". The most common in Cities: Skylines.
uint64[edit | edit source]
8 byte long unsigned integer type. Also referred to as a "long".
Other Data Types[edit | edit source]
pstr[edit | edit source]
Strings in Cities: Skylines are stored Pascal-style – they're a variable length data type with two fields: an integer field describing how many bytes long the string data is, and then the string data itself. This differs from c style strings. In Cities: Skylines, similar to many other modern day software applications, use a variable length 7BitEncodedInt to designate the string length.
7BitEncodedInt[edit | edit source]
A 7BitEncodedInt is a variable length integer which consists of one to a maximum of five bytes. Only 7 bits are used to store the value in each bit, the most significant bit is set when another byte follows and unset when this byte is the last byte of the variable length integer.