-
Notifications
You must be signed in to change notification settings - Fork 24
Known Pitfalls
Set of issues caused by Skyrim architecture you had to deal with, know about..
Skyrim strings are case-insensitive. Skyrim VM reuses (interns) equal strings. Thus a string "Agility" imported from JContainers may turn into "agility" or even "agIlitY" if VM already contains "agility" or "agIlitY" string. Thant's why all string comparison in JContainers is case insensitive.
The only encoding supported by JContainers is UTF-8 and ofc. ASCII as it's subset of UTF-8. The only encoding supported by Papyrus is ASCII. Be careful when processing a string containing any special western, asian characters, as default String
processing script assumes it works with ASCII strings, where single byte represents single character, which is ONLY the case for ASCII encoded string. You'd better use some UTF-8 string processing library.
There are static and dynamic forms in Skyrim. The first ones are persistent (any Creation Kit entry, like Quest, unique NPC and etc. is static, persistent form) and the last ones can be deleted any time. Skyrim reuses dynamic form identifiers. So, one day 0xffabcde0 may point to dynamically spawned bear in some cave and later it will point to a guard in the city.
JContainers stores form identifiers, not the forms.