Identifier Reference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
<identifier> ::= (<letter> | '_') (<letter> | <digit> | '_')*

An identifier is simply a name in Papyrus that refers to a variable, function, script, or property. A valid identifier consists of a letter or underscore, optionally followed by several other letters, digits, or underscores.

Examples[edit | edit source]

; Valid identifiers
HelloWorld
_IAmCool
_4You
i


; Invalid identifiers
4you
*Star
BFargle%

Namespaces[edit | edit source]

If the identifier refers to a script, it may have namespaces, separated by colons as follows:

<full script name> ::= <identifier> (':' <identifier>)*

The last identifier specifies the name of the script, and the identifiers in front of it are the namespaces. The namespaces are the folders that the script will be found in. For example, if you have a script in "MyCoolStuff\Quests\MyQuest.psc" the name of the script will be "MyCoolStuff:Quests:MyQuest".

Examples[edit | edit source]

MyQuestScript
CivilWar:MainQuestScript
Traps:Triggers:TripWire