#
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
#
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.
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
#include "Utils/Tools.h"
...
UTools::Log("Print this message", MyObject, EPrintType::Error);
#
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.
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}
#include "Utils/Tools.h"
...
// Macro (Only inside an UObject method. Type cast is NOT required)
PRINT("Print this message")
// Function call.
UTools::Print("Print this message", MyObject)
#
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.
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}
#include "Utils/Tools.h"
...
// Macro (Only inside an UObject method. Type cast is NOT required)
SUCCESS("Print this message");
// Function call.
UTools::Success("Print this message", MyObject);
#
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.
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}
#include "Utils/Tools.h"
...
// Macro (Only inside an UObject method. Type cast is NOT required)
WARNING("Print this message");
// Function call.
UTools::Warning("Print this message", MyObject);
#
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.
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}
#include "Utils/Tools.h"
...
// Macro (Only inside an UObject method. Type cast is NOT required)
ERROR("Print this message");
// Function call.
UTools::Error("Print this message", MyObject);
#
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
Object: ref
NewName: string
$ ^Quillscript.Tools.RenameObject {&RefName} NewRefName
$ &NewRefName.MyFunction
#include "Utils/Tools.h"
...
UTools::RenameObject(MyObject, "RefName");
#
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.
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
#include "Utils/Tools.h"
...
// Blueprint class.
TObjectPtr<UClass> BlueprintPath{ UTools::FindClassByPath("/Game/Path/To/My/Blueprint.Blueprint") };
TObjectPtr<UClass> ClassPath{ UTools::FindClassByPath("/Game/Path/To/My/Blueprint.Blueprint_C") };
// C++ class.
TObjectPtr<UClass> CppClass{ UTools::FindClassByPath("Module.ClassName") };
TObjectPtr<UClass> CppClassExample{ UTools::FindClassByPath("Engine.Actor") };
#
Get Class Default Object
Get the default object from the given class. This function is useful to expose the Default Object to Blueprints.
Class: ref[Class]
// Store class reference in {&ReturnValue}.
$ ^Quillscript.Tools.GetClassDefaultObject {&Class}
#include "Utils/Tools.h"
...
TObjectPtr<UClass> DefaultObject{ UTools::GetClassDefaultObject(Class) };
#
Property Exists
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get Property by Name
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Set Property by Name
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Find Property by Name
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Insert Property by Name
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
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.
WorldContextObject: ref
Target: ref
FunctionName: name
Parameters: array[string]
// Store class reference in {&ReturnValue}.
$ ^Quillscript.Tools.CallFunctionByName {&Target} MyFunction '("10","true")'
#include "Utils/Tools.h"
...
TMap<FName, FString> OuterParams{
UTools::CallFunctionByName(
WorldContextObject,
Target,
"MyFunction",
TArray<FString>({"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.
WorldContextObject: ref
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.HasAuthority
#include "Utils/Tools.h"
...
// Macro (Only inside functions with a 'WorldContextObject' variable)
if (HAS_AUTHORITY())
{
// Implementation.
}
// Function call.
if (UTools::HasAuthority(WorldContextObject))
{
// Implementation.
}
#
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.
ModuleName: name
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.IsModuleLoaded ModuleName
#include "Utils/Tools.h"
...
if (UTools::IsModuleLoaded(ModuleName))
{
// Implementation.
}
#
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.
(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
#include "Utils/Tools.h"
...
FString RandomString{ UTools::GenerateRandomString() };
#
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.
WorldContextObject: ref
Key: string
Value: string
// Store if level option exists in {$ReturnValue}.
// Store level option value in {&Value}.
$ ^Quillscript.Tools.RetrieveOption MyKey
#include "Utils/Tools.h"
...
FString Key, Value;
FString RandomString{ UTools::RetrieveOption(WorldContextObject, Key, Value) };
#
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.
Strings: array[string]
// Store result in {&ReturnValue}.
$ MyArray = '("Snowfall","Unreal Engine","Quillscript")'
$ ^Quillscript.Tools.SortStringsAlphabetically {MyArray}
#include "Utils/Tools.h"
...
TArray<FString> SortedArray{ UTools::SortStringsAlphabetically(StringsArray) };
#
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.
StringTablepPath: name
// Store result in {&ReturnValue}.
$ ^Quillscript.Tools.RegisterStringTable /Game/Folder/MyTable.MyTable
#include "Utils/Tools.h"
...
UTools::RegisterStringTable("/Game/Folder/MyTable.MyTable");
#
Find String Table Key
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get Variables in String
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Length
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
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
#include "Utils/Tools.h"
...
FString ProjectName{ UTools::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
#include "Utils/Tools.h"
...
FString ProjectVersion{ UTools::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
#include "Utils/Tools.h"
...
FString CompanyName{ UTools::GetCompanyName() };
#
Assets
#
Mark Asset Dirty
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Save Asset
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Files
#
Get All Save Game Slot Names
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Save to Text File
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Load Text File
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Load Image
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Take Screenshot
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Directory to String
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
List Files
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
List Directories
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Launch File
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Settings
#
Get Bool Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Set Bool Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get String Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Set String Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get Int Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Set Int Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get Float Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Set Float Setting
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Setting File to String
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
UI
#
Destroy Widget
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Add to Constraint Viewport
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Capture Widget
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get Nested Widgets
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Get Nested Widgets Of Class
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Remove Visible Widgets
🚧 Under construction 🚧
Please refer to the in-engine documentation
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Play Typewriter Effect
Return the given string in the 'On Printed Event' character-by-character in the given interval.
Text: text
PrintedDelegate: event
CompletedDelegate: event
(Omittable) Interval: float = 0.02
(Omittable) Sound: ref[Sound Base] = nullptr
(Omittable) bOverlapSound: bool = false
(Omittable) bSanitize: bool = true
#include "Utils/Tools.h"
...
FTextPrintedDelegate OnPrinted;
OnPrinted.BindDynamic(this, &UMyObject::Printed);
FTextCompletedDelegate OnCompleted;
OnCompleted.BindDynamic(this, &UMyObject::Completed);
TObjectPtr<ASmartTypewriter> Typewriter{
UTools::PlayTypewriterEffect(
WorldContextObject,
TXT("Hello, world!"),
OnPrinted,
OnCompleted
)
};
void UMyObject::Printed(const FText& Text, const FString& Character, const int32& Index)
{
// Implementation
}
void UMyObject::Completed()
{
// Implementation
}
#
Pipes
#
Replace Variables
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
To Signed Number
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
To Display Text
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Upper First Letter
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Text Upper First Letter
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Remove Accentuation
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Remove Rich Text Tags
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
To Hash
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
To Hex
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Encrypt
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Decrypt
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Is Key Value Pair
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
To Key Value Pair
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Has Key Value Tag
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Remove Repeated Values
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
To String
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Operators
#
Null Coalescing Operator
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Solve Math Expression
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Is Same Unique Net Id
🚧 Under construction 🚧
Please refer to the in-engine documentation
#
Is Host
🚧 Under construction 🚧
Please refer to the in-engine documentation