Fix memory allocation errors due to missing argument.
Fix Observe/Override sometimes affecting scripts when they shouldn't.
Fix crash when using multiple mods.
Crash on game exit when a reference had not been garbage collected by the lua vm.
Missing enum value CellPadding in Imgui Lua (Pull Request: 496).
Crash when using Override/Observe on pure script functions.
Crash when reloading mods using Override/Observe.
Crash when a malformed lua file was loaded with "require".
Lua execution error when a callback used a global variable because environments were not applied.
Fix memory leaks when reloading mods using Observe/Override.
Memory optimization for calls.
Replaced the hacky thread safety used for the Lua VM with TiltedCore's Lockable<T>.
API changes to support Imgui 1.81 and added missing ColorButton overloads.
Override has now 2 overloads to simplify usage, this will completely remove the original function or add one if it doesn't exist:
Override(typeName, fullFunctionName, shortFunctionName, function)
Override(typeName, functionName, function) - both full and short names are set to functionName
Observe has now 2 overloads to simplify usage, this will not remove the original function but will add one if it doesn't exist:
Observe(typeName, fullFunctionName, shortFunctionName, function)
Observe(typeName, functionName, function) - both full and short names are set to functionName
Upgrade Imgui 1.80 to 1.81.
Fixed Override so that it can override at runtime after scripts have been loaded.
Revert Lua caching of functions as the new override method will work regardless.
Fix game crash when a script used "require" on a malformed file.
Override function to either listen to a function or to replace a game function. Despite its name it can also be used to extend a type by adding a new function. Usage is as such:
Override("PlayerPuppet", "IsA", "IsA", true, function(self, className) print(className); return true end)
The first parameter is the class type, second the full name of the function, the third is the short name (usually they are the same), the fourth boolean is used to specify if this is a replacement of the function or not, if set to true it will replace entirely the original function, if set to false, your function will be called before the original function is called. The last parameter is your handler function, note that the parameters are passed according to the RED script definition.
Telemetry, the experiment gave us the data we wanted, obviously a lot of people use the mod and we are very happy about that! We are sorry this caused so much drama, it wasn't the intention and quite frankly we still don't really understand why.
Calling RED functions used to be cached, given that functions can be overridden at any time the cache has been removed, it's a bit slower but shouldn't be visible in the real world.
Using the up and down arrows in the console now retrieves the command history
Added Telemetry so we know how many people use CET (can be disabled in settings), note that we do not store any information we just count the number of players
Fix TweakDBID issues with large arrays
Fix TweakDBID crash when using specific functions
Updated to game version 1.12
Updated RED4ext.sdk to the latest
Proper sandboxing (#454):
Each mod is (right now) assigned sqlite3 database implicitly, accessible through
db lua object (will be changed later to on-demand through info in metadata file)
Introduced proper sandbox with LuaSandbox helper class
Bytecode cannot be loaded now (native modules included)
require cache is reset on
Reload all mods now
require does not support '.' instead of '/' now (only breaking change, functions the same otherwise)
All pathing is now relative to mod (breaking change, includes all io functions,
dofile() and such included)
stripped ImGui, json, io and dofile and such from console sandbox (only needed things left for it in)
dir() command for mods to list directory contents
Errors that happen in Game, game class methods,... should now log into proper environment (to console when executed from console, to mod log when executed from mod)
Enabled ImGui keyboard navigation. (
ctrl + tab to switch window, arrow keys to navigate)
Removed the deprecated
power argument in Drag and Slider widgets, replace it with the newer ImGuiSliderFlag (breaking change)
Made the argument
open optional in
ImGui.BeginTabItem(), so the close button can be hidden when setting flags.
Added bindings for the new tables widget in ImGui 1.8.0
Added selected mouse utilities back
Added bindings for ImDrawlist
TweakDB binding (#461)
Major vulnerability in the game's save loader fixed
Updated to game version 1.11
Updated RED4ext.sdk to the latest
Updated to spdlog 1.8.2
Replaced pattern search with much faster library
Fix issue when resizing game window (eg. resolution change in Options)
Fix issue causing game window to stop rendering and freeze on last frame
Fix ImGui.CalcTextSize overloads (now, second parameter is removed from all, as it did not make sense for Lua anyway)
Fix Windows 7 flatlining
jsonsupport to Lua
Added support for the latest patch 1.10
UI with settings will now ask you for a console key on first launch, you can edit it later
Mods can now request hotkeys via
registerHotkey, the user can pick what key they want to use in the menu
You can now instantiate game objects with
NewObject('class name'), do not expect this to work with every class without any issues
SQLite3 support was added, you can use the entire API at the moment, we are going to remove all open functions in the near future and replace it with a open that can only open a single database linked to your mod
Mods will now log to their own log files, you can also use
spdlogto print in your log
Scripting is now handling memory correctly, calling
Game.GetPlayer() every frame is fine now
Game doesn't crash when exiting anymore
dofile is now deprecated, use only mods please, it will be removed entirely in the next update