Scripts
Syntax:
ScriptHeader :
ScriptNameIDENTIFIER (extendsIDENTIFIER)? ScriptFlags* EOLScriptFlags : IDENTIFIER
Syntax Fallout 4:
ScriptHeader :
ScriptNameNAMESPACED_IDENTIFIER (extendsNAMESPACED_IDENTIFIER)? ScriptFlags* EOLScriptFlags :
BetaOnly|
Const|
DebugOnly|
Native|
IDENTIFIER
Source File
Papyrus source files have the extension .psc and can use any of the valid Encodings and Line Endings. The file name must be the same as the identifier in the Script Header. The Script Header must be the first line in the file that is neither a comment nor an empty line.
; MyScript.psc
ScriptName MyScript
Fallout 4 added Namespaced Identifiers which are identifiers separated by columns (:). Each Identifier of a Namespaced Identifier must be the parent of the next Identifier in the File System.
; Quests/MyQuest/Script1.psc
ScriptName Quests:MyQuest:Script1
Script Flags
The only valid flags that can be applied to a Script in Skyrim are User-defined Flags.
Fallout 4 added the following keywords as flags.
BetaOnlyConstDebugOnlyNative
Documentation
The Script Header can be followed by a Documentation Comment that describes the Script.