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. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    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

GTA:SA Opcodes

Recommended Posts

mbell

 

Does anybody know how the create_fire opcode is used? It has coordinates which aren't so hard, but there's also a variable at the end, and since no variable has been defined in the stripped main.scm, I don't know what to put there. 2 fails, 1.0 fails. And there are separate opcodes for placing fires on actors and cars allready I think, so I don't think there has to be an actor or something it should be on.

02CF: create fire at $X $Y $Z 1 4 $fire1

 

$X, $Y, and $Z are the coordinates of the fire. The 1 specifies whether or not (1=yes/0=no) there should be smaller fires scattered around the primary flame. EDIT: I just found a case in the game where this is set to 5. Setting it to 1 vs. 5 doesn't seem to make any noticeable difference though...maybe it's a density thing? The 4 specifies the size of the fire. The original code uses sizes from 1-4. The $fire1 parameter is the variable in which a reference to the fire is stored. You can call this whatever you like, and it can be a local or global. This can then be used to check if the fire has been extinguished with

 

02D0: fire $fire1 extinguished

Edited by mbell

Share this post


Link to post
Share on other sites
Quadropheniac90
OK, thanks! This is useful for a little movie I'm making. biggrin.gif Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
mbell

 

02D1: remove_central_fire $fire1

 

This removes ONLY the primary fire (it could probably use a better name...). If smaller fires were created around the main fire (see above), they will remain behind. This is different from 031A (remove_all_fires), which will remove the smaller fires as well. It seems that the smaller fires may somehow acquire their own references that you can't get to, as 02D0 will return true if the primary flame is extinguished and the smaller flames are still burning.

 

 

06F5: create_coordinate_from_fire $fire1 $X $Y $Z

 

I'm not sure how useful this one is...the original code uses it once to find out how far a hard-coded point is from a bunch of different fires.

 

 

0973:    does_fire_exist? $fire1

 

This one is a bit of an enigma. I think I've got it figured out, but I'm not 100% sure. It is a conditional that is used before every call to 02D0 (is_fire_extinguished) (except for one case - line 90607, at CRASH1_1112). I think it returns true if the fire has been created but not removed. If the fire has been extinguished but not yet removed, this will return true. If the fire is removed, it will return false. Passing it something other than a fire (such as a vehicleID) will also cause it to return false.

Share this post


Link to post
Share on other sites
Quadropheniac90

Thanks mbell, for the info! biggrin.gif

 

I don't know whether this has been discovered yet:

 

05E2: unknown_action_sequence @1 $3

 

This makes actor @1 kill actor $3... This used to kill the player, but $3 is $PLAYER_ACTOR so it's probably used on actors and the player. I hope someone can use this. Maybe it should be called:

 

 

05E2: actor @0 kill_actor @1

 

 

EDIT: It works here when I type 05E2: actor @0 kill_actor @1, gonna try some nice things like snipers and flowers or something.

 

A screen:

user posted image

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
spaceeinstein

More stuff from meh:

07FF: set_car @1 hydraulics 0

0 = off

1 = on

 

07E0: set_marker @1 type 0

0 = enemy

1 = friendly

By defulat, if you create a marker, it's already enemy.

 

07A7: put_jetpack_on_actor $PLAYER_ACTOR

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
BBumper

 

Thanks mbell, for the info!  biggrin.gif

 

I don't know whether this has been discovered yet:

 

05E2: unknown_action_sequence @1 $3

 

This makes actor @1 kill actor $3... This used to kill the player, but $3 is $PLAYER_ACTOR so it's probably used on actors and the player. I hope someone can use this. Maybe it should be called:

 

 

05E2: actor @0 kill_actor @1

 

 

EDIT: It works here when I type 05E2: actor @0 kill_actor @1, gonna try some nice things like snipers and flowers or something.

 

Thanks but this has been discovered about 2 times but I don't think anyone bothered to add it to the opcode database yet.

Share this post


Link to post
Share on other sites
Quadropheniac90

OK, sorry then. I'm gonna look for any other animation opcodes...

 

EDIT: The jetpack opcode doesn't put a jetpack on my actor, I requested the model first, but the actor does float for a sec and then touches the ground. Also, which opcode must be used to make them move?

Share this post


Link to post
Share on other sites
Demarest
07E0: set_marker @1 type 0

0 = enemy

1 = friendly

By defulat, if you create a marker, it's already enemy.

Friendly as in how? How does the game behave differently?

Share this post


Link to post
Share on other sites
spaceeinstein

It's the marker description in the legend/map.

 

Putting the jetpack on seem to work only on CJ. The AI hasn't learned to fly a jetpack yet.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
demonj0e

lol that would be cool if u could give ure gang members jetpacks and let em fly with u

 

dose game crash or dont they just not take off?

Share this post


Link to post
Share on other sites
Demarest

The way he worded it, I would guess they don't even adorn them. I'm probably wrong.

 

Does anybody remember that mission? At any point in time was CJ flying during a widescreen? Maybe there's an "actor fly to" opcode or something.

Share this post


Link to post
Share on other sites
spaceeinstein

There are only two missions relating to the jetpack and none of them has CJ flying in a widescreen. THe only widescreen with CJ on a jetpack is when you got your first jetpack and the Area 69 launch bay door opened.

 

When I gave a Balla a jetpack, he just stood there doing absolutely nothing.

Share this post


Link to post
Share on other sites
Quadropheniac90

Oh well, I do have some things here, related to planes. Hope these are new... biggrin.gif

 

This keeps the plane in it's current position, it doesn't move when the last parameter is 1:

 

0519: unknown_car @0 flag  1

 

 

This retracts the landing gear of a plane:

 

08E6: @0  1

 

 

The @0 is the plane. Both of these are used in the mission with the Forelli's in the Shamal. smile.gif

 

EDIT: This seems to put the plane at coordinates defined in the opcode. But why is there a separate opcode? I'm gonna try to move it with the put_car opcode, if that works too, I don't get why there are two different ones for planes.

 

088C: @0 X Y Z

 

 

EDIT: Yep, this works too:

 

00AB: put_car @0 at X Y Z

 

Don't get why... dontgetit.gif

 

Searching more stuff, hope I find some interesting stuff.

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
GodGell

in one of the cutscenes The Truth flies (and almost crashes) the jetpack. dunno whether that counts though...

Share this post


Link to post
Share on other sites
Craig Kostelecky

That's just a cutscene animation. It's not controlled by any opcode.

Share this post


Link to post
Share on other sites
GodGell
That's just a cutscene animation. It's not controlled by any opcode.

hmm, i thought so... don't the heli fly_to opcodes work?

Share this post


Link to post
Share on other sites
Demarest
This retracts the landing gear of a plane:

 

08E6: @0  1

 

So does 2nd param = 0 extend the landing gear? Somebody had asked about that recently.

 

Earlier GTAs had different put cars commands as well. It's logical to assume they do something different. Good look determining what smile.gif

Share this post


Link to post
Share on other sites
Quadropheniac90

I'll try, but after that it's sleepy time. I'll edit my post in a couple of minutes or tomorrow. biggrin.gif

 

EDIT: I put a wait in of 2 seconds and then the landing gear didn't 'come out' but just 'spawned'. I'll try some other parameters tomorrow. Hope it's useful to somebody. smile.gif

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
spaceeinstein

07CC: player $PLAYER_CHAR disable_key_15 0 (could be described better)

0 = disable

1 = enable

It disables the enter/exit key.

Share this post


Link to post
Share on other sites
PatrickW
Thanks mbell, for the info! biggrin.gif

 

I don't know whether this has been discovered yet:

 

05E2: unknown_action_sequence @1 $3

 

This makes actor @1 kill actor $3... This used to kill the player, but $3 is $PLAYER_ACTOR so it's probably used on actors and the player. I hope someone can use this. Maybe it should be called:

 

 

05E2: actor @0 kill_actor @1

 

 

EDIT: It works here when I type 05E2: actor @0 kill_actor @1, gonna try some nice things like snipers and flowers or something.

 

A screen:

user posted image

You should be cautious with renaming opcodes that have "action_sequence" in their name. They carry this name, because they can be used in the definition of an action sequence ( thus between a 0615/0616 pair, and with the first 'actor' parameter set to -1).

 

This is not yet fully figured out, but I think that these are improved versions of existing opcodes. The difference being that they noe support being part of an action_sequence.

 

If you can't follow the rambling above, don't worry...just remember:

if you rename an "unknown_action_sequence" opcode, be sure to keep "action_sequence" in the new name.

Share this post


Link to post
Share on other sites
spaceeinstein

Hmm...

097A: play_sound_at X Y Z sound 1135

But there's already one for it...

 

05BC: action_sequence actor @15 jump 0

0 = small jump

1 = large jump

 

I wonder where Tbm2k is. That site hasn't been updated in a long time. If this keeps up, there will be more pink opcodes than white ones.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Quadropheniac90

@PatrickW: OK, but as far as I know, not a single other opcode has been used to make one actor kill another one. And I did understand what you said... confused.gif

 

And about the valuesd for the 'landing gear' opcode, only 0 and 1 can be used, but then there won't be an animation of the landing gear coming out, it's just there. I thought that maybe 2 and 3 made it come out, but that's not true. smile.gif

 

EDIT: This makes an actor sit down:

 

06B0: unknown_action_sequence $actorID  80000

 

80000 is the amount of milliseconds the actor sits down.

 

Maybe this is a good name? smile.gif

 

06B0: action_sequence actor_sit_down @5  80000

 

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
nubbel

 

0726: @0 $PLAYER_ACTOR -1  30.0

 

Helicopter @0 follows you in a radius of 30.0

 

 

 

0841: @0  1 0724: @0 $PLAYER_ACTOR  30.0

 

Heli (Hunter) chases you in a radius of 30.0 and attacks you with machine gun.

 

 

 

0724: @0 $PLAYER_ACTOR  30.0 084E: @0  1

 

Hunter chases you in a radius of 30.0 and attacks you with rockets.

 

 

 

0710: @0 $PLAYER_ACTOR -1  50.0

 

Hydra attacks you. But seems that this opcode cant be used on its own.

The following lines are an example how it can be used:

 

 

 

04BA: set_car @0 speed_instantly  6.00742: @0  1.5 0745: @0 0710: @0 $PLAYER_ACTOR -1  50.0 0742: @0  .5 08A2: @0 $PLAYER_ACTOR  30.0

 

Hydra @0 starts, follows you in a radius of 30.0 and attacks you with missiles.

 

;--------------------------------------

 

 

0750: @2  0

 

Makes object @2 invisible (0) or visible again (1)

 

Edited by nubbel

Share this post


Link to post
Share on other sites
BBumper
0726: @0 $PLAYER_ACTOR -1  30.0

 

Helicopter @0 follows you in a radius of 30.0

 

 

When I found this opcode (See pg.6) I noticed it doesnt control the distance/radius, it actually makes the helicopter fly at (30.0) feet above the target.

Share this post


Link to post
Share on other sites
nubbel

Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.

Share this post


Link to post
Share on other sites
Quadropheniac90

I don't know if this has allready been discovered, I searched so...

 

This makes an actor do a driveby on a car:

 

0713: unknown_action_sequence $actorID -1 $carID  0.0  0.0  0.0  100.0  0  0  90

 

But I still need to figure all parameters out, I just love experimenting. tounge.gif

 

And this makes an actor do a driveby on an actor:

 

0713: unknown_action_sequence $actorID $actorID -1  0.0  0.0  0.0  5000.0  4  1  40

 

Still need to check all the parameters.

 

EDIT:

 

0713: action_sequence $actorID do_driveby_on $actorID $carID  0.0  0.0  0.0  5000.0  4  1  40

 

Something like that... You will have to use $actorID or $carID, I'm gonna test what happens when I use both.

 

EDIT: Same thing happens, he shoots at the plane... (Using 2 planes for little cutscene thingy, not good at movie making though sad.gif )

 

Hope someone can use it. biggrin.gif

 

EDIT: Wow, nubbel, really cool!

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
BBumper
Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.

I'll try to make a video later today after I get some sleep but I'm sure the last values in that opcode controls the altitude.

Share this post


Link to post
Share on other sites
Quadropheniac90

Nubbel, can the opcodes also be used for other planes/helicopters like the Rustler? I see the Hunter and Hydra underneath it, but I thought I oughta ask. biggrin.gif

 

Still looking for opcodes. Wanna discover something cool...

 

EDIT: This isn't in the database dontgetit.gif

 

04EB: $PLAYER_ACTOR 0

 

0 makes him stand, 1 makes him crouch... Probably allready discovered though... sad.gif

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
nubbel

 

Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.

I'll try to make a video later today after I get some sleep but I'm sure the last values in that opcode controls the altitude.

It's the radius, not the height.

The Heli tries to stay at the exact same height as you inside the given radius.

 

 

 

Nubbel, can the opcodes also be used for other planes/helicopters like the Rustler? I see the Hunter and Hydra underneath it, but I thought I oughta ask.

 

I was too lazy to try other planes/helis. Other helis will follow you, I'm sure. The Rustler may even try to attack you with the attacking opcode.

Edited by nubbel

Share this post


Link to post
Share on other sites
Quadropheniac90

OK, thanks! I'm gonna test it with the Rustler and Sea Sparrow, but the following worked allready, with helicopters at least. I'll post my results here...

 

EDIT: The Rustler does follow you, but when the opcode of firing with machinegun is activated for it, it uses the machinegun and sometimes rockets. dontgetit.gif Weird. But because of it's crappy AI handling, it never hits you, it flies in too big of a radius to get close. In a car it can hit you though, not all that good, but it hit me once with a rocket, my car didn't blow so I continued and it didn't hit me anymore and after a while I didn't see it anymore, probably crashed...

 

The Stuntplane is very cool, because it has rockets activated, and that one does hit. biggrin.gif I thought, maybe the smoke trail will appear or something, no, I get a rocket in my ass.

 

The RC Baron fires 3 rockets at a time, allthough it took the little bastard a while to fly straight to me.

 

The Skimmer I haven't tested.

 

The Beagle kills with one rocket. It's all quite cool.

 

The Cropduster is very good at missiles, he shot 5 at a time, so I could not escape. tounge.gif

 

That's all the planes with the missiles, I'll post again when I have the heli's tested.

 

Oh, yeah, notice planes without weapons have weapons? Maybe something could be done with cars.

 

EDIT: Too bad, cars don't work. Vortex probably does, that qualifies as a plane, testing again.

EDIT2: Vortex won't kill me either.

EDIT3: The RC Raider doesn't fire anything, and it was quite funny to see the driver lol, all out of the helicopter.

 

The Cargobob shot it's machine gun, but didn't manage to hit me.

 

The Maverick shoots alot, but doesn't hit me. The planes were much more fun.

 

I'm not in for more Helicopter Fun, I'd rather have some Stuntplanes killing me with their rockets.

 

If anyone wants a pic, I'll make one, I have the camera ready. wink.gif

 

EDIT: This RC Baron thing beats my NRG500, then shoots 10 rockets at me, but because I wanted to take pics, I was unkillable and so was my bike. But the bloody thing only fires 10 rockets when I'm in a vehicle, otherwise it fires 3 or so. So I can't take pics the easy way when on a bike. I'm gonna position the camera behind the little plane, and point it at me, then I should be able to take nice shots, shouldn't I?

 

@Nubbel: Great discovery, if you don't want me to produce some pictures or something, tell me. I don't wanna go off and steal your discovery or something, just that you know. biggrin.gif I'll post some nice screenshots when I make them.

Edited by teun.steenbekkers

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.

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.