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 Tuners
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

      1. St. Andrews Cathedral
    2. GTA VI

    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
    1. Announcements

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[REL] Sanny Builder


Seemann
 Share

Recommended Posts

I would love to have code folding in the editor but unfortunately SynEdit doesn't support this natively and I can't invest too much time in improving an outdated component.

 

I have some ideas on migrating onto another platform (namely VS Code) so it could resolve many outstanding legacy issues (UTF-8 support, ability to open folders, dropping dependency on Delphi 7 etc). 

Edited by Seemann
Link to comment
Share on other sites

  • 2 weeks later...
On 7/18/2020 at 2:31 PM, Seemann said:

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.

If the new customvariables.ini is appended to the older file then Sanny should compile either version correctly. And always decompile to the newer format. Personally, I'd be tempted to list familiar names like PLAYER_ACTOR and ONMISSION to have priority anyway.

Link to comment
Share on other sites

Any plans to introduce an option to skip emitting if 0 for high level constructs? It's the oldest trick in the book when it comes to reclaiming some (sometimes much needed) SCM space, but high level constructs make it impossible.

Link to comment
Share on other sites

2 hours ago, Silent said:

Any plans to introduce an option to skip emitting if 0 for high level constructs?

Or maybe add script optimization as a post-processing option on compiled scripts.


I've been seeing a lot of jump +0 statements posted in help topics recently. I thought these were artifacts of high-level constructs but I'm not getting similar results from my scripts. There's probably a lot of other low hanging fruit available if text scripts and constructs were removed from the analysis.

Edited by OrionSR
Link to comment
Share on other sites

On 7/27/2020 at 1:36 AM, OrionSR said:

If the new customvariables.ini is appended to the older file then Sanny should compile either version correctly. And always decompile to the newer format. Personally, I'd be tempted to list familiar names like PLAYER_ACTOR and ONMISSION to have priority anyway.

currently the order of variables with the same id is not guaranteed. it depends on the list sorting result and may vary when the list size changes (e.g. variables getting added or removed). I'm going to just rename those variables back to their original meaning, to avoid any possible confusions. It is a breaking change so was the introduction of the new names and I haven't heard any complaints.

 

On 7/27/2020 at 1:03 PM, Silent said:

Any plans to introduce an option to skip emitting if 0 for high level constructs? It's the oldest trick in the book when it comes to reclaiming some (sometimes much needed) SCM space, but high level constructs make it impossible.

mind filing a ticket in https://github.com/sannybuilder/dev/issues ? Definitely possible to add as a debug option. Could include other optimization tricks, such as replacing 0.0 with 0 (saves 3 bytes each)

  • Like 2
Link to comment
Share on other sites

i have suggestion if it can be done man you are genius 

 

1: add in cleo that possibility to check each cleo scripts process and can show in screen when you call it that how much memory or cpu it using or cause for lagging your game 

2: Eliminate Cleo before that causing game crash why have to crash whole game ? just because of 1 script...just get rid of of it and it should show in screen that this cleo have problem ..

3: ability that if some opcode missing or wrong that can be download to sanny builder direct from internet..

4: possibility to lock with password script to open it need owner password if possible that way its more secured and no need to messed around with 3rd party software which makes game crash sometimes i saw that.. 

Link to comment
Share on other sites

Today is the 15th Anniversary since the first Sanny Builder's release and the new version 3.4.0 is available now !

https://sannybuilder.com/index.html

 

Release Highlights:

  • added compiler support for the SCM format of GTA: Vice City Stories

As a continuation effort to finish the long-awaited expectation the compiler got the initial support for the GTA VCS SCM format. Mostly similar to the GTA Liberty City (see v3.3.0 Release notes) but many common opcodes got different IDs not matching with the previous games. The produced output was only verified to match the only known specification and was never tested on a real game. Any feedback would be highly appreciated.

  • added a simpler form of calling subroutines using labels: a label name followed by a pair of parentheses () substitutes a gosub command. I.e. the following two statements are equivalent:
gosub @label
label()

The decompiler also prefers the new form when "Write opcodes" is off.

  • added syntax for declaring local variables with custom names. Now you're able to declare a local variable using the syntax:
 <type> <name> [= <value>]

 Example:

int x

Optionally you may assign an initial value:

int x = 1

More information: https://docs.sannybuilder.com/coding/variables#shorter-form-of-declaration and https://github.com/sannybuilder/dev/issues/32

  • added more customization points for edit modes

It is now possible to customize the opcodes.txt path and the GXT file used for each edit mode. Also each mode can define exclusive code templates.

  • integration with the new documentation portal

New website https://docs.sannybuilder.com/ is up and running with the updated documentation on Sanny Builder features. Sanny Builder got links leading to this website from the main menu and error messages. Contributions are very welcome at https://github.com/sannybuilder/docs

 

Existing CHM files won't be getting any updates anymore. They will be removed with one of the future releases.

 

Full list of the changes in this release

Link to comment
Share on other sites

Thank you very much for the recent VCS recompiler support, I am excited to be able to tweak some things on this game, unfortunately both Liberty City and Vice City Stories main.scm hangs when recompiled even if they have no changes made to them. Tested on real hardware and using the PPSSPP emulator for Windows

Edited by marcelo_20xx
Link to comment
Share on other sites

18 minutes ago, marcelo_20xx said:

Thank you very much for the recent VCS recompiler support, I am excited to be able to tweak some things on this game, unfortunately both Liberty City and Vice City Stories main.scm hangs when recompiled even if they have no changes made to them. Tested on real hardware and using the PPSSPP emulator for Windows

That's what I expected, unfortunately. Would you be able to test different SCMs to help me identify the issue? Please shoot me a PM if yes.

 

Link to comment
Share on other sites

Good news, everyone! The issue with LCS/VCS compilation has been identified and resolved. Tested with VCS PSP version, the game now works with the custom scm file. Kudos to @marcelo_20xx for the help with testing 👍

 

 

Expect the fix with the next release.

Edited by Seemann
Link to comment
Share on other sites

Sanny Builder v3.5.0

https://sannybuilder.com/index.html

 

Release Highlights:

This release brings updates and enhancements to the command-line interface and edit modes. Also it fixes the long-standing bug with LCS/VCS compilation so a custom main.scm made for those games should work now.

  • improved edit modes
    • games.xml has been renamed to modes.xml, and its inner structure updated to better reflect the purpose of this file. Modes can now extend other modes (i.e. one could make a mode only with a few properties while using the remaining ones from the base mode, see the GTA SA v2.00 edit mode as an example)
    • the new mode for GTA SA v2.0, the GTA VCS mode has been replaced with two separate modes: GTA VCS PSP and GTA VCS PS2
    • IDE files can be customized per mode (previously they were hardcoded for different games). Sanny uses those files to display a list of models in the editor's autocomplete list or during decompilation to replace a raw model ID with its name.
  • updated command-line interface
    • CLI options have been updated to Unix-style with the hyphen-minus character as a prefix instead of \
    • CLI got the new options to run Sanny with a pre-selected edit mode (-m) or a different modes.xml (-x)
    • Starting Sanny the -x parameter while having another instance of Sanny running leads to the "hot reload" of the modes list (See #15).

Full list of changes

 

Sanny Builder v3.5.1

 

  • fixed a bug with LCS and VCS compilation (#56)

  • arrays in LCS and VCS now get custom names from CustomVariables.ini and CustomArrays.ini (#53)

     

 

Kudos to @darkdraggy for reporting the first bug and helping to test the fix.

Edited by Seemann
3.5.1
Link to comment
Share on other sites

thought it would be interesting to note but on VCS if you replace a gang with the Mendez cartel models MENGGA and MENGGB they actually have unique dialogue like all the other gangs do, leading me to believe that perhaps at one point in development the Mendez gang were suppose to actually spawn outside of missions? or maybe have been featured in the Empire system.

Link to comment
Share on other sites

  • 1 month later...

hey man, idk if that's happen only me, but when i recompile a modded VCS main.scm and start a new game, if i restart the emulator, the missions of Louise, Phil and Marty glitch, what kind of glitch ? well for instance their missions markers appears even if you haven't even finished Martinez Missions, and the worst thing, if you try to enter in their markers, the mission name doesn't appear and the game stuck in loading

1 minute ago, DragonYisusXD said:

hey man, idk if that's happen only me, but when i recompile a modded VCS main.scm and start a new game, if i restart the emulator, the missions of Louise, Phil and Marty glitch, what kind of glitch ? well for instance their missions markers appears even if you haven't even finished Martinez Missions, and the worst thing, if you try to enter in their markers, the mission name doesn't appear and the game stuck in loading

in other words, if i have to do phil, marty and louse missions, the game will not progress, because of that glitch

i use WinIso to extract and replace the main.scm in the Iso, but i don't think that's the problem

Edited by DragonYisusXD
Link to comment
Share on other sites

Hey Seemann i wonder if it possible cleo.asi avoid any script that make game crash it should end that specific script instead of closing the game it should show that script name or write in file that this script have problem like (circuit breaker) that would be awesome i think that possible for you...

 

 

 

Edited by Strs
name
Link to comment
Share on other sites

16 hours ago, DragonYisusXD said:

hey man, idk if that's happen only me, but when i recompile a modded VCS main.scm and start a new game, if i restart the emulator, the missions of Louise, Phil and Marty glitch, what kind of glitch ? well for instance their missions markers appears even if you haven't even finished Martinez Missions, and the worst thing, if you try to enter in their markers, the mission name doesn't appear and the game stuck in loading

in other words, if i have to do phil, marty and louse missions, the game will not progress, because of that glitch

i use WinIso to extract and replace the main.scm in the Iso, but i don't think that's the problem

I'll be honest - I never played Vice City Stories. Can you please provide complete steps to reproduce the issue from the moment a new game starts?

 

15 hours ago, Strs said:

Hey Seemann i wonder if it possible cleo.asi avoid any script that make game crash it should end that specific script instead of closing the game it should show that script name or write in file that this script have problem like (circuit breaker) that would be awesome i think that possible for you...

 

 

 

I agree in principle. I have recently open a new ticket to discuss this problem https://github.com/cleolibrary/CLEO4/issues/30

If you can join the discussion and add your points, it would be great.

Link to comment
Share on other sites

7 hours ago, Seemann said:

I'll be honest - I never played Vice City Stories. Can you please provide complete steps to reproduce the issue from the moment a new game starts?

 

well first of all,

 

  1. i only just change the gang vehicle of gang 8 (Vance Illegal Gang)
  2. i changed the gang vehicle of Gang 6 (Vance Legal Gang/Marty's Gang) to be set after To Victor, The Spoil
  3. i change the model of gang 6 to be the exactly same as gang 8 after From Zero to Hero
  4. I recompile Back
  5. i overwrite the Main.SCM in the ISO with the modded SCM (using WinISO)
  6. i played the first mission
  7. i save the game
  8. i restart the emulator PPSSPP (this part is when the problem start)
  9. i load the save file
  10. the marker of Louise, Marty and Phil appears in mini-map and in-game
  11. the Empire Buildings dissapeared
  12. i can't play neither of Phil, Marty or Louse mission
  13. the game get stuck
Edited by DragonYisusXD
Link to comment
Share on other sites

Before Restarting the game

Spoiler

3BCp6YA.png

 

After Restart:

Spoiler

JdQLl5D.png

 

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

 

Before:

Spoiler

JCoeDYU.png

 

After

Spoiler

Tdx4Q4N.png

 

 

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

 

Before:

Spoiler

zOeMqdg.png

 

After:

Spoiler

U7TcfSZ.png

 

The game shows no mission name:

Spoiler

68h5qzF.png

 

The Game stuck in loading

Spoiler

1WF9V3V.png

 

the only way i see to play my modded Main:SCM is use Save State instead of load my save, but that's not how it's supposed to work

Link to comment
Share on other sites

36 minutes ago, DragonYisusXD said:

I recompile Back

hey man, it seems my glitch is just caused by Decompilation or Recompilation, because i tested an unmmoded Main.SCM and decompiled and recompiled back (without touching anything) and the glitch pops out when i restart the game

it seems is not necessary restart the game, with only loading a save file is enough to make the glitch appears

Edited by DragonYisusXD
Link to comment
Share on other sites

Also, it seems that the glitch also affect others save game set by an unmodded Main.SCM, so it's reaaly not a save problem, but something in Main.scm that screw everything saved, fortunaley the glitch dissapear if i put back the original Main.SCM but yes, i can't play with the MAIN.scm that sanny builder decompiled and compiled back 

Edited by DragonYisusXD
Link to comment
Share on other sites

Sanny Builder v3.6.0

 

Version Changes:

Release Notes:

  •  support for enumerated types in classes

Now classes use enums for parameters. For example, the last parameter in Player.SetClothes is the enum BodyPart:

Player.SetClothes($PLAYER_CHAR, "", "", BodyPart.Torso)

Old "extended" constants are still supported but only in compilation.

IDE displays enum members if you press Ctrl+Space where an enum should be.

See https://docs.sannybuilder.com/coding/classes#class-constants for more information

 

Under the hood Sanny Builder got a new written from scratch classes.db parser that is faster and better than the previous one written in 2005 (and is also stricter - no more unbalanced parenthesis). It made it possible to fix memory-related issues with huge classes.db files.

 

  • better integration with CLEO

CLEO and its plugins got a new update in a few years. Sanny Builder now ships CLEO 4.4 that includes some fixes and SDK enhancements. Also it includes the updated SCRLog plugin that logs script activity into a text file and a new CLEO plugin: CLEO+ that adds 250+ new opcodes. All opcode-related files (INI, keywords.txt. opcodes.txt) have been updated as well.

 

Also the compiler now uses CLEO opcodes 0A9E, 0A9F, 0A90, 0A91 when it finds a statement like:

[email protected] = [email protected] + [email protected] // or - * /

One of the variables must have the type Int. The shortest way of doing it inline would be:

int [email protected] = [email protected] - [email protected] // -> produces opcode 0A9F
  •  language extensions

Sanny Builder has a single repository of opcode definitions: an *SCM.INI file (e.g. SASCM.INI). Both original and custom opcodes get added here. As the number of plugins and custom opcodes grew it became obvious that sometimes scripters might use opcodes without deep understanding what is their source. In fact it could be provided by a little-known CLEO plugin but they expect it to be available with the vanilla game.

Now there is the configuration that maps each opcode to a particular extension (basically a scope) and a script author should explicitly include the extension name into a script using a new {$USE} directive. For example, to allow CLEO+ opcodes one should add {$USE CLEO+} on top of the script.

See https://docs.sannybuilder.com/edit-modes/extensions for more information.

 

  •  updated opcode definitions

The "thread" term has been replaced with "script" (see motivation: https://gtamods.com/wiki/Talk:Script#Thread->Script)

 

Existing keywords got new aliases:

004f -> create_thread -> start_new_script
004e -> end_thread -> terminate_this_script
03a4 -> thread -> script_name
0459 -> end_thread_named -> terminate_all_scripts_with_this_name

Similarly CLEO opcodes have been updated to sound with Rockstar's taxonomy. They now match gta3sc compiler definitions:

0A92 -> create_custom_script -> stream_custom_script
0A93 -> end_custom_script -> terminate_this_custom_script
0A94 -> start_custom_mission -> load_and_launch_custom_mission

etc

  •  new parameter types in INI files: m% and k%.

m% defines a parameter that is a model id defined in one of .ide files as opposed to o% which is any model ID. The key difference between the two is how the disassembler treats negative values (especially -1). -1 commonly means a random model id in the game:

0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] [email protected] [email protected]

With m% -1 disassembles as is, without altering. On the other hand o% treats negative values as a reference to the SCM object list where -1 is the first defined object name, -2 is the second and so on. The same opcode with o% would get dissembled to:

0327: [email protected] = get_random_car_with_model #INFO in_rectangle_cornerA [email protected] [email protected] [email protected] [email protected]

k% - is now used for opcode 05B6 and similar opcodes in SA Mobile. It represent a fixed-length string (128 bytes) (otherwise known as TEXT_LABEL32 - https://gtamods.com/wiki/SCM_language#TEXT_LABEL32). Sanny Builder had been dealing with 05B6 in a fancy way: it substituted a string literal in 05B6 with an index that referenced a partucular chunk of data in the file debug.bin. Debug.bin was made back in 2005 as a compilation of those 128-byte chunks extracted from the original main.scm. When you had compiled the script back the compiler copied raw data from the debug.bin back to the compiled file. Now this type is supported in a proper way and opcodes look like:

05B6: save_string_to_debug_file "CURRENT_WANTED_LIST = "
05B6: save_string_to_debug_file "MODID, STATUS, PAYOUT, EXP NAME,  CROSS OUT"

or in SA Mobile

0A6E: set_widget_texture 54 "hud_check"
  •  Thanks to MatiDragon and @Wesser for updated translations

 

 

Link to comment
Share on other sites

Hey Seemann thanks for new release i cant wait to try it 

 

and i just curious that is it possible to make opcode that check if script is work fine ? 

 

Example: Condition 

 

{$cleo}

0000:

if

0123: Script Pass      //check if this script crash game ? this Opcode is responsible to terminate before game crash or bypass this script

then 

//your script here

else 

end

0A93: end_custom_thread 

 

it will be a great help

 

and another is that kind of debug tester like which script using how much FPS or Memory that can see in screen when we turn it on in real time and name 

 

 

 

 

 

 

Link to comment
Share on other sites

1 hour ago, Uchiha Batuhan said:

On New Version I Get The Sascm.ini And Opcodes.Txt Not Found Error.

@Seemann Why? Please Help Me.

Link to comment
Share on other sites

1 hour ago, Uchiha Batuhan said:

On New Version I Get The Sascm.ini And Opcodes.Txt Not Found Error.

Does it happen on a clean install? Do you have any files from the previous version? Try to delete settings.ini from the data folder and launch again.

Link to comment
Share on other sites

27 minutes ago, Seemann said:

Does it happen on a clean install? Do you have any files from the previous version? Try to delete settings.ini from the data folder and launch again.

Yes Happening In Clean Install. I Installed In The Mod Tool Folder Inside My Game And I Get This Error. Older Versions Were No Problem. I Deleted Settings.Ini. But, It Didn't Work.

Link to comment
Share on other sites

20 hours ago, Uchiha Batuhan said:

Yes Happening In Clean Install. I Installed In The Mod Tool Folder Inside My Game And I Get This Error. Older Versions Were No Problem. I Deleted Settings.Ini. But, It Didn't Work.

Please Help Me By @Seemann

Link to comment
Share on other sites

@Uchiha Batuhan making extra posts isn't helpful if they don't provide new details. I can't reproduce the issue on my machine and I don't hear from anyone yet with the same problem. Make sure you have SASCM.INI in your SB\data\sa directory. Try installing SB in a different folder. Check other edit modes (GTA 3, VC) to see if they have the same problem.

Link to comment
Share on other sites

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
 Share

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