OpenUserLog - Debug

From the Fallout4 CreationKit Wiki
Revision as of 16:27, 1 December 2015 by imported>Plplecuyer
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: Debug Script

Opens a new user log on disk.

Syntax[edit | edit source]

bool Function OpenUserLog(string asLogName) native global debugOnly

Parameters[edit | edit source]

  • asLogName: The name of the log to open, case-insensitive. User log names may use any combination of letters, numbers, spaces, and underscores ("_").

Return Value[edit | edit source]

True if the log was successfully opened. False if the name was invalid, or the log was already open.

Examples[edit | edit source]

; Opens a new user log name "myUserLog"
Debug.OpenUserLog("myUserLog")

Notes[edit | edit source]

  • This will also cycle the older logs (so log 0 becomes 1, 1 becomes 2, etc).
  • The log files are stored in "<documents>/My Games/Fallout4/Logs/Script/User".
  • If the log is already open, the function will return false (but not print an error to the main script log).
  • Note that you do not have to close the log yourself unless you want to, it will close automatically when the game ends, the player goes back to the main menu, or a save is loaded.

See Also[edit | edit source]