- add support for the latest GTA: The Trilogy patch on Steam and Rockstar Games Launcher
- fix a script crash when Bully's
CameraSetXYZ
command is used - fix an issue with commands returning multiple values (e.g.
World.GetAnyCharNoSaveRecursive
) crashing the script if nothing was found - add missing
Memory.Read
andMemory.Write
definitions for an unknown host. Also addedMemory.ReadI64
,Memory.ReadU64
,Memory.WriteI64
,Memory.WriteU64
for 64-bit unknown host - add
allowJs
option intsconfig.json
to allow importing JS files in TS scripts. Delete yourtsconfig.json
if you want to recreate it with the new option
INSTALLER
- update references to SilentPatch to their new location on GitHub
BREAKING CHANGES
- bumped minimum required versions of command definitions
- fix an issue when commands returning multiple values (
Char#storeClosestEntities
,Game.GetCurrentResolution()
, etc.) returned just one correct value
- fix an issue when importing the same file from different folders would result in duplicate code
- fix a crash in
Memory.Fn
methods returning 8-bit or 16-bit results - fix a bug with corona rendering when only one corona was visible #98
SDK AND PLUGINS
- Dylib 2.0: the plugin rewritten to provide a behavior identical to CLEO4's LOAD_DYNAMIC_LIBRARY. Now a returned value is the loaded module's address in memory.
BREAKING CHANGES
- bumped minimum required versions of command definitions
- add support for GTA The Trilogy - The Definitive Edition v1.0.17.39540 (Epic Games Store)
- fix an issue when constructor commands for derived classes returned incorrect values (
Heli.Create
,Boat.Create
, etc.) - fix an issue when the library could not read the host version if the path to the executable contained non-ASCII characters
- improve log for objects: now it gets serialized with all properties, not just
[object Object]
INSTALLER
- update references to Ultimate ASI Loader files to match their new names on GitHub
- append
Gameface\Binary\Win64
if a root directory of GTA The Trilogy - The Definitive Edition is selected
SDK AND PLUGINS
- Events 1.1: add support for latest version of GTA The Trilogy - The Definitive Edition (v1.0.17.39540), all launchers
BREAKING CHANGES
- bumped minimum required versions of command definitions
- add support for GTA The Trilogy - The Definitive Edition v1.0.17.39540 (Rockstar Games Launcher)
- add support for GTA The Trilogy - The Definitive Edition v1.0.17.39540 (Steam)
- update default
tsconfig.json
to solve issues with importing JSON files. Delete yourtsconfig.json
if you want to recreate it with the new options.
- add support for GTA IV 1.2.0.59
- add support for GTA The Trilogy - The Definitive Edition (Steam) - v1.0.17.38838
- add
"moduleDetection": "force"
in defaulttsconfig.json
to solve error TS2451 in VS Code. Delete yourtsconfig.json
if you want to recreate it with the new option.
BREAKING CHANGES
- bumped minimum required versions of command definitions for GTA IV
- add a new property
CLEO.hostVersion
that returns the version of the current host. Currently only available if the current exe file has version info (e.g. GTA IV or GTA Trilogy) - fix a crash in GTA IV when loading a script with a syntax error
- fix an issue in GTA IV when some commands always returned the same value (e.g.
GET_CURRENT_CHAR_WEAPON
)
BREAKING CHANGES
- bumped minimum required versions of command definitions
CLEO.version
andCLEO.apiVersion
incorrectly returned empty strings for missing parts of the version string. Now they returnundefined
instead.
log(CLEO.apiVersion.patch); // was "" now undefined
log(CLEO.apiVersion.pre); // was "" now undefined
log(CLEO.apiVersion.build); // was "" now undefined
- new built-in functions
addEventListener
anddispatchEvent
. See https://re.cleo.li/docs/en/events.html - add
setTimeout
,setInterval
,clearTimeout
,clearInterval
. See https://re.cleo.li/docs/en/api.html - add
.cs
,.js
,.ts
to the list of allowed file extensions for CLEO.runScript - fix a rare deadlock causing scripts to stop on timeout
- fix an issue causing script failures after hot reload
- fix an issue when Bully commands returned incorrect values
SDK AND PLUGINS
- new SDK method
TriggerEvent
to trigger custom events with some payload. SDK version is now 7. - new Events plugin that brings in a few events to react on in JS/TS code:
OnVehicleCreate
,OnPedCreate
,OnObjectCreate
,OnVehicleDelete
,OnPedDelete
,OnObjectDelete
- IdeLoader 1.3: generate
ide_loader.d.ts
for better intellisense in TS scripts - TxtLoader 1.1: generate
txt_loader.d.ts
for better intellisense in TS scripts
BREAKING CHANGES
- bumped minimum required versions of command definitions
- add TypeScript support
- add support for commands using global SCM variables (e.g. counters or timers).
- delete previously deprecated variable
GAME
. UseHOST
instead - update script watcher: changing
.mjs
files in a script directory or any nested directories triggers script reload FxtStore
can be forced to mutate global FXT keys by setting the last argument inFxtStore.insert
andFxtStore.delete
to trueis_variadic
attribute is no longer used in JIT compilation of commands with thearguments
type
SDK AND PLUGINS
- IdeLoader 1.2: fixed a parser bug that prevented
.ide
files with a2dfx
section to be loaded - Frontend 1.1: reduced a timeout during a check for updates to 10 seconds
- ImGuiRedux: more commands
BREAKING CHANGES
- bumped minimum required versions of command definitions
- experimental support for async functions
- add new method
CLEO.runScript
to spawn new scripts - add FXT support in GTA IV
- changing JS files in a script directory makes this script to reload
i.e. if you have
CLEO\myscript\index.js
andCLEO\myscript\dep.js
, changing either file reloadsindex.js
- fix a crash on GTA III and GTA VC when a script continuously creates and destroys blips #75
BREAKING CHANGES
- bumped minimum required versions of command definitions for GTA IV
- add support for the latest Trilogy patch 1.04.5
- add methods
Memory.ReadUtf8
,Memory.WriteUtf8
,Memory.ReadUtf16
,Memory.WriteUtf16
for reading and writing strings from memory - setting
ONMISSION
variables totrue
allows usage of mission-only commands like00D9 STORE_CAR_CHAR_IS_IN
or00D8 MISSION_HAS_FINISHED
SDK AND PLUGINS
- new SDK methods
GetDirectoryPath
,GetCLEOVersion
,GetSymbolAddress
,GetNumberOfActiveCSScripts
,GetNumberOfActiveJSScripts
,IsEndOfArguments
. SDK version is now 6. - code that displays a CLEO version in the main menu was extracted into a separate plugin -
frontend.cleo
. Works with GTA III, VC, re3, reVC, and SA.
BREAKING CHANGES
- bumped minimum required versions of command definitions
- add JavaScript support in 64-bit versions of re3 and reVC (see Feature Matrix for details)
- make
CheckUpdates
option disabled by default
SDK AND PLUGINS
- make 64-bit version of IdeLoader
INSTALLER
- fix an error during the installation of ASI Loader in GTA IV
- add an extra step during the installation for re3 and reVC to select the correct version of the game (32-bit or 64-bit)
BREAKING CHANGES
- bumped minimum required versions of command definitions
- initial support for Bully: Scholarship Edition (v1.2 PC)
- fix a potential crash in gxt hook
- fix a potential issue with scripts not working after reload under some circumstances
SDK AND PLUGINS
- add
GTA IV
,Bully
, andManifest
toHostId
enum - update Input plugin to v1.3:
- use
GetAsyncKeyState
instead ofGetKeyState
- new commands GET_CURSOR_POS and SET_CURSOR_POS
- use
- new SDK method
OnShowTextBox
to register and run callbacks on aShowTextBox
function call. Implementing a custom callback shadows the default implementation for the given host (e.g. a message in the black rectangular text box). - unknown hosts can now have a manifest file to define a custom name and API files for the host
- SDK version is now 5
INSTALLER
- you can opt out of installing provided API files and download latest versions from Sanny Builder Library during the first game run
BREAKING CHANGES
-
bumped minimum required versions of command definitions
Pad
enum was renamed toPadId
to avoid conflicts with a staticPad
class.
- add initial support for GTA IV (The Complete Edition)
- all GTA games now use compound definitions (a combination of the primary JSON file and a JSON file for the Unknown host from Sanny Builder library)
- fix an issue when CLEO stopped loading FXT files after encountering non-UTF8 characters
- add CLEO.apiVersion property
SDK AND PLUGINS
- two new plugins: MemoryOperations and Input
- new SDK methods
OnBeforeScripts
,OnAfterScripts
,OnRuntimeInit
to register and run callbacks on each game tick or after game reload. See example of usage in the Input plugin.
INSTALLER
- installer now includes all files needed to setup and run CLEO Redux in offline mode
BREAKING CHANGES
- bumped minimum required versions of command definitions
- add support for custom file loaders allowing import of various file formats
- add new bindings available in JS code: a static object
CLEO
and a constant__filename
- add new config option
DisplayMenuInfo
to control whether CLEO Redux should display the version information in the main menu (supported in GTA III/VC/SA) - fix a conversion error in some commands when an integer number is given instead of a boolean
SDK AND PLUGINS
- when
RuntimeNextTick
is called with both arguments set to zero (RuntimeNextTick(0, 0)
) CLEO calculates correct values for current_time and time_step as the time elapsed from the last call ofRuntimeInit
and the delta time between two ticks respectively - add an option in the installer to download SilentPatch as a dependency of the ImGuiRedux plugin
- new methods
RegisterLoader
,AllocMem
,FreeMem
(see the guide) - new file loaders for Text files (any host) and IDE files (GTA3, VC, SA)
BREAKING CHANGES
- configuration option
LogOpcodes
is no longer applied to JS scripts. To start tracing executed commands in a script useCLEO.debug.trace(true)
. To disable tracing useCLEO.debug.trace(false)
. __dirname
is nowconst
and can not be changed- static methods have been excluded from fluent interface (can't be chained with other methods)
- CLEO can be embedded and run on unknown hosts via the self-hosted mode See demo
- new installer that automatically downloads extra dependencies such as Ultimate ASI Loader and plugins (dylib, IniFiles, or ImGuiRedux)
- support for organizing scripts and its dependencies in sub-directories inside the CLEO folder. See https://re.cleo.li/docs/en/script-lifecycle.html#organizing-scripts
- automatically download the latest
enums.js
file from Sanny Builder Library along with the command definitions. You can import enums in JS withimport * as enums from './.config/enums';
- memory access operations can run on an unknown host (previously they had a dependency on the
op
command which itself can only run in GTA games) Memory.CallFunctionReturnFloat
andMemory.CallMethodReturnFloat
are now available for 32-bit hosts.CallFunctionReturnFloat
has been previously added for 64-bit hosts.
SDK AND PLUGINS
- SDK's method
ResolvePath
now resolves paths starting with./
or.\
relative to the script directory. You can use them in commands likeREAD_INT_FROM_INI_FILE
orLOAD_DYNAMIC_LIBRARY
- new SDK methods
GetHostName
,SetHostName
,RuntimeInit
,RuntimeNextTick
. SDK version is now 2. - IniFiles plugin updated to 1.2: increased max length of the INI file path
- Dylib plugin updated to 1.1: increased max length of the DLL file path
BREAKING CHANGES
- delete previously deprecated command
op
. Usenative
instead. - rename
GAME
variable toHOST
(GAME
is still available for use but it's recommended to update older scripts)
Game | File | Minimum Required Version |
---|---|---|
GTA III, re3 | gta3.json | 0.218 |
GTA VC, reVC | vc.json | 0.220 |
GTA San Andreas (Classic) 1.0 | sa.json | 0.236 |
GTA III: The Definitive Edition | gta3_unreal.json | 0.213 |
Vice City: The Definitive Edition | vc_unreal.json | 0.215 |
San Andreas: The Definitive Edition | sa_unreal.json | 0.220 |
- add support for The Definitive Edition Title Update 1.04 (GTA III DE 1.0.0.15284, VC DE 1.0.0.15399, SA DE 1.0.0.15483)
- fix an issue with string arguments in Memory call commands in GTA San Andreas (#36)
- fix an issue with scripts not working if the path to the game directory has square brackets
[
,]
- add SDK for developing custom commands in C++ and Rust
- add support for fallible commands in JS (also known as
IF and SET
commands in SCM scripts), they returnundefined
when failing, e.g.DynamicLibrary.Load
orChar.IsInAnySearchlight
) - two new plugins adding commands to work with DLL (
dylib.cleo
) and INI files (IniFiles.cleo
) in all supported games - add
__dirname
variable in JS scripts that resolves to the current file's directory - add a new function native that calls a scripting command by name (similar to
op
):
/** Executes a named command with the given arguments */
declare function native<T>(name: string, ...args: any[]): T;
const lib = native("LOAD_DYNAMIC_LIBRARY", "test.dll");
- fix a rounding issue with floating-point numbers in GTA 3
- fix an issue with imports not working in JS when the CLEO folder is located in the AppData directory
- fix an issue with the
showTextBox
command in San Andreas displaying some garbage text - fix a conversion error when the
showTextBox
command is given an integer argument - fix an issue with scripts permissions not being validated for JS scripts
- fix an issue when the object returned as a result of some commands (
Object.GrabEntityOnRope()
,Heli.GrabEntityOnWinch()
and like) did not have relevant fields wrapped in a class instance
INSTALLATION STEPS
https://github.com/cleolibrary/CLEO-Redux/blob/master/README.md#installation
BREAKING CHANGES
Game | File | Minimum Required Version |
---|---|---|
GTA III, re3 | gta3.json | 0.208 |
GTA VC, reVC | vc.json | 0.210 |
GTA San Andreas (Classic) 1.0 | sa.json | 0.210 |
GTA III: The Definitive Edition | gta3_unreal.json | 0.210 |
Vice City: The Definitive Edition | vc_unreal.json | 0.212 |
San Andreas: The Definitive Edition | sa_unreal.json | 0.216 |
- add support for JS scripts in GTA III: The Definitive Edition (v1.0.0.14718) and Vice City: The Definitive Edition (v1.0.0.14718) (some limitations apply, see Feature support for the details)
- add support for modern ES6+ syntax (arrow functions, const/let, classes, more methods in the standard library, etc), see Mines Drop script as an example
- add support for importing other scripts and JSON files
For 64-bit games (The Trilogy):
- you can now call game functions with floating-point arguments - thanks to @ThirteenAG.
- new command
Memory.CallFunctionReturnFloat
that is similar toMemory.CallFunctionReturn
but is used for functions that return a floating-point number
let x = Memory.FromFloat(123.456);
let y = Memory.FromFloat(456.555);
let groundZ = Memory.CallFunctionReturnFloat(0x100cc50, true, 2, x, y);
- new convenience method
Memory.Fn.X64Float
that can be used for functions that return a floating-point number:
let CWorldFindGroundZForCoord = Memory.Fn.X64Float(0x100cc50, true);
let x = Memory.FromFloat(123.456);
let y = Memory.FromFloat(456.555);
let groundZ = CWorldFindGroundZForCoord(x, y);
- add CALL_FUNCTION and CALL_FUNCTION_RETURN commands in San Andreas: The Definitive Edition
- add
Memory.Fn.X64
convenience methods for calling functions from JavaScript on the x64 platform showTextBox
now works in San Andreas: The Definitive Edition- fix an issue with FxtStore object not showing in VS Code autocomplete
- fix an issue with text draw not working in GTA San Andreas
- fix an issue in CLEO dev builds causing the game crash on startup while checking for an update
- minimum required version of
sa_unreal.json
is0.209
- add support for static FXT files in
CLEO_TEXT
folder - add support for private FXT storage in each JS script
- fix an issue when scripts permissions were not validated for CLEO scripts
- fix an issue when the game may crash on the script reload
- custom CLEO opcodes (
0C00
-0C07
) can now be used in the main.scm in San Andreas: DE
-
for San Andreas: The Definitive Edition:
- new opcodes
0C06 WRITE_MEMORY
and0C07 READ_MEMORY
, as well as corresponding JavaScript commands:Memory.Write
andMemory.Read
. Read the guide for more information - fix an issue with opcodes
0C01
,0C02
,0C03
,0C04
crashing the game
- new opcodes
-
for all games:
- improve stability of JS scripts (#22)
- fix an issue when scripts permissions were not validated for CLEO scripts
CLEO Redux for San Andreas: The Definitive Edition now uses sa_unreal.json
from https://github.com/sannybuilder/library.
Game | Minimum Required Version |
---|---|
GTA III, re3 | 0.200 |
GTA VC, reVC | 0.201 |
GTA San Andreas (Classic) 1.0 | 0.202 |
San Andreas: The Definitive Edition | 0.204 |
- fix a critical bug in CS scripts scheduler causing abnormal behavior (mostly resulting in slow execution) (#21)
- fix an issue making coronas created in CLEO scripts not render (#23)
- CLEO now uses AppData directory if there is no write permissions in the current game directory (see First Time Setup note)
- add fluent interface for methods on constructible entities. See demo: https://www.youtube.com/watch?v=LLgJ0fWbklg
- fix an issue when a script could run during game pause (when the game menu is active)
- add support for San Andreas: The Definitive Edition v1.0.0.14718 (Title Update 1.03)
- new 64-bit version of CLEO Redux (cleo_redux64.asi). It's intended to work only with remastered games.
- initial support for San Andreas: The Definitive Edition v1.0.0.14296 and v1.0.0.14388
- fix an issue when scripts might not reload after loading a save file
showTextBox
function does not work in JavaScript in San Andreas: The Definitive Edition- CLEO does not display its version in the main menu in San Andreas: The Definitive Edition
- minimum required version of
gta3.json
is0.100
- minimum required version of
vc.json
is0.145
- minimum required version of
sa.json
is0.175
- CLEO Redux now works on Windows 7
- fix: some custom command could have unconventional arguments order (e.g. 0AA4 GET_DYNAMIC_LIBRARY_PROCEDURE)
- fix: "if and set" commands had incorrect definitions in *.d.ts file
- ignore mobile and console command definitions (fixes #6)
- minimum required version of
vc.json
is0.144
- minimum required version of
sa.json
is0.168
- ensure custom scripts have unique in-game names when the first 7 characters of their file names are the same (e.g. scripts in files
spawner_a.cs
,spawner_b.cs
,spawner_c.cs
would now have namesspawner
,spawn01
,spawn02
respectively) - fix: internal address error could make a JS script execute a wrong instruction
- minimum required version of
sa.json
is0.167
- add
ONMISSION
variable that can be used to manipulate the global player's on a mission status
if (!ONMISSION) {
showTextBox("Not on a mission. Setting ONMISSION to true");
ONMISSION = true;
}
- using
new
operator on a static object (for which Sanny Builder Library does not define a constructor, e.g.Audio
orHud
) now throws an error:
var hud = new Hud(); // error: Hud is not constructable
- minimum required version of
sa.json
is0.166
- new static function
Memory.Translate
to get memory address of a function or variable by its name (see documentation) - new function
exit
to terminate the script early
- CLEO Redux can now work as an extension to CLEO Library (see Relation to CLEO Library)
- CLEO Redux is now able to execute JavaScript in GTA San Andreas with CLEO 4.4 installed
- new config parameter
AllowCs
to control*.cs
scripts - fix: ini config was ignored if there were missing parameters in the
cleo.ini
CLEO Redux' primary distribution file has been renamed to cleo_redux.asi
. To avoid conflicts with previously installed versions of CLEO Redux manually delete old cleo.asi
file from the game directory.
- add CALL_FUNCTION, CALL_FUNCTION_RETURN, CALL_METHOD, CALL_METHOD_RETURN. See Using Memory for more information.
- update typings to include links to relevant documentation
- fix crash in
Memory
class methods
- add INT_ADD, INT_SUB, INT_MUL, INT_DIV commands
- math operations are now available through the native JavaScript
Math
object where possible (see documentation). - new static methods in
Memory
class. See documentation for more info
asFloat
has been removed in favor ofMemory.ToFloat
- class
Object
has been renamed toScriptObject
to avoid conflicts with native JavaScript Object. - deprecated command
isKeyPressed
has been deleted. UsePad.isKeyPressed
instead
- add a new built-in JavaScript function
asFloat
to cast an integer value returned by theMemory.Read
command to a floating point number (IEEE 754)
var gravity = asFloat(Memory.Read(gravityAddress, 4, false)); // the gravity var now holds a floating-point value
- auto-generated
*.d.ts
files now make a distinction between integer and floating-point parameters, VS Code autocomplete now displays them withint
andfloat
types respectively - auto-generated
*.d.ts
files now have<reference no-default-lib="true"/>
so it is no longer needed to add this line in a script file to exclude unsupported JS commands from autocomplete - fix:
op
incorrectly returned any single value as integer regardless of the type information - fix:
showTextBox
command was missing in thecleo.log
withlogOpcodes=1
- CLEO now checks for updates and notifies in the main menu (can be disabled with
CheckUpdates=0
) - command
isKeyPressed
has been deprecated, usePad.IsKeyPressed
instead - fix: deadlock causing timeouts in JS scripts
- add support for
Boolean
,null
andundefined
as arguments of theop
command - allow arbitrary size in
0A8C WRITE_MEMORY
to fill a continiuos block of memory with a single byte value - fix: after reloading the game JS scripts could have been duplicated
- add support for GTA III 1.0 and GTA VC 1.0
- add support for auto-incrementing variables
TIMERA
andTIMERB
- add permission levels for unsafe opcodes
- add two unsafe opcodes:
0A8C WRITE_MEMORY
and0A8D READ_MEMORY
- fix: custom opcodes did not work in main.scm
- fix: gosub did not work in CS scripts
- fix: race condition caused false-positive timeouts for JS scripts
- add bindings for all opcodes in JS scripts
- CLEO can now generate a
*.d.ts
file for autocomplete in VS Code - add hot reload for
*.js
files - fix: opcodes log did not work even with
LogOpcodes=1
- add
op
function to execute any opcode from JavaScript code - add
GAME
constant to check the current host game - CLEO now keeps its settings in
CLEO/.config/cleo.ini
created on the first run - JavaScript support can be disabled using
AllowJs=0
setting
- add experimental VM executing ECMAScript 5 (JavaScript)
- watch the CLEO directory and start/stop scripts if a CS file has been added or deleted
- add hot reload
- add support for reVC
- initial release