Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

KhrysINXS-JonathanOstrus

Uploaded by

KhrysINXS

Virus scan

Safe to use

About this mod

Simplistic PowerShell Command-line Driven Shortcut Targeting Real-Time Papyrus Logging

Permissions and credits
Changelogs
Donations
Simplistic PowerShell Command-Line Driven Shortcut
Targeting Real-Time Papyrus Logging


MAIN PURPOSE:
  • This is a very simple shortcut from the C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • The shortcut is conditioned with a command targeting the default file-path of the game generated papyrus.0.Log (user needs to enable) and initialize the logs real-time generated content on a live PowerShell window instance
  • Says what it does. Does what it says. Useful to have incase one wishes to real-time monitor what information is parsing live in their Papyrus Log
  • When debugging ones code or another parties created code for the sake of a personal objective; sometimes to view the 5W1H warnings/errors fire (both in-game and logger respectively) at the same time; has essence granting one a visual snapshot that can shed extra light during debugging investigations

HOW TO USE:
Spoiler:  
Show
For Folk Whom Had Papyrus Logging Disabled Prior to Downloading & Contain No Existing Papyrus.0.log in File-Path: C:\Users\Username\Documents\My Games\Skyrim Special Edition\Logs\Script\Papyrus.0.log
  • Enable Skyrim Papyrus Logging in the Skyrim.ini YOU ARE USING PER GAME LAUNCH
    • BOLDED that above purposely. If using MO2; your profile could be using "Use profile-specific Game INI Files" which means the INIs registering at game launch are in a custom, profile specific location thus the native ones down file-path \My Documents\My Games\Skyrim Special Edition\ are NOT being used
    • Make sure you know which INI's are being used relative to how your game is setup to launch
  • Turn on Papyrus Logging in your Skyrim.ini as shown in Spoiler
CLICKME
Spoiler:  
Show
Most of These Modifiers Will Already Exist in Your INI but Set Differently. Edit What's There to These Edits. If a Line Is Not in There; Add It
[Papyrus]
bEnableLogging=1
bEnableProfiling=1
bEnableTrace=1
bLoadDebugInformation=1
fPostLoadUpdateTimeMS=2000

  • That is that part
  • After that; head on over too: C:\Users\Username\Documents\My Games\Skyrim Special Edition\Logs\Script\Papyrus.0.log
      • If a Logs folder doesn't exist inside the Skyrim Special Edition Folder; make it
      • If a Scripts folder doesn't exist inside the Logs Folder; make it
      • Inside the Scripts folder make a new Text file named Papyrus.0
      • Now click on the Windows Explorer Instance (top of window) View Tab
      • Check on [X] File Name Extensions
      • Rename the files extension Papyrus.0.txt to Papyrus.0.log and when the rename warning prompt comes up; click yes
    • Now you can carry on with the instructions below as though you already had Papyrus Logging Enabled Prior to download

    For Folk Whom Had Papyrus Logging Enabled Prior to Downloading & Contain an Existing Papyrus.0.log in File-Path:
    C:\Users\Username\Documents\My Games\Skyrim Special Edition\Logs\Script\Papyrus.0.log
    • Hence forth is just easy-peasy lemon squeezy
    • Put the shortcut anywhere you wish. Copy/paste in different destinations on PC for different ways to access the same shortcut conveniently (optional)
    • Execute the Shortcut prior to launch
    • That's it. It will hook into the already existing Papyrus.0.log (reading a bit of its stack from prior launch) and will be idling, waiting for you to launch
    • Position it somewhere comfortable. Having a secondary monitor is always a win-win

    Also Included:
    • An icon (.ico) file for your shortcut
    • The icon within the package is located down file-path C:\Windows\System32\WindowsPowerShell\v1.0\powershellpapyrus.ico
    • This is the default destination the shortcut is setup to find the icon it uses
    • The user can put the icon anywhere they wish and open up the Shortcut Properties > General Tab > at bottom is "Change Icon" and re-stage the shortcut to the new existing location you want the icon to be
    • It is best to put the icon in a significant place where it wont get relocated so no matter where you place the shortcut; it will always find the target .ico file

  • HOW NOT TO USE (ATM):
    Spoiler:  
    Show
    Mod Managers
    • DO NOT setup this shortcut as a shortcut to launch from within your Mod manager
    • I couldn't get it to work which isn't to say it won't. I just gave up after 30 minutes of trying
    • You can try to get it to work launching from within a Mod Manager. Play around and test but understand that its entirely experimental
    • Launch the shortcut from anywhere else (C Drive Recommended)

    ANOTHER USEFUL PURPOSE:
    Spoiler:  
    Show
    Works for other logs from all games or whatever else needs real-time logging
    • Right-click on Shortcut
      • Properties
        • Target: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "$logfile = $env:USERPROFILE + '\My Documents\My Games\Skyrim Special Edition\Logs\Script\Papyrus.0.log'; Get-Content $logfile -Tail 10 -Wait" ;pause
    My Documents\My Games\Skyrim Special Edition\Logs\Script\Papyrus.0.log'; Get-Content $logfile -Tail 10 -Wait"
    • In game cases; the highlighted above can be manually edited to suit the path of another log (if be for another game) the user wishes this shortcut to work for or perhaps the desired path is completely different then stated above. Just need to fill in the full address including full name of target file with its extension
    • Make a copy of this here provided PS shortcut (to preserve a Skyrim Papyrus one); paste it somewhere and then edit the copied shortcut target to another log. Give your new shortcut a unique name significant to the other log its targeting

    SHORTCUT TWEAKS:
    Spoiler:  
    Show
    Change the PowerShell Window UI Attributes (personal edits per shortcut only apply to that shortcut and PS instance it opens)
    • Right-click on Shortcut
      • Properties
        • Shortcut Tab: Can change the Shortcuts Icon from here
        • Options Tab: Cursor Size, Edit Options, Text Selection
        • Font Tab: Make all kinds of PS logging Fonts you prefer
        • Layout Tab: Calibrate the size of the PS Window and where its to station on the monitor when opened. Can manually move anywhere after
        • Terminal Tab: More Tweaks to fiddle with
    • This just Windows Know-how and extras

    PS EDITOR WARNINGS LE-CK REAL-TIME LOGGER (OPTIONAL FILE)
    • This is for those that still use the LE CK and wish you had the real-time CK Logger feature from SE CK
    • You can use the Powershell shortcut version for the LE CK if wish to download but you NEED to re-path the shortcut target command to where your EditorWarnings.txt generates in your CreationKit.exe folder
    • The way the shortcut's Target Command is currently in the file downloaded:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "$logfile = 'E:\Steam\Steamapps\Common\Skyrim (v1.9.32)\EditorWarnings.txt'; Get-Content $logfile -Tail 10 -Wait" ;pause
    • The user will need to edit the path in this command to target where your EditorWarnings.txt generates on your machine
    Some Particular Notes:
    • Based on my own experimentation, I have to launch the PS Shortcut after I selected the plugins in the LE CK and they begin to load. That is when the CK EditorWarnings.txt FILE generates in your CreationKit.exe folder. It needs to be there first before launching the PS Shortcut so it can hook into it

    REQUIRMENTS:
    Healthy Windows OS with a functioning PowerShell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Secondary Monitor is always very complimentary


    INSTALL/UNINSTALL:
    There is none really. Download and use but don't run it from within your Mod Manager until someone discovers a way to have it work from there
    Since there is no install but you downloaded it; delete it like anything else you wish to trash


    COMPATIBILITY NOTES:
    Follow what's stated from above and let me know
    As for what's Incompatible; IDK.... MacOS, Linux, Android Phone, Your Microwave, etc.....


    SIGNS OF MISUSAGE:
    When the Powershell shortcut is launched (due to the ;pause command added to the shortcuts overall target command), hopefully, you will receive some form of an informative error on the launched PS instance that explains why it is not working as it should

    FAQ:
    Q. Can this be used for other games?
    A. Read under spoiler "ANOTHER USEFUL PURPOSE"

    Q. What do I do with this icon? Why is my shortcut have no icon?
    A. Read under spoiler "HOW TO USE"

    Q. Is this safe to download? Nervous as its a PowerShell Shortcut
    A. I totally get that with all this craziness in this place we call our world today. Can't be to careful and we all share that common guard respectively. Yes, Its absolutely fine. Although no one really knows me except a selective bunch from the Nexus community; I would never upload anything (whether be Nexus or wherever) that intentionally harms any end-user. The world has enough of those immoral/inhuman parasites as it is. I cannot say in absolution every single Antivirus in the world wont fire a false-positive (or I would be lying). It does contain a Link.ShellCmd (written in full under "ANOTHER USEFUL PURPOSE") necessary in order for it to function. I have absolutely no problems. My testers had no issues. Have some faith or move on. Your call

    Q. Any way to make a Logger based upon the CMD.exe rather then the PowerShell.exe
    A. Fact of the matter is CMD is an entirely other beast which lacks a built-in tail command that the PowerShell owns. This makes the PowerShell option the optimal approach at the expense you get basically the exact same results as the CMD would provide minus the need of 3rd-party requirements
    PS vs CMD:
    PS Pros/Cons - No requirements. Works natively out of the box. Simple on user. Few less functions as CMD but not very profitable for logging
    CMD Pros/Cons - Due to the extra requirement TailforWin32 (or another UNIX fork alternative); Not so simple. More struggle for end-user to make work which exacerbates strain on them and I. Barely any additional functions that the PS doesn't already have (minus a few but pretty redundant for this). New command-line work
    • This all under the assumption after rigged correctly; it will work equivalently to PS without other strings attached (which is a very large assumption)
    PS vs CMD (in this particular use-case) summed up; PS is definitely the victor
    • Tail Command is built-in. No 3rd-party requirements promoting end-user simplicity. Has 2 functions less CMD approach offers but redundant for a logger
    • Common sense suggests PowerShell is the winner for this especially because it needs nothing except itself

    Q. What is that mod in your video?
    A. Just ask. I will gladly let you know


    MY OTHER STUFF:
    KHRYSINXS USER FILES

    TO-DO UPDATE NOTES:
    Spoiler:  
    Show
    Subject Step
    • STANDBY