Guides/11
Papyrus and Creation Kit tools
Compile Papyrus scripts, check the scripts of a plugin and run the installed Creation Kit tools.
esx has no Papyrus compiler of its own. esx ck compile runs the compiler of your installed Creation Kit.
The commands that read a compiled script (a PEX file) need no Creation Kit.
Check the tools
esx ck doctor
esx ck setup
ck doctor checks the files of the game and the Creation Kit, and starts no program. ck setup prepares the tool state.
On Windows, esx runs the tools directly. On Linux, it runs them through Proton in a prefix that esx owns. That prefix is not the prefix of the game.
esx downloads nothing. When it does not find the game, give the folder:
esx --game-path '/path/to/Fallout 4' ck doctor
Compile
esx ck compile papyrus/MyQuest.psc -I papyrus -o build/Data/Scripts
esx ck compile papyrus --all -o build/Data/Scripts --release --final
--all compiles each source in a folder. -I adds an import folder, and you can repeat it. Your import folders come before the sources of the game.
esx checks each compiled file before it publishes it. --overwrite replaces files that exist. A job stops after 300 seconds, and --timeout SECONDS changes that limit.
The compiler makes a PEX file. It does not attach the script to a record. You do that with the VMAD data of the record, as you edit any other field.
In a project folder, esx build compiles the papyrus/ folder. See Project and build.
Read a compiled script
esx papyrus inspect MyQuest.pex
The report has the objects of the file with their parent, structs, properties and function signatures. esx does not decompile the code.
Check the scripts of a plugin
esx plugin check-scripts MyQuest.esp --fail-on-issues
This command compares the script data of each record with the compiled scripts. It checks the script names, the property names, the property types and the names of the fragment functions.
It reads the compiled script that wins in the loose files and the archives, and it follows parent scripts. Give --archive FILE for scripts in an archive that the load order does not name.
With --fail-on-issues, the exit code is 7 when it finds a problem. The command does not run a script, so it cannot tell if a quest works.
Startup quests
A quest with the flag Start Game Enabled gets a SEQ file: Seq/<Name>.seq has the FormID of
each such quest of the plugin. esx build writes the file. The assets step reads the plugin
and puts Seq/<Name>.seq into the stage, so the file is in the Main archive of the release:
esx build
The report of the assets step has seq with the file and the FormIDs. Do not keep a SEQ
file in an asset folder. The build replaces a file with other bytes and warns with SEQ_REPLACED.
For a release that you pack by hand, plugin seq writes the file:
esx plugin seq MyQuest.esp -o Seq/MyQuest.seq --dry-run
esx plugin seq MyQuest.esp -o Seq/MyQuest.seq
Always give -o. Without it, the file goes into the Seq folder of the game Data folder.
release check compares the file with the plugin in its seq section:
| Code | Severity | Meaning |
|---|---|---|
SEQ_STALE |
Issue | The release has Seq/<Name>.seq, and its bytes are not the quests of the plugin. |
SEQ_MISSING |
Warning | The plugin has a start-game-enabled quest, and the release has no SEQ file. |
SEQ_MISSING is a warning because no game test of esx proves that Fallout 4 needs the file.
The file does no damage, so the build always writes it.
Dialogue links
esx loadorder check-info-links MyQuest.esp
Each dialogue response can name the response before it. This command finds links that form a cycle and links to a response that is missing or deleted. The exit code is 7 when it finds a problem.
Other tools
| Command | Use |
|---|---|
esx ck archive pack, esx ck archive extract |
Run Archive2. esx archive pack does the same work with no Creation Kit. |
esx ck plugin export, esx ck plugin build |
Change a plugin into Spriggit JSON files and back, to keep a plugin in Git. They need Spriggit.Json.Fallout4 0.41.0, which you give with --spriggit. |
esx ck anim-info |
Make animation data with the Creation Kit, to compare it with a behavior build. A behavior build does not need it. |
esx has no command for FaceGen, navmesh, lip files, precombines or previs. Do those tasks in the Creation Kit.