5.4.0
- fixed discrepancy between CLEO and native subtitles behavior:
PRINT_STRING and PRINT_FORMATTED now queue correctly
- CLEO messages are now added to the Brief Menu history, respecting the
ADD_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS flag (no change for .cs4 scripts)
- CLEO subtitles starting with a
~z~ token are now hidden when "Show Subtitles" option is disabled (no change for .cs4 scripts)
- CLEO config (
CLEO\.cleo_config.ini) improvements:
- new
LogDirectory option to configure where cleo.log and cleo_script.log are stored (root by default)
- config is now recreated if missing, and new config keys are appended to existing user configs
- config is reloaded on a new game session
READ_MEMORY_WITH_OFFSET and WRITE_MEMORY_WITH_OFFSET now behave identically to READ_MEMORY/WRITE_MEMORY; READ_MEMORY_WITH_OFFSET no longer reads input as a null-terminated string when the output is a string variable
- removed a check preventing allocation of zero-sized memory blocks
- hardened path validation to prevent access to files outside of game root and settings directories
- fixed an issue causing scripts to load and execute twice on a new game session
- fixed multiple bugs related to game crashes and script handling
- fixed script corruption when loading a CLEO mission exceeding 69,000 bytes
- updated BASS and simdjson libraries; removed deprecated EAX check from BASS
5.3.0
- moved CLEO core and plugin settings into a shared configuration file (
CLEO\.cleo_config.ini)
- improved compatibility with ModLoader
- refactored error handling and relaxed checks for non‑critical errors
- keyboard input is now ignored when the game window is not focused
- increased text length limit from 255 to 399 for:
- fixed a memory leak caused by creating too many script TXDs
- fixed multiple issues with string‑formatting opcodes
- fixed a crash in print string commands when processing very long input
- fixed GET_AUDIO_STREAM_DURATION always returning
0
- fixed an incompatibility with the result of SAMP_RAKNET_HOOK_RETURN
5.2.0
- added script execution log (
cleo\_cleo_script.log). By default, it's disabled. Configurable via cleo_plugins\DebugUtils.ini.
- added call stack overflow error check to gosub and gosub_if_false commands
- added check for preceding gosub call in 0AA1 (return_if_false)
- added limit for memory allocated per script (see
cleo_plugins\SA.MemoryOperations.ini). Exceeding the limit will cause a warning in game
- added listing of remaining memory blocks allocated by scripts to the cleo.log when closing or starting new game
- added support of string pointers as output type in 0AD4 (scan_string)
- added more checks for correctness of format string in 0AD4 (scan_string)
- fixed false positive
Code execution past script end error messages when calling functions from CLEO modules
- added error message when the script silently crashes in SAMP due to the script problem
- fixed problem with texture sprites corruption, now scripts can safely use sprites from multiple TXDs
- remove trailing whitespace from FXT entries preventing them from being displayed in game
- new SDK method:
CLEO_CallNativeOpcode. See SDK documentation: https://github.com/cleolibrary/CLEO5/wiki/CLEO-5-SDK
5.1.0
- fixed collision of GXT texts hook with SAMP and other mods
- rewritten script drawing handling code. Logic moved from CLEO.asi to Text.cleo plugin
- relocated several opcodes from CLEO core into new GameEntities.cleo plugin
- fixed 0ADD (spawn_vehicle_by_cheating) crashing when invalid model id was used
- new CLEO plugin: Input.cleo
- new opcode 2080 (is_key_just_pressed)
- new opcode 2081 (get_key_pressed_in_range)
- new opcode 2082 (get_key_just_pressed_in_range)
- new opcode 2083 (emulate_key_press)
- new opcode 2084 (emulate_key_release)
- new opcode 2085 (get_controller_key)
- new opcode 2086 (get_key_name)
- added warning message to commands 0AC2-0AC5 if used with non-3d audio streams
- call function/method commands 0AA5-0AA7 are now setting logical result
- limited "previously called opcode" info in script error messages to show just commands of that script
- now more script error messages include previously executed command name
- added missing terminate_this_script command error message for scripts compiled with extra SCM info
5.0.3
- added GxtHook.cleo plugin to ignored list
- fixed audio streams stopping when volume was set to 0.0
- fixed audio streams potentially not starting to play if still decoding or downloading
- volume of audio streams with type None and UserInterface no longer affected by screen fades
5.0.2
- updated BASS library
- fixed Doppler effect calculations for 3d audio streams
- fixed sound glitches of 3d audio streams when playback starts or the camera mode changes
- fixed possible crashes when car/object/ped with attached 3d audio stream is deleted
- fixed CLEO sound artifacts when moving camera with mouse
- updated distance decay for 3d audio streams to match behavior of in-game sounds
- implemented proper support for 3d audio streams source size
- CLEO sounds volume is now affected by wide screen and fades in same way as in-game sounds
- updated "Audio_Demo" example script
- reverted muting 'music' type audio streams for game speeds other than default introduced in 5.0.1
- allow storing string result at static address (e.g.
get_name_of_vehicle_model 400 0xC16F98)
- fixed path resolution issues when the game is installed in symlink or RAM Disk directory
- fixed audio playback not working in SAMP
5.0.1
5.0.0
- support for CLEO modules feature https://github.com/sannybuilder/dev/issues/264
- new Audio plugin
- new DebugUtils plugin
- new opcode 00C3 (debug_on)
- new opcode 00C4 (debug_off)
- new opcode 2100 (breakpoint)
- new opcode 2101 (trace)
- new opcode 2102 (log_to_file)
- implemented support of opcodes 0662, 0663 and 0664 (original Rockstar's script debugging opcodes. See DebugUtils.ini)
- new FileSystemOperations plugin
- forbidden scripts from accessing and changing any files outside game root or game settings directory
- file related opcodes moved from CLEO core into separated plugin
- opcode 0A9E (write_to_file) now supports literal numbers and strings
- opcode 0AD7 (read_string_from_file) no longer includes new line character(s) at end of read string
- fixed bug causing file stream opcodes not working correctly when read-write modes are used
- fixed buffer overflows in file stream read opcodes
- added/fixed support of all file stream opcodes in legacy mode (Cleo3)
- new opcode 2300 (get_file_position)
- new opcode 2301 (read_block_from_file)
- new opcode 2302 (write_block_to_file)
- new opcode 2303 (resolve_filepath)
- new opcode 2304 (get_script_filename)
- new Math plugin
- new MemoryOperations plugin
- new Text plugin
- new and updated opcodes
- changes in file operations
- file paths can now use 'virtual absolute paths'. Use prefix in file path strings to access predefined locations:
root:\ for game root directory
user:\ for game save files directory
.\ for this script file directory
cleo:\ for CLEO directory
modules:\ for CLEO\cleo_modules directory
- rewritten opcode 0A99 (set_current_directory). Now it no longer affects internal game state or current directory in other scripts
- improved error handling
- more detailed error messages in multiple scenarios
- some errors now cause the script to pause, instead of crashing the game
- updated included Silent's ASI Loader to version 1.3
Bug Fixes
- fixed error in 004E (terminate_this_script) allowing to run multiple missions
- fixed handling of strings longer than 128 characters causing errors in some cases
- fixed error in handling of first string argument in 0AF5 (write_string to_ini_file)
- fixed resolution dependent aspect ratio of CLEO text in main menu
- fixed clearing mission locals when new CLEO mission is started
- when reading less than 4 bytes with 0A9D (readfile) now remaining bytes of the target variable are set to zero
- fixed invalid 7 characters length limit of 0AAA (get_script_struct_named)
- fixed an undefined behavior caused by 0459 (terminate_all_scripts_with_this_name) when the name matches a custom script
SDK and plugins
- now all opcodes in range 0-7FFF can be registered by plugins
- plugins moved to cleo\cleo_plugins directory
- new SDK methods:
- CLEO_GetVersionStr
- CLEO_RegisterCommand
- CLEO_RegisterCallback
- CLEO_GetVarArgCount
- CLEO_PeekIntOpcodeParam
- CLEO_PeekFloatOpcodeParam
- CLEO_PeekPointerToScriptVariable
- CLEO_SkipUnusedVarArgs
- CLEO_ReadParamsFormatted
- CLEO_ReadStringParamWriteBuffer
- CLEO_GetOpcodeParamsArray
- CLEO_GetParamsHandledCount
- CLEO_IsScriptRunning
- CLEO_TerminateScript
- CLEO_GetScriptVersion
- CLEO_SetScriptVersion
- CLEO_GetScriptInfoStr
- CLEO_GetScriptFilename
- CLEO_GetScriptWorkDir
- CLEO_SetScriptWorkDir
- CLEO_ResolvePath
- CLEO_ListDirectory
- CLEO_ListDirectoryFree
- CLEO_GetGameDirectory
- CLEO_GetUserDirectory
- CLEO_GetScriptByName
- CLEO_GetScriptByFilename
- CLEO_GetScriptDebugMode
- CLEO_SetScriptDebugMode
- CLEO_Log
CLEO internal
- introduced unit test scripts
- project migrated to VS 2022
- configured game debugging settings
- plugins moved into single solution
- configured automatic releases on GitHub
- added setup_env.bat script
Older
For previous changes, see CLEO4 changelog
Special Thanks
- 123nir for the v5.0.0-alpha testing, troubleshooting and valuable bug reports
- Hamal for the v5.0.0-beta testing, troubleshooting and valuable bug reports