Tools

Tools Function Library

The Tools Function Library is a versatile collection of extra utility functions designed to streamline and simplify common tasks in Unreal Engine game development.

This library is a useful resource for any Unreal Engine project, offering a wide range of functions that provide essential functionality for various game development needs.


Print


Print a message on screen and/or console. (In Development, Debug or Editor mode)

Check your Verbosity setting to select where this message is printed.

Parameters
Message: string
(Omittable) Owner: ref    // Object that called this function.
$ ^Quillscript.Tools.Print Hello
$ ^Quillscript.Tools.Print 'Print this message'
$ ^Quillscript.Tools.Print 'Print this message' {&Script}

Success

Print a success message on screen and/or console. (In Development, Debug or Editor mode)

Check your Verbosity setting to select where this message is printed.

Parameters
Message: string
(Omittable) Owner: ref    // Object that called this function.
$ ^Quillscript.Tools.Success Hello
$ ^Quillscript.Tools.Success 'Print this message'
$ ^Quillscript.Tools.Success 'Print this message' {&Script}

Warning

Print a warning message on screen and/or console. (In Development, Debug or Editor mode)

Check your Verbosity setting to select where this message is printed.

Parameters
Message: string
(Omittable) Owner: ref    // Object that called this function.
$ ^Quillscript.Tools.Warning Hello
$ ^Quillscript.Tools.Warning 'Print this message'
$ ^Quillscript.Tools.Warning 'Print this message' {&Script}

Error

Print an error message on screen and/or console. (In Development, Debug or Editor mode)

Check your Verbosity setting to select where this message is printed.

Parameters
Message: string
(Omittable) Owner: ref    // Object that called this function.
$ ^Quillscript.Tools.Error Hello
$ ^Quillscript.Tools.Error 'Print this message'
$ ^Quillscript.Tools.Error 'Print this message' {&Script}

Log

Print a message on screen and/or console with control params. (In Development, Debug or Editor mode)

Check your Verbosity setting to select where this message is printed.

Parameters
Message: string
(Omittable) Owner: ref              // Object that called this function.
(Omittable) PrintType: PrintType    [ Log, Success, Warning, Error ]
$ ^Quillscript.Tools.Log Hello
$ ^Quillscript.Tools.Log 'Print this message'
$ ^Quillscript.Tools.Log 'Print this message' {&Script} Error

Utilities


Rename Object

Rename the given object.

This function is useful to give a know name to an object and reference it later by name in script like: $ &ObjName.ObjFunction

Parameters
Object: ref
NewName: string
$ ^Quillscript.Tools.RenameObject {&RefName} NewRefName
$ &NewRefName.MyFunction

Find Class by Path

Attempts to locate a class by its path, specified as a string. This function is a valuable utility for dynamically finding and accessing classes within your Unreal Engine project based on their defined paths.

Parameters
Path: string
// Store class reference in {&ReturnValue}.
$ ^Quillscript.Tools.FindClassByPath /Game/Path/To/Blueprint.Blueprint
$ ^Quillscript.Tools.FindClassByPath /Game/Path/To/Blueprint.Blueprint_C
$ ^Quillscript.Tools.FindClassByPath Module.ClassName

Get Class Default Object

Get the default object from the given class. This function is useful to expose the Default Object to Blueprints.

Parameters
Class: ref[Class]
// Store class reference in {&ReturnValue}.
$ ^Quillscript.Tools.GetClassDefaultObject {&Class}

Call Function By Name

Call a Target's function by name and return its Return Value and Outer Parameters.

This is a simplified general usage version of Interpreter.CallFunctionOnTarget() that do not create Quillscript variables and script references.

Parameters
WorldContextObject: ref
Target: ref
FunctionName: name
Parameters: array[string]
// Store class reference in {&ReturnValue}.
$ ^Quillscript.Tools.CallFunctionByName {&Target} MyFunction '("10","true")'

Has Authority

Serves as a shortcut utility designed for use inside static methods that have a WorldContextObject parameter. It allows you to determine whether the current execution context possesses authority, using the GetFirstPlayerController, which is often associated with server or authoritative roles in networked multiplayer games.

While this function provides a convenient way to check authority within static methods, it's important to note that if your function already has access to HasAuthority() through other means, it's advisable to use those methods instead.

Parameters
WorldContextObject: ref
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.HasAuthority

Is Module Loaded

Check whether a specific module or plugin is currently loaded within the Unreal Engine project. This function provides a straightforward way to determine if a particular module or plugin is available and active for use in your project.

Parameters
ModuleName: name
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.IsModuleLoaded ModuleName

Generate Random String

Check whether a specific module or plugin is currently loaded within the Unreal Engine project. This function provides a straightforward way to determine if a particular module or plugin is available and active for use in your project.

Parameters
(Omittable) Size: byte = 8
(Omittable) Letters: bool = true
(Omittable) Numbers: bool = true
(Omittable) Symbols: bool = false
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.GenerateRandomString
$ ^Quillscript.Tools.GenerateRandomString 8 true true true

Retrieve Option

Fetch a level transition option by providing the option's key. This function is particularly useful when you need to access specific transition options after a level change, allowing you to retrieve and utilize option values as needed.

Parameters
WorldContextObject: ref
Key: string
Value: string
// Store if level option exists in {$ReturnValue}.
// Store level option value in {&Value}.
$ ^Quillscript.Tools.RetrieveOption MyKey

Sort Strings Alphabetically

Sort an array of strings in alphabetical order. This function allows you to arrange a collection of strings into ascending alphabetical sequence, making it easier to manage and organize string data.

Parameters
Strings: array[string]
// Store result in {&ReturnValue}.
$ MyArray = '("Snowfall","Unreal Engine","Quillscript")'
$ ^Quillscript.Tools.SortStringsAlphabetically {MyArray}

Register String Table

Register a string table by path. This function is useful when a string table is used by path and never referenced, causing it to not be loaded during runtime.

Parameters
StringTablepPath: name
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.RegisterStringTable /Game/Folder/MyTable.MyTable

Metadata


Get Project Name

Retrieves the project name that is configured in the 'Edit > Project Settings > Project > Description > Project Name' field. This function allows you to access the project's name programmatically.

// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.GetProjectName

Get Project Version

Retrieves the project version that is set in the 'Edit > Project Settings > Project > Description > Project Version' field. You can use this function to access the project's version number within your code.

// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.GetProjectVersion

Get Company Name

Fetches the company name specified in the 'Edit > Project Settings > Project > Description > Company Name' field. This function is useful for obtaining the company name associated with your project.

// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.GetCompanyName

Last updated