Data Types
Data Types
Section titled “Data Types”Computers store information in a standard way using data types. For example, EA releases .tdesc XML files that define tuning structure using data types:

Here we can see references to the types bool, Pack, ResourceKey and str.
Primitive Data Types
Section titled “Primitive Data Types”Primitive data types store single pieces of information, are used as the building blocks for all other data types.
| Type | Data | Examples |
|---|---|---|
Integer (int), Short, Long | Whole Numbers | 0, 54, -123 |
Float, Double | Fractions | 12, 3.14159, -2.5 |
Boolean (bool) | True/False | True, False |
String (str) | Text | Hello, World! |
Because numbers are infinite, they have multiple data types for different max ranges.
Data Structures
Section titled “Data Structures”Data Structures store multiple pieces of information together, either primitive data types or other data structures.
Array / List
Section titled “Array / List”A list of items that can be referenced by a numbered index, typically starting at 0.
fruits = ["apple", "orange", "pair"]
fruits[0] is "apple"Map / Dictionary / Object
Section titled “Map / Dictionary / Object”Maps a key to a value.
Person1 = { first_name = "John" last_name = "Smith" age = 45}
Person1["first_name"] is "John"As a practical example, here’s the object structure for a Sims 4 Resource Key:
Resource_Key { type: Int group: Int instance: Long}Enums are a special primitive data type that stores a list of possible options.
A good example is Sims 4 Ages such as Teen and Adult. You could store them as strings, or you could store them as numbers. Both methods have pros and cons.
Enums are essentially both. Here’s the actual Ages enum definition from Sims 4:
enum Ages{ BABY = 1, TODDLER = 2, CHILD = 4, TEEN = 8, YOUNG_ADULT = 16, ADULT = 32, ELDER = 64, INFANT = 128,}
// Example Usage:current_age = Ages.ADULTThus, enums act like predefined labels, but are stored as numbers internally. In XML tuning, enums are written using their label, but in SimData are written using their number.