#1 Re: GTA Modding » [SA|REL] CLEO 4.3 » 15-01-2014 01:57


Fixed .cleo plugins not working below Vista, fixed compatibility with Zaz's "Pimp My Car" mod, fixed surround sound & 3D audio stream bugs, added floating point audio decoding support for better audio quality & performance (where supported) and fixed sound not pausing when you Alt+Tab out of the game.

#2 GTA Modding » [SA|REL] CLEO 4.3 » 23-11-2013 01:49

Replies: 2
CLEO 4.3


CLEO is a hugely popular extensible library plugin which brings new possibilities in scripting for the game Grand Theft Auto: San Andreas by Rockstar Games, allowing the use of thousands of unique mods which change or expand the gameplay.
You may find more information about CLEO in the Sanny Builder help and on the website http://cleo.li

I'm now developing this.

Change Log

-- 4.3.15 --

* Improvemed compatibility fix for opcodes 0AE1, 0AE2 and 0AE3 with incorrect find_next usage

-- 4.3.14 --

* Fixed 0AAA only returning custom scripts

* Fixed many things which use the 'SCM Block' or 'Mission Local Storage' space

* Fixed parameters being passed to script local storage instead of mission local storage through 0A94

* Fixed potential problems with iteration through the script queues (may cause rare and hard to trace bugs)

-- 4.3.13 --

* Fixed crashing when starting a new game after a game has already started with CLEO scripts installed

* Possibly fixed other issues with starting a game with CLEO scripts installed

-- 4.3.12 --

* Fixed string parameter skipping in 'SkipOpcodeParams' used by CLEO plugins

* 0AC8 now returns a NULL value to the output var if allocation failed (as it did before 4.3a)

* 0AC9 now checks the memory was allocated by 0AC8 before attempting to free it

* FXT references are now case insensitive (as they were before 4.3a)

* File operations now check the input handle isn't null (as it seems was the way before 4.3a)

* 'Loaded mission' status now reset on new/loaded game (as it was before 4.3a)

* Scripts no longer load prematurely (like before 4.3a)

* Resolved conflicts with other menu hooks such as 'HUME'

* Other minor tweaks

-- 4.3.11 --

* Fixed crash with 0ADA in scripts beginning with an opcode ending in '00'

-- 4.3.10 --

* Improvements to opcodes 0AE1, 0AE2 and 0AE3 - now loops around the pool even when the 'find_next' flag isn't used correctly

* Fixed 0AD2 not returning peds targetted with the mouse, while targetting with a pad worked

-- 4.3.9 --

* Will now be able to start a CLEO mission after recently finishing a standard mission

* Will no longer error & terminate when scripts fail to open and instead simply log the error

* Will no longer terminate on warnings

* No longer includes paths in automatically generated script names (e.g. cleo\dir\demo.cs is now named 'demo.cs' and not 'dir\dem')

* Improved handling of script load errors

-- 4.3.8 --

* Fixed crash which would occur when missions were ended with 004E

-- 4.3.7 --

* Custom missions launched by CLEO scripts now inherit their compatibility mode - possibly fixing incompatibilities with mods using custom missions

* The current directory set by 0A99 is now script-dependant and only affects running CLEO scripts (not the entire game or the main.scm)

* Text and texture/sprite draws are now script-dependant (doesn't affect main.scm scripts)

-- 4.3 --

* Replaced code which dynamically allocated and deallocated memory for script parameters every time 0AA5-0AA8 were called with static arrays

* Removed a script execution loop replacement which wasn't used for anything important and weirdly only worked with 1.0US that caused crashes with script logging plugins

* Added support for Steam (v3) versions of gta_sa.exe

* Prevented the local storage from being initialized in SCM functions when the script is in CLEO 3 compatibility mode ('.cs3' extension)

* Updates to behaviour of following opcodes:

CHANGE_DIRECTORY can now correctly change to the program directory

OPEN_FILE now uses a 'legacy' mode when passing an integer as the mode parameter for compatibility of CLEO file handles and SA file handles
Note that you should really not pass CLEO file handles to game functions. However, this legacy mode now ensures that the handles are compatible.
Other file functions have also been updated ensuring that game file handles are passed to relevant game functions.
It is recommended to not rely on passing files to game functions and instead use CLEO 4's in-built file functions in future.

CALL now accepts string input, which is passed as a string pointer following string convention

SCAN_STRING now returns a condition result

FIND_FIRST_FILE now accepts string array output

FIND_ALL_RANDOM_OBJECTS_IN_SPHERE now ensures no fading objects are returned and returns -1 instead of 0 on failure

FIND_ALL_RANDOM_CARS_IN_SPHERE now ensures no script vehicles or fading vehicle are returned and returns -1 instead of 0 on failure

FIND_ALL_RANDOM_CHARS_IN_SPHERE now ensures no script characters or fading characters are returned and returns -1 instead of 0 on failure

ADD_TEXT_LABEL now updates existing text labels if they already exist

IS_END_OF_FILE_REACHED now returns true if a file error occured

GET_CHAR_PLAYER_IS_TARGETING now returns -1 instead of 0 when no target is found

STORE_CLOSEST_ENTITIES now ensures no script entities or fading entities are returned and ensures the player ped is not returned

Download (setup)
Download (zipped)

#3 Re: GTA Modding » Exporting variables from CLEO script » 08-10-2013 14:53

You could use files or if the other program is injected into the memory, allocated memory (or code data). There's no dynamic link library style exporting, though...

#4 GTA Modding » [ASI | OpenSrc] Custom Plate Format » 02-09-2012 02:29

Replies: 0

[center]Custom Plate Format[/center]


This mod allows you to change how the car license plates of SA are generated using basic formatting.


As requested by a GTAForums member.


#5 Re: GTA Modding » CLEO 4. Questions and bug reports. » 19-01-2012 21:02

Any idea what is causing the game to have a specific NTDLL crash when a new game is started while using CLEO 4 and the VC++ debugger?

And does anyone know how the hell to even compile the source? tongue Does it require linux or what?

#7 Re: GTA Modding » CLEO 4. Questions and bug reports. » 15-10-2011 01:01

I'd be willing to take it on, just focusing on fixing what current bugs I could. I'm not as free with time as I used to be and am not sure what to expect within the source outside of what I've seen from my decompilation of the CLEO ASI, so I can't promise to fix everything or build on it. Still got a lot to do with Vigilante Justice, after all.

The sounds playing while minimised would be easy enough to fix, at least.

By the way, Alien, what was the purpose of diverting SA file functions to CLEO ones? Fix for the game file function and CLEO file handle incompatibility? It may have caused me some previous problems in a project of mine.

#9 Re: GTA Modding » CLEO 4. Questions and bug reports. » 29-09-2011 20:43

Time to go open source?

Although I'd personally gain more from the Sanny Builder source tongue

#10 Re: GTA Modding » CLEO 4. Questions and bug reports. » 17-09-2011 21:41

It'd be a bit of a waste of time for me to make it only for CLEO 4 to be updated a month later. I already have a lot of my own things to finish and little time to work on them. It'd make a lot more sense to just wait for a CLEO 4 update, if one is due. Let me know if you need any help, though.

#11 Re: GTA Modding » SA ScrDebug » 08-09-2011 23:09

Another update. Pretty exciting one, actually. Added an opcode to clear the onscreen debug messages.

But the best bit is also incomplete. 00CC isn't based on an Original R* Opcode (although judging from the GTA IV natives list, one may have existed) but is still pretty damn helpful. It adds a breakpoint to the script, making the game freeze midway through parsing the script. This means you can go through SA's memory and check everything is in order. It also creates a HTML file containing information about the script including it's variables and global variables 2-1024 (as I said, this isn't complete, but I had to release the ScrDebug updated from before anyway).

A window will open up while the game is frozen which gives you the option to continue the game or disable the breakpoint. So you could hapily have the breakpoint in a loop and just disable it when you want to continue. The breakpoint is simply replaced with 0000.

I've found this opcode pretty helpful. Hopefully others will too. I'll soon try to add a decompiled output of what has run up to the breakpoint showing what opcodes returned, what vars contained, what conditions returned etc.

#12 Re: GTA Modding » CLEO 4. Questions and bug reports. » 12-08-2011 13:34

Heh, if I knew for sure that there will be no updates, I might make CLEO 4 bugfixes in a separate ASI. I think I know how to fix that one, for starters.

#13 Re: GTA Modding » CLEO 4. Questions and bug reports. » 23-07-2011 02:54

Question: Is CLEO still being worked on or should we lose faith? There's been no updates in months and the bug reports are only stacking up. I've tried to keep a posotive look towards the future of CLEO 4 but at the moment a future for it appears inexistant.

#16 GTA Modding » SA ScrDebug » 29-06-2011 19:11

Replies: 3

[center]SA ScrDebug[/center]

Finally, Rockstar-style SCM Debugging for San Andreas.


#17 GTA Modding » San Andreas Script Reloader » 25-06-2011 18:29

Replies: 0

Allows you to compile script.img and test the changes quickly, without closing the game.


Requires patching sanny.exe and a minor edit of gta.dat - as well as ASI installation.

#18 Re: Справочная информация » Адреса и функции gta_sa.exe 1.0 » 09-06-2011 01:50

0A8C: write_memory 0xB5F852 size 1 value 1 virtual_protect 0
0A8C: write_memory 0x748BC5 size 2 value 0x13C virtual_protect 1
0AA5: call 0x747660 num_params 2 pop 2 "movies\\Logo.mpg" 0
0A8C: write_memory 0xC8D4C0 size 1 value 4 virtual_protect 0
003D: // same as wait 0 - returns from script parsing
0AA5: call 0x746740 num_params 0 pop 0
0A8C: write_memory 0xBA677B size 1 value 0 virtual_protect 0
0A8C: write_memory 0xB5F852 size 1 value 0 virtual_protect 0

#19 Re: GTA Modding » CLEO 4. Questions and bug reports. » 21-05-2011 10:52

fastman92 wrote:

0A99 opcode works only for CLEO file opcodes like 0A9A=3,%3d% = openfile %1s% mode %2d% ; IF and SET
it works probably for INI opcodes.
It is not for GTA SA standard texture opcodes.

0390: load_txd_dictionary 'LD_BEAT'

Texture dictionary LD_BEAT.txd must exist in models\txd

chdir calls a San Andreas function (see CLEO 2 Source) which is used to switch between the user files and installation directories.

#20 Re: GTA Modding » Sanny Builder / CLEO discussion » 20-04-2011 15:17

Why do you need to? Eventually you'll run out of variables and the game will crash from overflow...

while true
    wait 10000
    00A0: store_actor $PLAYER_ACTOR position_to 1@(0@,1f) 2@(0@,1f) 3@(0@,1f)
    000A: 0@ += 3
    80DF:   not actor $PLAYER_ACTOR driving
    jf continue

In this example, if the loop runs for long enough, mission variables will be overwritten - which is safe as long as there is no mission running. But eventually, you'll pass the variable limit and start overwriting more important data.

#21 Re: GTA Modding » CLEO 4. Questions and bug reports. » 06-04-2011 22:39

fastman92 wrote:
0AC9: free_allocated_memory 0@

It shouldn`t damage GXT entry, it does. Why freeing allocated memory to which GXT entry was received should damage GXT entry, it is strange.

You don't need allocated memory. Use 0ADE like I showed in the example, on it's own.

#22 Re: GTA Modding » CLEO 4. Questions and bug reports. » 31-03-2011 03:50

wait 0
00BC: show_text_highpriority GXT 'BOATS' time 1000 flag 1
0AB0: key_pressed 48    // 0
jf @TEST
0ADE: 0@ = text_by_GXT_entry 'BOATS'
0AD1: show_formatted_text_highpriority "test: %s" time 3000 0@
wait 3000
jump @TEST

#23 Re: GTA Modding » GTA Garage Is Down Today ?! » 14-03-2011 17:30

It always goes down. It's never really a surprise for me.

#24 GTA Modding » [SCM|Rant] You Don't Know How To Load Models Properly » 11-03-2011 22:07

Replies: 2

Can't be assed to translate all the BB Code (can we have a Sanny syntax tag here? tongue) so here's a link. I just like to gloat smile

[SCM|Rant] You Don't Know How To Load Models Properly

I'll shuddup now... "noobs" may gloat away.

#25 Re: GTA Modding » GTA Garage Is Down Today ?! » 11-03-2011 20:06

You're suprised? You mustn't have been visiting GTANet services for long... tongue

Board footer

Powered by FluxBB