Skyrim Mod:Mod File Format/SCHR Field
< Mod / Skyrim: Skyrim Mod: File Formats: Mod File Format: FieldsSCHR and related fields represent old scripting code. It is believed that these are all non-functional, but they can occasionally still be found in the game data on records with versions 31 and lower. See Oblivion's SCPT page for more information on how some of these fields work.
Note: much of the information on this page is taken from the Oblivion page and may need updating for Skyrim.
Field LayoutEdit
Like many of the other common complex field types, old script records can include numerous fields, always starting with an SCHR and sometimes including nothing else.
C | SubRecord | Name | Type/Size | Info |
---|---|---|---|---|
+ | SCHR | Unknown | uint32 | Always 0. |
RefCount | uint32 | Number of references used script. This includes 'ref' local variables and direct references (eg: player). This should equal the number of SCRO and SCRV subrecords in the script. | ||
CompiledSize | uint32 | Size of the compiled data (SCDA subrecord)? | ||
VariableCount | uint32 | The last local variable index used in the script. For a new script this value will be 0. For a new script with a single local this will be 1. This index will always increase for a single script and never decrease. For example, if you create a new script, add a local variable, compile, delete the local, and recompile this value will remain at 1. If you add another local variable it will increase to 2. This is likely to prevent external references to a local variable from becoming invalid. | ||
Type | uint32 | Type of script
|
||
- | SCDA | Data | byte[] | Compiled script. |
- | SCTX | Text | string | Script text. |
- | QNAM | Quest | formid | The quest the script belongs to, if appropriate. |
- | SCRO | Object | formid | Object referred to by compiled code (much like CIS* fields in CTDA subrecords). |