papyrus record book

by Pickysaurus·v1.0·Updated 2018-10-03

A pair of scripts that allow you to log events within the script, useful for error checking.

Screenshots 1 screenshots

About this mod Machine translation

A pair of scripts that allow you to log events within the script, useful for error checking.

Here are some scripts I've written that may be useful if you want to log events and errors from your mod scripts. It's based on the system I added to Dragonborn of Legborn and will be used in Dragonborn's Odyssey. It has a debugging system that displays messages based on debugging globally.

what is it?

The archive contains two heavily commented scripts.

PKY_DebugScript - This is the main script, you can send events to this script and it will print messages to your mod's debug log.

PKY_DebugAliasScript - This is a helper script that will wake up the debug log when starting a new game or loading a saved game.

How do I use it?

The scripts are loose so you can use them however you like, but the recommended setup requires a few things:

  • Create a new Quest entry, giving it an editor ID in the line for {YourPrefix} Logger or {YourPrefix} Debugger. Make sure it is set to "Game Enabled". (You will also need to generate a new SEQ file)
  • Add a new alias pointing to the Unique Actor "Player" in the task. Append PKY_DebugAliasScript to the alias.
  • Create a global variable, this will control the debugging level.
  • Attach PKY_DebugScript to your task and fill in the debug global and your mod name in the properties window.

Next, add the following properties to the script you want to be able to log/debug.

PKY_DebugScript property LogFile automatically

Make sure to fill in the above properties in Creation Kit.

Now when you want to write to the log, use one of the following functions:

LogFile.Log("Leave a message here")

LogFile.Log("Warning here", 1)

LogFile.Log("Error here", 2)

The format of the function is Log(Script asMessage, int aiPriority). asMessage is the message to be written, aiPriority defaults to info (0), but can be defined as warning (1) or error (2).

Now, when you log an event, you will find a record of it in My Documents\My Games\Skyrim Special Edition\Logs\Script\User - where the file will have your mod's name defined in step 4 above.

I recommend opening this file with a text editor like Notepad++ for better readability.

Note that if the debug/log global is higher than the log priority, the message will not be printed. Used to turn on/off advanced logging when troubleshooting.

Isn't this Debug.TraceUser()?

Yes and no. If you don't turn on the logs ahead of time, simply calling TraceUser() will fail. If your global settings are allowed, logging will be turned on dynamically.

——————————————————————————————————————————————————————————

Here's a couple of scripts I wrote that may be useful if you'd like to log events and errors from your mod scripts. It's loosely based off the system I added into Legacy of the Dragonborn and will be using in Odyssey of the Dragonborn. It features a debug system that will display messages based on the debug global.

What is it?

There are two scripts, with plenty of comments, included in the archive.

PKY_DebugScript - This is the master script, you can send events to this script and it will print a message to a debug log for your mod.

PKY_DebugAliasScript - This is a help script, it will wake up the debug log on starting a new game or loading a save game.

How do I use it?

The scripts are loose so you can use them however you like, but the recommended setup requires a few things:

  • Create a new Quest entry, give it an editor ID along the lines of {YourPrefix}Logger or {YourPrefix}Debugger. Make sure it's set to "Start Game Enabled". (You'll need to generate a new SEQ file too)
  • Within the quest add a new alias pointing to Unique Actor "Player". Attach PKY_DebugAliasScript to the alias.
  • Create a global variable, this will control the debug level.
  • On your quest attach PKY_DebugScript, then fill the debug global and your mod name in the properties window.

Next, in scripts you want to be able to log/debug add the following property.

PKY_DebugScript Property LogFile A …

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
  3. Place the files exactly as the readme says; mods with listed dependencies need those installed too.
  4. Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.

Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.

File & checksum

Filename
纸莎草记录本
File size
4.1 KiB
SHA-256
38411b4a11b1d6e9829e663ad0c613bf05c81ea821412d6692e3453f5827d3d5
Stored at
2026-10-08 18:17