TransWikia.com

Is there a way to save all global variables to a text file?

Arqade Asked on May 9, 2021

There is a console command,

showglobalvars

that shows all global variables. Instead of getting that displayed in a console I want the output to be written in a text file.

I’ve heard about the command

SetConsoleOutputFilename 

However, it doesn’t work properly, since using

scof "c:tempoutput.txt"

will output

SetConsoleOutputFilename  >>  "c:tempoutput.txt"

but no such file is created.

How do I successfully print all global variables in a text file?

2 Answers

In the comments, you indicate that you "just want to see [what] all the global variables are." In general, the easiest way to do this is to open the various ESP/ESM files in xEdit, which is a third-party modding tool. Although it is designed for modifying these files, it will give a very prominent warning before it actually lets you change anything, so it's perfectly usable as a viewer as well.

Once you've loaded Skyrim.esm and the DLC into xEdit, you can expand each of the ESP/ESM files in the panel on the left, which will show a list of categories. Expanding a category shows a list of individual records:

Screenshot of the xEdit interface.

This image is showing Fallout 3, but the same app also works on Skyrim's plugin files. Under the "Global Variables" category, there will be one record for each global variable. Clicking a record will display it in the area to the right of the navigation tree. For a global variable, it will tell you the name of that variable and the value it has at the start of the game. For other records, you will usually see a much larger amount of information. Clicking the "Referenced By" tab at the bottom will also tell you about all the places where other records use the global variable in some way.

If you don't want to download third-party software, you can instead use the official Creation Kit (install via Steam under "Tools" for the original Skyrim, or from the Bethesda Launcher for the Special Edition). It also organizes data into categories and records. You'll find the list of global variables under Miscellaneous / Global. Unfortunately, running the CK is a bit tricky for multiple reasons:

  1. It won't let you load multiple files.
  2. It won't let you load DLC, because that requires loading both the DLC file and Skyrim.esm.
  3. It crashes if you look at it funny.
  4. Depending on your setup, various bits of functionality might be broken (particularly related to Papyrus scripting). You probably don't need to care about this just to look at the list of globals.

These problems are fixable; see particularly this mod and this thread on Nexusmods. In short, you need to fiddle around with skyrimeditor.ini because its default values are (in many places) incorrect or otherwise problematic.

Correct answer by Kevin on May 9, 2021

SetConsoleOutputFilename or scof used to work in the old Fallout games. In Skyrim LE/SE the method is defined, but the implementation does not do anything.

There is a mod for the old Skyrim LE that logs the console output to a file. It is called ConSkrybe on the Nexus mods. It requires SKSE but it has not been updated in a while.

EDIT

There is a Skyrim SE mod called Console Commands Extender. This adds output redirection functionality for piping console output to a text file, clearing the console, and setting perk points. You can view the full Read Me

Answered by Lore Friendly on May 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP