User:Scrivener07/Strings

From the Fallout4 CreationKit Wiki
< User:Scrivener07
Revision as of 22:05, 15 February 2019 by imported>Qazaaq (Created page with "In practice, Papyrus strings are ''case-insensitive'' due to the way the game engine's string pool operates for efficiency reasons. Most strings in the engine come from th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In practice, Papyrus strings are case-insensitive due to the way the game engine's string pool operates for efficiency reasons. Most strings in the engine come from this same case-insensitive string pool, with a few exceptions. The pool works by caching a unique occurrence of a string whenever one is encountered by the game engine for the first time. The pool will reuse the cached version of a string for any following occurrences. This means the distinction between uppercase and lowercase may not exist.

For example, the strings "MyString" and "mYsTrInG" are technically equivalent. Which string is used depends on which version of the string is encountered by the game engine first. The game's load order has an influence on this, among other things. Following the example, if "mYsTrInG" is cached first then any following occurrence of "mystring" will always be "mYsTrInG".

This is potentially a problem for some Game Systems which require a case-sensitive string.

Notes

  • The game engine internally uses a data structure called BSFixedString for handling string data.
  • UI function calls to Scaleform are affected by this string casing limitation.
  • Initialization File related function calls are affected by this string casing limitation.