Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This event gets triggered even before onInit, and can be useful for making changes to the TweakDB, as some values can only be changes very early during the loading process.
This event get triggered when the CET Overlay gets shown.
Use this to keep track of the overlays state, and e.g. to only draw your own UI when CETs overlay is visible. Use it in conjunction with onOverlayClose to get a proper on/off switch case.
This example use the onDraw event, which is triggered continuously. Make sure to check the documentation before any modification.
This event works similarly to , except that it is used for drawing custom ImGui UI. It gets triggered on every frame that the game runs, thus is framerate dependent.
Use this event with caution, as it is triggered continuously once the game is launched.
Trying to draw ImGui UI outside this callback is prohibited
On onInit gets triggered once, when CET loads in all the mods. This event ensures that CET has fully loaded, and you have access to the Scripting API. There can be only one onInit event per mod.
Use it to register any , as well as do any one-off actions needed for your mod.
This event is a safe starting point for your code interaction with the game, as it guarantees the access to most of the Scripting API.
This event is also triggered when using "Reload all mods" button in the , as it fires when CET load all mods.
This event gets triggered on every frame that the game runs, thus is framerate dependent. The callback function gets the deltaTime
passed along with it, which measures the frametime in ms, useful for making e.g. timers.
In here you can put any code that you want to run every frame, although it is best practice to only run your code when needed, e.g. using .
Use this event with caution, as it is triggered continuously once the game is launched.
Cyber Engine Tweaks has builtin events which can be listened using the registerForEvent()
function. These listeners must be registered inside the init.lua
file.
Keep in mind that CET events are not game events. For example, doesn't mean the game the initializing, but rather that CET loaded mods and the game's Scripting API.
If you need to listen for game events, take a look at the functions.
Here is a video showing when events are triggered in real-time:
This example use the event, which is triggered continuously. Make sure to before any modification.
This example use . Check the for further information on its usage.