Jump to content

[SA|REL] CLEO 4.3


Deji

Recommended Posts

CLEO 4.3


Visit CLEO Website

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.sannybuilder.com

I'm now developing this.

Now with legacy (CLEO 3) mode!
Name problematic CLEO 3 scripts with the '.cs3' extension for added compatibility with certain CLEO 3 scripts and CLEO 4 (rarely necessary).

CLEO 4
--------------------
Change Log


-- 4.3.22 --

* Now creates cleo, cleo/cleo_saves and cleo/cleo_text folders on startup if they do not exist
* Fix to issue with 0AE9 not returning result

-- 4.3.21 --

* Fixed operand type IDs in CLEO.h
* Added 'extern' to variables declared in CLEO.h

 

* Fix to issue with 0AB1 in missions not storing mission locals

 

-- 4.3.19-20 --
* Fixed issue with 0AB1 passing incorrect variable scope in missions
* Updated SDK version


-- 4.3.17-18 --
* Fixed potential future problem with 0AB0 which used methods with undefined behaviour
* Fixed incorrect method used for 0AB7

-- 4.3.16 --
* Fixed bugs with CLEO saves when saved scripts ended

-- 4.3.15 --
* Improved 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:

0A99 - CHANGE_DIRECTORY can now correctly change to the program directory

0A9A - 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.

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

0AD4 - SCAN_STRING now returns a condition result

0AE6 - FIND_FIRST_FILE now accepts string array output

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

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

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

0ADF - ADD_TEXT_LABEL now updates existing text labels if they already exist

0AD6 - IS_END_OF_FILE_REACHED now returns true if a file error occured

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

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


The change log mainly highlights changes to opcodes (pretty important for scripters).

Mirrors (latest build: v4.3.22)
Download (setup)
Download (zipped)

Edited by Deji
Link to comment
Share on other sites

First ! :D

EDIT:

adjnYG32.jpgacho7Znb.jpgadsy5zDE.jpg

 

tested it, finally ryosuke's missile script works with *.cs3 compability mode. but when used together with stinger.cs (Man Portable Missile) it freezed, as far as i remember it works with CLEO3 :/ or not?

Edited by Sidoarjo_Modder
Link to comment
Share on other sites

Thank you for your work on CLEO 4.3, that's a nice contribution.

Link to comment
Share on other sites

First ! :D

 

EDIT:

adjnYG32.jpgacho7Znb.jpgadsy5zDE.jpg

tested it, finally ryosuke's missile script works with *.cs3 compability mode. but when used together with stinger.cs (Man Portable Missile) it freezed, as far as i remember it works with CLEO3 :/ or not?

 

See the page: http://hotmist.ddo.jp/cleomod/stinger/index.html

"This script had been jointed to Missile."

 

So, if you're using the missile script, you don't need man portable missile.

Link to comment
Share on other sites

It's not working here. I'm getting an error message entirely in Japanese (so I can't even read what it says), and the game just refuses to start.

 

EDIT: It turns out it's the Script Dependent Drawings plugin that's causing the error.

 

EDIT2: Now I have a different problem. The game just crashes after I try to load a saved game.

Edited by Zera
Link to comment
Share on other sites

It's not working here. I'm getting an error message entirely in Japanese (so I can't even read what it says), and the game just refuses to start.

 

EDIT: It turns out it's the Script Dependent Drawings plugin that's causing the error.

 

EDIT2: Now I have a different problem. The game just crashes after I try to load a saved game.

The Script Dependant Drawings plugin seems to require modifying CLEO opcodes via memory in order to work, so it working will be very specific to each version of CLEO.

 

Assuming the other problem is without that plugin, I'll need to know which script or plugin is causing the problem. Can you get CLEO to run without any scripts or plugins? If so, which one causes the crash when you restore it?

Link to comment
Share on other sites

It turns out it's one of your own cleo scripts, Stream Ini Extender, that's causing the crash. It works fine without it.

 

I only use the framedelay feature of it, if that helps.

Edited by Zera
Link to comment
Share on other sites

aStiffSausage

Same here, Stream Ini Extender crashing the game. Also, I'm using ZAZ's Pimp My Car, and it crashes as soon as you try to enable it. Just a shot in the dark but... 0A94?

Link to comment
Share on other sites

Same here, Stream Ini Extender crashing the game. Also, I'm using ZAZ's Pimp My Car, and it crashes as soon as you try to enable it. Just a shot in the dark but... 0A94?

 

Now with legacy (CLEO 3) mode!

Name problematic CLEO 3 scripts with the '.cs3' extension for added compatibility with certain CLEO 3 scripts and CLEO 4 (rarely necessary).

So name Stream Ini Extender 'StreamIniExtender.cs3'. Try it with Pimp My Car, too. I hope it works because I reeallly don't want to install a mod so complex right now :p

Link to comment
Share on other sites

Renaming appears to have worked.

 

I got another crash while in-game, must be another problematic script. I'll try renaming some other ones.

Edited by Zera
Link to comment
Share on other sites

Breaking compatibility with your own mods, that's something :D

Link to comment
Share on other sites

aStiffSausage

Heh, Stream Ini Extender seems to be working now. Stupid me. ._.

But the problem with Pimp My Car still exists, my shot in the dark appears to be lucky one.
fa1b8b89576c490a0f10cce96c8a873c.png

That's the pop-up error I get as soon as I try to activate the mod. Game freezes at this point.

Also SCRLog seems to confirm this. If you need it, I can upload it somewhere.

Link to comment
Share on other sites

Heh, Stream Ini Extender seems to be working now. Stupid me. ._.

 

But the problem with Pimp My Car still exists, my shot in the dark appears to be lucky one.

fa1b8b89576c490a0f10cce96c8a873c.png

That's the pop-up error I get as soon as I try to activate the mod. Game freezes at this point.

 

Also SCRLog seems to confirm this. If you need it, I can upload it somewhere.

Interesting. Seems Alien has added script error alert, and unfortunately it worked. Two missions should indeed not be expected to run at once, but I imagine this may be a trick to use more variables.

 

So even if I remove that, a bigger problem may remain. Unless perhaps you have another CLEO mission running?

Link to comment
Share on other sites

I get this error while trying to run the game with .cleo files included from the installation.

And when I have them deleted it runs, but on exit some error appears again and unfortunately I have no clue what is it since I only have black screen, nothing else.

 

dz9pg7.jpg

Edited by acid96
Link to comment
Share on other sites

I get this error while trying to run the game with .cleo files included from the installation.

And when I have them deleted it runs, but on exit some error appears again and unfortunately I have no clue what is it since I only have black screen, nothing else.

Sorry, I compiled the plugins with MSVC 2012 RTM, which lacks XP support. I'll try to get around to recompiling them soon.

 

The plugins that came with an older CLEO 4 should work just as well for now.

Edited by Deji
Link to comment
Share on other sites

I get an error message in japanese,what the hell??? could it be Ryosuke's plugins?

 

Edit : game crashes as soon as the opening cutscene of the game initiates.

 

Edit2 : Japanese error message is back

 

Edit3 : Removed all .ASI s to another folder and started moving each plugin seperately,it appears to be that IDE_DD_Tweaker.asi crashes my game after all.

Edited by Danikov
Link to comment
Share on other sites

I get an error message in japanese,what the hell??? could it be Ryosuke's plugins?

No it's not Ryosuke sending you a secret message through time lol :p check the 4th post above ;)

 

Will release the XP-friendly plugins along with some updates to CLEO once I've done a few more things. I want to get the next update as finished as possible.

Link to comment
Share on other sites

IDE_DD_Tweaker is working here with the new CLEO. What isn't working is the Pimp My Car script, even the most simple version (without the neons and all). I press 5, mod the car, exit it then a few seconds later, the game crashes.

Link to comment
Share on other sites

 

How to fix it?

25ebd3301082181.jpg

Sorry for going off topic, but what's that renderware.cs and what does it do ?

 

it's a part of Multi-Sampling fix plugin created by _DK and someone post the cleo code

so, I compile it

Link to comment
Share on other sites

CLEO updated. 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.

 

So hurry up and download :p

Link to comment
Share on other sites

I'm still getting a crash a few seconds after exiting the PimpMyCar menu. Here's the relevant part of the log file:

14/01/2014 22:14:11.883 [0A94] Starting new custom mission TUNING.cm from thread named pimpt14/01/2014 22:14:11.883 Loading custom script TUNING.cm...14/01/2014 22:14:11.907 Registering custom mission named TUNING.14/01/2014 22:15:01.887 Unregistering custom mission named pmctune14/01/2014 22:15:05.629 [004E] Incorrect usage of opcode.14/01/2014 22:15:05.696 [004E] Incorrect usage of opcode.14/01/2014 22:15:05.762 [004E] Incorrect usage of opcode.14/01/2014 22:15:05.829 [004E] Incorrect usage of opcode.14/01/2014 22:15:05.896 [004E] Incorrect usage of opcode.14/01/2014 22:15:05.962 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.030 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.096 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.163 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.230 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.297 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.363 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.430 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.497 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.563 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.630 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.699 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.765 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.832 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.899 [004E] Incorrect usage of opcode.14/01/2014 22:15:06.966 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.032 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.099 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.166 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.232 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.299 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.365 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.432 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.499 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.565 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.634 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.701 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.767 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.834 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.902 [004E] Incorrect usage of opcode.14/01/2014 22:15:07.968 [004E] Incorrect usage of opcode.14/01/2014 22:15:08.035 [004E] Incorrect usage of opcode.14/01/2014 22:15:08.101 [004E] Incorrect usage of opcode.
Link to comment
Share on other sites

I'm still getting a crash a few seconds after exiting the PimpMyCar menu. Here's the relevant part of the log file:

Ahh, there's always something. Fixed.

Link to comment
Share on other sites

This time I got a crash when attempting to start N-Races, also by ZAZ. The log file says something about running more than one custom mission, which is weird considering CLEO 4.1 had no problems with this.

14/01/2014 22:57:11.349 [0A94] Starting new custom mission TUNING.cm from thread named pimpt14/01/2014 22:57:11.349 Loading custom script TUNING.cm...14/01/2014 22:57:11.350 Registering custom mission named TUNING.14/01/2014 22:57:45.820 Unregistering custom mission named pmctune14/01/2014 22:58:28.437 [0A94] Starting new custom mission N-RACES.cm from thread named nstrace14/01/2014 22:58:28.437 Loading custom script N-RACES.cm...14/01/2014 22:58:30.427 [Error] Exiting with error: Error during loading of custom script N-RACES.cm occured.Error message: Starting of custom mission when other mission loaded
Link to comment
Share on other sites

This time I got a crash when attempting to start N-Races, also by ZAZ. The log file says something about running more than one custom mission, which is weird considering CLEO 4.1 had no problems with this.

14/01/2014 22:57:11.349 [0A94] Starting new custom mission TUNING.cm from thread named pimpt14/01/2014 22:57:11.349 Loading custom script TUNING.cm...14/01/2014 22:57:11.350 Registering custom mission named TUNING.14/01/2014 22:57:45.820 Unregistering custom mission named pmctune14/01/2014 22:58:28.437 [0A94] Starting new custom mission N-RACES.cm from thread named nstrace14/01/2014 22:58:28.437 Loading custom script N-RACES.cm...14/01/2014 22:58:30.427 [Error] Exiting with error: Error during loading of custom script N-RACES.cm occured.Error message: Starting of custom mission when other mission loaded

 

That should be fixed too now. Unless that script really is trying to launch two missions at once, which would be terrible :p

Link to comment
Share on other sites

It's fixed now. But there's yet another problematic script by ZAZ, this time it's Car Saloon. When attempting to enter the tuning menu, the game crashes. The log file doesn't say anything helpful this time either, it simply quit when attempting to enter the menu.

Edited by Zera
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.