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

    1. GTANet.com

    1. GTA Online

      1. Los Santos Summer Special
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    1. Announcements

    2. Support

    3. Suggestions

Seemann

[REL] Sanny Builder

Recommended Posts

SugarD-x

Can anyone verify this? I'm still getting this problem with every single Sanny Builder version no matter where I try to download it from. Either this is a false positive, or something malicious was slipped into the code long ago.


Edit: 3.05 is not flagged. It looks like every version after that is.

Edited by SugarD-x

Share this post


Link to post
Share on other sites
boludoz
I have some problems to decompile android scm (gta sa).
Unknown opcode 4604 at offset 83953.

it seems that it happens only with very specific versions. already solved
 I'm sorry I should have more expertise

 

 

 

Edited by boludoz

Share this post


Link to post
Share on other sites
Grinch_
3 minutes ago, Seemann said:

Version 3.2.3 is available!

  • improved support of the version of GTA San Andreas for WinStore, Xbox 360, and PS3
  • fixed an issue with opcodes 09A4 and 0A18 not being properly decompiled in SA_Mobile mode

https://sannybuilder.com/downloads.html

 

Finally something after so long!

  • Like 1

Share this post


Link to post
Share on other sites
RestractPrime

Legend

Share this post


Link to post
Share on other sites
FireproofFlare
4 hours ago, Seemann said:

Version 3.2.3 is available!

  • improved support of the version of GTA San Andreas for WinStore, Xbox 360, and PS3
  • fixed an issue with opcodes 09A4 and 0A18 not being properly decompiled in SA_Mobile mode

https://sannybuilder.com/downloads.html

 

Seemann, could you please take a look at this topic of mine? It's about developing opcodes for Cleo Library. Thank you in advance and sorry if this is inappropriate.

Share this post


Link to post
Share on other sites
Vadim M.

No way! This is sweet, thanks for the update!

Share this post


Link to post
Share on other sites
Link/2019
On 8/19/2005 at 11:24 AM, Seemann said:

Seemann

Good Job.

Share this post


Link to post
Share on other sites
Vadim M.

Did some testings and, sadly, there are still some flaws left with compiling and decompiling "mobile" scripts.

First of all, if I want to compile fresh mobile scripts, it won't allow me to do it, because it doesn't like 11th value for 0A6E opcode.

Happens with Xbox 360, PS3 and fresh Android scripts. I didn't test the rest.
HnbAIXm.png

~~~

Secondly, If I manage to compile mobile scripts, SannyBuilder won't ever allow me to decompile the darn thing again.

Happens with Xbox 360, PS3. I didn't test the rest.
djmasYB.png
I didn't test it much, but it seems that the game actually loads these new scripts, however I don't know if it gives errors throughout the game.

Is it possible to fix it?

Edited by Vadim M.
  • Like 1

Share this post


Link to post
Share on other sites
Seemann
5 hours ago, Vadim M. said:

Did some testings and, sadly, there are still some flaws left with compiling and decompiling "mobile" scripts.

First of all, if I want to compile fresh mobile scripts, it won't allow me to do it, because it doesn't like 11th value for 0A6E opcode.

Happens with Xbox 360, PS3 and fresh Android scripts. I didn't test the rest.
HnbAIXm.png

~~~

Secondly, If I manage to compile mobile scripts, SannyBuilder won't ever allow me to decompile the darn thing again.

Happens with Xbox 360, PS3. I didn't test the rest.
djmasYB.png
I didn't test it much, but it seems that the game actually loads these new scripts, however I don't if it gives errors throughout the game.

Is it possible to fix it?

 

Hi Vadim,

 

thanks for reporting, this is fixed and will be included in the next release.

 

 

 

  • Like 3

Share this post


Link to post
Share on other sites
Seemann

Today is the Sanny Builder's 14th anniversary and I'm happy to present another update: Sanny Builder v3.2.4

 

Version Changes:

 

  • fixed bugs #0031, #0032, #0033, #0040, #0044
  • fixed regression defect when a CHM help file can not open
  • updated opcode definitions for GTA 3 and Vice City
  • added IDE support for CLEO 2.0 for III and VC

 

Edited by Seemann
  • Like 9

Share this post


Link to post
Share on other sites
Vadim M.

Huge thanks for the update!

Share this post


Link to post
Share on other sites
OrionSR

Application Error: Exception EInOutError in module sanny.exe at 0013885A, I/O error 104.

 

Never mind, I think I've sorted things out.

 

The problem with Sanny is that it crashes and hangs when bad arguments are issued to the command line instead of... exiting with a useful error code. The strings are difficult to format so I'll probably be crashing Sanny a lot. I'll leave my inaccurate observations below in case it helps someone track down their issue.

 

Also, the Sanny application must be closed or the command line will cause Sanny to open both files for editing. (I copied sanny.exe to sanny3.exe and have been calling that file for command line compilation. So far I haven't run into any conflicts when sanny.exe is concurrently running as an application.)

 

The problem I was having with strings was a combination of special characters in C-like interfaces and spaces in the paths of filenames. The formatting below is finally working. Note the use of double slashes and \". 

 

char arguments[256] = "\\compile \"" + sourceText + "\" \"" + destinationScript + "\"";
Exec( "C:\\Sanny Builder 3\\sanny.exe", arguments , true );
\compile "C:\Users\OrionSR\Documents\GTA San Andreas User Files\Embedded\hijack.txt" "C:\Users\OrionSR\Documents\GTA San Andreas User Files\Embedded\hijack.s"

The Sanny application must be closed or the command will cause Sanny to open both files for editing.

____________________________________

 

Original observations with inaccurate conclusions:

Sanny crashes when called as an external application using command line options. Commands that work when Sanny is executed from the command line cause this error if executed by an 010 Editor script or a batch file.

 

The goal was to write a text "cleo" script with an 010 script, pass the text file to Sanny to be compiled, and then open the compiled cleo script for use by the calling 010 script. Since I couldn't be 100% confident that 010 was passing the arguments properly, I wrote a batch file to execute Sanny with hard coded arguments, but still got the same error when the batch file was called by 010 or executed from the command line of a Power Shell.

I'm not sure if this is a problem with Sanny or the Windows 10 environment, but I'm fairly confident that I've got the arguments formatted correctly. Any suggestions for how to manage this error would be appreciated. 

____________________________________

 

Update: I found a work around. Executing Sanny with command line arguments works as expected in the 010 Editor and batch files when executed while Sanny's program folder is the current working directory. This makes directory and path name management a lot more difficult but at least I can continue testing. Hopefully there's a more elegant solution.

Edited by OrionSR

Share this post


Link to post
Share on other sites
wmysterio
On 8/7/2019 at 11:08 PM, OrionSR said:

Application Error: Exception EInOutError in module sanny.exe at 0013885A, I/O error 104.

You need add mode in command line. I use this line in my GTA Script Generator:

\sa \nosplash \compile "C:\main.txt" "C:\main.scm"

For 3.2.2 it work. Today compiling to "SA SCR" automatically for some reason.

Edited by wmysterio
  • Like 1

Share this post


Link to post
Share on other sites
OrionSR

Ah, yes. Good point. I had left out the mode as it wouldn't matter for the simple script I was compiling, and the arguments were giving me problems so I left out what I could to simplify the string. Hm... to work mode into the 010 script properly I'll need to add it as a variable, which won't clarify the formatting used in the string definition at all, so I think I'll leave it out of the example above and work it into a more complex script later. Thanks for pointing out the omission.

 

Share this post


Link to post
Share on other sites
Seemann

Sanny Builder v3.3.0

 

Version Changes:

  • added compiler support for Liberty City Stories SCM format
  • added aliases for the timer variables: TIMERA and TIMERB
  • changed the Ranges check option to apply to the global variables

Release Notes:

 

This release brings in the long-awaited support for one of the two GTA Stories games: Liberty City Stories. 

 

Sanny Builder lacked compiler support for this game mainly due to the heavily changed data types. Even though the final dissassembled file looks very similar to the GTA 3's main.scm format the underlying data types are completely different. The LCS scripts have much wider range of local variables: [email protected] to [email protected] comparing to [email protected]@ in GTA 3. At the same time number of allowed global variables was reduced down to 6655 comparing to 16 383 in GTA 3. 

 

Functions in LCS

 

It happened because of the shift to using function calls in the scripts and supporting the function's local stack. In the previous games a script had the local var space with the fixed address for each variable calculated as (var_index*4). For example, [email protected] held its value at the 4th, 5th, 6th and 7th bytes of the local var space. In LCS this approach was changed to introduce the function stack. Now a script has to maintain the base index for local variables, so the address to store the value of the variable calculated as (base_index + var_index) * 4. 

 

The new opcode 05AE and its conditional version 05AF were introduced to bring functions support in the language. The definitions of these opcodes look as follows:

 

05AE=-1,args %1d% out %2d% locals_base_index %3d% call_func %4p%
05AF=-1,  args %1d% out %2d% locals_base_index %3d% call_func %4p%

 

where args is the number of input parameters, out is the number of variables following the input parameters to store the function results and locals_base_index is the new base index for the current script.

 

:A
05AE: args 1 out 1 locals_base_index 2 call_func @B 100 $var

 

here the code starting at the A label (the A function) calls to the function located at the B label (the B function). Before calling the B function the base index becomes equal to 2, meaning the variables [email protected] and [email protected] of the current script will preserve their values during the execution of the B function. The variable [email protected] of the B function gets a new value of 100. Then the execution flow transfers to the B label and proceeds there until it finds the return command. After that the local variables of the B function are copied one by one to the variables provided as the out parameters ($var here). Finally the base index is decreased by 2.

 

Saved Variables

 

Another challenge presented in LCS was the introduction of so-called saved variables. The save system of LCS is made so some global variables preserve their values between different game sessions (this is the common behavior in the previous games) and some do not. There is a new segment at the SCM header that contains the list of the global variables preserving their values. Sanny Builder marks them with the combination of the $ and _ characters e.g. $_var. It means they are fully compatible with the other global variables but the underscore character also tells the compiler to put this variable onto the list of saved variables so they restore their values on the game load.


Timer Variables

 

In an attempt to minimize the difference between supported games and make the language more user-friendly new aliases are added for the timer variables (previously known as [email protected] and [email protected] or [email protected] and [email protected]). Now the disassembler uses TIMERA and TIMERB names respectively. While the older scripts are fully compatible it's highly encouraged to start using these aliases instead of the variables.

 

0006: TIMERA = 0

:WAIT_2S
0001: wait 0 ms
00D6: if
0019:   TIMERA > 2000
004D: jump_if_false @WAIT_2S
0662: printstring "2 seconds has passed"

 

Ranges Check for Global variables

 

While scripts may use many global variables their number is still limited (normally $2 to $3FFF). Sanny Builder allowed using numeric indexes for global variables that are out of var space bounds silently treating them as variables with string names. For example $0 would've been compiled as $2 (or any other available index). This behavior may lead to some unexpected results as the variable index changes during the compilation. Starting from this version the compiler throws an error when the option Ranges check is enabled and the variable index is not in the allowed range. Using ADMA to circumvent the ranges is still possible (&0 gets compiled as two bytes 00 00).

 

  • Like 15

Share this post


Link to post
Share on other sites
Dr.  Prakamya Khare

Can any one help me,  how to load ini file in GTA sa Android.  I tried pc opcodes but it cause crash to my game. Please help me

On Mon Jul 29 2019 at 12:14 AM, Vadim M. said:

Did some testings and, sadly, there are still some flaws left with compiling and decompiling "mobile" scripts.

First of all, if I want to compile fresh mobile scripts, it won't allow me to do it, because it doesn't like 11th value for 0A6E opcode.

Happens with Xbox 360, PS3 and fresh Android scripts. I didn't test the rest.
HnbAIXm.png

~~~

Secondly, If I manage to compile mobile scripts, SannyBuilder won't ever allow me to decompile the darn thing again.

Happens with Xbox 360, PS3. I didn't test the rest.
djmasYB.png
I didn't test it much, but it seems that the game actually loads these new scripts, however I don't know if it gives errors throughout the game.

Is it possible to fix it?

Bro just change OA6E:  11 to OA6E:  10

It's really work. 

Share this post


Link to post
Share on other sites
Vadim M.

Sadly, the latest Sanny builder doesn't work with so called Japanese GTA VC main.scm. It goes nuts proceeding mysterious 5F4E opcode.
26S540J.png

And it doesn't allow to compile the scripts warning about "059C" opcode
jwsLL4t.png

The old version, for instance, 3.2.2 had no problem with that main.scm.

Edited by Vadim M.

Share this post


Link to post
Share on other sites
Glovenfun21

Welp You know what it means now, time to go in and edit gang zones give every gang rocket launchers spawn them EVERYWHERE and start a world war 3 in liberty city.

Share this post


Link to post
Share on other sites
gta.bullet

Hey Seemann, sometimes compiled script's Date Modified attribute stucks on this specific date. All three freshly compiled actually.

 

d1IjALZ.png

Edited by gta.bullet

Share this post


Link to post
Share on other sites
Seemann
On 11/14/2019 at 4:13 PM, gta.bullet said:

Hey Seemann, sometimes compiled script's Date Modified attribute stucks on this specific date. All three freshly compiled actually.

 

d1IjALZ.png

I can only imagine the following reasons on why file is not updated after compilation:

 

1) they are read-only and SB can't overwrite them;

2) assuming this is the CLEO directory in the picture and you have the source file in another directory you might be compiling it with F6, not F7, so that SB makes no copy to the CLEO directory;

2) assuming this is the CLEO directory in the picture and you are compiling it with F7, SB might have another directory set in the options, so that the copy is actually located in that directory.

 

Share this post


Link to post
Share on other sites
dot exe

Hi @Seemann,

Any information about CLEO for GTA SA Android v2.00?

Since v1.08 is not supported with latest Android version like Nougat, Oreo, Pie, Android 10.

Thanks :)

 

And can you see this?

https://ibb.co/S5kznRZ

what wrong with that? I took that source from other people, but when i try to compile it, it's error. (CLEO 60 FPS for GTA SA Android)

 

Edited by dot exe

Share this post


Link to post
Share on other sites
XMDS
18 hours ago, dot exe said:

Hi @Seemann,

Any information about CLEO for GTA SA Android v2.00?

Since v1.08 is not supported with latest Android version like Nougat, Oreo, Pie, Android 10.

Thanks :)

For updates about CLEO Library for Android, you should ask @Alexander Blade,You can also access the topic toc about Android CLEO in the forum:

(However, there are many questions about CLEO update of GTASA2.0. Alexander Blade has not answered any questions, and maybe it will not be updated in the short term.)

18 hours ago, dot exe said:

And can you see this?

https://ibb.co/S5kznRZ

what wrong with that? I took that source from other people, but when i try to compile it, it's error. (CLEO 60 FPS for GTA SA Android)

 

You should need to understand and learn some basics of CLEO script editing.

Or you can directly use the FrameLimit source code I posted and put it into the SannyBuilder tool F6 for editing to get 60FPS.  (It only supports 1.08).

––––––––––––––––––––––––––––

 

@Seemann You should update opcode definitions for CLEO Android for 3 / VC / SA Mobile mode of SannyBuilder tool

 

Android 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

Edited by China·XMDS

Share this post


Link to post
Share on other sites
-Anti-
Posted (edited)

1.

So I have an 8 digit hex number (eg.  [email protected] = 0x1A0F45B0) and perform these bitwise shift operations to get the 7th digit.

 

0B16: [email protected] = [email protected] SHL 0x4
0B15: [email protected] = [email protected] SHR 0x1C

 

If the digit is 0x0 to 0x7 everything is fine and i get said value but if it is 0x8 or higher I get the desired result minus 0x16.( eg. I want to get a 0x9 bit get a -0x7  or I want to get a 0xA but get a minus 0x6)

Is that intended or a bug?

 

(If I get that value using the modulo operation

0B14: [email protected] = [email protected] MOD 0x10000000 
0B14: [email protected] = [email protected] MOD 0x01000000 
0062: [email protected] -= [email protected]  
[email protected] /= 0x01000000

everything is fine and I get a value between 0x0 and 0xF)

 

 

 

 

 

2.

When I decompiled a script I wrote I noticed that there were some helpful comments.

eg:

using 0005: instead of 0085:

0005: [email protected] = [email protected]  // Note: the incorrect math opcode was used here

 

or if used correctly

0085: [email protected] = [email protected] // (int)

 

I think it would be nice to get "warnings" like that when compiling a script.  Would that be possible?

Thanks for your answer.

 

Edited by -Anti-

Share this post


Link to post
Share on other sites
Wesser

That is an intended behaviour or at least the correct one seeing the misleading description. The answer is that script variables hold signed values so the bitwise right shift is done arithmetically (the vacant bit positions are filled in by the sign bit).

 

Anyway, the command #1145 has a wrong number of parameters in VCSSCM.ini: given 3, expected 5.

  • Like 1

Share this post


Link to post
Share on other sites
Seemann
On 1/3/2020 at 8:18 AM, Wesser said:

Anyway, the command #1145 has a wrong number of parameters in VCSSCM.ini: given 3, expected 5.

thanks, fixed

Share this post


Link to post
Share on other sites
XMDS

Hello. Seemann.   I have been using the SB tool to write CLEO scripts.  I see that you have submitted some code on github.  Does this mean that the next version of the SB tool will be released soon?

 

Before the next version update, I make a few suggestions I hope you can consider.

Const

Xxxx = [email protected]

Yyyy = 1

End

 

1.Const custom variable name and parameter name. I hope you can add text highlighting. Because the new name currently defined and the color of the code are black, it is not easy to distinguish between the code and the parameter. This makes the writer (Obsessive-compulsive disorder) very uncomfortable. At least the highlight looks more beautiful and prominent

 

2.In the GTA3 game, the variable $PLAYER_ACTOR representing the player does not seem to be defined as the correct value. The name becomes $script_controlled_player. This allows some people who like to use the former to make errors in the game after compiling cleo.

 

3.When writing a CLEO script, the OP search bar is used. Sometimes when the minimize OP search bar is clicked, the search bar cannot be opened again. It seems to be hidden? Is this a bug? I am a win10 system.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
Seemann
On 7/17/2020 at 5:16 AM, China·XMDS said:

Does this mean that the next version of the SB tool will be released soon?

Yes, v3.4.0 is going to be released soon. You can find the release plan here: https://github.com/sannybuilder/dev/issues/30

 

On 7/17/2020 at 5:16 AM, China·XMDS said:

Const custom variable name and parameter name. I hope you can add text highlighting

There is a ticket to track constants highlighting https://github.com/sannybuilder/dev/issues/28 

Please upvote tickets you think should get a higher priority.

 

On 7/17/2020 at 5:16 AM, China·XMDS said:

In the GTA3 game, the variable $PLAYER_ACTOR representing the player does not seem to be defined as the correct value. The name becomes $script_controlled_player

$script_controlled_player comes from CustomVariables.ini. This is the original Rockstar's name taken from the leaked source code for GTA III scripts.

 

I didn't notice this variable name changed when updated the CustomVariables.ini. Yes, it might cause runtime errors in CLEO scripts assuming $PLAYER_ACTOR is a variable known to the compiler whereas it's not. So the obvious workaround would be to add

Alloc($PLAYER_ACTOR,11)

in the script code so it gets correctly compiled. In the long term I probably should revert and bring back PLAYER_ACTOR into GTA III's CustomVariables.ini. Same goes to 207=flag_player_on_mission which was previously known as ONMISSION. Thanks for bringing my attention to this issue.

 

On 7/17/2020 at 5:16 AM, China·XMDS said:

When writing a CLEO script, the OP search bar is used. Sometimes when the minimize OP search bar is clicked, the search bar cannot be opened again. It seems to be hidden? Is this a bug? I am a win10 system.

Looks like a bug. Needs investigation.

 

  • Like 1

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.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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