|
 |
|
|
|
|
|
GTA Modification Forums
III Coding Directory
 |
|
 |
| |
BnB  |
Posted: Saturday, Jul 2 2011, 15:24
|
sh*t Happens

Group: Members
Joined: Jun 28, 2010



|
  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. Set your own keys for script mods by ZAZ This tutorial is great for people who don't have a clue how to make a script or very beginners. Mission Coding for Dummies by Dutchy3010 This is a great tutorial for beginners who want to learn Mission Scripting it is very well structured and explained. Mission Coding for Pros by Dutchy3010 and Patrick WThis tutorial is for people who prefer (want to learn) coding in high level (c-like). SCM/CLEO Video Tutorials by Dutchy3010 Video tutorials for basic Mission Coding things. Coding Bible Part I & Part II by tomworld10 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 by Seemann & Alien 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. In order to edit or create a script mod you need a compiler and a decompiler. There are two main compilers for this script language. The first one is Sanny Builder which is the most popular and has a lot of useful extras. The other one is Mission Builder which isn’t widely used anymore and it is abandoned. Between these two the syntax and the denotation of the data types are different, however, the result will be the same. Also, there are two other compiler GTAMA and Point, however, they are outdated and abandoned. Moreover the creators of MB, GTAMA and point have retired. 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. Tools |
|---|
Code Format •GTAMA/VCDisAsm:
| CODE | | is_car_in_cube $car, $lowerx, $lowery, $lowerz, $upperx, $uppery, $upperz, 0 |
•Mission Builder:
| CODE | | 00B1: is_car $car in_cube $lowerx $lowery $lowerz $upperx $uppery $upperz 0 |
•Sanny Builder:
| CODE | | 00B1: car $car sphere 0 in_cube_cornerA $lowerx $lowery $lowerz cornerB $upperx $uppery $upperz |
•Point:
| CODE | | IsCarInCube ( $car, f$lowerx, $lowery, $lowerz, $upperx, $uppery, $upperz, 0 ) |
| Which IDE/Compiler you should useThere 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 What is SCMSCM 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): | CODE | IF IS_BUTTON_PRESSED PAD2 RIGHTSHOULDER1 AND flag_create_car = 1 AND button_press_flag = 0 IF IS_CAR_DEAD magic_car DELETE_CAR magic_car ELSE IF NOT IS_PLAYER_IN_CAR player magic_car DELETE_CAR magic_car ELSE MARK_CAR_AS_NO_LONGER_NEEDED magic_car ENDIF ENDIF flag_create_car = 0 initial_car_selected = 0 button_press_flag = 1 ENDIF |
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. | CODE | 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 00
|
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: | CODE | // This file was decompiled using SASCM.INI published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027} {$E}
//-------------MAIN--------------- 0000: NOP gosub @Noname_D wait 0
:Noname_D 0A9F: 0@ = current_thread_pointer 0@ += 16 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0@ -= -49 return |
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. | Tutorials |
|---|
| Tutorials Name | Author | Program | Game | Link |
|---|
| 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 |
| Useful Topics |
|---|
| Topic's Name | Game | Link |
|---|
| 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 |
| Other |
|---|
| Name | Game | Link |
|---|
| GTAG Opcode Database | All | Here | | Deji's Opcode Database | All | Here |
| GTAModding.com | All | Here | Please contribute to GTAModding.comThis 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. This post has been edited by BnB on Wednesday, Aug 29 2012, 10:54
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Deji  |
Posted: Wednesday, Mar 7 2012, 15:02
|
Coding like a Rockstar!

Group: Members
Joined: Dec 24, 2007


|
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
TLFdjobaw  |
Posted: Thursday, Jun 21 2012, 12:37
|
Un-skilled Collisions Modders

Group: Members
Joined: Jan 20, 2012


|
hey guys... i read and learned some tutorials but i still not understand... can you make an tutorials for making a cheat to spawn some weapons?? please..  because i need it! i just try make script like this: | CODE | //-------------MAIN--------------- thread 'VIB' 16@ = 0 33@ = 0
:VIB_25 wait 20 if Player.Defined($PLAYER_CHAR) else_jump @VIB_25 if and Player.Controllable($PLAYER_CHAR) not Actor.Driving($PLAYER_ACTOR) else_jump @VIB_25 if 0AB0: key_pressed 71 else_jump @VIB_95 16@ = 1 33@ = 0
:VIB_95 if and 16@ == 1 0AB0: key_pressed 85 else_jump @VIB_131 16@ = 2 33@ = 0
:VIB_131 if and 16@ == 2 0AB0: key_pressed 78 else_jump @VIB_167 16@ = 0 jump @VIB_200
:VIB_167 if 33@ > 5000 else_jump @VIB_25 16@ = 0 jump @VIB_25
:VIB_200 16@ = 0 04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.2 1@ -= 2.5 2@ += 0.5 6@ = 1.0 0@ = 20.0
:VIB_276 wait 50 if Player.Defined($PLAYER_CHAR) else_jump @VIB_276 if 25 > 16@ else_jump @VIB_724 02F6: 4@ = sine 0@ // (float) 02F7: 5@ = cosine 0@ // (float) 006B: 4@ *= 6@ // (float) 006B: 5@ *= 6@ // (float) 005B: 1@ += 4@ // (float) 005B: 2@ += 5@ // (float) wait 0 0871: init_jump_table 16@ total_jumps 12 default_jump 0 @VIB_433 jumps 0 @VIB_440 1 @VIB_466 2 @VIB_492 3 @VIB_518 4 @VIB_544 5 @VIB_570 6 @VIB_596 7 @VIB_625
:VIB_433 jump @VIB_700
:VIB_440 7@ = Pickup.Create(#ARMOUR, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_466 8@ = Pickup.Create(#GUN_PARA, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_492 9@ = Pickup.Create(#BRASSKNUCKLE, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_518 10@ = Pickup.Create(#GUN_VIBE1, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_544 11@ = Pickup.Create(#GUN_VIBE2, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_570 12@ = Pickup.Create(#GUN_DILDO1, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_596 13@ = Pickup.Create(#GUN_DILDO2, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_625 14@ = Pickup.Create(#JETPACK, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_654 19@ = Pickup.Create(1240, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_683 20@ = Pickup.Create(1242, 15, 1@, 2@, 3@) jump @VIB_700
:VIB_700 0@ += 20.0 16@ += 1 jump @VIB_276
:VIB_724 Player.CanMove($PLAYER_CHAR) = True 16@ = 0 33@ = 0
:VIB_745 wait 0 if Player.Defined($PLAYER_CHAR) else_jump @VIB_784 if 33@ > 25000 else_jump @VIB_745
:VIB_784 Pickup.Destroy(7@) Pickup.Destroy(8@) Pickup.Destroy(9@) Pickup.Destroy(10@) Pickup.Destroy(11@) Pickup.Destroy(12@) Pickup.Destroy(13@) Pickup.Destroy(14@) jump @VIB_25
|
but when i start the game.. and try the script.. the weapons doesnt appear?? how to fix it??  help me please
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(2) [1] 2
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|