WolvenKit Scripting
Public Member Functions | List of all members
ScriptFunctions Class Reference

TODO More...

Inheritance diagram for ScriptFunctions:
AppScriptFunctions

Public Member Functions

virtual IEnumerable GetArchiveFiles ()
 Gets a list of the files available in the game archives Note to myself: Don't use IEnumerable<T> More...
 
virtual ? IGameFile GetFileFromBase (string path)
 DEPRECATED: Please use GetFileFromArchive(path, OpenAs.GameFile) Loads a file from the base archives using either a file path or hash More...
 
virtual ? IGameFile GetFileFromBase (ulong hash)
 DEPRECATED: Please use GetFileFromArchive(hash, OpenAs.GameFile) Loads a file from the base archives using either a file path or hash More...
 
virtual ? string GameFileToJson (IGameFile gameFile)
 Creates a json representation of the specifed game file. More...
 
virtual ? CR2WFile JsonToCR2W (string json)
 Creates a CR2W game file from a json More...
 
virtual string ChangeExtension (string path, string extension)
 Changes the extension of the provided string path More...
 
virtual ? object GetFileFromArchive (string path, OpenAs openAs)
 Loads a file from the base archives using either a file path or hash More...
 
virtual ? object GetFileFromArchive (ulong hash, OpenAs openAs)
 Loads a file from the base archives using either a file path or hash More...
 
virtual bool FileExistsInArchive (string path)
 Check if file exists in the game archives More...
 
virtual bool FileExistsInArchive (ulong hash)
 Check if file exists in the game archives More...
 
virtual string YamlToJson (string yamlText)
 Converts a YAML string to a JSON string More...
 
virtual string JsonToYaml (string jsonText)
 Converts a JSON string to a YAML string More...
 

Detailed Description

TODO

Member Function Documentation

◆ ChangeExtension()

virtual string ScriptFunctions.ChangeExtension ( string  path,
string  extension 
)
virtual

Changes the extension of the provided string path

Parameters
pathThe path of the file to change
extension
Returns

◆ FileExistsInArchive() [1/2]

virtual bool ScriptFunctions.FileExistsInArchive ( string  path)
virtual

Check if file exists in the game archives

Parameters
pathfile path to check
Returns

◆ FileExistsInArchive() [2/2]

virtual bool ScriptFunctions.FileExistsInArchive ( ulong  hash)
virtual

Check if file exists in the game archives

Parameters
hashhash value to be checked
Returns

◆ GameFileToJson()

virtual ? string ScriptFunctions.GameFileToJson ( IGameFile  gameFile)
virtual

Creates a json representation of the specifed game file.

Parameters
gameFileThe gameFile which should be converted
Returns
Exceptions
ArgumentNullException

◆ GetArchiveFiles()

virtual IEnumerable ScriptFunctions.GetArchiveFiles ( )
virtual

Gets a list of the files available in the game archives Note to myself: Don't use IEnumerable<T>

Returns

◆ GetFileFromArchive() [1/2]

virtual ? object ScriptFunctions.GetFileFromArchive ( string  path,
OpenAs  openAs 
)
virtual

Loads a file from the base archives using either a file path or hash

Parameters
pathThe path of the file to retrieve
openAsThe output format (OpenAs.GameFile, OpenAs.CR2W or OpenAs.Json)
Returns

◆ GetFileFromArchive() [2/2]

virtual ? object ScriptFunctions.GetFileFromArchive ( ulong  hash,
OpenAs  openAs 
)
virtual

Loads a file from the base archives using either a file path or hash

Parameters
hashThe hash of the file to retrieve
openAsThe output format (OpenAs.GameFile, OpenAs.CR2W or OpenAs.Json)
Returns

◆ GetFileFromBase() [1/2]

virtual ? IGameFile ScriptFunctions.GetFileFromBase ( string  path)
virtual

DEPRECATED: Please use GetFileFromArchive(path, OpenAs.GameFile) Loads a file from the base archives using either a file path or hash

Parameters
pathThe path of the file to retrieve
Returns

◆ GetFileFromBase() [2/2]

virtual ? IGameFile ScriptFunctions.GetFileFromBase ( ulong  hash)
virtual

DEPRECATED: Please use GetFileFromArchive(hash, OpenAs.GameFile) Loads a file from the base archives using either a file path or hash

Parameters
hashThe hash of the file to retrieve
Returns

◆ JsonToCR2W()

virtual ? CR2WFile ScriptFunctions.JsonToCR2W ( string  json)
virtual

Creates a CR2W game file from a json

Parameters
json
Returns

◆ JsonToYaml()

virtual string ScriptFunctions.JsonToYaml ( string  jsonText)
virtual

Converts a JSON string to a YAML string

Parameters
jsonTextThe JSON string to convert
Returns
The converted YAML string

◆ YamlToJson()

virtual string ScriptFunctions.YamlToJson ( string  yamlText)
virtual

Converts a YAML string to a JSON string

Parameters
yamlTextThe YAML string to convert
Returns
The converted JSON string

The documentation for this class was generated from the following file: