Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Seemann

Project CLEO 2

Recommended Posts

Seemann

--- CLEO 2 is the next generation for the CLEO project.

 

You may read these topics to understand the point:

SA Memory Handling

Original CLEO topic

 

--- CLEO 2 features:

 

* both versions 1.0 and 1.01 are supported

* all code is written as a DLL file which is loaded when the game started. It allows to save space in the main.scm

* backward compatibility with the original CLEO opcodes

* +3 new opcodes

* ability to use plugins

 

 

You may get more information, download CLEO 2 and plugins at this page:

http://cleo.sannybuilder.com

 

 

Feel free to comment, discuss it here.

 

Note that original CLEO project is not supported anymore. You may download final version 1.29 from there: http://sannybuilder.com/dev/cleo.txt

 

 

Share this post


Link to post
Share on other sites
PLPynton

any chances to fix mission pack externals with new opcode/s? that would be great if it has full functionality without any pathing required.

Share this post


Link to post
Share on other sites
Seemann

No, it will not help. Script.img is loaded once when the game loads gta.dat and stays in the memory until the game ends. Cleo.dll is loaded after gta.dat so even I will make some fixes in the exe code, nothing happens.

 

The mission packs fix requires patching via an external patch (as done) or via a fake dll that loaded by the game before gta.dat (vorbis.dll, for example).

Share this post


Link to post
Share on other sites
PLPynton

 

No, it will not help. Script.img is loaded once when the game loads gta.dat and stays in the memory until the game ends. Cleo.dll is loaded after gta.dat so even I will make some fixes in the exe code, nothing happens.

 

The mission packs fix requires patching via an external patch (as done) or via a fake dll that loaded by the game before gta.dat (vorbis.dll, for example).

it is not loaded once, it is included once in the time you described. actually script.img chunks are loaded every time time the main.scm requires it (and required part is not present in memory). that is normal game.

in mission pack the script.img gets included as usually but the main.scm does not have abilities to call it at all.

 

every small script in script.img can be loaded and executed in mornal game, just like a model but mission pack does not do that right? can't it be fixed by rewriting memory to follow instructions as normal game has?

 

Edit: i forgot, nice opcode to have:

set_searchlight X attach_to_actor Y

here are pointers to pool if you need them 0x00A4B0AD & 0x00A7A82D

pool is 124byte per object

at offset +0x44 DW- you have tho input actor/object/vehicle for it to work

Edited by PLPynton

Share this post


Link to post
Share on other sites
Seemann

 

in mission pack the script.img gets included as usually but the main.scm does not have abilities to call it at all.

 

every small script in script.img can be loaded and executed in mornal game, just like a model but mission pack does not do that right? can't it be fixed by rewriting memory to follow instructions as normal game has?

When a mission pack loading, the game skips the external scripts block at the main.scm header, assuming that that pack won't use any

scripts. I don't know why do R* have done it, as the external scripts very widely used in original game.

I could fix that but as cleo.dll loaded after main.scm, you will need to load the pack twice: first time to get the changes in exe, second to make all scripts working. Need that?

But even then this pack will use original script.img but not a separate file as the patch allows (script1.img, script2.img and so on). And this last thing cant be changed via CLEO, because the list of the existing external scripts (in other words, those scripts which are written in a script.img header) is created only once. The game then use it when scm says to load an ex. script. It could only be changed via patch or another library (.asi files or whatever, I dunno).

 

edit:

well, it also could be fixed using a loader, but it's the damn last thing I want to do.

Edited by Seemann

Share this post


Link to post
Share on other sites
PLPynton

maybe some other time... not many activity around here recently heh?

Share this post


Link to post
Share on other sites
spaceeinstein

O nevermind. Stupid me. Thanks for your help.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Seemann

the file ext.scm should be at "San Andreas\data\test" folder.

 

 

0A9A: [email protected] = openfile "data\test\ext.scm" mode 0x72

 

 

Anyway, v.0.26 had a bug with opcode 0A9A, this opcode always returned true even there's no such file. Fixed now (v0.27).

Edited by Seemann

Share this post


Link to post
Share on other sites
Seemann

Wrote an ASI plugin which makes the scm size almost unlimited (500,000 bytes). (note: I did not test it, have no time, someone?)

 

This plugin is only working on v1.0 any may not working (not sure) with some no-cd versions. I use gta_sa.exe having a size 14 383 616 bytes and it works.

 

You may download it there:

http://cleo.sannybuilder.com/plugins/Scm500k.rar

 

To use the ASI plugins download Delfi's ASI loader there:

http://www.gtatools.com/filedb/action.php?action=file&id=19

 

Install ASI loader and copy file Scm500k.asi to the game root directory.

 

 

Update (07.04.2007):

 

Max mission size grows up to 100.000 bytes

Max number of the running threads grows up to 350

Edited by Seemann

Share this post


Link to post
Share on other sites
spaceeinstein

Any possibility of making CLEO compatible with XBox?

 

Anyway to make it safe for saved games using this? When I load the game using this, the game crashes.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Seemann

 

Any possibility of making CLEO compatible with XBox?

I really dunno. What the file system Xbox has? Does it supports DLLs? If so, maybe the problem is that Xbox version has different memory addresses? I definitely don't know.

 

 

Anyway to make it safe for saved games using this? When I load the game using this, the game crashes.

Please, be more specific. Do you use cleo.dll or cleo.txt? How it's installed (via asi loader or directly through the main.scm)? What opcodes do use? What plugins do you use?

 

To me the saves work fine (without any plugins / I used 0a8c only).

Edited by Seemann

Share this post


Link to post
Share on other sites
Y_Less

Is the CLEO load code DP compatible? Otherwise it will crash on savegame load.

Share this post


Link to post
Share on other sites
Bigun

For some reason now that we can actually add opcodes I don't have many good ideas... but, those 2 conditionals could be nice to have, if possible:

 

  is_thread_running 'thread_name'  does_file_exist filepath

 

Share this post


Link to post
Share on other sites
Seemann

Y_Less; what is DP? Darkpact? What the code loading do you speaking about?

 

Bigun;

 

 

does_file_exist filepath

 

it's the part of the opcode 0A9A. If the file does not exists, it returns false.

 

 

is_thread_running 'thread_name'

 

you may use my code from Memory Handling topic (ChangeLocalVar thread) where I searched for the thread 'test'. It is absolutely the same.

 

Share this post


Link to post
Share on other sites
Bigun

 

Y_Less; what is DP? Darkpact? What the code loading do you speaking about?

 

Yes he must mean Darkpact. Also I guess the code is the SCM code-method to load CLEO. Basically IIRC to be Darkpact-compatible it has not to add any new global vars.

 

 

does_file_exist filepath

 

it's the part of the opcode 0A9A. If the file does not exists, it returns false.

 

Yes I know, but it could be nice as a conditional opcode. Also, a file may fail to open for other reasons such as not existing, such as being locked/corrupt/what have you. You should ideally distinguish between those cases, and between the file not existing at all. For example if you see a file doesn't exist and are about to make it then you should be sure that it doesn't exist. Of course this isn't as important as it is with other programming/scripting, it is less important for a GTA specific game scripting engine, but still.

 

 

is_thread_running 'thread_name'

 

you may use my code from Memory Handling topic (ChangeLocalVar thread) where I searched for the thread 'test'. It is absolutely the same.

 

Ah yes, I forgot about that topic, haven't been "SCMing" for a while, thanks. smile.gif

I must add that sure I can use your code thankfully as its already made, but again it could be nice to have it as a simple quick single conditional opcode, as personally for example I'm pretty good with coding but know 'jack about memory editing (though I shouldn't have much trouble using your existing code..hehe). And if I get this right, you have plenty of room for more opcodes (not that the awesome you couldn't even eventually make more room if needed I presume) and you can only add things that their memory addresses are known anyway, so 'you can do it from memory' (basically most things except some stuff which you already can do with SA default opcodes) shouldn't be a reason not to implement it, if thats the only one.

 

Also if I'm already posting, how exactly does '0AA9: is_game_version_original' work? What does it check? EXE? data files? Everything?

Also another function that could be nice for advanced users and related (could be used for checking if certain files are original/certain versions), can you include a hashing function that can be used on files, and if already strings too? md5 will do but it doesn't really matter which.

Edited by Bigun

Share this post


Link to post
Share on other sites
PLPynton

if you have time add as well check:

is something valid

like animations, particles, textures and stuff.

Share this post


Link to post
Share on other sites
Seemann

 

Yes he must mean Darkpact. Also I guess the code is the SCM code-method to load CLEO. Basically IIRC to be Darkpact-compatible it has not to add any new global vars.

OK, neither SCM-based way nor DLL-based one of loading the CLEO used no globals at all (in fact they both are same and are able to be seen in the cleo.txt). It's only dealing with the memory addresses and one temporary local variable.

 

 

Yes I know, but it could be nice as a conditional opcode.

Well, if I will have some free time, I'll do it.

 

 

Also if I'm already posting, how exactly does '0AA9: is_game_version_original' work? What does it check? EXE?

This opcode returns true if gta_sa.exe's version is 1.0 otherwise it returns false.

 

 

And if I get this right, you have plenty of room for more opcodes (not that the awesome you couldn't even eventually make more room if needed I presume) and you can only add things that their memory addresses are known anyway, so 'you can do it from memory' (basically most things except some stuff which you already can do with SA default opcodes) shouldn't be a reason not to implement it, if thats the only one.

Yes, I only add the things that could be done using the existing exe's functions, as a writing of your own routines in asm is the damn hard thing. But having a DLL written in high-level language with its own functions make the process even easier.

 

 

can you include a hashing function that can be used on files, and if already strings too? md5 will do but

 

it doesn't really matter which.

The most simple way is to check the file sizes using 0A9C, like IIRC v1.01 does for gta3.img. But the using of the hashes is a good idea too. The exe has a couple of CRC32' functions, so I may use it.

 

 

Also, do you use the CLEO with any ways? Does it work for you?

 

 

 

is something valid

like animations, particles, textures and stuff.

Well, any ideas how to check it? Does the proper file exist?

 

Share this post


Link to post
Share on other sites
PLPynton

for animation file it would be enough as checking for animation it contains could be more difficult.

Share this post


Link to post
Share on other sites
Bigun

Also, do you use the CLEO with any ways? Does it work for you?

I haven't actually used it yet because I only started coding again recently and current making stuff that don't need custom opcodes, though I am planning to do some nice things with the ones already in CLEO later.

 

I installed it now to test it and just to have the SCMLog for now, and it doesn't work (I am using v1.0 hoodlum nodvd). Game loads but no scmlog.log is created. I used the asi-loader method, so in SA root folder I have the asi loader files, cleo.asi, scmlog.cleo, it is correct, right?

I'll test it later with the default v1.0 EXE (provided I can dig up my disc).

Share this post


Link to post
Share on other sites
Seemann

 

I used the asi-loader method, so in SA root folder I have the asi loader files, cleo.asi, scmlog.cleo, it is correct, right?

No, *.cleo files must be at the \cleo folder (like if you use the scm-based way). So put it there.

Share this post


Link to post
Share on other sites
Bigun

Ah, I see. It works now.

 

So please update the CLEO page, it clearly says this:

 

The installation of the plugin is easy: just copy the file to the folder where main library (CLEO.DLL) is located.

 

So this is therefore incorrect for the ASI method, hence I got confused.

Share this post


Link to post
Share on other sites
Seemann

 

Ah, I see. It works now.

 

So please update the CLEO page, it clearly says this:

 

The installation of the plugin is easy: just copy the file to the folder where main library (CLEO.DLL) is located.

 

So this is therefore incorrect for the ASI method, hence I got confused.

yeah, I knew that, just have no time to fix that. Thanks anyway. smile.gif

Share this post


Link to post
Share on other sites
Bigun

Another request for when you have time, if possible:

 

 $slot = get_weapon $weapon_id weapon_group

 

(weapon_group IDs like 04B8)

 

Also, not very needed, but maybe it could be nice to have opcode(s) to get a weaponID's model and vice versa. Currently if you have something like a dynamic code like a "function" (thread that takes parameters) you have to waste vars on passing both weapID and modelID which is silly (whole using weapIDs at all is pretty silly, but thats R* >_>).

 

EDIT: Also can you put some limits on SCMLog, preferably configurable (scmlog.cfg in same folder?)? After a few runs scmlog.log gets to 3 MB. Can you do something about that, so it only keeps the last thread/X lines from each game execution and file doesn't get huge?

Edited by Bigun

Share this post


Link to post
Share on other sites
spaceeinstein

What does it mean when the game doesn't execute this line:

gosub [email protected]

? The code just stops there and doesn't go on.

Share this post


Link to post
Share on other sites
Seemann

 

What does it mean when the game doesn't execute this line:

gosub [email protected]

? The code just stops there and doesn't go on.

as I see the problem is that the file pointer in the variable is incorrect and the gosub just go to hell (undeterminated memory). Be sure that the file is open. Read first 2 bytes to load the content of this, then read the pointer and do gosub.

 

Did you use Scm500k plugin?

Share this post


Link to post
Share on other sites
altman

I tried to use scm500k.asi, but the game crashes almost at the end of loading screen. I use asi method and I put cleo.asi and scm500k.asi in the root folder. My sa exe size 13,7 MB (14 386 176 bytes).

What I did wrong or it's the problem of incompatible exe version?

Share this post


Link to post
Share on other sites
Seemann

You're using the euro version which is not supported. Only US 1.0 (14 383 616 bytes) is.

Share this post


Link to post
Share on other sites
altman

Yeah, that's great! It helps me fix this problem, so I upgrade my scm limit to 500k. But scm logging still not working for me.

I have scmlog.cleo in /cleo folder. The game works perfect, but log file is not creating.

Is there new scripts using cleo injector?

 

Thanks for the tool

Share this post


Link to post
Share on other sites
Seemann

 

Is there new scripts using cleo injector?

yeah, try my Mp3 Player for SA

 

http://cleo.sannybuilder.com/plugins/radio.rar

 

It is not released officially yet (and havent the Readme in English), you need the ASI loader to run it.

 

Hope you understand how it works smile.gif

 

 

Well, wrote the Readme in English:

 

 

MP3 Player

v1.0

----------------------

 

 

----------------------

Features:

----------------------

 

*** custom control keys

 

By default the player is controlled by the following keys:

 

F5    - toggle player

F6/F7 - previous / next track

F8    - pause

F9    - shuffle mode (the track will be played randomly)

 

*** the playlist could contain the single tracks or the whole folder with the MP3 files

 

*** the versions 1.0 è 1.01 are supported

 

 

----------------------

Installation:

----------------------

 

1. Install the ASI loader by JernejL.

Download link and the Readme are there: http://www.gtatools.com/filedb/action.php?action=file&id=19

 

Copy the files vorbisFile.dll and vorbishooked.dll to the game root directory.

 

 

2. Download the player files: http://cleo.sannybuilder.com/plugins/radio.rar

 

 

Unpack the archive to the game root folder. The file CLEO.ASI must be placed at the game root, and the files radio.cleo and radio.ini - at the \CLEO folder.

 

3. Open the file radio.ini, find the section [playlist] and write the full paths to the MP3 files you want to listen to. Each line should have only one path.

 

 

4. Now you can run the game and listen to the MP3s.

 

----------------------

Settings:

----------------------

 

The main settings are present in the file radio.ini.

 

The section [keys] contains the control keys codes (in decimal).

The section [playlist] contains the track paths or the folder paths.

 

 

As the BONUS this mod also includes my mod which activates the radio for ALL game vehicles (for police cars, bikes and so on).

 

 

Enjoy!

 

----------------------

Seemann © 2007

http://sannybuilder.com

 

 

 

The MP3 Player could be downloaded at cleo.sannybuilder.com

Edited by Seemann

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.