IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (44) [1] 2 3 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 GTA:SA Opcodes

 Discussion thread
 
Opius  
Posted: Saturday, Jun 11 2005, 16:11
Quote Post


General
Group Icon
Group: Members
Joined: Jun 27, 2002

au.gif

Member Award




Alright, I think you know what to do with this: Post opcodes and descriptions so we know what they do.

CODE
038F: REQUEST_AND_LOAD_2D_IMAGE "%2" as %1
%2 = string, %1 = int
0873: RELEASE_2D_IMAGE %1
%1 = int

Used to load and release the 2D menu items used in things like the schools, gambling minigames, etc. As to how they're used once loaded, I'm not sure.
Users WebsitePM
  Top
 

 
Hammer83  
Posted: Saturday, Jun 11 2005, 21:03
Quote Post


Hustler
Group Icon
Group: Members
Joined: Jan 11, 2003

ru.gif

Member Award




Here are some very useless opcodes (and they are actualy unused in the script):
CODE

0A49:   false
0A4D:   false


And also, opcode 0914: init_external_script actually does absolutely nothing. It just reads the index of external script and discards it. I guess it was PS2 specific.

This post has been edited by Hammer83 on Saturday, Jun 11 2005, 21:57
Users WebsitePM
  Top
 

 
GodGell  
Posted: Sunday, Jun 12 2005, 04:05
Quote Post


shlurp my burger, sir
Group Icon
Group: Members
Joined: Oct 31, 2003

hg.gif

XXXXX



if you find new opcodes, please post them to http://sa-db.webtools4you.net/
it's the sa-version of TbM2k's vice city opcode database. it isn't fully up yet, but you can already add opcodes as far as i know.
Users WebsitePMMSN
  Top
 

 
Craig Kostelecky  
Posted: Monday, Jun 13 2005, 00:50
Quote Post


GTA:LC Team Leader
Group Icon
Group: The Connection
Joined: Jan 28, 2004

us.gif

Member Award




CODE
09C7: change_player_skin $PLAYER_CHAR to 105

This was in the PS2 version (for the 2 player mode) but removed from the PC version. But it still works on the PC. The 2nd parameter is the peds.ide ID number. Putting this in the beginning of the code will make CJ a Grove St gang member. I don't know how eating or working out will affect this skin though.

EDIT: A test of this in action:
user posted image

EDIT2: I've been getting a lot of bugs with this opcode. Here's how the same code looked the next time I started the game:
user posted image


This post has been edited by Craig Kostelecky on Monday, Jun 13 2005, 01:32
Users WebsitePMAOLYahooICQ
  Top
 

 
Capushon  
Posted: Wednesday, Jun 15 2005, 00:01
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 19, 2003

un.gif

XXXXX



As it is correct? confused.gif

CODE

(scm_sa.ini  GTA:SA Mission Editing Tools)
04c1=6,
06E2=5,
09E9=3,
0A3D=4,
088E=3,

or
CODE

(sascm.ini  BW's GTA SA Mission Builder version v0.33)
04c1=0,
06E2=4,%1d% %2d% %3h% %4d%
09E9=1,%1d%
0A3D=1,%1h%
088E=0,
Users WebsitePM
  Top
 

 
Opius  
Posted: Wednesday, Jun 15 2005, 07:18
Quote Post


General
Group Icon
Group: Members
Joined: Jun 27, 2002

au.gif

Member Award




...

I'm not sure what you're posting. All those opcodes already have an entry in Barton's SASCM.ini file along with the number of arguments. We're looking for descriptions of each opcode.
Users WebsitePM
  Top
 

 
jax  
Posted: Wednesday, Jun 15 2005, 12:14
Quote Post


Moof!
Group Icon
Group: Members
Joined: Jan 20, 2004

au.gif

XXXXX



CODE
05DB: set_actor $actor to_run_from_actor  $actor radius 50.0 distance?  3000


did some testing, im not 100% on radius/distance, although in the main.scm they use 100000 / 3000 / -1 / -2
when its -1, the actor barely moves, -2 is a few feet, but when its like 3000 he runs forever. But basically it seems like a 'scare' flag.

I'll post more as i go through them.

-jax
Users WebsitePM
  Top
 

 
Un3462  
Posted: Wednesday, Jun 15 2005, 13:00
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jun 27, 2002

Member Award




capushon; second set is correct (although the ini with sadisasm seems to have 04c1/088e correct already, so i'm not sure where you got those from).
PM
  Top
 

 
MiiKKiZ  
Posted: Wednesday, Jun 15 2005, 21:08
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 9, 2005

XXXXX



This is little off-topic, but how can you run San Andreas in a window, Craig Kostelecky?
PM
  Top
 

 
jax  
Posted: Thursday, Jun 16 2005, 02:40
Quote Post


Moof!
Group Icon
Group: Members
Joined: Jan 20, 2004

au.gif

XXXXX



CODE
05BE: kill_actor $PLAYER_ACTOR


obvious what this one does smile.gif

-jax
Users WebsitePM
  Top
 

 
Craig Kostelecky  
Posted: Thursday, Jun 16 2005, 04:10
Quote Post


GTA:LC Team Leader
Group Icon
Group: The Connection
Joined: Jan 28, 2004

us.gif

Member Award




QUOTE (MiiKKiZ @ Jun 15 2005, 16:08)
This is little off-topic, but how can you run San Andreas in a window, Craig Kostelecky?

Check out GTAGarage. There's a window mode/coordinates mod made by Smithers (along with many other mods)
Users WebsitePMAOLYahooICQ
  Top
 

 
Viper187  
Posted: Thursday, Jun 16 2005, 05:40
Quote Post


Crazy Snake
Group Icon
Group: Members
Joined: Oct 17, 2002

XXXXX



Is there an opcode to add nitro ability like the mod garages do? I mean, I know you could code it the same as with Vice City setting the car speed manually, but I was wondering if it can be done this way.
Users WebsitePMAOLICQ
  Top
 

 
MiiKKiZ  
Posted: Thursday, Jun 16 2005, 19:20
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 9, 2005

XXXXX



QUOTE (Craig Kostelecky @ Jun 16 2005, 04:10)
QUOTE (MiiKKiZ @ Jun 15 2005, 16:08)
This is little off-topic, but how can you run San Andreas in a window, Craig Kostelecky?

Check out GTAGarage. There's a window mode/coordinates mod made by Smithers (along with many other mods)

Thanks!
PM
  Top
 

 
jax  
Posted: Monday, Jun 20 2005, 11:20
Quote Post


Moof!
Group Icon
Group: Members
Joined: Jan 20, 2004

au.gif

XXXXX



CODE
05E2: $Actor1 kill_actor $Actor2

the new method of hate flags.^
CODE
05CB: $Actor1 enter_car $car -1
;; -1 makes the actor walk to the car and enter it / 1 teleports the actor in the car instantly.^


-jax
Users WebsitePM
  Top
 

 
Viper187  
Posted: Monday, Jun 20 2005, 18:48
Quote Post


Crazy Snake
Group Icon
Group: Members
Joined: Oct 17, 2002

XXXXX



For those who wan tto mess with car mods, check out these ops...

CODE

06E9: request_car_component #WHEEL_OR1
86EA:   NOT   car_component_available #WHEEL_OR1
06E7: $10420 = add_car_component $10415 to_car $10431
06EB: release_car_component $10415


I just noticed those in the code. The component names are in data\maps\veh_mods\veh_mods.ide

There should be an op somewhere to check if a car has a component, but I haven't found one yet. Also, wasn't there somewhere you could get a chopper with a magnet hanging from it? Maybe that's a component too?


This post has been edited by Viper187 on Monday, Jun 20 2005, 19:01
Users WebsitePMAOLICQ
  Top
 

 
Y_Less  
Posted: Monday, Jun 20 2005, 21:27
Quote Post


629
Group Icon
Group: Members
Joined: Mar 14, 2004

en.gif

Member Award




CODE
0788: enable_heli $MAGNET_HELI magnet  1;; Turn it on


No its not.
Users WebsitePM
  Top
 

 
DexX  
Posted: Monday, Jun 20 2005, 21:29
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




nah, the magnet is hardcoded. but you can still reactivate it for the chopper of your choice:
CODE
0788: enable_heli $yourheli magnet  1

bah, y_less beat me tounge.gif

i think i found the code to attach one vehicle to another as well..
CODE
0683: $car1 $car2  0.0 -4.6  .65  15.0  0.0  0.0

car1 gets attatched to car2

full code from scm:
QUOTE
00A5: @188 = create_car #PACKER at  1550.873 -1737.122  14.1055
09C4: @188  0
0175: set_car @188 z_angle_to  245.14

0129: @197 = create_actor  24 #MAFFA in_car @188 driverseat
054A: unknown_actor @197 flag  0
02AC: set_car @188 immunities  1  1  1  1  1
02AB: set_actor @197 immunities  1  1  1  1  1
060B: unknown_actor_use_entity @197 @35
01C8: @198 = create_actor  24 #MAFFA in_car @188 passenger_seat  0
01B2: give_actor @198 weapon  28 ammo  99999  ;; Load the weapon model before using this
060B: unknown_actor_use_entity @198 @35
00A5: @208 = create_car #SULTAN at  1550.873 -1737.122 -14.1055
09C4: @208  0
0175: set_car @208 z_angle_to  256.415
02AC: set_car @208 immunities  1  1  1  1  1
0683: @208 @188  0.0 -4.6  .65  15.0  0.0  0.0


edit, yep, thats it. interestingly if you try to drive a vehicle thats attachted to another ( a car attachted to a flatbed) you can start the engine and spin the wheels, the vehicle simply wont move.
PM
  Top
 

 
ceedj  
Posted: Tuesday, Jun 21 2005, 03:24
Quote Post


PEDS Creator
Group Icon
Group: Members
Joined: May 21, 2005

us.gif

Member Award




I'm sorry to interupt with such a newbish question, but I'm just not sure...

Am I to understand that the engines use the same opcodes? Of course Vice wouldn't use SA opcodes, but in comparing the database with my PEDS code, everything matches up. Does this mean that with a few IDE reference changes (ped and car selection) that I could just drop this script into SA Builder and compile it and do PEDS from SA?

If this is the case, I'll play with the animation states, since I use those the most...

And this explaination:

CODE

011C:  clear_actor_objective P: $actorID
- how to explain... like taking a rope away from a person... (?)


just bugs me. This opcode resets the actor for a new task. For example, if I have a ped running, unless I invoke this after an animation:

CODE

011C: actor $Grp1Ped1 clear_objective


The ped will just do the animation and keep on running. This has been tested and works with the walk and run codes in Vice. (handy if your stupid peds run in the wrong direction)
Users WebsitePM
  Top
 

 
steve-m  
Posted: Tuesday, Jun 21 2005, 17:15
Quote Post



Group Icon
Group: Members
Joined: Jul 26, 2002

gr.gif

Member Award




QUOTE (Viper187 @ Jun 20 2005, 20:48)
For those who wan tto mess with car mods, check out these ops...

Does anyone have an idea how multiple car textures are handled? The uranus for example has an uranus.txd, but also uranus1.txd, uranus2.txd and uranus3.txd (with additional body textures) which are not defined in any ide or (apparently) the main.scm. Don't tell me this is hardcoded... ph34r.gif
Users WebsitePM
  Top
 

 
Y_Less  
Posted: Tuesday, Jun 21 2005, 21:53
Quote Post


629
Group Icon
Group: Members
Joined: Mar 14, 2004

en.gif

Member Award




QUOTE (ashdexx @ Jun 20 2005, 21:29)
nah, the magnet is hardcoded. but you can still reactivate it for the chopper of your choice:
CODE
0788: enable_heli $yourheli magnet  1

bah, y_less beat me tounge.gif


Hehe tounge.gif

QUOTE (ashdexx @ Jun 20 2005, 21:29)
i think i found the code to attach one vehicle to another as well..
CODE
0683: $car1 $car2  0.0 -4.6  .65  15.0  0.0  0.0

car1 gets attatched to car2


Im guessing its:

CODE
0683: attatch $car1 to $car2 at $xoffset $yoffset $zoffset rotation $xrot $yrot $zrot


yes?

Also, a bit offtopic, but who was it who discovered how to merge cars in VC, I remember hearing about it, but never found any info.
Users WebsitePM
  Top
 

 

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

0 Members:

Pages: (44) [1] 2 3 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG