Data Encoding
XML & JSON
Section titled “XML & JSON”When storing information in a structured way, it’s extremely common to use formats like XML and JSON. These formats are fairly readable, while still being structured in a way that makes them easy to process by software.
Sims 4 tuning mods use XML, while JSON is just extremely common in general.
<?xml version="1.0" encoding="UTF-8" ?><People> <!-- XML allows comments! --> <!-- Comments are for documentation and don't affect the data. --> <Person socialSecurityNumber="85037826"> <firstName>John</firstName> <lastName>Smith</lastName> <age>45</age> </Person> <Person socialSecurityNumber="79815634"> <firstName>Rachel</firstName> <lastName>Doe</lastName> <age>39</age> </Person></People>[ { "firstName": "John", "lastName": "Smith", "age": 45, "socialSecurityNumber": 85037826 }, { "firstName": "Rachel", "lastName": "Doe", "age": 39, "socialSecurityNumber": 79815634 }]These formats are fairly self explanatory, but there are also countless resources available for learning all the details. I’d recommend the w3schools.com tutorials for XML and JSON.
Data Types
Section titled “Data Types”You’ll sometimes see data referred to using types. For example, the name John would be type String, and the number age would use type Integer.
While knowing these terms isn’t mandatory for Sims 4 modding, it can be useful, especially when discussing more advanced topics. For a full discussion of data types, you can read the Data Driven article. Otherwise, continue below.