Custom Lua Types

The mod introduces new types in Lua. Those are detailed in sub-categories, you can find them on the left. Below is documentation on type-related things

Objects

Objects are instances of a type. What is actually mean is that types are like blueprints for a house. They dictate how the house will look and function, but aren’t a house. A house can be created from those blueprints, and those houses are objects This explanation is a bit janky so DM/ping me to give me feedback on it please

Methods

Methods are member functions of a certain type. They can be called on objects by using the : operator and generally use or affect the object they’re called on. Here’s an example : Object:GetDefaultValue("PropertyName")
This will call the GetDefaultValue method and return the default value of a property of a class in the game (more info in the LuaUClass type documentation)

How to read the method documentation

All methods are read like this :
Return Type method’s name (Argument Type Argument Name)

This means that the method expects you to pass an argument of the argument type and it will return something of the return type or nil if something failed. Methods can have more that one argument. Argument names are just to indicate their use and you do not need to pass a variable with that exact name
If a type is value then it means it means that type can be a multitude of different types

Properties

Properties are a very important notion in this mod. Properties are variables stored in objects. That is important because it is what TweakIt accesses in the game. When you will index (Object.something) certain objects of a custom type, the mod will go and find that something in the actual game, not in the Lua custom type. More on this in the LuaUClass type’s documentation