The Language resource type in Need for Speed Hot Pursuit and Most Wanted is similar to its predecessor in Burnout Paradise. Each string is assigned an ID and pointed to in a table. However, the IDs are now unique IDs rather than JAMCRC hashes of an identifying string, and although strings remain null-terminated they now have associated capacity values as well.
Whereas Paradise used standard UTF-8, NFS uses a custom wide-character encoding most similar to, and compatible with, UCS-2 (a fixed-width 16-bit encoding format related to UTF-16). Criterion uses the private use area, with characters in the E0XX and E1XX ranges being used for custom symbols such as the one for Speed Points. The F0XX range is used for inline styles.
Note: Hot Pursuit uses the AK namespace rather than Game.
Structures
Game::LanguageResource
32-bit
Offset
Length
Type
Name
Description
Comments
0x0
0x4
uint32_t
meLanguageID
Language ID
See ELanguage. Unlike Paradise, this matches the bundle name.
Inline styles (characters in the F0XX range) are used to apply bold, italic, colors, or sizes to a section of a string. In practice, they are used similarly to how HTML tags are, with start and end characters. A list of styles can be found below.
Char code
Description
F000
Starts a bold section of text.
F001
Ends a bold section of text.
F002
Starts an italic section of text.
F003
Ends an italic section of text.
F004
Starts a section of text at XXS size.
F005
Ends a section of text at XXS size.
F006
Starts a section of text at XS size.
F007
Ends a section of text at XS size.
F008
Starts a section of text at S size.
F009
Ends a section of text at S size.
F00A
Starts a section of text at M size.
F00B
Ends a section of text at M size.
F00C
Starts a section of text at L size.
F00D
Ends a section of text at L size.
F00E
Starts a section of text at XL size.
F00F
Ends a section of text at XL size.
F010
Starts a section of text at XXL size.
F011
Ends a section of text at XXL size.
F012
Sets a section of text to use color index 0x3F. In practice, this is used to end colored sections and is likely a "no color" value.
F013:F091
Sets a section of text to use color index color_code + 0xFED. Due to integer overflow, effectively results in color_code - 0xF013.
Hmmm...
To do: Find out what these color indices are pulling from.