Quantcast

Jump to content

» «
Photo

Opcodes for Bartons Editor (GTA3 + VC)

252 replies to this topic
spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#181

Posted 23 January 2010 - 03:04 AM Edited by spaceeinstein, 23 January 2010 - 03:51 AM.

Wow, VC actually has a whole lot more opcodes that never appear in the script but actually work. These opcodes are from SA that are never used in VC but can actually work in VC.

New VC opcodes:
• 02F2: actor $actorhandle model == #modelname
• 04A4: @local == any
• 04AF: @local = any
• 04B0: $global > any
• 04B1: @local > any
• 04B2: any > $global
• 04B3: any > @local
• 04B4: $global >= any
• 04B5: @local >= any
• 04B6: any >= $global
• 04B7: any >= @local

More opcodes newly described/redefined in VC also used in SA:
• 0339: anything_in_cube_cornerA X.0 Y.0 Z.0 cornerB X.1 Y.1 Z.1 solid 0 car 0 actor 0 object 0 particle 0
• 044A: player $playerhandle on_foot
• 044B: actor $actorhandle on_foot
• 04D0: force_heli $helihandle looking_angle_to $angle
• 04D1: reset_heli $helihandle looking_angle
• 04F8: define_police_trigger_type 0 if_player_with_wanted_level_in_rectangle X.0 Y.0 X.1 Y.1 spawn_policeA_at X.2 Y.2 headed_towards X.3 Y.3 spawn_policeB_at X.4 Y.4 headed_towards X.5 Y.5
• 050A: $distance = distance_between_point X.0 Y.0 Z.0 and_point X.1 Y.1 Z.1
• 0526: set_actor $actorhandle stay_in_car 1
• 054E: clear_actor $actorhandle damage


VICESCM.INI UPDATE!
Put that into Sanny Builder 3>data>vc to apply your new update with the latest descriptions. Remember to backup your file. Old decompiled scripts might not be compatible. For the expert coders, parameters for 04C1 are corrected and might mess up Cop Land.

grovespaz
  • grovespaz

    Group: Morons

  • Members
  • Joined: 22 Feb 2004

#182

Posted 24 January 2010 - 12:34 AM

It's been a while since I've been here, and I recently learned the oh so handy opcode DB was taken offline.. sad.gif

Luckily, I spent today thrashing through my old GTA files from 'back then' and found a (I think) complete copy of the opcode DB dated around 2007.

I was ecstatic when I found it, cause I had spend the previous hour looking for some opcode definitions.

I hope this helps you fellow VC lovers as well biggrin.gif

Grovespaz's backup of the opcode DB

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#183

Posted 24 January 2010 - 02:32 AM

You can "retrieve" the opcode database through archive.org. Works with SA, too.

ghost of delete key
  • ghost of delete key

    ಠ_ಠ ... otter ...

  • The Connection
  • Joined: 27 Dec 2003

#184

Posted 06 February 2010 - 10:19 AM

Somebody tell me if I'm behind the times, but I haven't seen this anywhere...

while plonking around in the exe, mapping out the opcode handling routines, I realized that (from what I know) the last documented VC opcode is 059B [unknown] [untested] [does absolutely nothing (?)]...

Well, the last opcode branch in the main tree handles opcodes 0578 TO 05A8!

Indeed, 059C thru 05A8 are all handled, and are all variations of other known opcodes; a number of them check the player, or check if someone is driving, etc. One appears to zero out the major and minor corners of a cube for some reason, and then do some heavy 3d thinking. (059D) mercie_blink.gif

I'm a little burnt out ATM, but if anyone wants, I'll throw together a synopsis of what they look at.
I'm too new at reading ASM, but I can tell y'all what known subs they call and what memory addresses they manipulate.

For example;
059A(documented, unk), 05A0, 05A3, 05A5 check if someone is driving a car, and
059B(documented, unk) checks if a vehicle still exists.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#185

Posted 08 February 2010 - 07:41 PM Edited by spaceeinstein, 21 February 2010 - 07:51 PM.

Cool find. Do you know how many parameters each have? I had crashed VC enough times already. I will test them later on. Can you check if 0150 and 0488 are also undiscovered opcodes?

New and fixed opcode descriptions!
  • 0114
    ADD ammo to currently held weapon of the same type, NOT car-specific!
  • 02DD
    I didn't seem to have fixed that yet, as in SA it gets random ped in area, added to-do list
  • 0469
    get law enforcement in area: cop, SWAT, FBI, army, and (NEW!) Vice Squad
  • 04AC
    NEW! Unused in Vice City, checks if the player is in a plane
  • 04C9
    INCORRECTLY labeled, it checks if the player is in ANY flying vehicles
  • 04CF
    add to fashion budget stat, doesn't seem to be documented but it is known
  • 0546
    is player colliding with car (succeeded by 0547 in SA)
  • 0557
    release cab created by 0556
Note: 010C needs the RC Bandit model to be loaded or the game will crash!

I am making a giant list of opcodes so I would appreciate if anyone wants to help out. Check the list before adding stuff because I have made the whole thing consistent. I'm planning to go until VC's last opcode because there are just too much.


EDIT: Ooo, this is cool. It is used in SA but never used in VC.
05A4: get_angle_between_vectors_origin_to 10.0 0.0 and_origin_to 0.0 10.0 store_to $handle
This will measure the angle between two vectors, both of them starting at the origin. The one posted above creates a 90 degrees angle and will spit out 1.57 (pi/2). Not all of VC's extra opcodes function similarly to SA so I'll keep on testing.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#186

Posted 23 February 2010 - 05:49 PM Edited by spaceeinstein, 23 February 2010 - 05:51 PM.

Here are the rest of the ID numbers for garages in Vice City, most of them completely useless. I had spent so much time trying to find these undocumented garage IDs.

type 6,12,13 - invalid garages, they don't act as garages at all
type 11 - garage normally closed, if forced open will stay open if your car or you are in the garage, can't be forced to close, will close by itself if nothing is in the garage
type 14,21 - garage normally closed, if forced open will always try to close itself no matter what
type 15 - garage normally closed, if forced open can't ever close
type 20 - garage normally closed, can and needs be forced open and closed like a regular garage, can set to accept car after door is forced open

To elaborate already known garage
type 7 - not just a car eater, it functions almost exactly like the export garages but can accepts any cars and gives no reward
type 19 - generic working garage, can't accept cars
type 23 - can set to accept car, will automatically open for that car

Out of all that is discovered, type 20 is the only useful garage.

NTAuthority
  • NTAuthority

    member_title

  • The Yardies
  • Joined: 09 Sep 2008
  • European-Union

#187

Posted 23 February 2010 - 06:32 PM

QUOTE (spaceeinstein @ Feb 23 2010, 18:49)
type 11 - garage normally closed, if forced open will stay open if your car or you are in the garage, can't be forced to close, will close by itself if nothing is in the garage

I think this is used for the Pay 'n' Spray internally, when you have < $100 or are driving a police vehicle.

QUOTE

type 14,21 - garage normally closed, if forced open will always try to close itself no matter what


Might be temporary types used in gameplay somewhere.

QUOTE

type 15 - garage normally closed, if forced open can't ever close


Odd types, indeed. sad.gif

QUOTE

type 20 - garage normally closed, can and needs be forced open and closed like a regular garage, can set to accept car after door is forced open


What's the difference with this and a normal garage?

QUOTE

type 7 - not just a car eater, it functions almost exactly like the export garages but can accepts any cars and gives no reward


Could be it's used for missions so that the script doesn't have to delete the car, or wait -- are rewards handled externally? If so, was there a specific export ID?

Anyway, nice to have these documented! Do these types also exist in a similar meaning for SA, or do they not?

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#188

Posted 23 February 2010 - 07:40 PM Edited by spaceeinstein, 01 March 2010 - 08:32 AM.

I highly doubt the unused garages are used to take over in-use types of garages. Garages are created by the script and their type is set by it. It doesn't make sense that a garage with one function like spraying for type 5 would switch to type 4, 11, or 21 temporarily. A type 5 garage should function exclusively as a type 5 garage. When you have less than $100 or driving a rejected vehicle (not all police vehicles are rejected, i.e. VCPD Cheetah), it will just not close and gives you a message to gtfo, typical of a type 5 garage as it also does that in GTA3 and SA.

The main difference with type 20 is that it's never used in the game. It's a useable garage. There are other subtle difference like when set to accept cars using 021B, it won't automatically open for it. You have to force it open with 0360. Not all garages can use 021B so being able to use it is already special.

Type 7 is probably a scrapped beta export garage. Almost everything about garages are hardcoded. Rewards, opening and closing, accepting which cars to export, text displayed, etc. are all hardcoded. The script is mainly used to check if the garage has the required cars, as seen in 03D4. Type 7 wasn't assigned to a list of cars like the other export garages so it just accept any cars. But it gives no message or reward because there is no list to check with.

I haven't touched SA or 3 yet but you have that idb resource so it shouldn't take that long to find out their undocumented garages. There do seem to be similarities between the games but I'm not sure because I haven't tested them yet. If they really do correspond with each other, it will explain so much about these garages.


EDIT: Whoops, type 20 garage will open for the car but the door will not close by itself as long as the car is in the garage. It was type 23 that need the door to be forced open.

All the garages that have an effect when using 021B are 14, 20, 21, and 23. They all behave differently.
Type 14: Opens for your car, once inside you will be frozen until the door closes, after a while it opens back up. You can either drive back out or walk back out and the garage door will close. It won't accept your car again if you drive back out.
Type 20: Opens for your car but won't close by itself as long as the car is in the garage.
Type 21: Opens for your car, once inside you will be frozen until the door closes, the door stay closed. It won't accept your car again if you manage to drive back out.
Type 23: It won't open for your car so you have to force it open. Once inside you can leave your car in it and walk out. You will be frozen as the door closes. It will accept your car again if you manage to get it back out.

Now for some new opcodes
  • 0522 - Seems to mainly disable dynamic shadows during cutscenes
  • 0585 - Checks if the attack button is being pressed
  • 056B - Set actor to raise arms when targetted, CLASSIC CONTROLS has to be set! By default created actors don't raise their arms.


EDIT: More details in 021B.

Now for even more opcodes never used in Vice City!
  • 059F: get_object 0@ velocity 1@ 2@ 3@
    Gets the object's velocity
  • 05A1: set_object 0@ rotation_velocity_about_an_axis 1@ 2@ 3@
    Rotates and accelerates the object around its axis up to max velocity 30 times the input value. This works on any objects but using it on objects not defined in the object.dat file will result in the object falling through the floor. If not told to spin anymore, it will slowly stop itself.
  • 05A2: set_object 0@ rotation_velocity_about_an_axis 1@ 2@ 3@
    Rotates the object at constant velocity. Just like the previous opcode except it doesn't accelerate the object.
  • 05A3: object 0@ stopped
    Checks if the object is not moving.
  • 05A6: get_object 0@ rotation_velocity 1@ 2@ 3@
    Gets the object's rotation velocity.
  • 05A7: set_object 0@ velocity 1@ 2@ 3@
    Sets the object's velocity. The object has to be already in motion for this to work. Depending on the rotation of the object, it can go straight or move in circles.
  • 05A8: get_object 0@ speed_to 1@
    Gets the speed of the object. I think it's like 059F except without a direction. This is the last opcode for Vice City!
059D and 059E are weird. If I use one parameter for 059E and use it to store a var, it gets some random integer. Loop it and it gets a constantly random integer. Using 059D with one parameter just stops this randomness and I get a random value. I have no idea what they do.

I think I found GTA III's opcode limit to be 0482. The last opcode known for GTA III goes up to 0455. With my slow progress of at least 1 opcode every few days, I might be able to get results within a month.


EDIT AGAIN
wow.gif
user posted image
The texture opcodes from SA works in VC!
  • 0390: load_txd_dictionary 'NEWS'
    Loads the txd file !FROM THE MODELS FOLDER ONLY!
  • 038F: load_texture 1 'NEWS'
    Selects the texture within the txd file and assigns it to a number; remember to load the txd file using the previous opcode first! The name has to be surrounded by single quotes, not double quotes. I tried double quotes and that crashes the game. So the limit on texture name is 7 for now.
  • 038D: draw_texture 1 position 20.0 20.0 size 100.0 100.0 brightness 128 128 128 255
    Draws the texture on the screen, this line is the top left texture in the screenshot above. The last parameter is useless! The three numbers before the last determines how bright the texture is. At 255 255 255, the texture will be using its original color. At 0 0 0, the texture will be pitch dark. Alpha transparency is supported.
  • 038E: draw_box_position 500.0 500.0 size 100.0 100.0 RGBA 0 0 0 255
    Draws a box but I have no idea how to remove it.


And more opcodes...
• 037E: is_sniper_bullet_in_area 4.66 -711.711 5.474 8.897 -684.8 11.77
Used during one of the assassination mission.
And another grossly misnamed opcode
• 0383: is_car_special_horn_on $7831
It was labeled PLAYER?! This opcode only works on special horns like sirens and jingles.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#189

Posted 01 March 2010 - 09:29 AM Edited by spaceeinstein, 01 March 2010 - 09:31 AM.

This deserves a bump, an awesome new opcode discovered.
• 0591: unlock_all_cars_in_area X1 Y1 X2 Y2
There's always something new to be found.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#190

Posted 01 March 2010 - 02:51 PM

Damn shame that one doesn't work in GTASA. I actually wanted a "lock_all_cars_in_area" to prevent the player from getting randomly spawned cars.

Question: Do you reckon R* has changed any opcodes operations in SA since VC? The opcode database could soon be able to provide VC opcodes... however I feel like some of the opcodes do different things... So that would stall the VCSCM.ini by quite a lot longer.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#191

Posted 01 March 2010 - 07:26 PM

Which opcodes do you think do different things between VC and SA? All the opcodes I know have identical or similar functions between all three games.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#192

Posted 01 March 2010 - 10:13 PM

Well the NOPCodes certainly aren't useful.

The best example is the randomizer opcode:

GTA3:

CODE
0099=1,%1d% = random_integer_0-to-65535


VC:

CODE
0099=1,%1d% = random_integer_0-to-65535


SA:

CODE
0099=1,%1d% = random_int_in_ranges_0_to_32767


.. Or maybe someone is messing up with these definitions. 65535 (max integer or something) seems to be a more reasonable number for the SA one to be... And 32767 is 1 less than half of 65535... But it's used for the Vigilante submission to randomize an unknown flag that a car is set to...

And another sad reason that I think I may have to re-do everything for VCSCM.ini and SCM.ini is because people using them are probably used to the different format by now.

Should all be easier once I set the edit opcode page up.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#193

Posted 03 March 2010 - 04:13 PM Edited by spaceeinstein, 05 March 2010 - 04:16 PM.

I think the description is wrong. It should be simple to verify it. There are opcodes with different number of parameters between the games like 0297/8 but they function just about the same.

Here's one brand new opcode never used in III or VC.
0150: status_text $2779 type 0
It displays a "status text", just like 03C4 and 04F7 but without needing a GXT entry. It's such a useless opcode that it's never used.

EDIT: I can't believe how much opcodes were grossly misnamed. 01D9 was described as "actor run away from car" but it's the exact opposite. The actor attacks the car.

An additional new opcode never used in VC but used in SA
• 03E3: set_texture_to_be_drawn_antialiased 1
user posted image
Just look at the difference between the two circular textures.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#194

Posted 08 March 2010 - 03:03 AM Edited by spaceeinstein, 19 January 2012 - 04:01 PM.

I have delved into 00D8: mission_cleanup and here is a list of what it cleans up for Vice City. I'd expect III and SA to do most of the same.
03DF set to -1 ; random ped type to normal
0481 set to 1 ; ???
01EB set to 1.0 ; car density multiplier to normal
0482 set to 1 ; ???
03DE set to 1.0 ; ped density multiplier to normal
03C7 set to 1.0 ; wanted multiplier to normal
effect of 04C1 ; remove police roadblock
effect of 015A ; restore camera
02A3 set to 0 ; widescreen to none
0507 set to 0 ; white scanline to none
04C7 set to 0 ; green scanline to none
effect of 04FA ; reset interior colors
effect of 040D ; clear 2 mission audios
effect of 01B7 ; release weather
effect of 0296 ; unload 21 special characters
effect of 0249 ; release 5 cutscene object models
03AF set to 0 ; streaming to none
03E7 set to -1 ; flash hud to none
effect of 03E6 ; clear help box
0396 set to 0 ; pause timer
effect of 0391 ; release 16 txds
01F7 set to 0 ;; police ignore to none
03BF set to 0 ; everyone ignore to none
01B4 set to 1 ; player control to normal
052C set to 0 ; drunk visuals to none
03FD set to 0 ; handling responsiveness to none
0501 set to 1 ; drive by mode to normal
04D6 set to 0 ; rc contact detonation
048A set to 0 ; rc detonation
effect of 0557 ; release cab
0552 set to 0 ; riot noise to none
effect of 01C2 ; remove ref to car
effect of 01C3 ; remove ref to char
effect of 01C4 ; remove ref to object

There are tons more but these are the main noticeable effects. It would be very good if anyone can add more to the list. This opcode can only be activated within threads created by 00D7 or in missions. Once activated, it affects everything globally. So when you are making a mission or have some set values, you would have to worry about not being able to keep your set values when a mission ends. Though it's not too difficult to go around this obstacle.


EDIT: Ever wanted to be able to edit more of Vice City's stats? You can now edit most of them using 042E.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#195

Posted 13 March 2010 - 09:49 AM Edited by spaceeinstein, 18 March 2010 - 12:44 AM.

VICESCM.INI UPDATE change log
Includes a giant list of fixes, updates, and new opcodes.


List of all peds in GTA 3.
List of all special peds in GTA 3

EDIT: Ooo, new opcodes for GTA 3!
• 0220: car $car_handle has_car_bomb
Checks if the car has a car bomb installed. This opcode was never used in the game.
• 0231: enable_second_police_heli 0
Enables the second police helicopter that chases you. By default it's set to 1. This opcode was never used in the game.
• 03BE: ???
This opcode was never used in the game. It controls Catalina's helicopter and it needs the helicopter to be already created by 03B2. The helicopter will fly straight up and stay up there at a certain height. If you are near the bottom of the helicopter, it will relentlessly drop explosives. I don't know what description should I give because it's so odd.
• 03F8: $global_var = 1000
All this does is setting the variable equal to 1000. I'm not sure why would there be a specific opcode for that.
user posted image
038D to 0390 works in GTA 3

Rapier
  • Rapier

    Retired scripter

  • Members
  • Joined: 14 Aug 2005

#196

Posted 20 March 2010 - 01:52 AM

Very good these findings. The problem is that people are forgetting this game. I remember when I spent hours and hours doing scripts for Vice City. Good times... Thanks spaceeinstein, for not letting these games be forgotten in time. icon14.gif

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#197

Posted 22 March 2010 - 03:21 PM Edited by spaceeinstein, 22 March 2010 - 03:24 PM.

Thanks. smile.gif I somehow have an urge to discover the unknown in Vice City and GTA 3. There are so much undocumented information. I learned so much about the inner workings of the game while combing through the wall of information.

Here's one of the tiniest detail Rockstar placed in the game.
• 057C: set_weather_pattern 1
The weather in Vice City is not randomized as it seems. There are two lists of preset weather patterns used in the game. "0" for list A and "1" for list B. The main difference between the lists is that list A has weather 5 (hurricane) while list B does not. Each list repeats itself every 84 (I think) in-game hours. The opcode was only used twice in "Phnom Penh '86" and "Keep your Friends Close..." You can only experience the hurricane weather between those two missions.

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia

#198

Posted 23 March 2010 - 06:37 AM

QUOTE (spaceeinstein @ Mar 13 2010, 12:49)
• 03F8: $global_var = 1000
All this does is setting the variable equal to 1000. I'm not sure why would there be a specific opcode for that.

That's not exactly so. This opcode sets the variable equal to the exe variable located at:
CODE
.data:005F7D4C word_5F7D4C     dw 1000


By default it's equal to 1000, but there are places in the exe, where this value is changed or ever zeroed. (in the CObject::ObjectDamage).

So, most times 03F8 will set the variable to 1000, but not always (very rarely possible).

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#199

Posted 24 March 2010 - 02:12 PM Edited by spaceeinstein, 03 April 2010 - 06:49 PM.

Cool find. What condition makes it change? This could be very useful for the old GTA LC project.

More new opcodes:
• 046B: actor $actor leave_car $car and_flee
Actor has to be in a car for this to work. The actor will always run away from the car after leaving it.

• 046D: $var = actor $actor members_in_group
Another grossly misnamed opcode, this one gets the number of peds following the actor on foot. That includes the ones that follow Tommy after using the fanny magnet cheat. This was recently fixed in SA.

Some opcodes need more descriptive explanations.
• 01CC: actor $actor kill_player $PLAYER_CHAR
End all current objectives and kill player
• 01CA: actor $actor kill_player $PLAYER_CHAR
Only kill if not on any objective, like entering a car
• 020E: actor $actor look_at_actor $PLAYER_ACTOR
Rotates entire body towards actor
• 022C: set_actor $actor to_look_at_actor $PLAYER_ACTOR
Turn head and look toward actor

• 0126: actor $actor finished_walking
This opcode was misnamed. It doesn't check if the actor is walking. It checks if the actor has finished walking. It returns true only after the actor walked in any way.

• 0502: actor $actor flee_to 0@ 1@
Makes the actor do a fleeing animation to the point. Some peds sprint while other flail their arms.

• 045F: all_exit_car 0@ 4
Using this will make everyone in the car exit it. The second parameter is odd. I used values 3 and 4 and saw no difference. Values 1 and 2 crashes the game.

EDIT: More corrections
0395: clear_area $x $y $z radius $r
03A1: show_sphere $x $y $z radius $r
04C2: actor $actor1 walk_to $actor2
04C6: actor $actor1 aim_gun_at $actor2 (if has no gun, does kung fu stance as described before)
04D6: enable_rc_detonate_on_contact 0 (only works on the rc buggy)

Making that huge ass list in GTAModding really helped me on these opcodes.


EDIT: More new and never before used opcodes for III
• 01DA: set_actor $actor walk_to_area $x1 $y1 $x2 $y2
This is funny when you spawn multiple peds in all directions around your defined area. They all end up forming a rectangle at the area.
• 041B: increment_rampages_passed
• 045E: place_object $object1 relative_to_object $object2 offset 0.0 0.0 5.0
Just like 035C but for object.

Another batch of updates Change log:
0163,01DA,01F8,0220,0231,0251,0252,03BE,041B - iii, brand new (I included it just for the sake of completion, these don't work in VC)
03A1,046B,04C2,0502,057C - new
0126,020e,023a,b,0395,046D,04C6,04D6 - update
01ad,e,f,01b0,03b8 - changed

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003

#200

Posted 14 April 2010 - 03:09 PM Edited by spaceeinstein, 01 May 2010 - 11:36 AM.

This is one of the oddest thing I have discovered in Vice City. I was using 03E5 (show text box) and it cannot display the GXT string "HELP15". Then I played the game in classic controls mode and suddenly the game can display "HELP15". That means that specific GXT string can only work if you are in classic controls and not in standard controls!

EDIT: Ooo, more new opcodes for GTA 3!
02A4: add_blip_to_car $car sprite 18 store_to $blip
02A5: add_blip_to_actor $actor sprite 18 store_to $blip
02A6: add_blip_to_object $object sprite 18 store_to $blip
These creates the usual arrow above the car/actor/object but you can also assign a texture icon as seen in the radar!
033D: put_out_fire_on_player $player_char


Here are GTA 3's restrictions for 03E5: help15, gun_2a, gun_3a, gun_4a

EDIT: More new, unused, and odd opcodes for III
•029D: set_actor $actor drive_to_and_walk_to_area $x1 $y1 $x2 $y2
The actor HAS TO BE IN A CAR or the game will crash. The actor will drive towards the coordinates, stops before reaching it, exits the car, and then walks toward the coordinates, similar to 01DA. It's the oddest behavior I've ever seen.
•02DC: get_random_actor_in_area $x1 $y1 $x2 $y2 store_to $actor
This grabs a random ped within the area. It functions similar to another random ped grab within zone opcode.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#201

Posted 03 June 2010 - 09:17 PM

After a long battle with Javascript and a complete rewrite in PHP, I've FINALLY managed to enable the opcode database to output Vice City and GTA III .ini's!

CLEO for VC and III are there as optional includes, just like with the other CLEO's for SA.


What's more, the sascm.ini can now be downloaded with the opcodes for the .cleo files that come with CLEO 4, giving you even more great opcodes which allow for very easy ini file operations, file management or pretty complex math abilities tounge2.gif

ini's all round!

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia

#202

Posted 03 June 2010 - 11:07 PM

vicescm.ini output gives this one:
QUOTE
05E9=2,0@ = ped_struct 0@ handle

no %parameters are there.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#203

Posted 04 June 2010 - 01:08 PM Edited by Deji, 04 June 2010 - 01:12 PM.

Fixed.

Also added 60 of the 362 missing opcodes from VC's opcodes.txt file, that were in the .ini file. A lot to go but I'm too sick of it to carry on tounge2.gif


Corrected this in the sascm.ini:
CODE
0117:   player $PLAYER_CHAR defined


I'm pretty sure this is actually a wasted check (unless the III and VC definitions are wrong), especially considering 0256 is the defined check.


Wtf is this.
CODE
00C3: enter_debugmode


On SA it is written as a NOP that takes parameters (why would it take params?). Does it do anything good on III or VC? A debug mode is something that can really help on many occasions (shame it isn't in SA).

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia

#204

Posted 05 June 2010 - 11:38 PM

Lil' off-topic but.
Deji, how can I open a specific opcode page in your database w/out direct changing of an url at the address bar or scanning through all the opcodes?

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#205

Posted 06 June 2010 - 01:49 AM

Well the only way currently is by the categories. I'm still working on a search feature that will let you search for a term in the description/opcode example and specify which categories to include, the number of parameters and maybe even the type of parameters.

I'm also facing new flaws in the system due to the unexpected release of VC CLEO, which causes a situation where two games (VC and SA) both have the opcodes, but are for completely different purposes. Gotta find a way past that without having to sacrifice other things, so it's taking me a long time and a headache to get things done. And I think that the idea of public editing has to be chucked out to prevent people deciding to just change SASCM lines for no reason, or something.

space_einstein
  • space_einstein

    Snitch

  • Members
  • Joined: 28 Oct 2006

#206

Posted 06 June 2010 - 09:55 AM

The database look good. It would be good to have some opcodes refer to GTAModding for pictures, like 024F.

Seemann, do you have anymore opcodes that you can find? I think I have found all that I can possibly find and have given up trying to find new ones.

TheSiggi
  • TheSiggi

    Surgeon

  • Members
  • Joined: 05 Jul 2009

#207

Posted 06 June 2010 - 10:25 AM

Deji, is it possible to extend the content of the pages in your opcode database?
cause its pretty uncomfortable to have 20 pages with 20 opcodes each smile.gif
it would be cooler to have more content on each page

btw. is it possible to log in in at gtamodding and supplement the specific opcode descrptions?

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#208

Posted 06 June 2010 - 07:09 PM

Yeah, I guess the pages can be much longer. Easy to change. I'll raise it to 100.

I'm never able to find any of the pages at GTA Modding (or many other wikis, for that matter). I think the categories need editing or something to make it easier for browsing. I click on "San Andreas" and look in hope for a "Opcodes" or "Particles" category but no luck sad.gif

Changes made, thanks for the suggestions.

TheSiggi
  • TheSiggi

    Surgeon

  • Members
  • Joined: 05 Jul 2009

#209

Posted 06 June 2010 - 07:19 PM

Thanx, thats pretty cool now smile.gif

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia

#210

Posted 11 June 2010 - 04:15 AM

QUOTE (space_einstein @ Jun 6 2010, 12:55)
Seemann, do you have anymore opcodes that you can find? I think I have found all that I can possibly find and have given up trying to find new ones.

yeah, possibly, but I didn't tried yet. biggrin.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users