Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Opius

Opcodes for Bartons Editor (GTA3 + VC)

Recommended Posts

Barton Waterduck

Here are two I found while searching for opcodes in GTA SA. They work the same way in VC. I have this feeling these have been found before ? blink.gif

 

04FE: deflate_tire <car> <tire>0496: is_tire_deflated <car> <tire>

 

Edited by Barton Waterduck

Share this post


Link to post
Share on other sites
Y_Less

On vc-db, 0496 is unknown, but has 2 parameters, so may be that, but hasn't apparently been found (I wish someone would sync all the opcodes places!)

 

047E is is_player_on_motorbike, has 1 parameter and was found by CyQ, so isn't (or may not be) that.

Share this post


Link to post
Share on other sites
Barton Waterduck

OOPS, a small typo there, it's supposed to be:

04FE: deflate_tire <car> <tire>0496: is_tire_deflated <car> <tire>

 

 

Example code in VC. If you use the parked faggio in the chase mission with the bfinjection with the gunner, both the tires of the faggio gets shot out.

 

 

:Label06505900D6: if  0047E:   player $PLAYER_CHAR driving_a_motorbike004D: jump_if_false £Label06508F00D6: if  08119:   NOT   car  [email protected] wrecked004D: jump_if_false £Label06508F04FE: unknown_car  [email protected] flag  004FE: unknown_car  [email protected] flag  10224: set_car  [email protected] health_to  350

 

 

It's easier to see it in SA because it's used with the spike strip / stinger mission "Puncture Wounds".

 

Edited by Barton Waterduck

Share this post


Link to post
Share on other sites
Y_Less

Are the numbers direct references to tires (e.g. 0 = front left, 1 = front right etc) or are they binary based (e.g. 1 = front left, 2 = front right, 3 = front left AND front RIGHT)?

 

Based on reading the basic description on VC-DB, I believe it is the former, but could be wrong.

Share this post


Link to post
Share on other sites
Barton Waterduck
Are the numbers direct references to tires (e.g. 0 = front left, 1 = front right etc) or are they binary based (e.g. 1 = front left, 2 = front right, 3 = front left AND front RIGHT)?

 

Based on reading the basic description on VC-DB, I believe it is the former, but could be wrong.

No idea. This is the SA code used with the stinger.

 

00D6: if  08496:   NOT   unknown_car_check @38  2004D: jump_if_false £Label1B893904FE: unknown_car @38 flag  2:Label1B893900D6: if  08496:   NOT   unknown_car_check @38  0004D: jump_if_false £Label1B895204FE: unknown_car @38 flag  0:Label1B895200D6: if  08496:   NOT   unknown_car_check @38  1004D: jump_if_false £Label1B896B04FE: unknown_car @38 flag  1:Label1B896B00D6: if  08496:   NOT   unknown_car_check @38  3004D: jump_if_false £Label1B898404FE: unknown_car @38 flag  3:Label1B8984

 

Share this post


Link to post
Share on other sites
Y_Less

Thats what I put as the first option, but you don't know which is which?

Share this post


Link to post
Share on other sites
Barton Waterduck
Thats what I put as the first option, but you don't know which is which?

Well, if you look at the code I posted, doesn't it look like it checks each wheel at a time ? Also, if each wheel is supposed to be a bit in a variable, then you have 4 bits for a car with 4 wheels and then you would check for the number 15 wouldn't you ? Doesn't look like that with the code I posted.

 

Short reply: Looks like

the numbers are direct references to tires

Share this post


Link to post
Share on other sites
Hammer83

Some more opcodes:

 

 

03FB: car $MYCAR bind_to_current_island 0/1;; Works only in GTA3

 

 

If the parameter is 0, the flag of the car which denotes the island index is set to 0; otherwise, the island index is calculated from the current car position and is updated. Island index is needed so that computer controlled car doesn't drive to another island.

 

EDIT: Very similar to 044E, but that one sets the island index flag of the car to -1 if opcode parameter is 0. What's the difference between -1 and 0 is beyond me.

 

 

057F: $MYVAR = player $PLAYER_CHAR coach_passengers_dropped_off

 

 

Stores the number of passengers that got off at the bus station and resets this number to 0 in the player record.

 

 

0467: clear_actor $MYACTOR last_weapon_damage0468: clear_car $MYCAR last_weapon_damage

 

 

I have no idea what this does, but that's how Rockstar named these opcodes (although the name is pretty indicative of the effect of these opcodes).

 

 

0595: mission_complete

 

 

Has the same effect as 0318: set_latest_mission_passed, except that it doesn't update the last mission name. By the same effect, I mean it also resets taxi restart and increments the number of missions passed.

 

 

0598: stir_ground_around_cutscene_object $OBJ radius 10.0 flag 8

 

 

Used with helicopter in the opening cutscene to create effect of moving particles on the ground due to propeller's rotation.

Edited by Hammer83

Share this post


Link to post
Share on other sites
PatrickW

Nice finds hammer,

 

 

But the thing that intrigues me the most is the source of this knowledge:

 

Some more opcodes:

 

I have no idea what this does, but that's how Rockstar named these opcodes (although the name is pretty indicative of the effect of these opcodes).

 

 

Do you have connections at R* ??

cool.gif

Share this post


Link to post
Share on other sites
Hammer83

Hehe.

 

The source is GTA-VC.EXE/GTA3.EXE biggrin.gif That's my Rockstar source.

Share this post


Link to post
Share on other sites
Y_Less
Nice finds hammer,

 

 

But the thing that intrigues me the most is the source of this knowledge:

 

Some more opcodes:

 

I have no idea what this does, but that's how Rockstar named these opcodes (although the name is pretty indicative of the effect of these opcodes).

 

 

Do you have connections at R* ??

cool.gif

I was also intrigued by that, though I guessed at one possible source (the one he used).

Share this post


Link to post
Share on other sites
random_download
Hehe.

 

The source is GTA-VC.EXE/GTA3.EXE biggrin.gif That's my Rockstar source.

I just followed the dissassembled exe through as if 0467 was being executed and the offset to: 'CLEAR_CHAR_LAST_WEAPON_DAMAGE - Charact' is pushed to the stack for some reason :S. Any idea why this happens? Or why it doesn't happen to other opcodes as well?

Share this post


Link to post
Share on other sites
Hammer83

It prints the rror message for some opcodes if something is wrong. Unfortunatelly, out of 1000 opcodes only about 20 have error message, if not less.

 

OT: Mr. 47 is cool. biggrin.gif Can't wait for Blood Money

Share this post


Link to post
Share on other sites
Hammer83

A couple of GTA3 opcodes:

 

 

02F0: create_barrel_pickup_at $x $y $z (this one is not in the ini)02F1: create_exploding_barrel_pickup_at $x $y $z

 

 

Creates a spinning barrel pickup. First opcode creates BARREL1 model, the second one creates BARREL2 model that explodeson contact.

 

EDIT: Oops, sorry for double post.

Edited by Hammer83

Share this post


Link to post
Share on other sites
jacob.
How did you find out the names of those opcodes, hammer? Debug strings in ps2 gta3?

Share this post


Link to post
Share on other sites
Hammer83

Most of them made up based on things they do. Some have error messages in the exe containing opcode names, like random_download said.

 

BTW, there are a lot of opcodes in GTA3.exe and GTA-VC.EXE that are not in the INI files at all. Neither in Barton's nor in TbM2k's

Share this post


Link to post
Share on other sites
random_download
Most of them made up based on things they do. Some have error messages in the exe containing opcode names, like random_download said.

 

BTW, there are a lot of opcodes in GTA3.exe and GTA-VC.EXE that are not in the INI files at all. Neither in Barton's nor in TbM2k's

Which do things? wow.gif when I was looking through I looked at a few which were not in the INI file and when that opcode was called the jump table tells it to return without doing anything at all, so I assumed that that was why some of the opcodes were completely omitted (ie. not even called unknown). Looks like I was wrong and that some of the opcodes not in the ini file actually do something wow.gif

Share this post


Link to post
Share on other sites
Hammer83

Another one of those not working anymore opcodes (it was for GTA3):

 

03FC: actor $MYACTOR bind_to_current_island 0 (false)/1 (true)0438: set $MYACTOR level 0 (clear)/1 (from_position)

 

 

Same as 03FC works the same as 03FB, but with actors. 0438 works like 044E but for actors. The difference between 044E and 03FB is explained previously.

Edited by Hammer83

Share this post


Link to post
Share on other sites
Opius

What does setting the actors level actually do? By 'level' do you mean 'island'?

Share this post


Link to post
Share on other sites
Hammer83
What does setting the actors level actually do? By 'level' do you mean 'island'?

In used Barton's terminology. I think island is a better description. It basically locks the actor on one island. He won't take any roads that will lead to another island.

Share this post


Link to post
Share on other sites
.:Xieon:.

Hi to all!

I have found new OPR:

 

 

0519: unknown car $86F flag  1

 

 

this same as:

 

 

0519: lock_car $86F in_current_position  1

 

 

Opcode forces the any car to "freeze" on the current place.

To shift the car it is impossible. Useful in movies or at creation of the special roadblocks.

Opcode 04FE works and in VC, not only SA, I in VC have found it,

and when have going it to post, I have seen that have outstripped me smile.gif

However in VMB, 04FE still appears as unknown, It is necessary to add myself.

 

And the database of opcodes (vc-db) for a long time itself is not updated,

and the opportunity of the additive unknown opcode now does not work. Why? The most of unknown there opcodes are already known in VMB...

Share this post


Link to post
Share on other sites
PatrickW

Nice finding.. cookie.gif

 

And welcome smile.gif

 

Yeah, there are various sources of opcode definitions, which do not always agree, and are not always updated together. The best thing with exotic opcodes, is to check all sources, compare the results, and test yourself, which one is correct.....

Share this post


Link to post
Share on other sites
ZAZ

I found the following code in the original bank robbery mission of Vice City and

I used it for my own mission mod. So I know, its not gas or smoke.

Its a visuell animation scene of swats. They climb down a robe and its not possible

to hit them by weapons.

 

0503: create_gas_smoke -907.307 -336.618  26.00503: create_gas_smoke -907.307 -345.504  26.00503: create_gas_smoke -915.401 -336.6184  26.00503: create_gas_smoke -915.401 -345.5  26.0

 

It needs the 0247: request_model #SWAT before using

 

____________________ZAZ__________________________________

Edited by ZAZ

Share this post


Link to post
Share on other sites
Demarest

BUMP!

 

0534: increment_pizzas_delivered_stat X

 

 

I just tested this
:LabelMAIN30001: wait 250& ms00D6: if 0?047A:   in_pizza_car $PLAYER_ACTOR004D: jump_if_false ��LabelMAIN3018C: play_sound  1? at  0!  0!  0!0002: jump ��LabelMAIN3

...along with Car Spaw v3 and ANY 2-wheeled vehicle was chiming. On the surface, this looks just like 047E, although R* used both so A difference is implied. If you'll look at its context in The Party, you'll know from playing the game that if you're escorting Mercedes on a motorbike, she never asks about putting her hand in your lap. Pretty straight forward.

 

[EDIT]

Just tested 044B. It was constantly chiming unless Tommy was actively pursuing entering or exiting a vehicle. As in "is_on_foot_and_free_from_commitment" or what have you. NOT like is player controllable because it continues to chime while diving out of the way of oncoming traffic, uncontrollable falls, flying off of a motorbike, etc. I have to assume that 044A is the same, except for players not actors.

Just noticed that 044A and 044B are still listed as unkown in the Opcode Database.

Edited by Demarest

Share this post


Link to post
Share on other sites
Demarest

I'll keep posting as if somebody's actually reading tounge.gif

 

03AB set_car( $CAR).do_nothing 1?

 

The car will remain still with no directive until released by code or given something to do. Setting it to 0? did nothing from what I saw, though it was used in original code during Silence The Sneak.

Share this post


Link to post
Share on other sites
Demarest

0578: set_highest_vigilante_level_to ($)int

 

[EDIT]

0582: set_hotring_best_result_to 0? ($)int

 

[EDIT2]

0544: set_longest_time_in_bloodring_to ($)int

 

[EDIT3]

0536: increment_drug_deals_made_by ($)int

 

[EDIT4]

0534: increment_pizzas_delivered_by ($)int

Edited by Demarest

Share this post


Link to post
Share on other sites
ceedj

A couple of Vice related things I found while converting my mod...

 

04ED: request_animation

 

Used in a few places, but the ones that interested me was when I was putting together the Mailbu and Pole Position clubs.

 

When you do this:

 

04ED: request_animation "STRIP"04ED: request_animation "RIOT"

 

they're used with animation wait states 32 and 29 (which when used alone crash the game), so the peds will do a Dance (32) animation (like in the clubs) and the Riot (29) animation (like in the RIOT mission).

 

I haven't been able to locate any use of animation states 28 and 34, although I haven't tried them with these animations loaded yet either. When I muck about with it more, I'll check those, and also check to see if I can load the animation to run throughout the game so I can use these in Vice Studios.

 

colgate.gif

Share this post


Link to post
Share on other sites
Demarest

First and foremost, Y_Less gets credit for this opcode! I experimented in game, but it was his brainstorming that led to the articulation of this opcode.

 

0596: is_riding_mission_restart_taxi

 

One parameter: a player. It is used only once in VC and SA and then only to determine if you are eligible to even receive the textbox that informs you to press submission, let alone launch Taxi Driver. The accompanying opcodes of 058D and 058E were NOP'ed in SA, but 0596 was not despite it having no valid application. I'm assuming it was left in the SA sniffer as a result of a clumsy copy/paste of VC's approach.

Share this post


Link to post
Share on other sites
spaceeinstein

Three-year-old bump? breadfish_by_Moto.gif

 

There are lots of undocumentation/lost information for opcodes. Here are the ones I have detailed so far for Vice City and some for GTA III so that people won't need to rediscover them again. It also includes stuff that I think are new discoveries (for a six-year-old game?!).

  • 00BA

    Page updated to include Vice City's. III coming as soon as Thanksgiving if I can remember to do it.

     

  • 0152

    Sets the gang car spawn. The numbers from parameters 4 and up cannot exceed 1000 when added up, i.e. "250 0 0 0 0 0 250 500 0 0" (250+250+500) is the most you can set. You can set it lower than that but not higher. It seems that param 12 is trying to load an invalid ped model because the game doesn't crash right away. Can someone find out what model is it trying to load?

     

  • 015C

    Functions similar to above but for gang on foot spawn.

     

  • 01B5

    This was documented as "force weather" but that doesn't sound different from "set weather." A more clear description is "set next weather cycle."

     

  • 024A

    Misleading description, it doesn't "create" a phone. It grabs the nearest phone model and assign it to a variable. If a phone model is not close by, the game will crash.

     

  • 0324

    Sets the zone's ped spawn. The zone is defined in info.zon. The last parameter is the line number in the pedgrp.dat file. Line number starts at 0 at the top. Each "line number" contains 16 peds. The game reads 16 peds as each line, not the line you see in the text editor.

     

  • 03ED

    Prevents a flipped car from blowing up, as long as YOU are not in it. I discovered this by accident in Vice City and was really pure luck. I was just insanely spawning cars and some flipped over but didn't blow up. Opcode's functionality discovered!

     

  • 042E, 042F

    Stats opcodes. See links for list of stats.

     

  • 04D8

    Functions the same as in San Andreas, prevents actors from drowning, even you.

     

  • 0533

    Increments "Assassination Contracts Completed" stat

     

  • 0551

    Kaufman Cabs radio

     

  • 057D

    Known to play bridge status audio file but can also play ANY audio file in the Audio folder. See link for a complete list from 0 to 73 and some for above.

It seems like the predecessors of III coding do know a lot about some of these opcodes but I cannot find any documentation on them.

 

Congratz on the millionth visitor to GTAModding.com. I was the million and forty first.

 

EDIT:

More newly discovered/more detailed/redefinition of opcodes

A COMPLETE list of descriptions of all animations used by that opcode in the game, even the ones that was previously found to crash the game.

 

  • 03F1

    I rediscovered this and didn't realize it was posted before. Now it's documented in one place.

     

  • 0445

    This is well-known but no one specified which specific cheats would be checked. In Vice City, these cheats are checked: airship, comeflywithme, gripiseverything, loadsoflittlethings, seaways.

     

  • 0493

    Disables the tank's ability to explode on contact! 0 = disable, 1 = enable

     

  • 0291

    Sets the actor to attack threat when provoked.

     

  • 04AA

    Checks if the player is in a helicopter

     

  • 0552

    Riot noise, like the one heard during the mission Riot for Ken Rosenburg. By default, values go from 127 to 0, 127 being loud and 0 being silent. It is hardcoded to play the noise at that location and for the volume of the noise to change with distance.

     

  • 0168

    I feel like 0168 is grossly misnamed but apparently corrected in San Andreas. It should be renamed "set blip size". Default size of most blips is 3 although there are exceptions. You can set it to any number, even 100 to cover up your radar with a giant pink square.

  • Edited by spaceeinstein

    Share this post


    Link to post
    Share on other sites
    spaceeinstein

    • 0159 is the most freakiest and randomest opcode I've ever experienced. Here are the values and what they do:

     

    1 - frozen camera, low draw dist

    2,3,12,18,22,33,37 - frozen camera, normal draw dist

    4 - revert to normal

    5,6,9,10,13,15,19,20,21,24,25,26,27,30,31,47 and up - 0,0,0

    7,8,34,46 - first person, can move and hit but cant jump or enter cars, movement controls also affects camera movement

    9,10 - 0,0,0

    11 - camera angled from tommy, sometimes jitters because follows rule of no camera clipping colls, stuck

    14 - camera first person, stuck, x angle from -45 to 45 degs

    16 - frozen first person, can only move forward, previous limitations apply

    17 - CRASH

    23 - camera zooms sraight up while stayed pointing to tommy

    28 - camera stuck, some distance away from tommy, follows rule of camera clip

    29 - wasted camera motion, will keep moving up

    32 - busted camera motion, wants to rotate around tommy and messes up when clipped, cinematicy-like

    35 - camera will want to zoom out away from tommy until hits colls, if no coll, stops at 0,0,0

    36 - some weird angle, smooth, stuck

    38 - camera stuck in lighthouse (odd)

    39 - sniper rifle, can move, when rotate camera moves in wide circle, can zoom in and out, zoom in makes even larger circle

    40 - rocket launcher, movements similar to sniper rifle zoomed out

    41,43 - same as rocket but without anything on screen

    42 - 1st person weapon (ie kruger), movements like launcher

    44 - stuck camera somewhere high overlooking ocean beach

    45 - less restricted 1st person, can't enter vehicles

     

    I might record a video on this, some of these are really freaky.

     

    EDIT:

    • 0506: Here's a list of car variations used in Vice City. Param 1 sets the variation, param 2 overlays another variation to your car. So you can combine two variations for one car! All these are spawned in the game and I haven't checked the cars' model files so there could be more variations.

     

    Most but not all of the blank and empty variations are also variant -1.

     

    Model Changes 0 1 2 3 4 5
    barracks Bed coverings Closed top Open top with frame Open top
    bfinject Engine Variant 1 Variant 2 Variant 3
    benson Company names and contents Sumo ZIP Vice 'n' Easy Bitch 'n' Dog Food blank and empty
    bloodra Numbers, ads, and rear window style 53 27 3 69 99 1
    bloodrb Numbers, ads, and rear window style 83 11 41 59 48 73
    boxville Company names and contents CityHaul Haul Marlin R.S. & L. Bows blank and empty
    burrito Roof Spoiler and roof light none
    cabbie Roof light normal normal Lightless
    caddy Rear contents Brown golf bag Brown satchel Red golf bag Purple satchel Green golf bag Blue golf bag
    cheetah Mirrors and dashboard Single mirror Double mirrors No mirror, black siren on dashboard No mirror, clean dashboard
    coach Company names Vice Free Bus Line Whippet Express Coach Bullet Bus and Coach Line blank
    firetruk Numbers 1 2 3 4 5 6
    flatbed Rear contents Stacked boxes Stacked pipes Tall covered thing (whale?) Short covered thing (whale?) Stacked smaller boxes Stacked boxes (like in variant 0)
    gangbur Bear position Front Top none
    hotrina Numbers and ads 46 21 34 78 56 99
    hotrinb Numbers and ads 14 28 35 65 69 80
    kaufman Roof lights normal normal Lightless
    mesa Bed coverings Covered back Framed back none
    mule Company names and rear contents Haul Outta Sight Marlin Vice Voice R.S.&L. Bows blank and empty
    patriot Bed coverings Low covered back High covered back Open back with rack none
    peren Roof Roof rack No roof rack
    pony Company names R.S. & L. Bows Gasmaster blank
    romero Casket Fancy brown casket Black casket Simple brown casket empty
    taxi Roof light normal normal Lightless
    stallion Roof Closed top Open top
    trash Trash Trash sticking out in rear No trash in rear
    vicechee Side mirrors Single mirror Double mirrors No mirrors
    yankee Company names CityHaul Haul Marlin R.S. & L. Bows blank
    zebra Roof light normal normal Lightless

    cry.gif

    Edited by spaceeinstein

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    • 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.