russo-2025 / papyrus-compiler

An open-source implementation of Papyrus scripting language compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler

Open source compiler for the Papyrus scripting language used in Skyrim Special Edition.

Prerequisites

Building

v -o "bin\papyrus.exe" -prod -gc none compiler.v

Testing

v -stats test modules

Usage

papyrus <command> [arguments]

Commands:

compile        compile papyrus files

read           converts pex file into a readable format and outputs it to console

disassembly     converts pex file into a readable format and writes result to file

create-dump    ...

Сompile command arguments:

-i, -input      folder with files(*.psc) to compile

-o, -output     folder for compiled files(*.pex)

-h, -headers-dir  folder with header files

-nocache        compile all files, regardless of the modification date

-original       compile using a vanilla compiler

-silent         disable output of messages and errors to console

-silent         disable output of messages and errors to console

-verbose        ...TODO

-stats          ...TODO

Examples:

papyrus compile -nocache -i "D:\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts\Source" -o "../test-files/compiled/skyrimSources"
papyrus compile -nocache -i "../test-files/compiler" -o "../test-files/compiled"
papyrus compile -i "../../RH-workspace/scripts" -o ""../../RH-workspace/compiled""
papyrus read "../test-files/compiled/ABCD.pex"
papyrus create-dump "../folder_with_pex_files"

Links

About

An open-source implementation of Papyrus scripting language compiler


Languages

Language:V 94.4%Language:Papyrus 5.5%Language:Batchfile 0.1%