Quantcast

Jump to content

» «
Photo

GTA:SA Opcodes

874 replies to this topic
DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002
  • None

#451

Posted 20 June 2006 - 09:28 PM

naming conventions aside, wouldn't it be best just to post the code, and let us work out what to call the opcodes? This community has been built around people sharing what they discover, simply for the sake of furthering gta modding capabilities, and to learn more about how the game works. I can tell your talented and know what your doing, but essentially taking your code hostage until we implement these changes, goes against the entire idea.

So like i said, wouldn't it be best for all of us, if you just posted the code you discovered, like everyone else has been doing for the last 4 years, and let us work out what to call the opcodes? if you want to call the opcodes something else in your private files, thats your business, but it's not right that you try to force it on everyone else, regardless of the incentive.

On a side note;
QUOTE
speaking about which, the unified database i am trying to introduce to you is half way done as i have got a little time during weekend. it has about 105Kb but that shouldn't be a problem yet.

Does this include the other unknown opcodes as well, and how/where will we be able to access it at? it'd be a shame to lose access to any unknown opcodes, and im quite curious to see what you've uncovered..

PLPynton
  • PLPynton

    Player Hater

  • Members
  • Joined: 09 Jul 2005

#452

Posted 21 June 2006 - 08:58 AM

QUOTE (Y_Less @ Jun 20 2006, 19:34)
Setting conditions on help which other people offer for free is not noble in any way. You could suggest that, that would be fine, they're not even bad ideas and are what R* appear to do, but demanding it in return for your help is not the way to go about things.

finally you could be right. it can be language issue maybe for peoples who speaks english well it seems to be, that my altitude is to high.

QUOTE
naming conventions aside, wouldn't it be best just to post the code, and let us work out what to call the opcodes? This community has been built around people sharing what they discover, simply for the sake of furthering gta modding capabilities, and to learn more about how the game works. I can tell your talented and know what your doing, but essentially taking your code hostage until we implement these changes, goes against the entire idea.

So like i said, wouldn't it be best for all of us, if you just posted the code you discovered, like everyone else has been doing for the last 4 years, and let us work out what to call the opcodes? if you want to call the opcodes something else in your private files, thats your business, but it's not right that you try to force it on everyone else, regardless of the incentive.

On a side note;
QUOTE
speaking about which, the unified database i am trying to introduce to you is half way done as i have got a little time during weekend. it has about 105Kb but that shouldn't be a problem yet.

Does this include the other unknown opcodes as well, and how/where will we be able to access it at? it'd be a shame to lose access to any unknown opcodes, and im quite curious to see what you've uncovered..


i have been working on this database, not alone at the beginning and it is not like we rape work of other peoples. it was the simple fact for us that in our community it is obvoius we are always big step ahead from gta froums database for codes. i presented already 100+ codes few months ago to show that i am not kidding.
selecting unknown codes unknown here but known for us is painful for me as it takes a lot of time to find and rewrite.
at the moment i am not able to post code without translating it to present database and that is always time consuming process.
i have to discuss a bit about it, that is all.

tomworld10
  • tomworld10

    Mark Chump

  • Members
  • Joined: 29 Jun 2005

#453

Posted 21 June 2006 - 12:42 PM

Hi,



08E5 ; It's a already "known" opcode but hasn't been posted here.

As I didn't find it myself I won't make my description, but I'll lead you to the answer you're looking for.

It'll be a good exercise for anyone to have a bit of forum search !!! wink.gif

So go on the left tool bar in "Forum Tools" category and clic on search.

refine the dates search to "Any date" and search for 08E5.
Sometimes you have to search with = or : added (like "08E5=" or "08E5:" ). Then you won't miss any instance.

---------------------------------------------------------------------



@PLPynton : Mate, don't care about anything told !!!! Use the little piece of freedom that's been giving you here. Post it, post anything you want, if it's not in a langage we understand then we'll learn it !!!! Post it the way you've done it, it might be faster for us to learn the language it's written in than for you to change the file. It we'll be usefull anyway. And maybe once it's available for anyone it might be people working on it and "creating a new way to code" that is based on your file. So just post it, and if people complain...., well people always complain....


@everyone who knows what I'm talking about : Opcode parameters order is a pain in the ass, it gets me crazy. It would be pretty cool if the compiler could handle/check/correct it (no idea if it's possible) well. But it's already the mess anyway, every "rare"/"new"/"unknown" isn't in the right order.... So it won't be very annoying to have a file with another parameters order, it'll be just as usual.... And once again the compiler/decompiler should handle it, it would be the best way.



@PLPynton again : My opinion matters so please Pynton don't remain passive, I do need you're help. And others do need it too, even if they don't realize it. By the way, totaly off topic, if you have time I actually need you to code two thing :

the maths part of a script of a parchute for car (just like the normal one but with a car, like in the TV ad for the Opel/Vauxhall/Holden/Chevrolet/Subaru Zafira/Nabira/Traviq : Wikipedia about Zafira, TV ad)

the maths part of a script for a deltaplane (flying instead of skydiving, no link needed I think...)

As you probably noticed in my code, I'm not good at maths (and hate anything that's over +; -; .; /; ) at all. I just need the maths, I'll handle the rest of the code.
I'm asking that to PLPynton because I know he knows the opcode and I think he knows maths that are needed here. But I'll be verry happy if some one else get it done, it's an open challenge.

Pynton please, please, don't remain passive, I do need you're help. Please post your file.




People, fun greatings

PLPynton
  • PLPynton

    Player Hater

  • Members
  • Joined: 09 Jul 2005

#454

Posted 21 June 2006 - 08:49 PM

hmm, my file ain't in english...
in few days i will introduce unified database and then maybe spaceeinstein will get unknown codes from it and give to all. hovever i will not tanslate it twice so the order of all parameters will remain as in original state. i will however stick unified version and update only that one.

@tom
topic will be started

Yangster
  • Yangster

    Rat

  • Members
  • Joined: 09 Sep 2003

#455

Posted 22 June 2006 - 07:24 AM

I agree with PLPynton that the opcode parameter order thingy can be frustrating. I only realised how it actually worked a couple of days ago, after someone else's tested and posted script mod kept crashing my game.

But, I think that changing the current known opcode parameters again would just piss off too many people. Especially people trying to learn how stuff works from old code.

However, I think there is a compromise. If we take all the currently known opcodes (ie those in spaceeinstein's newest SASCM.nin) and keep them as is, then for all new opcodes keep the default param order. This will prevent future incompatabilities.

@PLPynton: Thanks for choosing to share your opcodes anyway. I agree that asking you to translate them twice is unfair, since you've done so much already.

I would like to ask though, whether one of the opcodes you've discovered can put an actor into your group/gang? I'm trying to make a mod where you don't lose your gang when you save. That would involve automatically storing the position and modelID of all the gang members before saving, then respawning them after the player spawns again. However, it would be a real pain to have to recruit them again, and some would likely disappear. So I was wondering if there is an opcode that puts an actor into your group without you having to press the gang forward key.

Anyway, thanks again PLPynton. Some of your new opcodes have already helped me with some mods. Keep up the good work.

Kamazy
  • Kamazy

    I Do It All Baby!

  • Members
  • Joined: 07 May 2006

#456

Posted 22 June 2006 - 11:26 AM

YAY finaly found a code to get a random ped taht doesn't crash the game after 4-5 times using it. rah.gif

@Yangster: you should check out the mod where you can take and give weapons to the gang members fallowing you, I'm sure he uses alot of gang/group opcodes.

Yangster
  • Yangster

    Rat

  • Members
  • Joined: 09 Sep 2003

#457

Posted 22 June 2006 - 01:29 PM

Yes, I've seen that mod. It uses an opcode that gets the group members into actor handles, but it doesn't make an actor join your group. I plan using that opcode to store the group members' coords. However, I'm still trying to find an opcode that makes an actor automatically be recruited.

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#458

Posted 23 June 2006 - 09:36 PM Edited by spaceeinstein, 25 September 2006 - 11:07 PM.

---

Seemann
  • Seemann

    Ruhe

  • GTA Mods Staff
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2016 [OpenIV]
    Best Tool 2013 [Sanny Builder]
    Contribution Award [Mods]
    Helpfulness Awards [Mods]

#459

Posted 28 June 2006 - 11:18 AM

CODE
0904=5,store_color %1h% rgb_values %2d% %3d% %4d% and_alpha %5d%


returns RGB and alpha values for some of pre-defined colors

Colors:

0 - red
1 - green
2 - blue
3 - aqua
4 - white
5 - black
6 - gold
7 - violet
8 - silver
9 - maroon
10 - dark green
11 - light yellow
12 - gray
13 - dark blue
14 - yellow

kamikaze9699
  • kamikaze9699

    Player Hater

  • Members
  • Joined: 29 Jun 2006

#460

Posted 05 July 2006 - 01:19 AM

Trying to figure out 09B7

It first appears in the population and gang territory allocation section of the game initialization (Mission 0)

CODE
0767: set_zone 'GAN1' popcycle_group_for_peds_to  7
0767: set_zone 'GAN2' popcycle_group_for_peds_to  7
0874: set_zone 'GAN1' popcycle_group_for_peds_to  1
0874: set_zone 'GAN2' popcycle_group_for_peds_to  1
076C: set_zone 'GAN1' controlled_by_gang  1 density  25
076C: set_zone 'GAN2' controlled_by_gang  1 density  25
[COLOR=green]09B7: 'GAN1'  1[/COLOR]
0767: set_zone 'GLN1' popcycle_group_for_peds_to  7


It next appears in "Breaking the Bank..."

CODE
:HEIST9_21
[COLOR=green]09B7: 'MEAD'  1 [/COLOR]
054C: use_GXT_table 'HEIST9'
...
:HEIST9_5518
09B7: 'MEAD'  0
014F: stop_timer $7934


Then in "Grove 4 Life"

CODE
090C: hilight_inactive_gang_zone_as_available_for_gangwars 'IWD4'
09B7: 'IWD3A'  1
09B7: 'IWD3B'  1
09B7: 'IWD1'  1
09B7: 'IWD4'  1
...
:GROVE2_395
09B7: 'IWD3A'  0
09B7: 'IWD3B'  0
09B7: 'IWD1'  0
09B7: 'IWD4'  0
090D: hilight_all_inactive_gang_zones_as_available_for_gangwars


And finally in "Los Desperados"

CODE
0361: close_garage 'DUF_LAS'
09B7: 'ELCO'  1
0213: @184 = create_pickup #HEALTH type  15 at  1877.54 -1982.63  13.48
09D2:  0
...
:RIOT2_3736
09B7: 'ELCO'  0
00D6: if  0
8118:   NOT   actor @36 dead


Thinking it might be a toggle to disable a gang's involvement in the area (like in the last instance, where a player could've overthrown the location flooding it with Families, but R* needed it to be controlled by Vagos for the mission) Of course, this is just an uneducated guess by a n00b...

Gonna play with it some n see what happens that_guy2057_evilgrin.gif

KewlAzMe
  • KewlAzMe

    Player Hater

  • Members
  • Joined: 01 Jul 2005

#461

Posted 08 July 2006 - 02:41 AM

Does anyone have the vehicle ID code for jetpack? Its not in the vehicle.ide file.

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002
  • None

#462

Posted 08 July 2006 - 12:02 PM

because its not a vehicle. The game handles the jetpack in a special way. technically its a weapon. The model definition is in default.ide, and the weapon data for it is in weapons.dat.

Further questions pertaining to it should be in a different, preferably your own, topic. The SA opcode topic is for discussing SA opcodes.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#463

Posted 15 July 2006 - 05:47 AM

I apologize for not giving whomever credit initially. But after an hour of troubleshooting, I've been able to verify that the SASCM.ini update is borked. Don't know for how long now. By borked I mean that I used SAMB to decompile the original SCM/IMG and recompile it. Start a new game and in the opening cutscene, after the officers drive away with CJ in the car, before it can cut to Ballas territory, it crashes. Replaced the INI with the one Barton included with it and no such errors. My site's been REALLY flakey lately. Once it's back up, I'll pull my mirroring of the problematic INI and share out the original for those without the foresight to back it up.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#464

Posted 15 July 2006 - 05:48 PM Edited by Demarest, 15 July 2006 - 05:55 PM.

09B4 has something to do with the yellow marker that allows you to enter a safehouse. First two parameters are X and Y. I don't know what the others are. I just know that with that line commented out, I was not able to enter a safehouse and there was no yellow marker. Put the line back in (only variable) and now I can.

[EDIT]
Looks as if the command itself establishes the portal. Final parameter is 0/1 for off/on

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#465

Posted 17 July 2006 - 12:16 AM Edited by spaceeinstein, 20 July 2006 - 04:19 PM.

I don't seem to have that problem. The game ran fine for me. If you want a more up-to-date ini file, click here.

094A: set_money_pickup @0 cash_to 0
Sets the amount of cash for the money pickup

08DC: put_radar_marker @0 on_radar_at 0.0 0.0 0.0
Places the radar marker at that coordinates on the radar only, not in the map

0A07: put_train @0 at_next_station
Places the train onto the next station, station defined in some DAT file

081D: set_vehicle @0 engine_operation 0 for_cars_and_planes
0=on
1=off
Works only for cars and planes similar to 02D4 but a more realistic turning off the car. On boats, the engine sound would be off but you can still drive it. It doesn't work on helicopters.

094E: $PLAYER_ACTOR 0 is wierd. It made CJ mute.

Bigun
  • Bigun

    wandering about

  • Members
  • Joined: 10 Jul 2004

#466

Posted 21 July 2006 - 03:21 PM

QUOTE
094E: $PLAYER_ACTOR 0 is wierd. It made CJ mute.


Are you sure 0 muted him? it should be:
CODE
094E: actor $PLAYER_ACTOR claude 1

Perhaps a legacy feature.

(sorry for the lame joke)

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#467

Posted 24 July 2006 - 09:07 AM

QUOTE (Demarest @ Aug 16 2005, 21:29)
0A3D: toggle_prostitutes_pay_you (0/1)
Tested. 1 means they will like after the Pimping mission, 0 means they won't like GTA3 / VC.

How is space credited for this when I was the first to document it?

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#468

Posted 24 July 2006 - 02:48 PM

Credited in the opcode database? I was adding all the unknown opcodes using my name. If you want it changed, I think you need to contact the person who runs the site.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#469

Posted 25 July 2006 - 05:25 AM

Look again. It's in white, so it was somebody with access. Was just wondering as I don't remember you ever posting it. Lord knows you've discovered and tested a TON of opcodes, so I'd like the few that I do wink.gif

BBumper
  • BBumper

    Learner

  • Members
  • Joined: 11 Dec 2003

#470

Posted 25 July 2006 - 05:51 AM Edited by BBumper, 26 July 2006 - 03:01 AM.

CODE
06E1: AS_actor $ACTOR using_vehicle $ACTOR_VEHICLE target_vehicle $COP behavior 10 max_speed 15.0 traffic_flag 3


Behavior 10 appears to make the vehicle run about randomly in reverse, although the target vehicle is set for the first police car it doesnt try destroy or wreck it. If that police car wasnt behind it the actor vehicle would go only in reverse for a few feet, stop, make a 360 in reverse and repeat these steps until stuck or in the water. I added the police cars and officers for effect BTW you can view the video below.





Extended Version:

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#471

Posted 05 August 2006 - 07:12 PM

This has PROBABLY been documented before, but the database doesn't reflect it. 048F appears to be clear_actors_weapons.

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#472

Posted 05 August 2006 - 11:52 PM

Appears? It is. Pynton called it "delete all items possessed".

gtaTC
  • gtaTC

    Wannabe Modder

  • Members
  • Joined: 27 Jun 2006

#473

Posted 11 August 2006 - 11:31 AM

Anybody know wat opcode to use to check what outfit CJ is wearing?

I want to have the script check of CJ is wearing a cop outfit, if so, then he can't get a wanted level. (cops don't arrest cops!) I know how to set the wanted level, but not sure about the outfit. anuj_cop.gif

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#474

Posted 11 August 2006 - 03:30 PM Edited by spaceeinstein, 25 September 2006 - 11:09 PM.

---

PLPynton
  • PLPynton

    Player Hater

  • Members
  • Joined: 09 Jul 2005

#475

Posted 22 August 2006 - 06:18 PM

here is the pre-release desc.
03A2=2,set_vehicle %1d% something_(handling_control)_mode %2h%
space, could you do some research on it? it appears to be a way of change handling of one vehicle to another TOGETHER with switching off/on some of the hardcoded vehicle rules. it could be revolutionary if it does what i think it does.
mode 0 restores handling to default.
beware that used in some specific situations on vehicle it can assign veh into autopilot mode, the vehicle then drives along pathes without a driver. better test it with player as a driver.
mode 1 seems to work with ground vehs, it frezzes posibility to control vehicle but keeps the last action (acceleration, breake, turn ect.) going regardless of controller.
mode 3 puts veh in iddle mode and declines controller and as well hardcoded controls of some of components like misc
mode 4 enagages breakes and
modes 6-8 are for air vehs definitelly, tried with hydra and helis.

pdescobar
  • pdescobar

    Conformist Scum Panda

  • Members
  • Joined: 19 Jul 2005

#476

Posted 24 August 2006 - 11:07 AM

I just began learning some mission coding in order to do some testing to understand how various stats work (particularly the respect stats) and surprisingly found an unknown opcode which I can identify:

0997=1,set_total_respect_points_to %1d%

Similar to how 030D sets the total number of mission points, 0997 sets the total number of mission respect points. I'm not sure if putting "mission" in the name makes it more confusing or less confusing, however; I left it out in the above suggestion for consistency with 0998.

Like its mission point counterpart, it would generally be set to the sum of all the individual "0998: add_respect %d" lines, and it is used to set stat 228 ("Respect Mission Total") which I believe is then used to calculate the mission-related portion of the overall respect stat (64).

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#477

Posted 24 August 2006 - 02:44 PM Edited by spaceeinstein, 25 September 2006 - 11:06 PM.

---

BBumper
  • BBumper

    Learner

  • Members
  • Joined: 11 Dec 2003

#478

Posted 25 August 2006 - 04:40 AM Edited by BBumper, 25 August 2006 - 05:52 AM.

10= appears to have to same effect as 2 when the vehicle is spawned.

12= If the vehicle is set to follow a path it will follow that path while maintaining ground z originally spawned at, here it is in action.


PLPynton
  • PLPynton

    Player Hater

  • Members
  • Joined: 09 Jul 2005

#479

Posted 25 August 2006 - 04:38 PM

that is all confusing me now, resultsof both of you are quite similar with mine and there is a handling change proof:

use hydra, default thrusters position, hop into it and let it be 8 for parameter. now try to take off. strange isn't it? whenever you change state of thrusters closet to horizontal (1.0) it lets you control veh as normal jet plane while before youcould not even steer it.
parameter 10 in that case returns it to default hydra handling.

look at the mission where you play low rider minigame, before the hydraulics can be engaged that code has to be used with value 3.

how to name it?

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#480

Posted 26 August 2006 - 02:35 PM Edited by spaceeinstein, 25 September 2006 - 11:05 PM.

---




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users