GTA Script Generator is a tool that allows you to generate code for Sanny Builder using Visual Studio and the C#. The DLLs contain all the basic methods that are often used when developing standard main.scm modifications. Now you can develop scripts more quickly, avoid critical errors and write code using the modern C# language.
To use these libraries, you need to have a basic knowledge of C# and how SCM scripts work. You need to use the latest version of Visual Studio and .NET Framework version 4.7.2 or higher. Operation in other languages and platforms is not guaranteed.
Libraries only work with Sanny Builder v3.5.0(or higher) and generates code specifically for it. There is support for both simple code generation and direct compilation into an SCM file.
If you want to support the author, then download the program through a mirror link! When you follow a mirror link, you get the latest version of GTASG (7.5b).
Major changes in 7.5b: + Added support for compiling CLEO scripts. + Added support for SCM functions. + Added "Union" and "Calculator" classes. + Added "EndJumpTable" property in "LabelCase" class. + Added GXT encodings from Fargus and BadMan. # Libraries now use ".Net Framework 4.8". # Fixed work of opcode "07E4". # Many methods have been renamed according to the American form of some words. Also renamed some properties in plugins. - The "UseAutomaticVariableInitialization" property of the "Generator" class has been removed.
Show SpoilerHide Spoiler
Major changes in 7.2b: + The "Memory" class can now accept an integer in the constructor. This will allow you to specify a direct address in functions that require this type. + Added "unsafe_code" method. + Added static method "IndexOf" of the "Variable" class. # Fixed bug when local variable index did not allow using array variable in missions using thread limit and external scripts.
# The "Car.empty" property is now available in the GTA.SA library. # The "set_tag_status" method has been renamed to "set_tags_status_in_area". - The "AutoJumpCase" and "AutoJumpEnd" events in the "JumpTable" class have been removed.
Major changes in 7.1b: + Added "do_if_index_in_range" method to "Array" class. + The "Label" event has been added to the "Memory" class, which is identical to the "label" property. + Added "set_volume" method for "AudioBackground" plugin. + Added "onloadData", "onunloadData" and "OnReplicaChanged" events to "Phone" plugin. + 2 events have been added to the JumpTable class: AutoJumpCase and AutoJumpEnd. + The "EnableEmmetsGun", "EnableDefaultArmourPickups", "EnableDefaultBribePickups" and "EnableDefaultMeleeWeaponPickups" properties have been added to the "Original" class. + Now, when initializing local variables in missions, an error will be triggered if their indices contain the values 32 and 33. # The "Parameter" type can no longer accept string variables. The limit on the number of passed parameters has been changed to the correct one in the GTA.III and GTA.VC libraries. # Methods that take arrays as parameters have been fixed. Now the number of parameters is specified correctly.
# Now, when accessing the numeric index of the actors array, its "task" field will have the correct index. # Fixed the "start" method of the "Timer" class, which used the wrong format for opcode 014E (GTA.III). # The "Phone" plugin can now store 24 dialogues instead of 20. It can also store an unlimited number of dialogues instead of 75. # The "After" property of the "DialogSetup" class has been changed to the "OnComplete" field. # The "EnableDefaultPickups" property of the "Original" class has been renamed to "EnableDefaultWeaponPickups".
Major changes in 7.0b: + Local and global variables no longer require preliminary initialization. + Added simplified array initialization syntax. + Added the "UseAutomaticVariableInitialization" property of the "Generator" class. It governs the use of automatic variable initialization. + Now you can specify a name for the SCM file. + Added type "Bike" for GTA VC. + Added decorative types "sString" and "vString" for GTA III and VC. + Added 0601 and 0602 opcodes for GTA III and VC. # The generator is adapted for Sanny Builder v3.5.0 (or higher).
# Reduced number of namespaces. # The FXT property class has been completely redesigned. Now you can add texts for multiple FXT files. # When creating a local array, an error will be shown if the passed type is not used in the local context. # The parking generator now has methods "init", "init_with_number_plate" and returns type "CarParkGenerator". The old initialization methods have been removed. - Most properties of the "Generator" class have been removed. Now, instead of some of them, methods are used. - The default variable "ScriptStatus" has been removed. - Removed the "set_crouch" method of the "Actor" class in GTA SA mode. This is a duplicate of the eponymous method of the "TaskManager" class. - Disabled GTA III, VC and SA opcodes that were not used in main.scm but were natively supported.
Major changes in 5.3b: + The "Original" plugin now has the "After" property. + Added "change_door_lock" method for Vehicle type in GTA III and VC mode. # The "start_new_external_script" method that took parameters has been fixed. # The "Generator.OpenAllMapZones" and "Generator.DisableCheats" methods have been moved to the "Original" plugin. # The plugin "Original" has been updated. 140scripts! Added the following original scripts: ## BBALL: Ability to play basketball; ## CRANES: Ability to use cranes; ## INTMAN: Makes the atmosphere in the interiors like in the original game (casino, bar, strip club, etc.). Ability to buy clothes, tattoos, haircuts, weapons. The ability to use a wardrobe or shoot at a shooting range; Added the ability to play mini-games, billiards, bet on horse racing or participate in the battle of lowriders; ## R3: Mini-missions (taxi driver, medic, fireman, policeman, pimp, robber, train driver); ## TRACE: Opportunity to participate in street racing and tournaments; ## SKOOLS: The ability to pass pilot school and others; ## ODDVEH: Ability to complete courier missions, triathlon and other secondary tasks related to motorcycles and bicycles; ## TRUCK: Ability to complete cargo carrier missions; ## QUARRY: Ability to complete career missions; ## VALET: Ability to complete lackey missions; ##TRAINS: ## PLANES: Allows you to use planes for fast travel; ## HJ: Includes bonuses for insane stunts; ## IMPND: Atmosphere near the police station (confiscated vehicles); ## IMPEXPM: Allows you to import and export vehicles at the San Fierro docks; ## CARPRK1: Includes a standard parking vehicle generator; ## TCASH: Creates a pickup truck to collect profits near Carl's house;
Major changes in 5.2b: + The "Generator.Compile" method now has an optional "restartSannyBuilder" parameter that will open the Sanny Builder after compilation. + Added "&=", "|=", "^=" and "%=" operators for "Int", "Memory", "StatusText" and "Timer" types. They implement the work of opcodes "0B10", "0B11", "0B12" and "0B14". + Added plugin "Phone" for GTA SA, which allows Carl to receive calls. + Added plugin "SaveGame" for GTA SA, which allows you to save the game, as in the original game. + Added plugin "Properties" for GTA SA, which allows Karl to buy property, as in the original game. + Added plugin "Original". Added the following scripts: ++ PLCHUTE: Ability to use a parachute; ++ VENDING: Allows the player to buy soda and chips; ++ FVENDOR: Allows the player to buy food from vendors; ++ HOTDOGV: Allows the player to buy hot dogs from vendors; ++ DEALER: Dealers sell drugs; ++ GATEOS: Controls the gates of the K.A.S.S. fuel depot; ++ GYMBIKE: Allows you to use a gym bike; ++ GYMBENC: Allows you to use an exercise bar; ++ GYMTREA: Allows you to use the treadmill; ++ GYMDUMB: Allows you to use exercise dumbbells; ++ GYMLS: Allows you to learn the fighting style after defeating an opponent (Boxing); ++ GYMSF: Allows you to learn the fighting style after defeating an opponent (Kung Fu); ++ GYMLV: Allows you to learn the fighting style after defeating an opponent (Muay Thai);
# The "StartGlobalAutoIndex" property now defaults to 714 instead of 2000. # The "Continue" and "Break" methods have been renamed to "@continue" and "@break" respectively. # Mandatory script method "Start()" changed to "START( LabelJump label )".
- The "jump", "or", "and" and "jf" methods, which did not accept a jump marker as arguments, are now unavailable. - In some methods, the "Out>" type parameter has been replaced with the old version.
Major changes in 5.1b: + Added auxiliary type "Out", which will cause an error if a variable is not specified in the parameter. + The "load_requested_models" method can now accept an array of models as a parameter. + Added the "is_scan_string_format" method, which implements the work of the 0AD4 opcode. + Added "chdir" method, which implements opcode 0A99. + Added a crooked English version of the build and errors in the console. + Added the "StartGlobalAutoIndex" property of the "Generator" class, which allows you to set the index from which automatic global variables start. # Small changes inside the methods that create various entities. Now the generator will throw an error if the variable has no context. # Fixed GTA VC extension methods for the "Vehicle" class, where the "object" type was in the parameters.
# The "read_memory" method now respects the output type, rather than using the default "Memory" type. # Fixed a bug where the "CarComponent" class could not be a local variable.
Major changes in 5.0b: + New script generator architecture. Now, classes are used to implement code for streams, missions, and external scripts, rather than methods with attributes. + Added the ability to create local variables in the scope of the class. + Methods "local" and "global" now have an overload without parameters. It allows you to give variables indexes automatically. + Added "local_array" and "global_array" methods for GTA SA mode, instead of "local" and "global" overloads. + Added "Scene" event instead of "start_scene_scip" method in GTA SA mode. + Added the "gosub" method as an alternative to the "Gosub" event. + Now if you use an array element as an index of another array, an error will be triggered (as it should be). + Added overloads of frequently used methods to simplify the code. + Added plugin "RaceMission" in GTA SA mode. + Added "convert" method for "FXT" property. It will allow you to translate text into symbolic form without adding an entry to the FXT archive. + Added "NotToCompileExternalScripts" property in the "Generator" class. It will tell Sanny Builder not to compile external scripts. # The FXT property no longer has a "set_GXT_encoding" method. Instead, the "Encoding" property of the "Generator" class is used. # The "ConsoleLanguage" property of the "Generator" class is now named "Language". # All Gosubs now always generate "return". # Reworked the mechanics of the parking generator. Now the methods return the transport. # The generator now does not generate script code if they were not run in the code. # Changed label format. Instead of indexes, special classes are now used. # Fixed a glitch when using an array, when the "task" field of the "Actor" class had the wrong variable name. # Fixed indexes for local timers in GTA SA mode (to the mission code). # Updated and added some transfers for GTA SA. # All plugins no longer require indexes of global variables.
# The "mission_cleanup" method and the "is_wasted_or_busted" condition are now only available in the "Mission" and "MissionCustom" classes. # The generator no longer throws an error if the "script.img" file could not be overwritten during the game. Instead, a warning will be shown. - Removed the ability to specify the order of generating scripts as unnecessary. Sorting occurs automatically during the generation process. - Removed condition methods that took label indexes as parameters. - Removed class "CarParkVehicle" as unnecessary. - Removed attributes "Thread", "Mission" and "External" as unnecessary. Instead, the "Thread", "Mission", "MissionCustom" and "External" classes are used.
Major changes in 4.5.25b: + Added the ability to select the language of construction and console errors. Previously, there was only Russian, but now others are being tested. + Class "Ini" is now available for GTA III and VC. + Added constants for models of weapons, actors, vehicles and other things for GTA III, VC and SA. + Added test method "Start" for the generator. The previous method is still available under the name "Start_old". + Added plugin "StarterAdvanced" for GTA SA, which will make the starter more functional. # Plugin "Starter" now requires 2 global variables. # Updated some enums for GTA III and VC. # The "each" method for arrays now correctly uses a counter. # The FXT class now has the default encoding "None". Major changes in 4.5b: + Added methods that describe most of the opcodes from the CLEO 2.0.0.5 library for GTA III and VC. + Added overload of the "wait" method, where it is not necessary to specify the delay time with conditions. # Fixed errors in the texts of opcodes (020C, 0219, 0357, 0887, 09D8), which did not allow the script to be compiled correctly. # Changed the location of some methods in the "Script" classes. # The "Library" and "File" classes are now in the GTA namespace, not in GTA.SA. # The "auto" event in the "Switch" class is now named "Auto". Major changes in 4.4b: + Added "jump" and "jump_end" methods in "SwitchCase" class. + Added overloads for "local" and "global" methods. + Added "auto" event in "Switch" class. Now you can make automatic cases in the transition table, the countdown of which starts from zero. This makes the code more compact and building faster due to the built-in capabilities of Visual Studio. + Added the "jf" method, which takes the label index as the first parameter, as it was in other conditions. + A static field "None" has been added to the "GXTEncoding" class, which contains a pseudo-encoding that does not convert text. Used for quick work in places where conversion is not needed (for example: English localization). # The generator no longer throws errors if FXT and IMG files were not created during compilation. # The "jf" method, which took a delay time as its first parameter, is now named "wait". # Reworked the mechanics of the "jump_table" method. - Removed "jump_label" and "jump_end" methods in "Switch" class.
Major changes in 4.2b: + Methods that take "JumpHandler" as a parameter now generate a new label if it's missing instead of throwing exceptions. Now you can jump to the first and arbitrary labels if the conditions are not met. + Added "Starter" plugin for GTA SA, which will allow you to make a simple mission starter (Reworked version of former starter plugins). # Updated and added some enums. # Gosub now uses a different delegate # The parking vehicle generator no longer has "init" and "init_with_number_plate" methods. Instead, similar methods have been added that take into account the type of transport. # Fixed a bug when untranslated text was saved to an FXT file. # Minor edits for "Jump" and "Gosub" events. # The "Camera" class is now a "single class", accessible via the "CAMERA" property. - Now you can't jump on tags that are created by the Gosub ! event! - Camera related functions removed. Now they are called through the "CAMERA" property.