Skip to content

The Papyrus Index is a project to provide indexing, useful searching, and documentation for all developer-oriented Papyrus functions, properties, and events—for all Papyrus-using games.

License

Notifications You must be signed in to change notification settings

BellCubeDev/papyrus-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Papyrus Index

Components made with React Built with Next.js Packages managed via pnpm Commit Formatting dictated by gitmoji

The Papyrus Index is a project to provide indexing, useful searching, and documentation for all developer-oriented Papyrus functions, properties, and events—for all Papyrus-using games.

Tip

If you're looking to track development, check out the development branch. The default branch is production.

Site deployed at https://papyrus.bellcube.dev/ from the production branch

Deployed at https://papyrus.bellcube.dev Image depicting GitHub Workflow status

Why Does This Exist?

The Papyrus Index was born largely out of frustration (as many great projects are). Searching for a Papyrus extender that enabled the features you want to use in your script can be… annoying, to say the least. Aside from this project, there's not even a centralized list of Papyrus extenders, let alone a searchable one. Even finding the correct function to use in the vanilla Papyrus language can be a pain, honestly.

How It Works

The Papyrus Index uses a custom-built JS parser for the Papyrus language to extract a ton of relevant information. We store the Papyrus scripts we want to index in data/, and everything is separated out by game. After separating scripts by game, we further divide scripts by their "sources"—where the script came from. This might be the vanilla game, script extender, an xSE plugin, or even a regular mod that intentionally gives developers a way to interact with it. Multiple sources may contain versions of a script—most commonly seen with the vanilla game and the game's script extender.

The extracted information is initially stored in a JSON-compatible data structure. When it comes time to use the data, we typically uses an "indexed" version of the data, which replaces names of things (e.g. the name of a struct) with references to the original data (e.g. the actual struct object). This is significantly easier for a developer to work with, but, crucially, cannot be serialized (no saving to disk, no sending over the network) because of the circular data structure.

The website also fetches documentation from the following sources:

  • The game's CK wiki (or a fallback if the game doesn't have its own CK wiki; e.g. Starfield uses FO4's CK wiki)
    • To parse the CK wiki, your machine must have PHP, Composer, the XML and CURL extensions for PHP installed so it can run Parsoid (the official PHP-based parser for the MediaWiki format—and the only good option out there).
  • TODO: The GitHub Wiki for the mod (if applicable)
  • TODO: The GitHub Wiki for the Papyrus Index

We then use this data to generate the site. The website is a static site built with Next.js.

Setting Up Your Environment

To set up your environment, you need to install the following tools:

  • Node.js (LTS version recommended)
  • pnpm (a speedy package manager for Node.js)
  • PHP 7.x
    • PHP XML extension
    • PHP CURL extension
  • Composer (a dependency manager for PHP)

Once those tools are installed, clone this repository and run the following command in the root of the project:

pnpm install

This will install all the dependencies for the project.

Once that's done, you can run the following command to start the development server:

pnpm run dev

Alternatively, you can run the following command to build the project:

pnpm run build

The built output can be found in the out/ directory. You can run the following command to start a local server to view the built output:

pnpm exec serve out

About

The Papyrus Index is a project to provide indexing, useful searching, and documentation for all developer-oriented Papyrus functions, properties, and events—for all Papyrus-using games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •