Table of Contents

Class DebugScript

Namespace
SkyrimForge.Papyrus
Assembly
SkyrimForge.Game.dll

Functions and comments from Debug.psc.

Note that these functions will do nothing in release console builds

public static class DebugScript
Inheritance
DebugScript
Inherited Members

Properties

Dispatcher

The dispatcher that binds this script to a form and calls the functions and properties that have no generated member.

public static PapyrusScriptDispatcher Dispatcher { get; }

Property Value

PapyrusScriptDispatcher

Methods

CenterOnCell(string)

[Obsolete("Uses the Papyrus virtual machine. Prefer GameTarget.CenterOnCell(string).", DiagnosticId = "SKYRIMFORGE0002")]
public static Task CenterOnCell(string asCellname)

Parameters

asCellname string

Returns

Task

CenterOnCellAndWait(string)

public static Task<float> CenterOnCellAndWait(string asCellname)

Parameters

asCellname string

Returns

Task<float>

CloseUserLog(string)

Closes the specified user log

public static Task CloseUserLog(string asLogName)

Parameters

asLogName string

Returns

Task

DBSendPlayerPosition()

Prints out the players position to the database (non-release PC and Xenon builds only)

public static Task DBSendPlayerPosition()

Returns

Task

DebugChannelNotify(string, string)

Outputs the string to a named debug channel (useful on the Xenon currently)

public static Task DebugChannelNotify(string channel, string message)

Parameters

channel string
message string

Returns

Task

DumpAliasData(Quest)

Dumps all alias fill information for the quest to the AliasDump log in Logs/Script/

public static Task DumpAliasData(Quest akQuest)

Parameters

akQuest Quest

Returns

Task

GetConfigName()

Returns the config name

public static Task<string> GetConfigName()

Returns

Task<string>

GetPlatformName()

Returns the platform name

public static Task<string> GetPlatformName()

Returns

Task<string>

GetVersionNumber()

Returns the version number string

public static Task<string> GetVersionNumber()

Returns

Task<string>

MessageBox(string)

Displays an in-game message box

[Obsolete("Uses the Papyrus virtual machine. Prefer IMessageBoxPrompter.ShowAsync.", DiagnosticId = "SKYRIMFORGE0002")]
public static Task MessageBox(string asMessageBoxText)

Parameters

asMessageBoxText string

Returns

Task

Notification(string)

Displays an in-game notification

[Obsolete("Uses the Papyrus virtual machine. Prefer IDebug.Notification.", DiagnosticId = "SKYRIMFORGE0002")]
public static Task Notification(string asNotificationText)

Parameters

asNotificationText string

Returns

Task

OpenUserLog(string)

Opens a user log - fails if the log is already open

public static Task<bool> OpenUserLog(string asLogName)

Parameters

asLogName string

Returns

Task<bool>

PlayerMoveToAndWait(string)

player.moveto functionality

public static Task<float> PlayerMoveToAndWait(string asDestRef)

Parameters

asDestRef string

Returns

Task<float>

QuitGame()

Quits the game

public static Task QuitGame()

Returns

Task

SendAnimationEvent(IObjectReference, string)

Forcibly sends an animation event to a reference's behavior graph used to bypass actor limitation on the ObjectReference version

[Obsolete("Uses the Papyrus virtual machine. Prefer ObjectReference.SendAnimationEvent(string).", DiagnosticId = "SKYRIMFORGE0002")]
public static Task SendAnimationEvent(IObjectReference arRef, string asEventName)

Parameters

arRef IObjectReference
asEventName string

Returns

Task

SetFootIK(bool)

Toggles Foot IK on/off

public static Task SetFootIK(bool abFootIK)

Parameters

abFootIK bool

Returns

Task

SetGodMode(bool)

TGM functionality

public static Task SetGodMode(bool abGodMode)

Parameters

abGodMode bool

Returns

Task

ShowRefPosition(IObjectReference)

Used to add a tripod to a reference (non-release builds only)

public static Task ShowRefPosition(IObjectReference arRef)

Parameters

arRef IObjectReference

Returns

Task

StartScriptProfiling(string)

Start profiing a specific script - setting doesn't persist across saves Will do nothing on release console builds, and if the Papyrus:bEnableProfiling ini setting is off

public static Task StartScriptProfiling(string asScriptName)

Parameters

asScriptName string

Returns

Task

StartStackProfiling()

Start profiling the calling stack - setting doesn't persist across saves Will do nothing on release console builds, and if the Papyrus:bEnableProfiling ini setting is off

public static Task StartStackProfiling()

Returns

Task

StopScriptProfiling(string)

Stop profiling a specific script - setting doesn't persist across saves Will do nothing on release console builds, and if the Papyrus:bEnableProfiling ini setting is off

public static Task StopScriptProfiling(string asScriptName)

Parameters

asScriptName string

Returns

Task

StopStackProfiling()

Stop profiling the calling stack - setting doesn't persist across saves Will do nothing on release console builds, and if the Papyrus:bEnableProfiling ini setting is off

public static Task StopStackProfiling()

Returns

Task

TakeScreenshot(string)

Takes a screenshot (Xenon only)

public static Task TakeScreenshot(string asFilename)

Parameters

asFilename string

Returns

Task

ToggleAI()

ToggleAI

public static Task ToggleAI()

Returns

Task

ToggleCollisions()

TCL functionality

public static Task ToggleCollisions()

Returns

Task

ToggleMenus()

Toggles menus on/off

public static Task ToggleMenus()

Returns

Task

Trace(string, int)

Outputs the string to the log Severity is one of the following: 0 - Info 1 - Warning 2 - Error

public static Task Trace(string asTextToPrint, int aiSeverity = 0)

Parameters

asTextToPrint string
aiSeverity int

Returns

Task

TraceAndBox(string, int)

A convenience function to both throw a message box AND write to the trace log, since message boxes sometimes stack in weird ways and won't show up reliably.

public static Task TraceAndBox(string asTextToPrint, int aiSeverity = 0)

Parameters

asTextToPrint string
aiSeverity int

Returns

Task

TraceConditional(string, bool)

As Trace() but takes a second parameter bool ShowTrace (which if false suppresses the message). Used to turn off and on traces that might be otherwise annoying.

public static Task TraceConditional(string TextToPrint, bool ShowTrace)

Parameters

TextToPrint string
ShowTrace bool

Returns

Task

TraceStack(string, int)

Outputs the current stack to the log

public static Task TraceStack(string asTextToPrint = "Tracing stack on request", int aiSeverity = 0)

Parameters

asTextToPrint string
aiSeverity int

Returns

Task

TraceUser(string, string, int)

Outputs the string to a user log - fails if the log hasn't been opened

public static Task<bool> TraceUser(string asUserLog, string asTextToPrint, int aiSeverity = 0)

Parameters

asUserLog string
asTextToPrint string
aiSeverity int

Returns

Task<bool>