The Editor Functions

  1. The main functions can be found as icon button in the menue bar
    1. Decompile: sanny opens script files with extensions .CS, .CM or .SCM
    2. Compile: sanny compiles by default to a [Name]main.SCM
    Sanny compiles automaticly to Cleoscript files, if the script have a Cleo-Direktive as entry
  2. Useful tools:
  3. Choose TOOLS on menue, then IDE Tools >> Coords Manager
    to read the x,y,z coordinate and the z-angle of the current player position if the game is running
  4. Choose TOOLS on menue, then IDE Tools >> Opcode Search
  5. to search for opcodes
    type any keyword to find a codeline which include this word
    or type an opcode to find the description
    the foundings are allways existing lines of original main.scm
    The opcode search tool requires to create the opcode.txt in Sanny Builder 3\data\sa folder
    Load the decompiled original main into sannybuilder
    then choose TOOLS on sanny menue, then: make opcodes.txt
  6. download my opcodes.txt and put it in Sannybuilder installation directory\data\sa
  7. then you have everything for your opcode search
  8.  

     

    Options

    Choose TOOLS, then options

  9. Line numbers: in option menu EDITOR you can find the feature to switch Line numbers off/on
    The line number is part of the editor, not of the script
  10. HighLighter: in option menu HighLighter you can find the feature to switch Line numbers off/on
    Ermöglicht Anzeigeeinstellungen allows to show different script entries in different kinds (coloring, big, coursiv)
  11. Conditions check:
    this option in menu General should allways be enabled
    checks while compiling process if the conditional checks of your script have failures
  12. Write opcodes: in option menu GENERAL you can find the feature to switch between 2 ways for decompiling
  13. either decompile by writing opcodes
  14. or decompiling without opcodes
  15.  

    Option: different view of the decompiled code

  16. 1. Writing Opcodes
  17. All entries are shown with their opcodes
    The opcodes are the real programm codes of the script functions
  18. Script with opcodes:

    :CARSL_6439
    00D6: if
    00E1:   player 0 pressed_key 16
    004D: jump_if_false @CARSL_6535
    010B: 5@ = player $PLAYER_CHAR money
    00D6: if
    002D:   5@ >= 14@ // (int)
    004D: jump_if_false @CARSL_6512
    0012: 14@ *= -1
    0109: player $PLAYER_CHAR money += 14@  
    0002: jump @CARSL_6700

  19. 2. Without Opcodes
  20. The script is more slim, maybe more clear (but not for me)
    especially 004D: jump_if_false will be now jf
    But not all opcodes are disappeared. Many codes must be used furthermore by applying their opcodes.
  21. Script without opcodes::

    :CARSL_6439
    if 
    00E1:   player 0 pressed_key 16 
    jf @CARSL_6535 
    5@ = Player.Money($PLAYER_CHAR)
    if 
    002D:   5@ >= 14@ // (int) 
    jf @CARSL_6512 
    14@ *= -1 
    Player.Money($PLAYER_CHAR) += 14@
    jump @CARSL_6700
  22. By compiling it doesnt matter if you use codes with opcodes or without opcodes
    You can merge everything and sanny compile it as well,
    provided that the code is correct and codelines which includes opcodes by decompiling without opcodes
    must be used furthermore by using opcodes
  23. A special feature by decompiling without opcodes is to translate opcode based commands into
  24. Classes and Keywords
  25. For a couple of codes can be used CLASSES
    Read more about classes in Sannybuilder-HELP theme: Coding >> Classes
  26. or at Keywords and Classes
  27. This code by decompiling with writing opcodes:
    00AB: put_car 22@ at -1577.942 52.6333 40.0
    will by shown by decompiling with without opcodes in this kind:
    Car.PutAt(22@, -1577.942, 52.6333, 40.0)
    the meaning of the code is defined by the class entries,
    Car = class name
    PutAt = class member
    name and member are combined with a dot in the middle
    22@ = class owner
    class owner and parameters are placed in brackets and separated with comma
    (parameter = needed information for the command)
nothing

Sannybuilder - HELP

  1. Choose HELP on menue, then Content to find informations,
    such like key_press numbers, weapon numbers, bodyparts etc..