Welcome to the III Coding Section Directory the most comprehensive directory of this section.
The point of this Directory is to sum up the most important bits of tutorials, documentation and other useful and helpful topics not only from this section but from every section related to SCM Coding. Also I wanted this to be a Guide to make learning SCM coding a bit easier by gathering up also these pieces of information.
First of all you should know that the GTA Forums Rules apply in this section too, so if you haven't read them yet you should read and follow them for your own sake. You can find them here. Into this section you should discuss about SCM Coding also you may request help about learning scripting or about fixing your code, making your script mod. You can even request script mods in the Mod Request Topic, but it is not sure that your request will be fulfilled you had better learn coding and try make it yourself and remember that you can always ask for help. Please don't post Mod releases here post them in the Mod Showroom.
Before posting make sure you are using proper grammar also you should use BB codes and use Code tags when you are posting a piece of code. Also look here for any further details. Your topics should always have proper titles which make clear to which game you refer to.
The III Coding forum led-bys (in alphabetical order): Adler, Andrew, Dutchy3010, PatrickW, spaceeinstein, Suction Testicle Man
Don't hesitate to send them a Personal Message regarding the III Coding section of the forum. You can ask for topic locks when you think your topic must be locked. Also you can request topic moves ,when you think that the topic is in the wrong section, and even Topic Title changes. But remember led-bys are humans not slaves.
- CLEO Script Tutorial by ZAZ
- Probably the best tutorial on CLEO scripting, well documented, very comprehensive, well structured and easily understandable and it's suitable for every level.
- This tutorial is great for people who don't have a clue how to make a script or very beginners.
- This is a great tutorial for beginners who want to learn Mission Scripting it is very well structured and explained.
- This tutorial is for people who prefer (want to learn) coding in high level (c-like).
- Video tutorials for basic Mission Coding things.
- A great tutorial that explains everything about main.scm and scripting in main.scm.
- Sanny Builder by Seemann
- Sanny Builder has a very fast Compiler and Decompiler also it provides syntax highlighting and includes descriptions and solutions for all errors. Furthermore it is widely used and it supports CLEO and CLEO opcodes.
- CLEO is a tool that extends the coding possibilities in all III Era Games by adding a lot of new and useful opcodes and allowing to run the scripts without modifying the main.scm file.
A compiler is a program that converts your source code into machine code, so the game can read it. And a decompiler is a program that performs the reverse operation.
Below there is a table that shows the syntax of each SCM editing tool.
There are are a lot IDEs you can use, but most of them are outdated. However, there is one that stands out it's called Sanny Builder, which is developed by Seemann. Also, it's widely used and it has many useful features. You can find a download link below. Moreover, I have made a list with the reasons why it is the best IDE.
• It is fast
• It is widely used
• It supports CLEO library the most popular SCM extension
• It has 12 language translations (English, French, German, Spanish, Polish, Dutch, Italian, Portuguese, Russian, Finnish, Hungarian, Ukrainian)
• It is very well documented it includes two SCM tutorials, useful information and detailed help including description and solutions for all run-time error messages
• It has useful tools such as Coords Manager, Opcode search , MB > SB syntax converter and many others
• Supports all III era games (Can decompile from GTA III, GTA VC, GTA SA, GTA LCS, GTA VCS and Can compile in GTA III, GTA VC, GTA SA)
• Handles the IF statements better
• It uses color code highlighter
• Supports high-level statements (loops, conditions)
• It has a coding method with classes
• Direct hex input
• It has a wide variety of options for everything
SCM is a script language used in all III Era GTAs, it was named SCM by the GTA Modding community. Specifically it is used mainly in the main.scm file, where every single mission is coded. It is a script language because main.scm is not an executable file. Although most of the game features are hardcoded, still much things could be done via scripting especially with the help of CLEO library.
This is how an original mission script looked like (taken from vice city debug.sc file):
IF IS_BUTTON_PRESSED PAD2 RIGHTSHOULDER1
AND flag_create_car = 1
AND button_press_flag = 0
IF IS_CAR_DEAD magic_car
IF NOT IS_PLAYER_IN_CAR player magic_car
flag_create_car = 0
initial_car_selected = 0
button_press_flag = 1
If you open the a scm file using a hex editor you are going to see a bunch of bytes, like the example below. A scm file is a binary file with certain structure.
| 00 00 50 00 01 F3 FF FF FF 01 00 04 00 9F 0A 03|
00 00 0A 00 03 00 00 04 10 8D 0A 03 00 00 04 04
04 00 03 00 00 0E 00 03 00 00 01 CF FF FF FF 51
To edit an scm file you must decompile it. The decompiler will transform the bytes you see above into the scm code you see below. When the decompile has finished a text file containing the source code will be created.
If you decompile the code you see above using Sanny Builder you ll probably get this:
|// This file was decompiled using SASCM.INI published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007|
0A9F: [email protected] = current_thread_pointer
[email protected] += 16
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
[email protected] -= -49
This is a part of a scm code. You can edit it using Sanny Builder or any other IDE, but Sanny Builder is highly recommended.
Here is a list that contains many tutorials and other useful topics and things to help you learn SCM Coding easier. Before you start you should know that you won't learn coding and you'll able to make your own mods in only 24 hours, but it takes time and you must have will to learn scripting. Learning SCM does not requires any knowledge of any other programming language probably because it's relatively easy and different from other languages, but having a knowledge of computer architecture would be useful especially for CLEO coding.
|CLEO Script Tutorial||ZAZ||Sanny Builder||San Andreas||Here|
|Set your own keys for script mods||ZAZ||Sanny Builder||San Andreas||Here|
|Mission Coding for Dummies||Dutchy3010||Sanny Builder||San Andreas||Here|
|Mission Coding for Pro's||Dutchy3010 and PatrickW||Sanny Builder||San Andreas||Here|
|SCM/CLEO Video Tutorials||Dutchy3010||Sanny Builder||San Andreas||Here|
|YeTi's SA Coding Tutorial Part One||YeTi||Mission Builder||San Andreas||Here|
|YeTi's SA Coding Tutorial Part Two||YeTi||Mission Builder||San Andreas||Here|
|Coding bible part I||tomworld10||Sanny Builder||San Andreas||Here|
|Coding bible part II||tomworld10||Sanny Builder||San Andreas||Here|
|Editing main.scm code||San andreas master||Mission Builder||San Andreas||Here|
|Getting extra space in main.scm||Rapier||Sanny Builder||San Andreas||Here|
|Stripped main.scm||Rapier||Sanny Builder||San Andreas||Here|
|Making your own very special savegame||gtasearcher||Sanny Builder||San Andreas||Here|
|Scripting Tutorials||l3mmy||Sanny Builder||San Andreas||Here|
|N00bs guide to using anims||james227uk||Sanny Builder||San Andreas||Here|
|How To Create A Mission||spaceeinstein||Sanny Builder||San Andreas, Vice City, GTA III||Here|
|Create A Thread in main.scm||Multiple Authors||Sanny Builder||San Andreas, Vice City, GTA III||Here|
|III Era SCM Syntax||Wesser||-||San Andreas, Vice City, GTA III||Here|
|Display a float in text||spaceeinstein||Sanny Builder||San Andreas, Vice City, GTA III||Here|
|Math Operations||spaceeinstein||Sanny Builder||San Andreas, Vice City, GTA III||Here|
|Mission Packs||Seemann and Deezire||-||San Andreas||Here|
|Spawn a Ped||spaceeinstein||Sanny Builder||San Andreas, Vice City, GTA III||Here|
|Move an object||Aschratt||Sanny Builder||San Andreas, Vice City, GTA III||Here|
|SA Memory handling||Seemann||Sanny Builder||San Andreas||Here|
|[CLEO]Some Tutorials||Deji||Sanny Builder||San Andreas||Here|
|Decision Makers||Deji||Sanny Builder||San Andreas||Here|
|YeTi's VC Coding Tutorial Part One||YeTi||Mission Builder||Vice City||Here|
|YeTi's VC Coding Tutorial Part Two||YeTi||Mission Builder||Vice City||Here|
|littleguna's Coding Tutorial||timmy2004||Mission Builder||Vice City||Here|
|How To make Marker to execute your mission||kiavash2k||Mission Builder||Vice City||Here|
|Y_Less's Coding Tutorial||Y_Less||Mission Builder||Vice City||Here|
|Tutorial for spookie's SCM hook (C++)||XcR||Any C++ Compiler||Vice City||Here|
|Text_Draw Explanation||grovespaz||Mission Builder||San Andreas, Vice City, GTA III||Here|
|Custom Ingame menu||PatrickW||Mission Builder||San Andreas||Here|
|Sanny Builder||Seemann||San Andreas, Vice City, GTA III, GTA LCS, GTA VCS||Here|
|Mission Builder||Burton Waterduck||San Andreas, Vice City, GTA III||Here|
|GTAMA||Dan Strandberg||GTA 3||Here|
|CLEO||Seemann and Alien||San Andreas, Vice City, GTA III||Here|
|SCM Hook for San Andreas||op9080||San Andreas||Here|
|SCM Hook for Vice City||Spooky||Vice City||Here|
|SA ScrDebug||Deji||San Andreas||Here|
|Request Mod Thread||All III Era GTAs||Here|
|GTA:SA Opcodes||San Andreas||Here|
|Opcodes for Bartons Editor (GTA3 + VC)||Vice City, GTA III||Here|
|Documenting GTA-SA memory adresses||San Andreas||Here|
|Documenting GTA3/VC memory adresses||Vice City, GTA III||Here|
|SCM Coding FAQ||San Andreas, Vice City, GTA III||Here|
|Sanny Builder VS Mission Builder||N/A||Here|
|Mission Coding Directory||San Andreas, Vice City, GTA III||Here|
|Tutorial Links and Mission Coding Information||San Andreas, Vice City, GTA III||Here|
|The Modders Lounge||N/A||Here|
|GTAG Opcode Database||All||Here|
|Deji's Opcode Database||All||Here|
This topic isn't finished yet, I am going to edit the Useful Topic section soon. Post your suggestions below and let me know if I have left out something.