Wesser Posted December 31, 2011 Share Posted December 31, 2011 (edited) Full Nitro ControlA cleo modification for GTA San Andreas 1. What does this mod do? This cleo modification allows to control the nitro consuming as you like. By default, you must use the whole nitro gas and wait until it is empty before filling up completely. That's too much research and time spending, don't you think? 2. What bugs were found? No bugs has been found till now. Feel free to notify them. 3. How can I decompile the script? You can't decompile it because it is coded mostly in ASM, so the decompiler won't recognize unexisting opcodes. Anyway, it is open source. 4. Can I use it in my mod? I'd be glad to see this making part of your mod. Do not forget to ask for permission, though. 5. Where are the screenshots, please? They're included in the archive. 6. Where's the download link? The mod is available here to download. Readme included. If you have comments, opinions or evaluation you are welcome. For further information, look at the readme. Edited January 22, 2012 by Wesser Adrian28, Eric_Christy, 𝓦𝓸𝓵𝓯 and 3 others 6 Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/ Share on other sites More sharing options...
Silent Posted December 31, 2011 Share Posted December 31, 2011 I remember seeing parts of this code some time ago, and it MUST be cool. Good work It would be nice to see an ASI version of it though. Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981408 Share on other sites More sharing options...
fastman92 Posted December 31, 2011 Share Posted December 31, 2011 It works, but seemingly you forgot to remove centered number at the bottom. I wouldn`t prefer doing like this: 0@ += 0x34 0AB1: call_scm_func @setMemOffset 3 memory 0@ pointing_to 0x53FF90 virtual_protect 0 // CPad__firePressed0@ += 0x10 To set pointers, but rather: :readCheatStrings_push_EmptyStringAddresshex00 00 00 00E8 // call _chdirProgramDirend:readCheatStrings_call_chdirProgramDirAddresshex00 00 00 00 68 // push offset "rb" end:readCheatStrings_push_offset_rb_mode_offsethex00 00 00 00// stack: -0x14FF 74 24 50 // push [esp+50] ; push [filepath]E8end And: 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content 1@ source_label @readCheatStrings_push_EmptyStringAddress destination @EmptyString0AB1: call_scm_func @GetAddress_chdirProgramDir 0 store_address_to 2@0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content 1@ source_label @readCheatStrings_call_chdirProgramDirAddress source_size 4 destination 2@0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content 1@ source_label @readCheatStrings_push_offset_rb_mode_offset destination @RB_mode0AB1: call_scm_func @GetAddress_CFileMgr__Open 0 store_address_to 2@ 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content 1@ source_label @readCheatStrings_call_CFileMgr__OpenAddress source_size 4 destination 2@ Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981418 Share on other sites More sharing options...
Wesser Posted December 31, 2011 Author Share Posted December 31, 2011 Silent, thanks for your feedback. I posted the source code at GTAG and I was unsure whether to release it or not. By the way, I'm still using VC2003 because of school (no more right now), by which I'm not able to call internal .exe functions for unknown reasons. The game always crash. fastman, thank you too. I forgot to remove a little debugging code. I updated the first post. However, I didn't understand what you're saying. You have to be more clear. Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981515 Share on other sites More sharing options...
fastman92 Posted December 31, 2011 Share Posted December 31, 2011 (edited) There is 0@ to store position and you wrote code to add movement to it as many bytes as number of bytes to next relative offset. I wouldn`t prefer adding it manually, but rather split places where offsets should be placed into label chunks: :readCheatStrings// void __cdecl readCheatStrings(char* filename, void * _cheatStringHashes){Stack:-38h - int cheatID-34h - char * cheatString [34] 0h - void * return_address4h - char * filename8h - void * _cheatStringHashes}hex// stack: +0x083 EC 38 // sub esp, 38h51 // push ecx53 // push ebx56 // push esi68 // push EmptyStringend:readCheatStrings_push_EmptyStringAddresshex00 00 00 00E8 // call _chdirProgramDirend:readCheatStrings_call_chdirProgramDirAddresshex00 00 00 00 68 // push offset "rb" end:readCheatStrings_push_offset_rb_mode_offsethex00 00 00 00// stack: -0x14FF 74 24 50 // push [esp+50] ; push [filepath]E8end:readCheatStrings_call_CFileMgr__OpenAddresshex00 00 00 0083 C4 0C // add esp, 0Ch 8B F0 // mov esi, eax ( eax = FILE* )85 F6 // test esi, esi ; is file correctly opened0F 84 // jz @@returnend To put offset on particular label i`m using my functions: 0AB1: call_scm_func @Get_EXE_version_ID 0 get_version_number_to 0@0AB1: call_scm_func @getScriptContentPointer 0 store_script_content 1@0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content 1@ source_label @readCheatStrings_push_EmptyStringAddress destination @EmptyString0AB1: call_scm_func @GetAddress_chdirProgramDir 0 store_address_to 2@0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content 1@ source_label @readCheatStrings_call_chdirProgramDirAddress source_size 4 destination 2@0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content 1@ source_label @readCheatStrings_push_offset_rb_mode_offset destination @RB_mode0AB1: call_scm_func @GetAddress_CFileMgr__Open 0 store_address_to 2@ 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content 1@ source_label @readCheatStrings_call_CFileMgr__OpenAddress source_size 4 destination 2@0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToLabel 4 script_content 1@ source_label @readCheatStrings_jz_returnAddress source_size 4 destination @readCheatStrings_return That`s how i avoid manual calculation of pointer to relative address. My functions from asm_handling.txt :asm_PutOnAddressRelativeAddressToAddress{Description: Writes at the specified address a relative adress to second adress.Type: SET Parameters: Passed: 0@ - source adress 1@ - size of written adress (1, 2, 4) 2@ - source virtual protect 3@ - destination adress Example: 0AB1: call_scm_func @asm_PutOnAddressRelativeAddressToAddress 4 source_adress 2@ source_size 4 source_virtual_protect true destination 0x004912DC }0062: 3@ -= 0@ // (int)0062: 3@ -= 1@ // (int)0A8C: write_memory 0@ size 1@ value 3@ virtual_protect 2@0AB2: ret 0:asm_PutOnAddressRelativeAddressToLabel{Description: Writes at the specified adress a relative adress to second adress.Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source adress 2@ - size of written adress (1, 2, 4) 3@ - source virtual protect 4@ - destination label Example: 0AB1: call_scm_func @asm_PutOnAddressRelativeAddressToLabel 5 script_content 1@ source_adress 2@ source_size 4 source_virtual_protect true destination @label }0062: 0@ -= 4@ // (int) // destination: label adress0062: 0@ -= 1@ // (int)0062: 0@ -= 2@ // (int) 0A8C: write_memory 1@ size 2@ value 0@ virtual_protect 3@0AB2: ret 0:asm_PutOnLabelRelativeAddressToAddress{Description: Writes at the specified label a relative adress to second adress.Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source label 2@ - size of written adress (1, 2, 4) 3@ - destination adress Example: 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content 0@ source_label @function_adress source_size 4 destination 0x004912DC }0062: 0@ -= 1@ // (int) 0062: 3@ -= 0@ // (int) 0062: 3@ -= 2@ // (int) 0A8C: write_memory 0@ size 2@ value 3@ virtual_protect false0AB2: ret 0:asm_PutOnLabelRelativeAddressToLabel{Description: Writes at the specified label a relative adress to second label.Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source label 2@ - size of written adress (1, 2, 4) 3@ - destination label Example: 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToLabel 4 script_content 0@ source_label @function_source source_size 4 destination @function_destination }0062: 0@ -= 1@ // (int) // source adress0062: 1@ -= 3@ // (int) // difference0062: 1@ -= 2@ // (int) // -= size0A8C: write_memory 0@ size 2@ value 1@ virtual_protect false0AB2: ret 0:asm_PutOnAddressAbsoluteAddressToAddress:asm_PutOnAddressAnyValue{Description: Writes at the specified adress any adress/valueType: SET Parameters: Passed: 0@ - source adress 1@ - size of written adress (1, 2, 4) 2@ - source virtual protect 3@ - destination adress Example: 0AB1: call_scm_func @asm_PutOnAddressAbsoluteAddressToAddress 4 source_adress 2@ source_size 4 source_virtual_protect true destination 0x004912DC }0A8C: write_memory 0@ size 1@ value 3@ virtual_protect 2@0AB2: ret 0:asm_PutOnAddressAbsoluteAddressToLabel{Description: Writes at the specified adress an absolute adress to label.Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source adress 2@ - source virtual protect 3@ - destination label Example: 0AB1: call_scm_func @asm_PutOnAddressAbsoluteAddressToLabel 4 script_content 0@ source_adress 0x466D44 source_virtual_protect true destination @function_destination }0062: 0@ -= 3@ // (int) // destination adress0A8C: write_memory 1@ size 4 value 0@ virtual_protect 2@0AB2: ret 0:asm_PutOnLabelAbsoluteAddressToLabel{Description: Writes at the specified label an absolute adress to label.Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source label 2@ - destination label Example: 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content 0@ source_label @function_source destination @function_destination }0A8F: 2@ = 0@ - 2@ // int // destination adress0062: 0@ -= 1@ // (int) // source adress0A8C: write_memory 0@ size 4 value 2@ virtual_protect false0AB2: ret 0:asm_PutOnLabelAbsoluteAddressToAddress:asm_PutOnLabelAnyValue{Description: Writes at the specified label an absolute adress to second adress.Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source label 2@ - size of written adress (1, 2, 4) 3@ - destination adress Example: 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToAddress 4 script_content 0@ source_label @function_source source_size 4 destination 0x400000 }0062: 0@ -= 1@ // (int) // source adress0A8C: write_memory 0@ size 2@ value 3@ virtual_protect false0AB2: ret 0:asm_GetStructOffsetLabeltoLabel{Description: Calculates offset between first and second lableType: SET Parameters: Passed: 0@ - first label 1@ - second labelExample: 0AB1: call_scm_func @asm_GetStructOffsetLabeltoLabel 2 base_label @vehicles second_label @vehicles_properties store_offset 5@}0062: 0@ -= 1@ // (int) 0AB2: ret 1 0@ :asm_PutOnAddressJmpFarToLabel{Description: Writes at the specified label ASM jmp far with relative address to label (0xE9 + relative address)Type: SET Parameters: Passed: 0@ - adress of script content (current_thread_pointer + 0x10) 1@ - source address 2@ - source virtual protect 3@ - destination label Example: 0AB1: call_scm_func @asm_PutOnAddressJmpFarToLabel 4 script_content 0@ source_address 2@ source_virtual_protect true destination @function_destination } 0062: 0@ -= 3@ // (int) // destination adress0A8C: write_memory 1@ size 1 value 0xE9 virtual_protect 2@1@ += 10062: 0@ -= 1@ // (int) // difference0@ -= 40A8C: write_memory 1@ size 4 value 0@ virtual_protect 2@0AB2: ret 0 BTW. My nickname is fastman92, not fastman Edited December 31, 2011 by fastman92 Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981537 Share on other sites More sharing options...
Wesser Posted December 31, 2011 Author Share Posted December 31, 2011 Ok, now I realized the meaning of your last post. I wouldn't prefer such structure because it'll break the code understanding. BTW. My nickname is fastman92, not fastman. I know, but someone call me Wes, so... Anyways, this is the Mod Showroom section. You had to pm me instead. P.S. Why the profile says your birth year is '95? You said you were a lot older. Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981721 Share on other sites More sharing options...
fastman92 Posted December 31, 2011 Share Posted December 31, 2011 P.S. Why the profile says your birth year is '95? You said you were a lot older. When i said that? Number 92 in nickname doesn`t determine how old i am. Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981733 Share on other sites More sharing options...
aStiffSausage Posted December 31, 2011 Share Posted December 31, 2011 P.S. Why the profile says your birth year is '95? You said you were a lot older. When i said that? Number 92 in nickname doesn`t determine how old i am. Agreed with that one. Some people think I'm born in '98 due to having 8 in my nick sometimes... But, great mod, no bugs, no crashes, Wesser's quality. I like it! Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981778 Share on other sites More sharing options...
Silent Posted December 31, 2011 Share Posted December 31, 2011 Sadly it doesn't work with Compact EXE, but it does work in VCS PC I think it's actually one of few CLEOs not made by me that will stay in my SA installation. Awesome Edit: Thanks to this thing, I think I'll actually make camera shake like hell with nitro on (VCS has cam shake instead of blur). Nitro will be absent in VCS PC, but screw it. I want it. Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981841 Share on other sites More sharing options...
Wesser Posted December 31, 2011 Author Share Posted December 31, 2011 oksa8, thank you aswell. Your posts are always constructive. Silent, this time I preferred to follow R*'s style. It can be seen has a feature that R* hided before realising the game. P.S. Why the profile says your birth year is '95? You said you were a lot older. When i said that? Number 92 in nickname doesn`t determine how old I am. In fact I said "a lot older". I remember something you said in chat. Maybe I'm confusing you with someone else. It isn't important, though. Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1060981903 Share on other sites More sharing options...
hanslukaas Posted July 15, 2013 Share Posted July 15, 2013 A BIG THANK YOU FOR THIS AWESOME CLEO MOD RyanDri3957V 1 Link to comment https://gtaforums.com/topic/497273-cleo-full-nitro-control/?do=findComment&comment=1062773917 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now