Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions


Opcodes for Bartons Editor (GTA3 + VC)


Recommended Posts



This update should be compatible to scripts decompiled with Sanny Builder's old revision of the INI file. The update was done all by hand so there may be mistakes in the file. So far, there doesn't seem to be any errors. Here is a list of major changes and additions since the 04.01.11 revision.

• Almost all "GTA 3 only" opcodes are commented out to allow documentation of III's opcodes without obstructions

• 009D removed because VC and III never supported that in the first place


• Changed opcode descriptions

009F: set_actor [char handle] objective_idle

020F: actor [char handle] rotate_to_player [player handle]

0210: player [player handle] rotate_to_actor [char handle]

0336: set_player [player handle] visibility [int]

0350: set_actor [char handle] maintain_position [int]

0377: set_actor [char handle] objective_steal_any_car

0381: set_object [object handle] velocity [flt1] [flt2] [flt3]

039C: set_car [car handle] watertight [int]

03AE: remove_particles_from_cube [flt1] [flt2] [flt3] [flt4] [flt5] [flt6]

03C8: set_camera_in_front_of_player

03D3: get_closest_car_node_at [flt1] [flt2] [flt3] with_heading [var1] [var2] [var3] [var4]

0411: set_actor [char handle] use_pednode_seek [int]

0418: set_object [object handle] draw_last [int]

0428: set_car [car handle] avoid_level_transitions [int]

04E3: set_player [player handle] mood [int1] duration [int2]

054B: attach_object [object handle] to_car [car handle]


• "GTA 3 only" changed opcode descriptions

00AC: car [car handle] alive

015E: car [car handle] in_air

023E: set_car [car handle] flash [int]

0240: set_object [object handle] flash [int]

029C: car [car handle] boat

02A1: message_wait [int1] [int2]

0344: set_text_draw_center_size [int]

0367: init_rampage_headshot

03f8: get_body_cast_health [var]

0438: set_actor [char handle] avoid_level_transitions [int]

0447: player [player handle] lifting_phone

044f: make_car [car handle] bit_stronger [int]

045E: place_object [object handle] relative_to_object [object handle] offset [flt1] [flt2] [flt3]


• "GTA 3 only" added opcodes

0195: set_actor [char handle] guard_area [flt1] [flt2] [flt3] [flt4]

021F: set_all_taxi_lights [int]

023F: set_actor [char handle] flash [int]

0246: set_player [player handle] walk_style_to [int]

02C4: save_player_coords

02D6: actor [char handle] firing_weapons_in_rectangle [flt1] [flt2] [flt3] [flt4] [int]

031B: car [car handle] primary_color [int]

031C: car [car handle] secondary_color [int]

0328: get_random_car_in_zone [string] model [int] store_to [var]

0338: set_car [car handle] visibility [int]

033D: put_out_fire_on_player [player handle]

0413: set_player [player handle] get_out_of_jail_free [int]

046A: get_random_law_enforcement_in_zone [string] store_to [var]



Ooo, new opcode for GTA III


045D: get_object_at [flt1] [flt2] [flt3] radius [flt4] model [int] store_to [var]


This grabs an object of specified model at a location within a radius and stores it into a variable. It only works with dynamic objects. This was never used in the default script.

I can add blips to nearby traffic lights with this!

user posted image

Edited by spaceeinstein
Link to comment
Share on other sites

  • 3 weeks later...


The SCM from the mobile version seems formatted exactly the same as the PC version, but with two extra opcodes:


03A8 - 1 parameter03A9 - 0 parameter


Add these to Sanny Builder's SCM.INI file if you want it to decompile correctly:




According to real SCM source, the opcodes are:



03a8=1,save_float_to_debug_file %1d%03a9=0,save_newline_to_debug_file



I bet they are NOPs in final build though.

Link to comment
Share on other sites

  • 2 weeks later...


0323: ANCHOR_BOAT [car handle] [int]


Can anyone explain to me how is this suppose to work? I first learned this from Towncivilian and R*'s GTA III source code confirms this, but I have been testing this extensively and found no apparent effect in VC. It is always used with boats. If anchor is suppose to mean not being able to move, this opcode doesn't do that. I can still push boats, drive them, and have NPCs drive them.

Link to comment
Share on other sites

It is a bit of a weird one... I'd identified it as being that before even the III source code but was never sure of what the actual effects were. I'll try and check the SA IDB again tomorrow and see if I can find out if it's even used. Bad programmer-mission coder communication seems to be a likely culprit of many weird SCM phenomenons.


In SA, it's used mainly in the mission where you plant a bug on a boat and CJ explains his unfortunate encounter with a condom (Amphibious Assault?).


If I'd have to guess, I'd say it does make the boat stick to a position (even if not keeping completely still, like the "make char stay in kinda the same position" opcode), but probably not under the circumstances that you tested it in. Did you try getting the handles of a random (or just the closest) boat and using the opcode? It may have more of an effect, since the boat doesn't have a goal of sailing to a particular spot, it's just cruising. 00A8 is CAR_WANDER_RANDOMLY if you want to make a vehicle cruise. No idea if it works on boats, though.



I've listed most of the III command names, as well as related IV ones, in the v2 Opcode Database. I can provide you with a generated list, if you want.





Couldn't help myself. I had a quick look. The most striking thing is that the flag which is set doesn't stop the boat from doing something. A small amount of code is run if the flag is set. So the flag makes more happen, not less. Kinda the opposite of what the name would make out. I can't yet make much of this very undocumented (absolutely nothing in CBoat is documented) code, but I'll try documenting some stuff later and see if it's any clearer. Still, the code does mess with the boats matrix a lot... and it seems that if one of that float member values is -99999 (or w/e) the boat will only turn on the spot. So the command name almost definitely isn't lying.

Edited by Deji
Link to comment
Share on other sites


00A8 does work on boats; boats correctly search for boat paths. Still doesn't anchor though. I think I can guess why this opcode doesn't work the way I tested it. Boat anchor seems to be set at +0x2F5. Using this opcode in a loop suppose to set the byte value to 1. It works for cars but it never works for boats. Somewhere within the game is forcing the boat to never be anchored. Can it be safely concluded that this opcode is basically useless?

Link to comment
Share on other sites

Nah. Well, it appears used in SA anyway. When I repair my SA installation (it currently relies on VJ and the VJ source needs a bit of a fixup) I should be able to see for sure whether it's used, using R*'s code.

Link to comment
Share on other sites


With more testing and thinking, I found out how this opcode works. The boat must NOT be occupied for the effect to work. When a boat is anchored, it cannot move when being pushed, though push hard enough and it will slowly move. Gravity still have the normal effect. Once the boat is occupied, it is automatically unanchored. Boats are anchored by default when they are spawned without anyone inside it. This works even when boats are grounded.

Link to comment
Share on other sites

Interesting. Having all boats "anchored" when on ground would add realism, since CJ seems strong enough to push boats all the way across SA tounge.gif

Link to comment
Share on other sites

  • 4 weeks later...

CustomVariables.ini for GTA III

The CustomVariables.ini controls the labeling of global variables when decompiling the main.scm. The labels contained in this list are obtained from the partial source code of GTA III from gtamodding.ru. It is far from complete but it's much better than ones released previously. I will periodically update the list using the same link and will not be posting anymore notices after this unless it's necessary.

Link to comment
Share on other sites

Ahhh, I started working on the same thing, but hadn't had much time to spend completing it. Good work smile.gif

Link to comment
Share on other sites

  • 4 months later...

Whereas we were talking about the native SCM sintax some posts above, I decided to show in this topic the source (yeah, it's really a code) of GTAIII's american.gxt, available here.

012          345
678   9A   BCD
WX    YZ

Link to comment
Share on other sites

Looks like "THIS LABEL NEEDS TO BE HERE!!!" mystery is solved now tounge.gif


How does it organize stuff in tables though? I can't see their definitions anywhere.

Oh, III lacks tables. My bad.

Edited by SilentPL
Link to comment
Share on other sites

  • 5 weeks later...

0439 is a pretty fun opcode. It's never used in III (and it's III-only opcode), and it gets the SCM handle of chase scene vehicles. This way, I could try my best on kidnapping Old Oriental Gentleman by myself:


user posted image


Native name for it is probably TURN_CHASE_CAR_INTO_SCRIPT_CAR, thus opcode is


0439: turn_chase_car %1d% into_script_car %2d%


Edited by SilentPL
Link to comment
Share on other sites

  • 2 years later...

It looks like ALL the opcodes' names and constant names have been discovered. Onto documenting the behavior of all the opcodes!


For 018C (ADD_ONE_OFF_SOUND) in Vice City, I have found all the possible values that can play a sound and their behaviors. I have recorded the sounds of almost all of them for you to listen. A lot of the sounds are combinations of sound effects and have different frequency so you cannot rely solely on listening to the sounds in sfx.raw/sdt.


Value Coord-independent Notes Listen 1 Yes blip 3 No metal gate 5 No garage door finished open/close 7 Yes blip [/td] [/tr] 8 Yes blip 9 Yes blip 10 Yes high pitch blip 12 No bullet hit ground 13 Yes successful select 14 Yes unsuccessful select 16 Yes Demolition Man and Trojan Voodoo arm bomb 18 No No Escape? card swipe 19 No intermittent male pain 20 No intermittent female pain [tr][td]35No Dildo Dodo low fuel ping 52-54 No bullet hit ground see 12 56 No ringing phone 57 No glass breaking 58 No glass breaking 59 No glass breaking 60 No glass breaking 61 No boxes destroyed 62 No boxes destroyed 63 No metal sheet explosion 64 No tire hit ground 65 No beach ball 66 No bullet shell dropping [/table]

Coord-independent means that you can hear the sound regardless of location. Those with more than one sounds means that the sounds will be randomly chosen to play. GTAModding.com will have more information about this opcode.

Edited by spaceeinstein
Link to comment
Share on other sites

It's likely you haven't followed GTAModding's changes for a while. :p Thanks to the iOS version of III which supplied us all the .sc script includes except the main part, an article has been built concerning what's been known about the GTA3script language, roughly called SCM language. In the footer, you can find the link of the language definitions, including enumerations, extrapolated from the official GTA3 Script Compiler V413 left into the Android version of VC. Getting to the point, defines.h provides the aszSounds array which lists the sounds you documented by hand till the ID 51 with the native nomenclature.

012          345
678   9A   BCD
WX    YZ

Link to comment
Share on other sites


Wow, those are amazingly detailed documentation. I am surprised at how much of the original source was released.

Edited by spaceeinstein
Link to comment
Share on other sites

Craig Kostelecky

I am surprised at how much of the original source was released.


Me too. In fact, I rewrote nearly the entire LC script to use Rockstar's variable names and to give it nice if/while loops. Check it out when you get a chance :) There's even some stuff that R* commented out that I put back in (this can be easily disabled with a master variable.


And welcome back! We missed you :D

Edited by Craig Kostelecky
Link to comment
Share on other sites


:) It's great to be back. There is so much catching up to do. I'm only free for the moment unfortunately. Real life has been keeping me very busy.


EDIT: A note for 00E1, buttons 5 and 7 are not zoom in and out, buttons 14 and 16 are zoom in and out.


I've been going on a contribution spree at GTAModding. Check out the newly updated and created pages! There are extremely detailed descriptions for these.

Edited by spaceeinstein
Link to comment
Share on other sites

  • 3 weeks later...

Can someone help me confirm something weird that is happening to me in Vice City? Opcode 02AB's first proof is bullet proof:


02AB: set_actor $PLAYER_ACTOR immunities 1 0 0 0 0
But it does not protect me against damage from the Colt Python!


01B2: give_actor [email protected] weapon 18 ammo 999901CB: actor [email protected] kill_actor $PLAYER_ACTOR
Edited by spaceeinstein
Link to comment
Share on other sites

  • 4 months later...


0136: camera_shake 100 at x y z
Valid for GTA 3. Shakes the camera same as 0003, but also accepts a point coordinates. From a quick test I see no difference between 0003 and 0136, but in fact the 0136's function is used for all hardcoded camera shakes after vehicles detonations, blow ups, tank shots, etc, so its possibly a point that has to be viewable by the player for the shake to have an effect. Edited by Seemann
Link to comment
Share on other sites


For those who aren't updated on the new pages at GTAModding.com, here are the most interesting opcode-related articles since my last list in January.

  • List of statistics in GTA III, a full and complete list (Seemann)
  • Collectibles (Seemann)
  • III/VC script definitions, entirely organized (Wesser)
  • Pickups
  • List of statistics in Vice City, a full and complete list


    This opcode displays an onscreen timer. In GTA III the timer only counts down but since Vice City timers can also count up. You must use a global variable. Using an integer constant crashes the game and a local variable produces no timer. The value of the global variable is stored in milliseconds but the format of the display is MM:SS. The value of the global variable will be constantly updated by the timer and the timer itself can be updated by assigning a value to the global variable. When counting down, at 10 seconds the timer will produce a noise every second, specifically SFX 336 for GTA III and 370 for Vice City. Once the timer finishes counting down, it will be cleared from the screen. Only one timer can be displayed at a time. Attempting to display another timer while the current timer is in effect will not produce an additional timer. Due to the limitation of the format of the timer, the timer will not display properly above 99:99 but will still keep accurate count. In GTA III and Vice City, switching widescreen on will hide the timer from view. In Vice City, it will also mute the 10-second countdown noise.




    This opcode changes the scale of the specified blip. It has no effect on blips that use sprites. Most opcodes that can create a blip defaults the scale to 3. The original script uses values between 1 and 3 but values between 0 and 65535 can be used. Legacy documentation uses the description "show on radar" for the opcode.




    This opcode changes the display of the specified blip.
















    Hide all








    Show only the arrow/sphere in the world








    Show only the blip/sprite on the map








    Show all





    The audible ranges of all sounds are documented.


    All of GTA III is complete (there were so many!) and the audible ranges of all sounds are documented.



    This opcode sets the character's objective to walk along a route created by opcode 01E2. If the path is obstructed, the character cannot complete the route. When used on the player character, the player character becomes uncontrollable as it follows the route. Entering a vehicle, getting wasted, or getting busted regains control of the player character. Assigning certain objectives or clearing it using opcode 011C will stop any character from following the route.
















    Walks straight to the center of the map (0,0)








    Follows the route once, then walks straight to the center of the map (0,0)








    Follows the route in loop, when reaches the end walks back, e.g. 1,2,3,4,3,2,1,2,3,...








    Follows the route in loop, when reaches the end starts at the beginning, e.g. 1,2,3,4,1,2,3,4,1,...





    More details have been documented.


    All pickup locations listed and mapped



    This opcode starts a cutscene loaded by opcode 02E4. Cutscenes must be properly ended using opcode 02EA otherwise the game will be stuck in an uncontrollable state when the cutscene ends playing or is skipped.

    In GTA III and Vice City, widescreen is switched on while the cutscene plays. Most cutscenes can be started without loading anything other than cutscene data but it would look really weird. The minimum to view cutscenes properly is to set the position of the cutscene, create cutscene objects and assign them an animation, and, in GTA III, create cutscene heads and assign them an animation. Subtitles are generally shown using opcode 00BC timed to appear using 02E8 along with the cutscene.




    This opcode adds a moving particle effects at the specified location for a duration of time. Particle effects must be in range of the player (about 95 units) when adding them into the world; they will not appear when added outside the range. Particle effects that have been added will disappear when the player moves out of range regardless of duration.

    Using a particle ID outside the range listed on the page produces unpredictable results and may crash the game. The colors red, green, and blue only affect particle 14 in GTA III and particle 16 in Vice City and has no effect on anything else. Some particles do not obey the duration and are noted in the page. If the duration is set to 0, particles that obey duration will loop forever; using opcode 03AE or moving outside the range of the particle can remove a particle effect stuck in a loop. The strength represents the direction and length of movement of the particle. Some particles look meaningless or weird absence of the strength. Ones that are affected by gravity can be seen arcing towards the ground if an X or Y strength is set. Some particles do not obey the strength and are noted in the page. Particle effects created with this opcode is saved in block 14 of the save file in GTA III and block 15 in Vice City.




    In GTA III, this opcode sets right value of the "Missions passed" stat (GXT string FEST_MP). The left value is affected by 0318. The stat initially starts with a value of 0. That stat does not exist in Vice City so the opcode has no practical effect there. The value set with this opcode is saved in block 17 of the save file in GTA III and block 19 in Vice City.



    The extended stats section is simplified and clarified (check out a fancy use of this here).


    The extended stats section is simplified and clarified.


    Entire list of all GXT strings along with properties of the text from the end credits (different languages show different line separations :O)



    This opcode sets the starting location of restart mission taxis. The destination and most of the behavior of the restart taxi is set using opcode 058E. The taxi requires a ground to spawn on, otherwise it would not spawn at all. A maximum number of 16 points can be set before the game disallows anymore points to be set. The original script used eight, one in front of each hospital and police station. The point set with this opcode is saved in block 3 of the save file.


EDIT 1: The list has been updated to include full descriptions for some of the opcodes for your convenience.

EDIT 2: July update! Check out all the interesting script-related documentation.

  • We're in the process of renaming all "threads" to "scripts", their correct names.
  • CustomVariables.ini

    All named variables from the source has been completed as far as I can tell.

  • Ped type

    Table updated to be more better to use.

  • Crane, and all their related opcodes


    This opcode grabs and activates a crane that can lift any car within the pickup zone and move it to the drop off point. The crane's arm will rotate towards the center point of the pick up zone. If the crane has a magnet, it is lowered towards the same point and can be used to pick up the car. The car must be stationary for the crane's hook to attach to the car. When the car gets attached to the crane's hook whether it is a magnet or not, it becomes non-solid. At the drop off point, the car is released and becomes solid again. If you stand underneath the drop off point, the crane will not drop off the car until you move away. If the car becomes destroyed while in transit (but not before), the crane will still continue moving it. The crane moves back to its initial state afterwards and can be reused again.




    This opcode grabs and activates a crane that accepts vehicles for the crusher. The crane behaves similarly to ones activated by opcode 01EE with the following differences. If the crane have a magnet, the height of the magnet is lowered. When you deliver a vehicle model it does not accept, GXT string CR_1 ("Crane cannot lift this vehicle.") is displayed and the crane refuses the vehicle. The following vehicle models based on their IDE values are rejected by cranes activated with this opcode:

    • 97 (Firetruck)
    • 98 (Trashmaster)
    • 102 (Blista)
    • 118 (Securicar)
    • 121 (Bus)
    • 122 (Rhino)
    • 126 (Dodo)
    The crusher itself is separate from the crane and is not tied to this restriction or the crane.




    This opcode grabs and activates a crane that accepts emergency vehicles for exporting. Fans generally call this crane the emergency vehicle crane (or EV crane) because the vehicles it accepts are all the emergency vehicles in the game. The crane behaves similarly to ones activated by opcode 01EE with the following differences. When you deliver a vehicle model it does not accept at all, GXT string GA_19 ("We're not interested in that model.") is displayed and the crane refuses the vehicle. The following vehicle models based on their IDE values are accepted by cranes activated with this opcode:

    • 97 (Firetruck)
    • 106 (Ambulance)
    • 107 (Fbi Car)
    • 116 (Police)
    • 117 (Enforcer)
    • 122 (Rhino)
    • 123 (Barracks OL)
    When the crane drops off the vehicle, the vehicle disappears immediately. On all but the seventh and last vehicle, you are then rewarded $1,500 and GXT string GA_10 ("Nice one. Here's your $1500") is displayed. Regardless of order, the last vehicle delivered yields nothing. The crane accepts vehicles of the same model only once. If you attempt to deliver it again, GXT string GA_20 ("We got more of these than we can shift. Sorry man, no deal.") is displayed and the crane refuses the vehicle. This refusal applies globally if you have more than one military cranes. Opcode 03EC can be used to check if all vehicles have been collected by the crane.




    This opcode returns true if a crane at the location is lifting the specified vehicle. Somewhat misleadingly, state 3 (moving upwards from pick up) of the crane is ignored; only states 2 (moving to destination) and 4 (moving downwards to drop off) are detected.




    This opcode returns true if the military crane has collected all of the following vehicle models, listed based on their IDE values:

    • 97 (Firetruck)
    • 106 (Ambulance)
    • 107 (Fbi Car)
    • 116 (Police)
    • 117 (Enforcer)
    • 122 (Rhino)
    • 123 (Barrack OL)




    This opcode allows all taxis to spawn with their roof lights turned on. Anything that can spawn a taxi like 00A5, 014B, or natural traffic, is affected. Taxis that are already spawned are not affected by this opcode. This opcode was never called in the original script of GTA III.




    This opcode swaps a map model with another map model nearest to the center of the search area. The collision model and time property (TOBJ) of the model to swap to are also swapped with the model to swap from. The position and rotation of the model to swap from are preserved. Take note on not forgetting about its LOD model. Attempting to swap from a breakable object yields no effect and swapping to a breaking object does not preserve its ability to break. Data of the swapped model is saved in block 0 of the save file in GTA III, block 0 in Vice City, and block 1 in San Andreas, as long as the model is swapped; if the model is swapped back to the original model, the game no longer save that information. The game can swap and save a maximum of 25 map models.



    All particles complete with images



    This opcode returns true if the car component of the car is closed. If the component is damaged and cannot be closed shut, the opcode can still return true if the component rotates into the closing position.
















    bonnet, hood








    boot, trunk, tailgate








    front left door








    front right door








    rear left door








    rear right door




  • 0421 FORCE_RAIN


    This opcode allows raindrops to display in cull zones with flag 8 when raining. Normally entering zones with this flag do not display raindrops. The opcode has no effect on the rain itself. The original script called this opcode only once, during the introduction sequence.



    Includes a code snippet to recreate removed opcode 04A0, GET_OBJECT_DISTANCE_ALONG_PATH.



    This opcode gets the data of two wheels, wheelie, and stoppie stunts. After the opcode is called, all the stunt data are immediately set 0. The two wheels or stoppie stunt must be performed for more than two seconds or the wheelie stunt for more than five seconds in order to be able to get any data for those stunts the three stunts are independent of each other but the duration and distance of each stunt are dependent on the stunt. Interestingly the game does not use this opcode to register stunt data into the statistics; it registers them regardless of this opcode. This opcode is primarily used to display stunt data onscreen in the stunt jump script in the original script.



    Includes full table for Vice City.



    This opcode returns true if a glass map object has been shattered near the specified location. The opcode detects any glass within a 20-unit radius to the center of the glass. If there are more than one glass within the radius, glass that is closest to the coordinates point takes the highest priority. The original script called this opcode during "Shakedown."




    This opcode creates a helicopter dust particle effect around an object, behaving almost exactly as the one created by helicopters. The opcode must be placed within a loop, preferably with a wait of 0, in order to constantly create the particle effect. The radius parameter is the distance between the center of the object and the particles surrounding it at ground level. The density is capped at 8; any value higher than 8 is treated as 8. The player character must be within about 500 units of the object in order for the particle effect to be created. Pilotable helicopters in the game has a radius of 10.0 and density of about 9. The original script used this opcode on Lance's cutscene helicopter in the introduction scene.


EDIT 3: August update! More interesting pages. Edited by spaceeinstein
  • Like 2
Link to comment
Share on other sites

  • 2 months later...

I took a brief look at the original PS2 version and the Japanese PS2 version and compared the supported opcodes with the PC version. It looks like there are some differences.



Opcode and Command Original




Link to comment
Share on other sites

  • 2 months later...

Can someone help figure this out? Opcode 0540 (VC) does not seem to have any effect in the game. It is only used during "Shakedown". The command name is "SET_PLAYER_AUTO_AIM" and old documentations named it "window_washer_credibility". I looked up a video of the PS2 version of the mission and auto-aim still works during the mission so it doesn't seem to be system-dependent.

Link to comment
Share on other sites

  • 11 months later...

Here's a list of opcode-related articles that I feel are interesting over the past year at GTAModding.



    This opcode allows hurricane weather. It can choose from the two weather lists available in the game. The value set with this opcode is saved in block 19 of the save file in Vice City.



    Includes algorithm showing how cards are shuffled.



    This opcode sets the near clip of the camera. Anything closer to the camera than the specified value will be clipped by the game as seen in the image in the article. The effect of this opcode resets to its default value of 0.9 anytime a cutscene clears. Small values close to or at 0.0 will cause weird graphical glitches and negative values will clip everything that can be clipped so those value are not recommended. The opcode is generally used during cutscenes but it can be used anytime.



    Includes all available blip colors.

  • 02F0 DROP_MINE


    This opcode terminates the active mission by executing its mission cleanup routine. It only affects active missions with a specific structure and has no effect elsewhere. This opcode should not be called during cutscenes because it can skip over opcode 02EA, preventing you from resuming control of your character, unless the opcode is placed in the mission cleanup routine. Names used in alternative documentations include abort_mission and terminate_active_mission. This opcode was never called in the original script of GTA III and Vice City.




    This opcode sets the player's ability to reload certain weapons quickly. Only some weapons take full advantage of this ability by skipping the reload sequence completely. They include the Python, sniper rifles, and Rocket Launcher. Other weapons partially take advantage of this by replacing the reload animation with a short pause. They include pistols, sub-machine guns, and rifles. Shotguns do not take advantage of this; they merely silence the reload sound effect. The value set with this opcode is saved in block 16 of the save file in GTA III, block 18 in Vice City, and block 15 in San Andreas. This opcode was never called in the original script of GTA III.




    This opcode shakes the in-game camera for a while. The higher the integer value is, the more and the longer the camera shakes. The shaking of the camera depends if the camera's location, not the player's location, is within 100 units of the specified coordinates point. The duration and intensity is independent of that point. Leaving or entering the area after the opcode is called does not change the behavior of the shaking. This opcode was never called in the original script of GTA III.


  • 015E IS_CAR_IN_AIR


    This conditional opcode returns true depending on the drive type of the car under these circumstances. If the car is front-wheel drive, the opcode returns true if both the front wheels are off the ground. If the car is rear-wheel drive, the opcode returns true if both the rear wheels are off the ground. If the car is four-wheel drive, the opcode returns true if all four wheels are off the ground. Oddly for boats, the opcode produces an inconsistent return result. It returns true for some boats and false for others. Legacy documentation incorrectly described this opcode as checking if the car's wheels are on the ground.



    Includes table of all cars and their properties created for the scene.


    Includes screenshots of all possible effects.


    This opcode sets the motion blur primarily by overlaying a color over the camera. It is most effective when the trails option is turned on and the amount of blurriness differs depending on the mode. The effects of this opcode are cleared when the player dies or is arrested. The effects are overridden when the Sniper Rifle is used.



    Includes map of zones in GTA III where the RC Bandit will spontaneously explode.



    This opcode sets patrol cars regardless of the wanted level to Police cars and Enforcers, which normally happens when a four-star wanted level is achieved. Everything else behaves normally according to the wanted level like police helicopters, aggression, spawn rate, etc. Roadblocks at wanted levels 5 and 6 retain the usual Fbi Cars and Barracks OL, although this seems to be bugged. It is recommended that the models for the Enforcer and the SWAT be loaded beforehand in order to increase the chance of them spawning in the streets. The effect is reset when the player dies or is arrested. Legacy documentations described this opcode as setting the cop behavior.




    Many actions that require the character to move to a location will make the character walk to its destination. This opcode allows the character to run to its destination instead. It does not seem to work on the player character. Legacy documentations had incorrectly described this opcode as setting the character's wander state.




    A newly spawned character does not react when threatened by most events, e.g. getting punched or about to be run over by a car. This opcode sets the character to heed threats and react to them accordingly, e.g. running away, attacking back, or dodging a car. The game can cause the character to heed threats on its own depending on the conditions. Alternative documentations describe this opcode as setting the character to attack when provoked.




    This opcode sets the vehicle to block the target vehicle by driving in front of it. A driver other than the player must be present for the opcode to work. Anytime the vehicle stops, it will reverse and attempt to block the target vehicle again. It is recommended that the driving style and cruise speed be changed to increase the effectiveness of the block. If the vehicle has a siren, the siren will be switched on. Making the vehicle perform some other actions, like making the driver leave the vehicle or making the vehicle drive to someplace else, cancels the effect. The target vehicle must exist -- if it disappears while the blocking is still in effect, the game will crash.




    This opcode creates a restart point that overrides all restart points, which include ones created through opcodes 016C and 016D, only for the next player death or arrest. After the player is wasted or busted, the player will be spawned at the restart point and the override will be disabled, allowing all other restart points to resume. Opcode 01F6 can be used to cancel the override. The override restart point and its status are saved in block 9 of the save file in GTA III, block 10 in Vice City, and block 8 in San Andreas.




    This opcode sets the police to ignore the player. The police becomes unaggressive to the player and does not chase the player; police vehicles spawn with their siren off; they stop their vehicles when close to the player, exit, and walk away, sometimes taking cover and doing nothing; and the police helicopter will not show up. Everything else related to the police remains the same, like attaining wanted level, police deploying spike strips, and spawn rate of the police. Using a garage to respray your vehicle or fit a car bomb resets this effect and resumes the normal behavior of the police.


  • 059C

    Steam version has this as its last opcode also, a conditional opcode always returning false.


    Vice City's section should be complete or close to complete.


    Includes table of hardcoded fade colors for Vice City.



    This opcode gets a random non-mission character in the zone based on its ped type and turns it into a mission character. There are three categories that the opcode looks for: civilian (CIVMALE and CIVFEMALE), gang members (GANG1, GANG2, GANG3, GANG4, GANG5, GANG6, GANG7, GANG8, and GANG9), and criminals and prostitutes (CRIMINAL and PROSTITUTE). If it fails to get anything, it returns -1.




    This opcode sets the taxi shortcut drop-off point for mission. Pick-up points are set using opcode 058D. After the drop-off point is set, when the player dies or gets arrested, a marked Kaufman Cab is spawned at the closest pick-up point. When pressing button 15 near it, controls are disabled and the player character enters it as a passenger. The taxi will drive straight while the screen fades out to black and a big message with GXT key TAXI ("Taxi") is displayed. The taxi then warps to the drop-off point, the screen fades back in, $9 is removed, the player character exits the taxi, and controls are resumed. The taxi is marked as no longer needed and becomes a normal traffic taxi. The destination requires a ground to spawn on, otherwise it spawns in unexpected positions. Only the most recent drop-off point is used.

    This opcode is generally called at the beginning of missions although it is not required to do so. If the player dies or gets arrested during a mission, the taxi can be used as a shortcut to get back to the contact point. The taxi shortcut is disabled if 0318 or 0595 is called, usually when the player passes a mission, or when a rampage is started. An active taxi shortcut can be cleared without riding it by calling opcode 0557 or by setting up another taxi shortcut.



    money.dff and package1.dff have unique hardcoded behavior.

  • General article on text drawn on screen
  • Pac-Man pickups information
  • All payphone-related opcodes, including ones that create mini-cutscenes when picking up a payphone
Edited by spaceeinstein
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.