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
buuuUUUMP! AND triple post blush.gif For shame!

 

Anyways, opcode 0445 is no longer an unknown cheat check. It checks to see if the improved handling cheat is enabled. CORNERSLIKEMAD in GTA3 and GRIPISEVERYTHING in VC. This is evidenced by the fact that both scripts contain the check only once and that's during the insane stunt jump thread. If you test it in game, you'll find that you forfeit your ability to cash in on insane stunt jumps while the cheat is enabled, but is restored once you turn it back off. This has no effect on Unique stunt jumps as that is monitored by a separate thread without such a check.

What about the flying car cheat ? That should mess up the unique jumps too. Sorry for not believing a word you're saying. tounge.gif

Share this post


Link to post
Share on other sites
Demarest

Fair enough. Just tested CHITTYCHITTYBB in GTA3 and sure enough, no insane stunt jumps awarded.

Share this post


Link to post
Share on other sites
brokenfish
buuuUUUMP! AND triple post blush.gif For shame!

 

Anyways, opcode 0445 is no longer an unknown cheat check. It checks to see if the improved handling cheat is enabled. CORNERSLIKEMAD in GTA3 and GRIPISEVERYTHING in VC. This is evidenced by the fact that both scripts contain the check only once and that's during the insane stunt jump thread. If you test it in game, you'll find that you forfeit your ability to cash in on insane stunt jumps while the cheat is enabled, but is restored once you turn it back off. This has no effect on Unique stunt jumps as that is monitored by a separate thread without such a check.

nice!

 

i always thought it had to do something with the check before saves... sigh.gif

 

glad you found that out.

now if only someone removed it......

then posted a record of their top score - true cheating then.

Share this post


Link to post
Share on other sites
Demarest

BBUUMMPP!

 

Started coding Timetwister VC finally. Preliminary preparations led me to stumble upon

00D6: if  0?057B: (unknown)004D: jump_if_false ££Label012819

...in MB.22. Looking at it in context, it didn't take long to realize what it was about as it was tied to the GXT entry "Your wanted level has been suspended, if you commit a crime whilst the stars are flashing your full wanted level will be reinstated." But what triggers it? Is it your first visit to the Pay N Spray or your first suspended wanted level? So I wrote the loop

:LabelMAIN30001: wait 0? ms00D6: if  0?057B: (unknown)004D: jump_if_false ££LabelMAIN3018C: play_sound  1? at  0!  0!  0!0002: jump ££LabelMAIN3

Visit a Pay N Spray, silence. Run over a cop and visit the Pay N Spray and for as long as my star was flashing, it was chiming. Therefore

057B: is_wanted_level_suspended

 

 

Also, since this thread's inception a few other related threads have been created. I will link them for ease of finding...

 

link 1

link 2

link 3 (has typos)

 

Edited by Demarest

Share this post


Link to post
Share on other sites
Demarest

OMG, teh bump and double post! ph34r.gif

 

Opcode 0531 is "increment_stores_knocked_off_by".

Share this post


Link to post
Share on other sites
Opius

046F: store_player $PLAYER_CHAR currently_armed_weapon_to  $variable

 

 

That is all.

Share this post


Link to post
Share on other sites
Opius

0579: stop_actor $PLAYER_ACTOR04DD:  $test = actor $PLAYER_ACTOR armour04C6: actor [email protected] do_kung_fu_stance_towards_actor $PLAYER_ACTOR0563: set_player $PLAYER_CHAR driveby_ammo_to 3000 unknown 524805 unknown 00550: keep_object $D5E in_memory 102DF:   is_player $PLAYER_CHAR firing_a_gun04C5:   actor $temp photographed

 

That driveby ammo opcode is interesting. Setting the "524805" to anything else crashes the game.

That "keep object in memory" opcode is fun with exploding barrels

That is all. biggrin.gif

Edited by Opius

Share this post


Link to post
Share on other sites
Un3462

i think barton messed up the parcount for 0563 in your ini ([email protected]! ... though things like this can happen to anyone. finding out how many parameters an opcode needs without looking in the exe (or already having an ini or db to tell you) is pretty tiresome, especially when you need to do so for 1000+ opcodes. i know because i've done this. :) and though barton mostly copied our ini for gta3, i think he did try figuring out most of the vc opcodes himself).

 

opcode 0563 only has 2 parameters.

i repeat: opcode 0563 only has 2 parameters.

make the relevant changes in your inis.

 

what the code actually looks like is this (it's only used once, in taxwar2.gsr):

 

  0563 $hPlayer0008, 300 0501 $hPlayer0008, 1

 

 

this would assemble to the following bytecode:

 

63-05 02:08-00 05:2c-01

01-05 02:08-00 04:01

 

if you were to interpret this as a single opcode with 4 parameters, the 01-05 02:08-00 part would be read as 01:05-02-08-00, since 01 is the partype for a 4 byte signed int, and you'd get the "magic" number 80205h, or 524805.

 

the database contains the correct form of this opcode, but i seem to remember a while back when there was a different opcode which was incorrect in the database; the db said it had a magic number, but this also turned out to be an opcode misinterpreted as a parameter. so remember; big magic numbers are likely actually opcodes (or sometimes labels). though i doubt you'd find any others.

 

of course, you could just look at this finding as a special opcode that will only work in the builder, since that is supposedly what this thread was made for. :p

Share this post


Link to post
Share on other sites
sleeper777

since this topic wakes now and then i have been checkng out some code and found this one i am sure that everyone on the higher teer knows about this one

 

04AE: unknown 1684?? radar_icon_or_model 4?

 

 

but why is it named such when it is clearly used to set the model of the radar icon to a unique ID to allow it's use over and over again.. at least that's what i assume R*'s reasons for this were but it also seems like extra lines of code to me i mean why not just set the types directly when using the 02a7 opcode

 

02A7: 972?? = create_icon_marker_and_sphere 1684?? at 1860?? 1864?? 1868??

 

 

02A7: 972?? = create_icon_marker_and_sphere 4? at 1860?? 1864?? 1868??

 

i am still a bit confused about some of R*'s processing

 

Share this post


Link to post
Share on other sites
Un3462

04ae is a strange opcode, yes. it directly copies the second parameter into the first. the second parameter could be anything. i believe rockstar added it as an alternative to setgi/setli for special things like models, radar icons, and possibly other things. not necessary, but perhaps they thought it cleaner.

 

in rampage.gsr and firetru.gsr it is used with the same variable several times, so it's likely not some sort of constant setting opcode, like (i think) you say.

 

since it's like some sort of universal set opcode, it is simply named 'set' in the db.

Share this post


Link to post
Share on other sites
Opius

In Barton's language, I've seen it used to set a variable to a object or an object from default.ide. I've never seen it used with a radar marker.

 

That is all.

Share this post


Link to post
Share on other sites
sleeper777

@Opius is this section not in your main.gsr ..(iknow this is barton code but when you decompile the vc .scm the first time this is the code i have in my main segment

 

04AE: unknown  1684?? model  4?04AE: unknown  1728?? model  22?04AE: unknown  1668?? model  9?04AE: unknown  1672?? model  8?04AE: unknown  1676?? model  6?04AE: unknown  1680?? model  7?04AE: unknown  1688?? model  13?04AE: unknown  1692?? model  10?04AE: unknown  1696?? model  15?04AE: unknown  1700?? model  29?04AE: unknown  1704?? model  24?04AE: unknown  1708?? model  11?04AE: unknown  1712?? model  23?04AE: unknown  1716?? model  14?04AE: unknown  1720?? model  17?04AE: unknown  1724?? model  30?02A7:  892?? = create_marker  1668?? at  1824??  1828??  1832??0164: disable_marker  892??02A7:  964?? = create_marker  1672?? at  491! -77.7!  10.4!0164: disable_marker  964??02A7:  1096?? = create_marker  1708?? at  1908??  1912??  1916??0164: disable_marker  1096??02A7:  1148?? = create_marker  1712?? at  1944??  1948??  1952??0164: disable_marker  1148??02A7:  1112?? = create_marker  1716?? at  1920??  1924??  1928??0164: disable_marker  1112??02A7:  1132?? = create_marker  1720?? at  1932??  1936??  1940??0164: disable_marker  1132??02A7:  1188?? = create_marker  1724?? at -853! -302!  10!0164: disable_marker  1188??02A7:  988?? = create_marker  1688?? at  1872??  1876??  1880??0164: disable_marker  988??02A7:  1012?? = create_marker  1692?? at  1968??  1972??  1976??0164: disable_marker  1012??02A7:  1024?? = create_marker  1696?? at  1884??  1888??  1892??0164: disable_marker  1024??02A7:  1060?? = create_marker  1700?? at  1848??  1852??  1856??0164: disable_marker  1060??02A7:  1084?? = create_marker  1704?? at  1896??  1900??  1904??0164: disable_marker  1084??02A7:  936?? = create_marker  1680?? at  1848??  1852??  1856??0164: disable_marker  936??02A7:  972?? = create_marker  1684?? at  1860??  1864??  1868??0164: disable_marker  972??02A7:  1224?? = create_marker  1728?? at  1956??  1960??  1964??0164: disable_marker  1224??02A7:  912?? = create_marker  1676?? at  1836??  1840??  1844??0164: disable_marker  912??

 

Edited by sleeper777

Share this post


Link to post
Share on other sites
Capushon

I have found new ORP-codes:

 

 

; If player in water (I tested!)0521:   player $PLAYER_ACTOR sunk; If car blazes (I tested!)0495:   is_car_fired $MyCAR; If car has a damages (I tested!)031E:   has_car_been_damaged $MyCAR unknown 39; If on car shoot (I tested!)031E:   has_car_been_damaged_by_weapon $MyCAR unknown 47

 

 

-= Capushon =-

Share this post


Link to post
Share on other sites
sleeper777
I have found new ORP-codes:

 

 

; If player in water (I tested!)0521:   player $PLAYER_ACTOR sunk; If car blazes (I tested!)0495:   is_car_fired $MyCAR; If car has a damages (I tested!)031E:   has_car_been_damaged $MyCAR unknown 39; If on car shoot (I tested!)031E:   has_car_been_damaged_by_weapon $MyCAR unknown 47

 

 

-= Capushon =-

the last two are the same opcode 031E ... so which is it

Share this post


Link to post
Share on other sites
Opius

It seems to return true when you attack a car with a particular weapon.

 

031E:   car $car damaged_by_weapon $INT_weapon_number

 

 

That is all.

Share this post


Link to post
Share on other sites
Capushon

The weapon with code 47 can not be, maximum - 36...

Share this post


Link to post
Share on other sites
Opius

As I recall, 47 is the indicator for a driveby, with any sort of weapon.

 

That is all.

Share this post


Link to post
Share on other sites
jax

biggrin.gif

 

02df: Is_Player_Firing $Player_Char

02e0: Is_Actor_Firing $actor1

 

which is

 

02df=1,Is_Player_Firing %1d%

02e0=1,Is_Actor_Firing %1d%

 

for all you lazy peoples

 

-Jax

Share this post


Link to post
Share on other sites
jax

 

04E1=1,Open_Tight_Trunk_Of_Car %1d%

 

This code opens the boot/Trunk 'all the way' and doesn't allow it to move as you drive (unless the car gets damaged)

 

 

 

050B=1,Open_Loose_Trunk_Of_Car %1d%

 

Where as this only 'pops' the boot, and as you drive it will 'flap' freely in the wind. biggrin.gif

 

 

 

050D=1,Actor_Still_Alive %1d%

 

 

This opcode is a check on whether a actor is still alive, its used in that mission where you have to damage those jury dudes cars, but not kill them.

 

Im yet to find a code that closes the boot/trunk of the car though sad.gif

 

-Jax

Share this post


Link to post
Share on other sites
PatrickW

BUMP......

 

 

 

0477=3, car %1d% animation %2d% %3d% ms

 

 

This opcodes lets cars execute predefined movements. The following movements are available, selected with the second parameter:

1 : stop gently and wait

2 : brake hard and backup

3 : brake hard, breaking to left and wait

4 : brake hard, breaking to right and wait

5 : brake hard and wait

6 : tight turn to left

7 : tight turn to right

8 : boost/bump forward

9 : wide turn to right

10: wide turn to left

 

This opcode is especially usefull in the creation of "un-cutscenes"

Many examples of usages can be found in the R* code.

Share this post


Link to post
Share on other sites
Opius

Now THATS great!

 

Does the car need to have any speed, or does the game handle that on its own?

Share this post


Link to post
Share on other sites
TwoZero

Now THATS great!

Agreed

 

Does the car need to have any speed, or does the game handle that on its own?

Yes I also would like to know that... this can be very usefull in some custom cutscene's that need to made for LC.

Share this post


Link to post
Share on other sites
PatrickW

The game seems to handle this at any carspeed. I have tested it only at one speed yet, but the R* code uses it at many speeds....

 

Share this post


Link to post
Share on other sites
PatrickW

Sorry for the double post..

 

Another one that might be very usefull in uncutscenes.

 

04E0=2, car %1d% abandon_path_radius %2d%

 

 

I'm always having trouble letting cars drive in places where there are no paths defined.

I'm not very happy with the name yet, but what this opcode does is:

[EDIT] changed name to opius' suggestion, which is much better.

 

Normally when you issue a drive_to command, the vehicle first drives to the nearest path-node, then moves along te paths to the path-node near the target and drive around there.

This opcode allows you to specify a distance (integer in meters). When the car is within this distance of the target-location, it will abandon the path and drive in a straight line to its target . If the start-position is within the distance of the target, the car won't bother with path-nodes at all, and just drive there in a straight line.

Edited by PatrickW

Share this post


Link to post
Share on other sites
TwoZero

Very nice find, I also noticed that damn thing with the cars not driving correctly confused.gif.

 

One thing though... distance as Integer? weird, it's always float.

Share this post


Link to post
Share on other sites
Opius

Nice work!

I would probably name it "abandon_path_radius" or something though.

Share this post


Link to post
Share on other sites
PatrickW

@TwoZero:

Yes strange, I Know, but I didn't invent the opcode, just reporting it cool.gif

 

BTW, the allowed range of value seems to be 1-255, above that, the opcode does nothing.

 

@opius: much better name..... edited above

 

and... eh.. thanx for the Star, I'll try even harder helping ppl out and uncovering the R* secrets.. smile.gif

Edited by PatrickW

Share this post


Link to post
Share on other sites
PatrickW

I took a break from my work at the savefile format, and decided to hunt for some unknown opcodes, and I found a couple:

 

 

04C0=6;setup_police_roadblock  %1d% %2d% %3d% %4d% %5d% %6d%     

 

params: (float)x1,(float)y1,(float)z1,(float)x2,(float)y2,(float)z2

It sets up a roadblock with 2 police-cars and 4 cops between the two points.

Used in COPLAND

 

 

03FE=2;set_actor %1d% money %2d%

 

params: actor,(int)amount

Gives the actor the amount of money, which he will drop when killed

 

 

0457=2;actor %1d% point_gun_at %2d%   

 

params: actor, actor

This opcodes forces the first actor to point his gun at the second actor, which will be great for cutscenes. ( this behaviour can be ended with 011c: )

 

 

04c6=2; is_actor %1d% aiming_at_actor %2d%  

 

params: actor,actor

conditional that yields true is actor1 is aiming his weapon at actor 2

 

 

046F=2, get_player %1d armed_weapon %2d%

 

params: player, variable_to_store_weapon

player-variant of opcode 0470:

 

 

 011A=2, actor %1d% add_threat %2d%

 

This one is great, it lets you set the threats that are usually set on pedtype

base(03F1:pedtype add_threat)), for individual actors.

Heavily used in GUARDIAN ANGELS

 

 

0556=6,provide_cab_ride_from %1d% %2d% %3d% to %4d% %5d% %6d%

 

params: (float)x1,(float)y1,(float)z1,(float)x2,(float)y2,(float)z2

Create a cab at location 1 to drive you to location 2 for $9

 

 

0469=10,create_actor %1d% from_area %2d% %3d% %4d %5d% types %6d% %7d% %8d %9d% %10d%

 

The first param should be a variable set to -1 and will contain a handle if an actor was found.

param 2-5 set the area(x1,y1,x2,y2) where the actors are picked from

the last 5 params determine wat type of peds are picked:

6: 1-> #COP

7: 1-> #SWAT

8: 1-> #FBI (found by capushon)

9: 1-> #ARMY (found by capushon)

10: 1-> ???

 

 

 

[edit: fixed some typo's]

[edit2: fixed typo in 0566: opcode ; thanx CyQ]

[edit3: added 0469 params found by capushon]

 

I've a couple more, but I have to test those some more and will supply them later.....

Edited by PatrickW

Share this post


Link to post
Share on other sites
TwoZero

wow.gif seriously where have you been in the past year? You are here and in a week you find out a lot of stuff about the Save file format and now you found out the functions of a lot of unknown opcodes... you should have been here earlier...

 

Great find, especially that point gun opcode, that can be very usefull for some good cutscenes biggrin.gif.

Share this post


Link to post
Share on other sites
Un3462

great finds, but 0566 -> 0556 (see database ;).

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.


  • 3 Users Currently Viewing
    0 members, 0 Anonymous, 3 Guests

×
×
  • Create New...

Important Information

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