You are not logged in.
CLEO 4 is a continuation of ideas of CLEO 3 Code Library. CLEO 4 contains 100 additional opcodes and it provides compatibility with the scripts written and compiled for CLEO 3.
All documentation to library is available only in Russian. The part of manuals is translated Deji to English and laid out on his site. Big thanks to him for this work.
Download.
Updated to 4.1.1.26, 7/14/2010
Last edited by Alien (14-07-2010 11:49)
Offline
Heh, parts of the translation are bad. I tried to make up for the translator as much as I could.
I expect this is another instability in CLEO 4:
After a while of running CLEO 4 or after a few restarts, the game crashes upon the next new/loaded game... Windows reports cleo.asi as the problem and reports the address "20E2400" (in the cleo.asi module).
Assuming I know what I'm talking about here (which I probably don't), CLEO_GetGameVersion is something to do with it, assuming the windows error is accurate..
It seems to always happen after a certain time... Mostly when I'm coding and testing.
Last edited by Deji (10-03-2010 05:02)
Offline
Game crashes with this skript http://hotmist.ddo.jp/cleomod/skin/index.html
Offline
will be fixed in next update.
While you can get it to work, replacing this 2 lines:
8A9A: not 30@ = openfile SKIN_ARCHIVE mode 0x6272 8A9A: not 31@ = openfile SKIN_ARCHIVE mode 0x6272
on this:
8A9A: not 30@ = openfile SKIN_ARCHIVE mode "rb" 8A9A: not 31@ = openfile SKIN_ARCHIVE mode "rb"
Offline
Thanks
http://hotmist.ddo.jp/cleomod/portal/index.html
also this skript don't work. its freezes when i'm using it
Offline
fixed too.
Offline
Did you uploaded this version 4.1.0.22 ? I today downloaded and get this
Offline
sorry, mixed up files. I updated the link.
Offline
Is that only me not liking the following or can it be seen as a bug?
I just installed version of CLEO 4.1.0.20 and tested the compatibility with my current scripts (from: Back to The Future Hill Valley San Andreas mod) as well as I replaced 0AAC by 0AC1 and added 0AC2 and they worked almost fine.
When I resume from menu, the sounds again play from the start.
So is that now a thing that might be changed to how it was with CLEO3?
Offline
When I resume from menu, the sounds again play from the start.
streams should start playing from the stopping point.
When playing the ambient sounds (not 3D) it still starts from the beginning?
Offline
From what I have figured so far, no matter if I use either of the opcodes 0AAC or 0AC1 to load the mp3s and 0AAD, 0AC5 or 0AC2 to attach and play them (these are what I could test so far) when resuming the game I hear all of the ones that were already played previously in their full length; other mp3s that are only loaded but weren't played before however don't get played. Probably it is worth to know that the sounds are stored into CLEO variables via 0AB3 and get read from there by 0AB4 just before playing them.
Last edited by Mini-Me (15-03-2010 23:13)
Offline
I think the problem still remains with the CLEO Missions. They remain active after I start a new game. Only closing gta_sa.exe can end the CLEO Missions.
If it helps, I have one .cs file that starts the mission:
if and 04A4: 2@ == 0x4E // n 04A4: 3@ == 0x4354494F // ctio 04A4: 4@ == 0x414E4441 // anda else_jump @DIRECTOR // CHEAT: ANDACTION 0A8C: write_memory 0x969115 size 1 value 0 virtual_protect 0 0A94: start_custom_mission "mdirector" 0A93: end_custom_thread
Upon typing "andaction", the mdirector.cm file is loaded.
And when I select "Start New Game", the mission 'mdirector' is still active. The menu shows "1 mission loaded" and when I type "andaction" again, nothing happens. However, the mission seems non-functional. Nothing happens while it is activated.
I managed to create another .cm file that can end it when I need it ended. If I type "andaction" before ending the 'mdirector' mission, then the mission becomes un-endable and I have to restart the game.
I have 4.1.0.24, which should be the latest, right?
Offline
Yes, again a mistake in this place. Mission completed, but references are not removed. Fixed.
Offline
error loading this mod:
http://hotmist.ddo.jp/cleomod/missile/index.html
Offline
Cleo 4 is not available below method : Variables expansion by Buffer Overrun
http://samc.blog123.fc2.com/blog-entry-485.html
// From here
0A9F: 32@ = current_thread_pointer
000A: 1@ += 0x10
0A8D: 0@ = read_memory 1@ size 4 virtual_protect 0
000A: 0@ += 4
000A: 1@ += 0x2C
000E: 0@ -= @EXT_VAR
0062: 0@ -= 1@ // (int)
0016: 0@ /= 4
     :
0400: store_coords_to 4@(0@,1i) 5@(0@,1i) 6@(0@,1i) from_object 0@(0@,1i) with_offset 1@(0@,1i) 2@(0@,1i) 3@(0@,1i)
     :
:EXT_VAR
hex
00000000 // padding
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000 // padding
end
// Thank you all developers and sorry about my bad English !
Offline
Yes, this method is suitable only for the difference of baseIP and thread_pointer less than 0xFFFF (approximately). I tested with a missile.cs from Ryosuke.
wait 0 File.Open(10@, "cleo\missile.log", "w") 0A9F: 32@ = current_thread_pointer 0AD9: write_formatted_text "current_thread_pointer: 0x%08X %c%c" in_file 10@ 32@ new_line 0x0d 0x0a 000A: 32@ += 0x10 0A8D: 33@ = read_memory 32@ size 4 virtual_protect 0 0AD9: write_formatted_text "base IP: 0x%08X %c%c" in_file 10@ 33@ new_line 0x0d 0x0a 000A: 33@ += 4 000A: 32@ += 0x2C 0085: 0@ = 33@ // (int) 000E: 0@ -= @PARAMETER 0062: 0@ -= 32@ // (int) 0016: 0@ /= 4 0085: 1@ = 33@ // (int) 000E: 1@ -= @VARIABLE 0062: 1@ -= 32@ // (int) 0016: 1@ /= 4 0085: 2@ = 33@ // (int) 000E: 2@ -= @MOTHER 0062: 2@ -= 32@ // (int) 0016: 2@ /= 4 0085: 3@ = 33@ // (int) 000E: 3@ -= @FUNC_LIST 0085: 11@ = 3@ 0062: 3@ -= 32@ // (int) 0016: 3@ /= 4 0AC7: 11@ = var 0@(3@,1i) offset 0AC7: 12@ = var 0@ offset 0AC6: 13@ = label @FUNC_LIST offset 0AD9: write_formatted_text "label offset through script arithmetics: 0x%08X = %08X + 4*%08X, real label offset: 0x%08X %c%c" in_file 10@ 11@ 12@ 3@ 13@ new_line 0x0d 0x0a 000A: 33@ += -4 file.Close(10@) 0085: 0@(3@,1i) = 33@ // (int) // <------- there is an error 000E: 0@(3@,1i) -= @FUNC_00 0085: 1@(3@,1i) = 33@ // (int) 000E: 1@(3@,1i) -= @FUNC_01 0085: 2@(3@,1i) = 33@ // (int) 000E: 2@(3@,1i) -= @FUNC_02 0085: 3@(3@,1i) = 33@ // (int) 000E: 3@(3@,1i) -= @FUNC_03 0085: 4@(3@,1i) = 33@ // (int) 000E: 4@(3@,1i) -= @FUNC_04 0085: 5@(3@,1i) = 33@ // (int) 000E: 5@(3@,1i) -= @FUNC_05 0085: 6@(3@,1i) = 33@ // (int) 000E: 6@(3@,1i) -= @FUNC_06
The output:
current_thread_pointer: 0x01F2C8C0 base IP: 0x0F6D0BD8 label offset through script arithmetics: 0x01F58118 = 01F2C8FC + 4*035EAE07, real label offset: 0x0F6D8115
The game uses 2 bytes for operations with an offset array. Value 0x35EAE07 can't be placed in 2 bytes.
I think this is an issue of the method, rather than CLEO 4.
Offline
Either this is a CLEO issue in general, or I'm doing something terribly wrong.
{$CLEO .cm} 0000: :Loop wait 0 gosub @Calculate gosub @Thread jump @Loop //[...] :Thread 20@ = 5 0AB1: call_scm_func @FloatToInt 1 20@ 21@ if 8039: not 21@ == 10 then 0ACE: show_formatted_text_box "Value of 21@ == %d" 21@ wait 1000 else 0ACA: show_text_box "YAY" wait 1000 end return :FloatToInt 0@ *= 2 0AB2: ret 1 0@ //[...] :Calculate 0@ = 20 return
On running a script like the one above, I find that :FloatToInt uses variables outside of the scm function. This is not what a scm function is supposed to do, yet it seems to happen to me every time I attempt to use one.
However, I am using a CLEO Mission, not a CLEO Script. Maybe that is a reason for this bug? The same thing happens in CLEO 3 and CLEO 4. I've never been able to get returns to work properly with SCM Functions, which annoys me.
EDIT
It seems that this code displays the value "40".
This is 20 * 2... Which means that this:
0AB1: call_scm_func @FloatToInt 1 20@ 21@
Isn't correctly passing the value to :FloatToInt - Which should make 0@ the same as 20@.
Instead, the scm_function is acting exactly like a gosub command... Except whatever value it returns is written to 21@, which is good. But the values aren't being passed like they should.
Last edited by Deji (13-04-2010 05:13)
Offline
Problem with Onmission state and save script.
I installed cleo 4.1 setup.exe, downloaded here
When I make savegame with my savescript and then load this savegame the Onmission state is aktiv: $ONMISSION = 1
Furthermore it crashes sometimes when I have the script in cleo folder
So much $ONMISSION = 0 and $ONMISSION = 1 in my script
Yes its nesssary. Otherwise the colored gangwar teritories will not be shown if a save was done while gangwar is activ.
It works fine with cleo 3
(The savepoint of the script below is in the Atrium of Los Santos/Commerce)
{$CLEO .cs} :SAVE_1 03A4: name_thread 'SAVE' 0A95: enable_thread_saving 0570: 1@ = create_asset_radar_marker_with_icon 35 at 1722.2682 -1647.6366 42.4687 018B: show_on_radar 1@ 2 :SAVE_2 0001: wait 0 ms 0213: 2@ = create_pickup 1277 type 3 at 1720.7397 -1645.6292 20.2267 :SAVE_5 0001: wait 0 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false @SAVE_5 00D6: if 0 0214: pickup 2@ picked_up 004D: jump_if_false @SAVE_5 0050: gosub @SAVE_14 0002: jump @SAVE_2 :SAVE_14 00D6: if 0 0038: $ONMISSION == 0 // integer values 004D: jump_if_false @SAVE_17 0004: $ONMISSION = 1 // integer values 01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen) 0001: wait 350 ms 03D8: show_SAVE_screen :SAVE_15 00D6: if 0 83D9: NOT save_done 004D: jump_if_false @SAVE_16 0001: wait 0 ms 0002: jump @SAVE_15 :SAVE_16 00A1: put_actor $PLAYER_ACTOR at 1724.3228 -1646.5193 20.2272 0173: set_actor $PLAYER_ACTOR z_angle_to 176.8 01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen) 0004: $ONMISSION = 1 // integer values 0001: wait 350 ms 0004: $ONMISSION = 0 // integer values :SAVE_17 0051: return
Last edited by ZAZ (17-04-2010 10:08)
Offline
I have a answer,
what for this opcode needs?
It such like just disable radio. About that must be a memory address...
Offline
I have a question,
would it be possible to create an OpCode like that?XXXX: make_radio_stations_scrollable 0
This can easily be done by using the function instead. Furthermore, it can even be done by using other opcodes.
The point of extra opcodes (since there's a limit on them) is to handle more complex things that we wouldn't usually be able to do, which can result in amazing scripts.
Personally, I'd like an opcode that sets the camera position without having to use two opcodes (one to set position and one to set point_at, otherwise it doesn't work) but unfortunately, I just have to use another opcode to make the second opcode pointless.
Offline
Seemann is no longer working on CLEO. Seemann gave the CLEO 3 source to Alien to update. So yeah, he does support it, I guess.
Another bug.
0AE7 - Crashes in my code.
It will pause for 5 seconds before crashing.
if 0AE6: VAR1 = find_first_file "cleo\*.cs" get_filename_to 10@v then if 8039: not VAR4 == 1 then 08D4: VAR3 = create_panel_with_title 'DUMMY' position 160.0 160.0 width 300.0 columns 1 interactive 1 background 0 alignment 1 0006: VAR4 = 1 end 0ADF: add_dynamic_GXT_entry 'DRCTF0' text 10@v 08EE: set_panel VAR3 column 0 row 0 text_1number GXT 'DRCTF0' number -1 wait 5000 if 0AE7: 10@v = find_next_file VAR1 then 0ADF: add_dynamic_GXT_entry 'DRCTF1' text 10@v 08EE: set_panel VAR3 column 0 row 1 text_1number GXT 'DRCTF1' number -1 end end
Offline
found no direct relation between the crashes and opcode 0AE7. Next code works fine for me:
{$CLEO} wait 0 if 0AE6: 0@ = find_first_file "cleo\*.cs" get_filename_to 1@v then repeat wait 5000 5@ += 1 0ACE: show_formatted_text_box "CLEO script %d: %s" 5@ 1@v until 8AE7: not 1@v = find_next_file 0@ //IF and SET end 0ACE: show_formatted_text_box "search finished, %d CLEO scripts found" 5@ 0AE8: find_close 0@ 0a93:
Offline