Mod Showroom

 Reply to this postStart new topic

[REL] CLEO 4.3

Deji
post Nov 22 2013, 01:01 AM
Post #1


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



CLEO 4.3


Download (setup)
Download (zipped)

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.

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

-- 4.3.16 --

* Fixed bugs with CLEO saves when saved scripts ended

-- 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:

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 Version: 4.3.16)
Download (setup)
Download (zipped)


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Nov 23 2013, 12:47 AM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Fixed the bug with CLEO loading DK22's plugin. CLEO needed to open read/write access to .rdata earlier tongue.gif

So now I'm feeling fairly certain I've covered most of the crucial bugs. Still need to check out that audio problem. Has anyone had this?


--------------------
Go to the top of the page
 
+Quote Post
LINK/2012
post Nov 23 2013, 02:24 AM
Post #3


I will kill you

Posts: 126
Joined: 13-May 11



One thing I think is necessary is a way to get the BASS handle from the CAudioStream object, some people want to mess with some advanced music control with the audiostream handle, and using BASS directly is not a good alternative since the script can create leaks.

I'm saying that because friends of mine creating the mod BMS Sound need to do advanced stuff with the audio using bass.dll functions, but are currently using dirty ways to get the bass handle from the CLEO handle (I think in the current stable release the bass handle and the cleo handle are no different?)

This post has been edited by LINK2012: Nov 23 2013, 02:26 AM
Go to the top of the page
 
+Quote Post
Deji
post Nov 23 2013, 02:20 PM
Post #4


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



I'm trying not to add new opcodes until CLEO 4 is stablised and I can start speculating on CLEO 5 ninja.gif. Also since using BASS directly is not a good alternative, and using CLEO without the pure use of the provided opcodes also isn't a good alternative, how would being able to retrieve the BASS handle help? Surely you just then have a handle you can't pass to anything. It would be a better idea to write a plugin to bridge the gap (as I believe DK22 did with newOpcodes.cleo). Or just stick to CLEO opcodes tongue.gif

While it sounds like an important issue, it's sort of like just asking for all the relevant pointers and doing all memory calls/reads/writes CLEO has to do manually. CLEO would just become a game version address converter and only need opcodes for directly accessing the game memory tongue.gif It'd be a much better idea to provide relevant opcodes for everything required in future versions.


--------------------
Go to the top of the page
 
+Quote Post
LINK/2012
post Nov 23 2013, 02:24 PM
Post #5


I will kill you

Posts: 126
Joined: 13-May 11



QUOTE
Also since using BASS directly is not a good alternative, and using CLEO without the pure use of the provided opcodes also isn't a good alternative, how would being able to retrieve the BASS handle help?

I meant that creating the handle with BASS wouldn't be good, creating memory leaks. Using CLEO audiostreams and taking the handle would be better because, well, CLEO would manage the memory.

QUOTE
While it sounds like an important issue, it's sort of like just asking for all the relevant pointers and doing all memory calls/reads/writes CLEO has to do manually. CLEO would just become a game version address converter and only need opcodes for directly accessing the game memory tongue.gif It'd be a much better idea to provide relevant opcodes for everything required in future versions.

Yeah, you're right.
Go to the top of the page
 
+Quote Post
DK22
post Nov 25 2013, 09:24 PM
Post #6


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



I remember I got same problem with loading .cleo plugins when I tried to compile&use that 'new' CLEO.
I wish audio system will be available in plugins (.asi | .cleo) also.
PS NewOpcodes has some errors (just remember it has 116 opcodes while CLEO can handle only 100), I'm going to rewrite it and make open sourced.
Go to the top of the page
 
+Quote Post
Deji
post Dec 9 2013, 11:18 PM
Post #7


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Okay, I've not gotten in contact with Seemann since I gave him a build of CLEO 4 to test, but I think this build will probably be released officially (on SB website and GTAForums) as a BETA so I might as well post it here to allow some early testing to get done before it's released to the large crowd of enthusiasts on GTAForums, in the hopes a full release can be made by Christmas smile.gif

https://dl.dropboxusercontent.com/u/46693209/CLEO.asi (just overwrite CLEO.asi in current CLEO 4 installation)

Not like one couldn't have guessed the URL based on the URL for the SCRambl release, if one was looking ninja.gif Oh yeah, hiding in plain sight...

Let me know if any bug occur, specifically those CLEO 3 incompatibility issues. Hopefully it already fixes all those previously reported. Also I never disabled 4.2a's debug log file, so it will still be generated as 'cleo.log' and may help in tracing bugs.


--------------------
Go to the top of the page
 
+Quote Post
ThirteenAG
post Dec 10 2013, 10:47 AM
Post #8


Ameteur Member

Posts: 54
Joined: 8-January 11



Oh, i'll try to test it any time soon. Btw, one suggestion, CLEO 3 was distributed as installer and as archive. I want to see next cleo released the same way.

UPD. Doesn't work for me, no CLEO sign at the bottom of the screen, script(missile.cs) doesn't work either:
Seems like it caused by one of the plugins, i'll test by which one right now.

UPD2. Ok, i downloaded missile.cs from Ryosuke's site, it's working now. And i still don't have cleo sign because of this plugin:
CODE
    case GTA_SA_1_0:
        CPatch::SetInt(0x746362 + 0x1, res_x);
        CPatch::SetInt(0x746367 + 0x1, res_y);
        CPatch::SetInt(0x74636C + 0x1, (int)32);
        CPatch::SetUShort(0x7462AB, 0xB2E9); //jz      loc_746362 > jmp      loc_746362
        CPatch::SetInt(0x7462AB + 2, 0x00);
        CPatch::SetUShort(0x7462B3, 0xAAE9);
        CPatch::SetInt(0x7462B3 + 2, 0x00);
        break;

It shows up with cleo 3 though.

UPD3. Shooting rockets on hydra with missile.cs lags the game. Rockets isn't showing at all.

This post has been edited by ThirteenAG: Dec 10 2013, 11:23 AM
Go to the top of the page
 
+Quote Post
Deji
post Dec 10 2013, 12:12 PM
Post #9


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



What plugin is that? It messes with something very low level. Is it an e,tension of display settings?

@UPD3 Weird, I wouldn't have noticed any lag since this computer lags like hell anyway, but I'm sure the rockets were working perfectly...

This post has been edited by Deji: Dec 10 2013, 12:24 PM


--------------------
Go to the top of the page
 
+Quote Post
ThirteenAG
post Dec 10 2013, 12:54 PM
Post #10


Ameteur Member

Posts: 54
Joined: 8-January 11



That's one of my plugins, sets game resolution to custom or desktop at startup, depends on ini file.

http://youtu.be/bMDiuZpP97Q
Go to the top of the page
 
+Quote Post
Seemann
post Dec 13 2013, 08:38 AM
Post #11


The New Guy!

Posts: 7
From: Saint-Petersburg, Russia
Joined: 14-June 13



Thank you for the release. I will test a new version on this weekend.


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Jan 1 2014, 09:09 PM
Post #12


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Thanks to LINK/2012's help, CLEO 4.3 now supports Steam versions of the gta_sa.exe

Try it out: https://dl.dropboxusercontent.com/u/46693209/CLEO_steam.asi

Don't forget to rename it to CLEO.asi tongue.gif


EDIT: By the way, it only works on the decrypted steam .exe for now. LINK/2012 already has a method to fix it, but I think it would be better implemented in the ASI loader, that way it should fix all ASI's with the proper steam .exe instead of just CLEO.

This post has been edited by Deji: Jan 2 2014, 10:46 AM


--------------------
Go to the top of the page
 
+Quote Post
ThirteenAG
post Jan 2 2014, 09:27 PM
Post #13


Ameteur Member

Posts: 54
Joined: 8-January 11



Any new info regarding that bug with missile.cs i mentioned above?
Go to the top of the page
 
+Quote Post
Recoil
post Jan 3 2014, 09:05 AM
Post #14


The New Guy!

Posts: 8
Joined: 14-December 13



QUOTE (ThirteenAG @ Jan 3 2014, 01:27 AM) *
Any new info regarding that bug with missile.cs i mentioned above?

yes except script missile.cs virtually nothing works, does not work most of the scripts and Cleo3 and Cleo4, even the simplest Сleo3 scripts do not work confused.gif

Sisyphean task dry.gif senseless and merciless

This post has been edited by Recoil: Jan 3 2014, 09:10 AM
Go to the top of the page
 
+Quote Post
Deji
post Jan 3 2014, 11:38 AM
Post #15


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



The missile.cs script has been tested to work perfectly, by multiple users. Any bugs must be situation-dependant and require plenty of information so they can be reproduced.


--------------------
Go to the top of the page
 
+Quote Post
ThirteenAG
post Jan 3 2014, 02:13 PM
Post #16


Ameteur Member

Posts: 54
Joined: 8-January 11



QUOTE (Deji @ Jan 3 2014, 11:38 AM) *
The missile.cs script has been tested to work perfectly, by multiple users.

Well, at least i posted a video of the problem. Give me that .cs which is working perfectly then, maybe i'm using some wrong version.
Go to the top of the page
 
+Quote Post
Deji
post Jan 3 2014, 03:29 PM
Post #17


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



QUOTE (ThirteenAG @ Jan 3 2014, 02:13 PM) *
Well, at least i posted a video of the problem. Give me that .cs which is working perfectly then, maybe i'm using some wrong version.



I had tried to take a screenshot of the heli I shot down which gave me 2 stars, but I couldn't find the print screen key in the time it took the guided missile to take it down tongue.gif

I'm using the one currently hosted on Ryosuke's website now. Don't forget that you should rename the extension to .cs3 to invoke the new 'legacy mode', which will handle differences between CLEO 3 and CLEO 4 behaviours, as mentioned in the change log. It could also be another incompatibility, though because you're experiencing 'lag', it'd be my best guess that there was something conflicting or a more elaborate reason for the lag. Also remember to install the most recent missile.dat file next to the script, which I've admittedly forgotten to do a heap of times and scratched my head at the results tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
ThirteenAG
post Jan 6 2014, 08:50 AM
Post #18


Ameteur Member

Posts: 54
Joined: 8-January 11



Well, after another quick test with .cs3 extension, i have the same result - lags. I'll try on a clean game later, but i believe it's a cleo bug, since it never happens on cleo 3.
Go to the top of the page
 
+Quote Post
Deji
post Jan 8 2014, 03:39 AM
Post #19


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



QUOTE (ThirteenAG @ Jan 6 2014, 08:50 AM) *
Well, after another quick test with .cs3 extension, i have the same result - lags. I'll try on a clean game later, but i believe it's a cleo bug, since it never happens on cleo 3.


Any new results on a clean game?

The installation I'm testing looks like this, by the way (just mods):
CODE
cleo
-cleo\CLEO_SAVE
-cleo\ClipboardCommands.cleo (42,496 bytes)
-cleo\FileSystemOperations.cleo (4,096 bytes)
-cleo\IniFiles.cleo (4,608 bytes)
-cleo\IntOperations.cleo (2,560 bytes)
-cleo\missile.cs3
-cleo\missile.dat
-models\ps2btns.txd (for GInput)
-scripts\aerofix.asi (34,304 bytes)
-scripts\fastloader.asi (55,296 bytes)
-scripts\global.ini
bass.dll (107,584 bytes)
CLEO.asi (240,640 bytes)
cleo.log
d3d9.dll (windowed mode hook - 53,248 bytes)
GInput.asi (81,408 bytes)
GInput.ini
gta_sa.exe (14,383,616 bytes)
vorbisFile.dll (54,272 bytes)
vorbisHooked.dll (65,536 bytes)
xbox360cemu.ini (GInput)
xinput9_1_0.dll (GInput)


Also works just as fine if I remove everything but CLEO and the missile mod, with various graphical settings.

I also tried more of his CLEO 3 mods: 'Portal Gun', 'Gravity Gun', 'Flare', 'Man Portable Missile', 'Photographer', 'Fire Work', 'HUD / HUD'
Also had a chance to test some of my own old debug scripts.
All worked (I tried a few at a time), except 'Man Portable Missile', with which my game freezes trying to load the 'mod_stin' txd, for some reason. So if it still lags, it's a bit of a head-scratcher confused.gif


--------------------
Go to the top of the page
 
+Quote Post
ThirteenAG
post Jan 8 2014, 05:36 AM
Post #20


Ameteur Member

Posts: 54
Joined: 8-January 11



Kinda weird, on a clean game i have a crash with missile.cs or missile.cs3 presented in CLEO folder.
http://pastebin.com/U0Hki5Mk
gta_sa.exe(1).8260.dmp.7z

This post has been edited by ThirteenAG: Jan 8 2014, 05:37 AM
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

4 User(s) are reading this topic (4 Guests and 0 Anonymous Users)
0 Members: