Sanny Builder
In English
In English
  • Introduction
  • Credits
  • Version History
  • Language
    • Data Types
      • Constants
      • Variables
      • Arrays
    • Instructions
      • Opcodes
      • Keywords
      • Classes
      • Expressions
      • Built-in Commands
      • HEX..END
    • Control Flow
      • Labels
      • Conditions
      • Loops
      • Switch
    • Functions
    • Import/Export
    • Directives
    • Comments
  • Edit Modes
    • CustomLabels.ini
    • Code Templates
    • Enums.txt
    • Extensions
    • Opcodes List (SCM.INI)
  • Editor
    • Features
    • Options
      • General
      • Formats
      • Editor
      • Theme Editor
      • Hotkeys
      • Debugger
      • Edit modes
    • Console
    • Hotkeys
    • Opcode Search Tool
    • Command Line Interface
    • Language Service
    • SCM Debugger
  • SCM Documentation
    • GTA Limits
    • GTA III
      • Ped Types
      • Radar Icons
    • Vice City
      • Button IDs
      • Gang IDs
      • Garage IDs
      • Interiors
      • Ped Types
      • Radar Icons
      • Weapon IDs
    • San Andreas
      • Button IDs
      • Gang IDs
      • Garage IDs
      • Haircuts
      • Interiors
      • Particle Effects
      • Ped Types
      • Player Clothes
      • Player Body Parts
      • Special Actors
      • Statistics ID
      • Tattoos
      • Train Types
      • Vehicle Variations
      • Weapon IDs
      • Weather IDs
      • Zones
    • Liberty City Stories
      • Gang IDs
      • Model IDs
      • Player Clothes
      • Special Actors
      • Weapon IDs
      • Weather IDs
    • Vice City Stories
      • Gang IDs
      • Player Clothes
      • Weather IDs
  • Troubleshooting
    • Error Messages
      • 0001: INI file not found
      • 0002: Unknown array type
      • 0003: Error reading script.img
      • 0004: Unknown parameter type
      • 0005: Invalid edit mode
      • 0006: Unknown file header
      • 0007: File not found
      • 0008: Error reading opcodes list
      • 0009: Opcodes list not found
      • 0010: Unknown opcode
      • 0011: Unknown opcode
      • 0012: Incorrect jump instruction
      • 0013: Unknown directive
      • 0014: Incorrect expression
      • 0016: Script not found
      • 0017: Unknown type of variable
      • 0018: Invalid array size
      • 0019: Unknown array type
      • 0020: Variable is not declared as array
      • 0021: Incorrect variable name
      • 0022: Loop counter is not a variable
      • 0023: Unexpected instruction
      • 0024: Error reading integer number
      • 0025: Incorrect counter range
      • 0026: Error reading floating-point number
      • 0027: String is too long
      • 0028: Unterminated string
      • 0029: Invalid debug script ID
      • 0031: Invalid total number of elements
      • 0032: Invalid value in the header
      • 0033: Invalid local variable name
      • 0034: Local variable is out of range
      • 0035: Expected word
      • 0036: Local mission variable is out of range
      • 0037: Debug script not found
      • 0038: Unknown type of array
      • 0039: Invalid element definition
      • 0040: Constant name or value not found
      • 0041: Invalid mission id
      • 0042: Duplicate external script name
      • 0043: Invalid array index
      • 0044: Invalid array name
      • 0045: Invalid array syntax: variable name is missing
      • 0046: Invalid array syntax
      • 0047: Invalid array size
      • 0048: Error reading array size
      • 0049: Not enough parameters for opcode
      • 0050: Not enough parameters for command
      • 0051: Error writing script.img header
      • 0052: Error writing script.img
      • 0053: Recursive include
      • 0054: Label not found
      • 0055: Identifier not found
      • 0056: Label redeclared
      • 0057: Internal label not found
      • 0058: Invalid parameter
      • 0059: Invalid opcode definition
      • 0060: No input file
      • 0061: Empty source
      • 0062: IDE file not found
      • 0063: Mission label expected
      • 0064: Mission label not found
      • 0065: External script label not found
      • 0067: Forbidden character in external script name
      • 0068: Forbidden character in identifier
      • 0069: Forbidden character in object name
      • 0071: Incorrect number of conditions
      • 0072: Missing logical operator
      • 0073: Redundant logical operator
      • 0074: Disabled option
      • 0075: Incorrect hexadecimal value
      • 0076: Condition expected
      • 0079: Invalid parameter in Alloc command
      • 0080: Non-negative integer number expected
      • 0081: Too many actual parameters
      • 0082: Invalid syntax
      • 0083: Unknown model ID
      • 0084: Jump to offset 0
      • 0086: Invalid array index
      • 0087: Invalid variable
      • 0088: Global variable is out of range
      • 0089: Opcode not found
      • 0090: Duplicate constant
      • 0091: Not enough memory to allocate a local variable
      • 0092: Incorrect export symbol
      • 0093: Only headless scripts can export code
      • 0094: Duplicate export name
      • 0095: Incorrect import name
      • 0096: Incorrect import path
      • 0097: Too many actual parameters
      • 0098: Unknown operator
      • 0099: Left-hand side of the assignment must be a variable
      • 0100: Invalid operator
      • 0101: Variable is not a class instance
      • 0102: Switch statement needs a variable
      • 0103: Expected a switch case
      • 0104: Expected a value for the switch case
      • 0105: Expected a function argument name
      • 0106: Expected a function argument type
      • 0107: Expected function return type
      • 0108: Unsupported argument type
      • 0109: Expected variables to store function result
      • 0110: Function must return N values
      • 0111: Function not found in current scope
      • 0113: Duplicate function declaration
      • 0115: Invalid variable name. Name is reserved by another class or function
      • 0116: Invalid variable name
      • 0117: Invalid function name
      • 0118: Unexpected value to return
      • 0119: Unsupported type of argument
      • 0120: Expected calling convention type
      • 0121: Expected function's static address
      • 0122: A non-static function can't be called by name
      • 0123: A 'thiscall' function requires a pointer
      • 0124: Foreign functions can't return more than one value
      • 0125: Unexpected return type in function
      • 0126: Can't export a foreign function definition
      • 0127: Unexpected mission label in function
Powered by GitBook
On this page
  • Integration with Sanny Builder Library
  • Color Themes
  • Bookmarks / Quick jump
  • Navigate to Symbol
  • Displaying Information about Opcode
  • Opcode Search
  • Player Coordinates Management
  • Keypress Recording (Macro)
  • Code Formatting
  • Replacing Mission Numbers with their Names
  • Custom Mission Titles
  • Multilingual Interface
  • External Tools Menu
  • Automatic updates
  1. Editor

Features

PreviousOpcodes List (SCM.INI)NextOptions

Last updated 2 months ago

Sanny Builder provides the end-user the following features:

Integration with Sanny Builder Library

Sanny Builder Library is a community-driven portal aiming to document all known scripting commands used in GTA III, Vice City and San Andreas. You can find it here:

Starting with v3.8.0 Sanny Builder uses library's files to provide brief descriptions to all opcodes directly in the IDE complimentary to the feature. Those files are controlled with the new <library> parameter in the .

Double-clicking the opcode description in the status bar opens the library's page with this opcode's full description in the browser.

If the current edit mode uses the library documentation there is a text in the status bar telling the version of the documentation, e.g. SBL v0.119. The version may vary from mode to mode.

Clicking the library version text in the status bar brings up a popup menu from which you can check if there are newer versions and download them. If you enable Automatic updates option Sanny Builder will check the updates and download them on startup.

Color Themes

If you launch Sanny Builder v3.8.0 with settings.ini from a prior version, your syntax highlighting configuration will be converted to a custom user theme (stored inthemes\custom.ini).

Bookmarks / Quick jump

You can bookmark a line by pressing Ctrl+Shift+0..9 and then get back to it by pressing Ctrl+0..9. To delete all bookmarks, use the menu option Edit->Clear All Bookmarks.

Alternatively you can go to a particular line using the Go To Line feature. Press Ctrl+G, enter the line number and the editor will move the cursor to it.

Navigate to Symbol

The IDE allows to quickly navigate to some points of interest in the code without using the Find dialog box.

To go to the line marked with a label (e.g, :MyLabel), put the cursor on the label reference (@MyLabel) and press Alt+Right. If the label exists, the cursor position will change.

Similarly, to navigate to the start of a function or mission, use Alt+Right on the function or mission name.

To return back to the previous position, press Alt+Left. Keep pressing if you had more than one navigation.

Displaying Information about Opcode

  • a number of parameters for the current opcode;

Opcode Search

Player Coordinates Management

Press Ctrl+Alt+1 when GTA San Andreas is running and the Coords Manager window will appear. You can read the player's coordinates from the game memory and modify them there.

In the top edit line you can enter the XYZ coordinates, delimited by the space character or the comma character ,. Additionally, you can insert the player's coordinates in the script source by pressing Ctrl+Shift+C. To insert the player's z-angle, press Ctrl+Shift+E.

Keypress Recording (Macro)

You can record a key pressing sequence (macro) and playback it later. Consider the following code:

$Actor = Actor.Create(CivMale, #MALE01, 100.0, 100.0, 10.0)
$ActorWithGun = Actor.Create(CivMale, #MALE01, 110.0, 100.0, 20.0)
$Gang01 = Actor.Create(CivMale, #MALE01, 120.0, 100.0, 30.0)
$Gang02 = Actor.Create(CivMale, #MALE01, 130.0, 100.0, 40.0)
$Killer = Actor.Create(CivMale, #MALE01, 140.0, 100.0, 50.0)
$ActorWithoutGun = Actor.Create(CivMale, #MALE01, 150.0, 100.0, 60.0) 

Say, you need to exchange the actor's handles in each pair (i.e have $ActorWithGun instead of $Actor, and vice versa).

Place the cursor in the first line before $Actor and press Ctrl+M. The editor immediately begins recording all keys - so be careful!

  1. Press and hold Ctrl and press the Right Arrow button once

  2. Press Shift+Home and Ctrl+Ins.

  3. Press the Down Arrow button. The cursor must be on the second line with the global variable in the clipboard

  4. Press Ctrl+Right Arrow and Shift+Ins.

  5. Press Ctrl+Left Arrow, Shift+Home, Ctrl+Ins and Delete

  6. Press the Up Arrow button

  7. Press Ctrl+Shift+Right Arrow and Shift+Ins

  8. Press the Home button.

Now the first two lines should look like these:

$ActorWithGun = Actor.Create(CivMale, 100.0, 100.0, 10.0)
$Actor = Actor.Create(CivMale, 110.0, 100.0, 20.0)

with the cursor being in the beginning of the first line. Now press Ctrl+M to stop recording.

You can playback the recorded sequence by pressing Ctrl+P. Place the cursor in the beginning of the third line, press Ctrl+P and the actor handles will be swapped.

During recording, you can pause/unpause it by pressing Ctrl+P.

Code Formatting

Available since version 4.1

Replacing Mission Numbers with their Names

Sanny Builder allows using a mission name in the opcode start_mission. The mission name is the label defined with a DEFINE MISSION command. Say, you have:

DEFINE MISSION 10 AT @MYMISSION

Instead of start_mission 10 you can writestart_mission MYMISSION.

To call the mission names list, press Ctrl+Space. The cursor has to be directly after the start_mission command.

Custom Mission Titles

If a SCM file contains custom-made missions you may edit the missions.txt to have the correct titles after disassembling.

Multilingual Interface

External Tools Menu

You can configure up to 9 apps to run when you need them. Each app has its own hotkey for your convenience. You may also pass the parameters to your app if needed. To pass the name of the currently opened file use the special word $SB_FileName.

Since v3.7.0 it's also possible to pass the variables @sb: and @game: that represent Sanny Builder directory and current game directory respectively into the command-line parameters of the external app:

Parameters:
--cwd=@sb: --game-dir=@game:

Automatic updates

Sanny Builder is able to check if a new version is available. To use this feature, go to menu Help->Check for update.... If a newer version is available, the editor will prompt the download and installation.

Updates are available under different channels. The Stable channel provides full releases of Sanny Builder. The Beta channels provides intermediate beta releases that might be unstable but give you early access to new features.

With "Automatically install updates" checkbox checked, installation begins as soon as the new version is found.

Sanny Builder's look and feel can be customized with themes. They define colors and style of the interface and code elements for easier reading. The active color theme can be changed in the .

Also Sanny Builder has a built-in for quick customization of the existing themes.

These shortcuts can be redefined in the .

When the Show opcode info is enabled the bottom bar displays:

a model ID when the cursor is on the and IDE files for the current have been loaded;

a constant value when the cursor is on the constant name and the is enabled.

a brief description what this command does (from )

Use the built-in to find an opcode you need.

Sanny Builder has a built-in code formatter to properly indent high-level constructs. Default hotkey combo is Ctrl+Alt+3 and can be redefined in . Alternatively, you can press icon on the toolbar to quickly format the open file.

There is also the option. When it's enabled, the decompiler automatically replaces all mission numbers with their names.

Additionally, you can use to the mission code when the cursor is under the mission name.

Since v3.2.0 Sanny supports custom mission titles for each available . They are stored in the missions.txt file. This file is used by the disassembler to add the title as a comment on line with mission define (DEFINE MISSION) or start (mission_start) command.

Sanny Builder has fully multilingual interface translated into 15 languages. You can switch the languages in the (F10). Refer to for more information on how to create or update a translation.

theme editor
options
language service
Opcode Search tool
Sanny Builder Library
navigate
https://library.sannybuilder.com/
Show opcode info
Options
sannybuilder/translations
options
option
edit mode
Replace Mission Numbers
options
edit mode
model name
edit mode configuration
User Tools interface