Skip to content

String Tables

In case you missed it, a String is the data type used for encoding text. Is is typically written surrounded by quotes, such as "Radical".

String tables are how the Sims 4 stores text in a way that allows it to be easily translated into different languages.

A string is stored inside a string table as a key value pair, where the key is a unique ID (int) and the value is the string. The key is typically written as hex.

0xDF9A52E3 = "Radical"

A string table stores strings for a single language. However, when storing string translations inside a string table of a different language, the same key is used. This means string keys are language independent. Their value is automatically translated when selecting which string table to read the value from.

English Table {
0xDF9A52E3 = "Radical"
0xAE3713F9 = "This person is radical."
}
German Table {
0xDF9A52E3 = "Radikale"
0xAE3713F9 = "Diese Person ist radikal."
}
Repeat for all languages...

Now 0xDF9A52E3 can be used to reference a language independent version of “Radical”, and the value can be updated by editing the string tables. That’s radical!

Even if you don’t translate your mod, you should still include string tables for all languages and fill them with untranslated values. If not, text won’t appear at all in game, which is far worse than untranslated text.