Coding

 Reply to this postStart new topic

GTAG Opcode Database

Deji
post Dec 7 2010, 04:19 AM
Post #61


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



54 opcode discoveries have been made so far... and there are only 91 opcodes that are even partially unknown!

Lets finish before next year? tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
fastman92
post Dec 8 2010, 09:12 PM
Post #62


Trained Member

Posts: 77
Joined: 25-October 10



http://gtagmodding.com/opcode-database.php?opcode=0477
Description of this 0477 opcode is completely wrong. Descriptions of actions executed of specified numbers don`t match.
I spent hour on testing what do these numbers do.
It is so:

0 - brake without lights
1 - brake with lights
2 - brake without lights
3 - drive back
4 - turn left wide
5 - turn right wide
7 - drive forward + turn left
8 - drive forward + turn right
9 - drive forward
10 - turn left slightly
11 - turn right slightly
13 - drive back + turn left
14 - drive back + turn right
19 - turn left slightly, flash the rear lights
20 - turn left slightly, switch rear lights on for 4 seconds
21 - turn right slightly, switch rear lights for 4 seconds
22 - drive back
23 - drive forward very fast
24 - switch lights on at animation time

This post has been edited by fastman92: Dec 8 2010, 09:12 PM
Go to the top of the page
 
+Quote Post
Deji
post Dec 8 2010, 10:17 PM
Post #63


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Car Struct

+0x3BB - [byte] Car Animation ID
+0x3BC - [probably dword] Car Animation Time


0x437C20 is a function which executes the car animations. Some ID's indeed aren't used.


--------------------
Go to the top of the page
 
+Quote Post
spaceeinstein
post Dec 9 2010, 04:32 AM
Post #64


The New Guy!

Posts: 1
Joined: 9-December 10



In VC, the flags for 0477 are this:
0 brake, with brake lights
1 gentle brake
2 reverse
3 turn hard left and brake
4 turn hard right and brake
5 brake, no brake lights
6 turn hard left
7 turn hard right
8 forward
9 turn wide left (right for boat)
10 turn wide right (left for boat)
Go to the top of the page
 
+Quote Post
fastman92
post Dec 9 2010, 09:05 PM
Post #65


Trained Member

Posts: 77
Joined: 25-October 10



What I discovered is that opcode about 0477 and 02C2:
0477 opcode requires a driver in a car in order to drive, until once 02C2 opcode is executed on that car.
Simply 02C2 makes car able to be driven without driver by 0477 once it is executed for this car.
Example:
SANNY
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 0.1 0.0 0.0
02C2: car 0@ drive_to 11@ 12@ 13@
0477: set_car 0@ animation 9 time 6000

It would make car performs animation even when this car 0@ had no driver actor within car.

This post has been edited by fastman92: Dec 9 2010, 09:07 PM
Go to the top of the page
 
+Quote Post
Deji
post Dec 10 2010, 02:07 AM
Post #66


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



New Opcodes!

048B makes the aimless car more deterministic (it will head for a particular place/route).
04BD flags the car as being part of a convoy, whose path seems to be created via 0994.
0878 sets the cars dirt level (from 0.0 to 15.0).
08F2 prevents the vehicle from being targetted with a heatseeker. Used make Toreno's heli the primary target in Toreno's Last Flight.
08F3 sets whether the player can get goodies (money, ammo) from the car. Used in the driving school mission to prevent the taxi from giving the player cash and the cop car from giving the player a shotgun.
0918 sets the vehicles engine state. It only works with an actor in and is the same as the CLEO opcode.
0957 sets whether actors can choose to use the car to evade gunfire.
09D9 detonates all satchel charges placed by the player (used in that Toreno mission where you drive up the plane ramp).


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Dec 15 2010, 01:37 PM
Post #67


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



New Opcode!

0771 sets the license plate town number. Although I've yet to get it to work...

Edit: See here for a little hack to get it to work smile.gif


Edit 2

New Opcode

0A21 prevents the ped-driven car from being affected by cheats (I think just the "insane handling" cheat, actually).


--------------------
Go to the top of the page
 
+Quote Post
DK22
post Dec 18 2010, 04:39 PM
Post #68


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



I've tested 0878, but it didn't work.
Go to the top of the page
 
+Quote Post
Deji
post Dec 19 2010, 01:41 AM
Post #69


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Indeed, the opcode functions that way, but the dirt level doesn't actually work.

This is probably a bug in the game, because Pay'n'Spray garages are also made to set the dirt level of the car, but the effect doesn't seem to apply. I believe there are mods around to fix this, though, so you could try using the opcode with one of those installed.


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Dec 21 2010, 10:35 PM
Post #70


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



New Opcode!

0900 anchors the object, which locks its position. No idea why people started using it for strings..


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Dec 22 2010, 07:40 AM
Post #71


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Haha wait a minute... all it does is lock an object... but it stores strings too?? WTF!!!???


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Dec 22 2010, 04:19 PM
Post #72


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Opcode Update

0900 actually clears the last weapon damage... Maybe it affects the object position (if nothing hit it, it will "anchor"?).


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Dec 22 2010, 08:51 PM
Post #73


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Maybe it stores strings for some actual purpose. Could the opcode affect all objects with the name defined in the string?


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Dec 22 2010, 09:03 PM
Post #74


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



No, this opcode does nothing besides set the object value. The use for strings was only done by modders and was probably not even chosen for any particular purpose.


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Dec 23 2010, 07:29 AM
Post #75


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Hmmm weird how it can be used to store strings. Oh well. tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Dec 23 2010, 12:34 PM
Post #76


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Opcode Update

0905 doesn't make the door openable unless you set the param to 0, so "locked" is a better way of saying it, I'd think.


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Dec 27 2010, 10:28 PM
Post #77


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



It would seem that
SANNY
00DF:   actor $PLAYER_ACTOR driving


Actually tests to see if the actor is in a car, while
SANNY
0449:   actor $PLAYER_ACTOR in_a_car


Checks whether the actor is doing the task: TASK_SIMPLE_CAR_DRIVE (709) or TASK_SIMPLE_GANG_DRIVEBY (1022)


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Jan 2 2011, 07:06 PM
Post #78


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



New Opcode!

09AB makes a character in the specified vehicle speak from an Ambient Speech ID. (UNTESTED!)


--------------------
Go to the top of the page
 
+Quote Post
Towncivilian
post Jan 4 2011, 06:40 AM
Post #79


The New Guy!

Posts: 2
From: Florida, USA
Joined: 4-January 11



I added many opcode descriptions to this wiki page.


--------------------
Multi Theft Auto forum moderator & unofficial MTA 0.5 developer
Go to the top of the page
 
+Quote Post
Deji
post Jan 5 2011, 11:26 PM
Post #80


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Opcode Info

The type parameter for 060A chooses which .ped file is used as the new decision maker.

0 - "m_empty.ped"
1 - "m_norm.ped"
2 - "m_tough.ped"
3 - "m_weak.ped"
4 - "m_steal.ped"

The file is loaded afresh upon use of this opcode smile.gif


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: