Jump to content

Convert cs to csa


Recommended Posts

Yes, with Sannybuilder

Make sure that the game mode is set to GTA SA v1.0

then decompile cs file and save it in your work folder as myproject.txt

check if codes are compatible with mobile version and make corrections

cange {$CLEO .cs} to  {$CLEO .csi}

 

then switch Sannybuilder game mode to GTA SA Mobile and compile the script to mycleoscript.csi

 

Corrections:

 

- Most incompatible codes are these for key press

 

SA v1.0 has 00E1: as key press check (I don't don't know if it still work in mobile or has side a effect)

Cleo scripts for SA v1.0 mostly have the SA v1.0 Cleo opcode 0AB0:

 

GTA SA Mobile has only these

 

0a51=1,  is_widget_pressed %1d%
0a53=1,  is_widget_doubletapped %1d%
0a54=1,  is_widget_swiped %1d%
0A55=1,  is_widget_swiped_left %1d%
0A56=1,  is_widget_swiped_right %1d%

 

 

Cleo scripts for SA v1.0 often have other SA v1.0 Cleo opcodes

All SA v1.0 Cleo opcodes are incompatible

 

SA Mobile Cleo has only these opcodes

 

; Android CLEO opcodes
0DD0=2,%1d% = get_label_addr %2p% ; android
0DD1=2,%1d% = get_func_addr_by_cstr_name %2d% ; android
0DD2=1,context_call_func %1d% ; android
0DD3=2,context_set_reg %1d% value %2d% ; android
0DD4=2,%1d% = context_get_reg %2d% ; android
0DD6=1,%1d% = get_game_version ; android
0DD7=1,%1d% = get_image_base ; android
0DD8=4,%1d% = read_mem_addr %2d% size %3d% add_ib %4d% ; android
0DD9=5,write_mem_addr %1d% value %2d% size %3d% add_ib %4d% protect %5d% ; android
0DDC=2,set_mutex_var %1d% to %2d% ; android
0DDD=2,%1d% = get_mutex_var %2d% ; android
0DE0=3,%1d% = get_touch_point_state %2d% mintime %3d% ; android
0DE1=5,%1d% = get_touch_slide_state from %2d% to %3d% mintime %4d% maxtime %5d% ; android
0DE2=1,%1d% = get_menu_button_state ; read opcode info before using ; android
0DE3=2,%1d% = get_menu_button_pressed mintime %2d% ; read opcode info before using ; android

 

 

 

  • Best Bru 1
Brian343dzbz
Posted (edited)

I have a cleo of this mod which I was trying to convert by just renaming a cs. File into csa. File eventually my game just crash on my Android phone.

 

Can you help me convert this:

 

https://toast-zone.blogspot.com/2012/05/release-panzerkampfwagen-vi-b-king.html?m=1

Edited by Brian343dzbz
On 7/4/2025 at 1:26 PM, ZAZ said:

Yes, with Sannybuilder

Make sure that the game mode is set to GTA SA v1.0

then decompile cs file and save it in your work folder as myproject.txt

check if codes are compatible with mobile version and make corrections

cange {$CLEO .cs} to  {$CLEO .csi}

 

then switch Sannybuilder game mode to GTA SA Mobile and compile the script to mycleoscript.csi

 

Corrections:

 

- Most incompatible codes are these for key press

 

SA v1.0 has 00E1: as key press check (I don't don't know if it still work in mobile or has side a effect)

Cleo scripts for SA v1.0 mostly have the SA v1.0 Cleo opcode 0AB0:

 

GTA SA Mobile has only these

 

0a51=1,  is_widget_pressed %1d%
0a53=1,  is_widget_doubletapped %1d%
0a54=1,  is_widget_swiped %1d%
0A55=1,  is_widget_swiped_left %1d%
0A56=1,  is_widget_swiped_right %1d%

 

 

Cleo scripts for SA v1.0 often have other SA v1.0 Cleo opcodes

All SA v1.0 Cleo opcodes are incompatible

 

SA Mobile Cleo has only these opcodes

 

; Android CLEO opcodes
0DD0=2,%1d% = get_label_addr %2p% ; android
0DD1=2,%1d% = get_func_addr_by_cstr_name %2d% ; android
0DD2=1,context_call_func %1d% ; android
0DD3=2,context_set_reg %1d% value %2d% ; android
0DD4=2,%1d% = context_get_reg %2d% ; android
0DD6=1,%1d% = get_game_version ; android
0DD7=1,%1d% = get_image_base ; android
0DD8=4,%1d% = read_mem_addr %2d% size %3d% add_ib %4d% ; android
0DD9=5,write_mem_addr %1d% value %2d% size %3d% add_ib %4d% protect %5d% ; android
0DDC=2,set_mutex_var %1d% to %2d% ; android
0DDD=2,%1d% = get_mutex_var %2d% ; android
0DE0=3,%1d% = get_touch_point_state %2d% mintime %3d% ; android
0DE1=5,%1d% = get_touch_slide_state from %2d% to %3d% mintime %4d% maxtime %5d% ; android
0DE2=1,%1d% = get_menu_button_state ; read opcode info before using ; android
0DE3=2,%1d% = get_menu_button_pressed mintime %2d% ; read opcode info before using ; android

 

 

 

PC opcodes can now be used on mobile. because of aml. 

https://github.com/AndroidModLoader/GTA_CLEOMod

23 hours ago, Brian343dzbz said:

I have a cleo of this mod which I was trying to convert by just renaming a cs. File into csa. File eventually my game just crash on my Android phone.

 

Can you help me convert this:

 

https://toast-zone.blogspot.com/2012/05/release-panzerkampfwagen-vi-b-king.html?m=1

The mod you're looking for is here. 

https://www.gtainside.com/en/sanandreas/mods/209099-rhino-tank-cannon-w-working-tracks/

 

 

These are the required codes to do that

0A8D: 27@ = read_memory 12010644 size 4 virtual_protect 0

0AA6: call_method 5878048 struct 29@ num_params 3 pop 0 23@ 24@ 25@ 
000A: 29@ += 48
0A8C: write_memory 29@ size 4 value 20@ virtual_protect 0
000A: 29@ += 4
0A8C: write_memory 29@ size 4 value 21@ virtual_protect 0
000A: 29@ += 4
0A8C: write_memory 29@ size 4 value 22@ virtual_protect 0

 

they don't exist for mobile version, unless where the author wrote:

Quote

About CLEO5

This version of a mod contains a few CLEO5 opcodes. I dont wanna continue working on it because it's a broken ass that is not completed yet.

Opcodes from CLEO5 in this mod (except debugging ones!!!):

 

// SA V1
0A8D: 27@ = read_memory 12010644 size 4 virtual_protect 0
0A8C: write_memory 29@ size 4 value 20@ virtual_protect 0

 

// SA MOBILE CLEO 5 broken
2401=4, read_memory_with_offset %1d% offset %2d% size %3d% store_to %4d%
2402=4, write_memory_with_offset %1d% offset %2d% size %3d% value %4d%

looks not good

 

  • Realistic Steak! 2

That's not what I'm looking for, by the way, I'm the one who post it on gtainside and I'm not the developer of that script. The script you've provided is for the model, tiger I's tracks and what mod I want to be converted is the model tiger II's tracks, which tracks doesn't move because it has no script for it.

Actually, someone have converted that script before and he doesn't want to give it for free, and I understand the time and effort to convert just one script to android version.

12 hours ago, ZAZ said:

I was talking about PanzerVIII.cs, that makes tracks and wheels moving

Yeah it's difficult to convert into csa file, but someone converted the cs file before but he didn't give it.

Edited by Brian343dzbz

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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