Fallout 4

File information

Last updated

Original upload

Created by

Orvid

Uploaded by

Orvid

Virus scan

Safe to use

About this mod

A compiler for the Papyrus scripting language

Permissions and credits
Changelogs
The missing piece of the modder's toolbox. A Papyrus compiler. This was written because I'm not a patient enough person to wait for the Creation Kit to be released, and is my New Year's gift to the Fallout 4 modding community.

This compiles Papyrus Script files (*.psc) to Pex files (*.pex).

As of v0.1.3, there are various extensions to the Papyrus language supported by Caprica. Switch, For, ForEach, Break, and Continue statements are just some of the new types of statements that Caprica supports. For full details on the extensions and the syntax of them, see the appropriate section of the readme on github (https://github.com/Orvid/Caprica#language-extensions).

In order to use any of the existing files, you must first have a Papyrus script file for it. Disassembled op-codes is not enough. As of v0.0.6, you no longer have to have the files you reference decompiled to Papyrus script, they can stay in their original .pex format.

As of v0.0.4, you can now disassemble a .pex file into a .pas file by simply passing it to the compiler. You can then also compile that .pas file back to .pex by passing the .pas file to the compiler.

This compiler is also far faster than the CK compiler, as this is able to compile all 7.8k scripts for Fallout 4 in just over 5 when parallel compilation is enabled. If you were to try that with the Papyrus Compiler included in the Creation Kit for Skyrim, you'd be waiting almost 30 minutes for it to finish.

Please note that this is early development and there are likely bugs in it, and many things that can be improved. Currently it is able to compile every script in Fallout 4, as decompiled by Champollion, with some modifications in a couple of places where Champollion decompiled it wrong, but that doesn't mean the compiled versions will actually work.

While you can report bugs here, it's preferred to report them on the github repo: https://github.com/Orvid/Caprica

For inspecting and modifying stock scripts, I recommend Champollion (http://www.nexusmods.com/fallout4/mods/3742/), however you should be aware that it doesn't always produce correct results. In particular it may occasionally leave variables named "::temp" in the output, or else fail miserably at producing output that makes sense. It will also output large float values in e+ notation, which is not valid in Papyrus, although, as of v0.0.2, Caprica does support this notation with language extensions enabled (as they are by default).

Please note that you will need the VC2015 64-bit runtime in order to run the compiler. This is not included in the download.

This supports most of the options that the Creation Kit compiler does, except for a few that have no use with the way Caprica is written. Dragging and dropping a Papyrus script file onto the compiler will also compile it.

This does support what I have speculated the syntax for the new features of Papyrus will look like, including structs, property groups, consts, and the is expression, however this syntax is not final, and will likely be adjusted once the Creation Kit compiler is released and the actual syntax is known.

If you have additional questions, or want to help with the development of Caprica, feel free to drop by the #niftools channel on Freenode, with either your own IRC client, or the web interface (http://niftools.org/chat.html).