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: (13) « First ... 11 12 [13]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Opcodes for Bartons Editor (GTA3 + VC)

 Post yours here!
 
spaceeinstein  
Posted: Saturday, Jan 7 2012, 08:26
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




VICESCM.INI update
This update should be compatible to scripts decompiled with Sanny Builder's old revision of the INI file. The update was done all by hand so there may be mistakes in the file. So far, there doesn't seem to be any errors. Here is a list of major changes and additions since the 04.01.11 revision.
• Almost all "GTA 3 only" opcodes are commented out to allow documentation of III's opcodes without obstructions
• 009D removed because VC and III never supported that in the first place

• Changed opcode descriptions
009F: set_actor [char handle] objective_idle
020F: actor [char handle] rotate_to_player [player handle]
0210: player [player handle] rotate_to_actor [char handle]
0336: set_player [player handle] visibility [int]
0350: set_actor [char handle] maintain_position [int]
0377: set_actor [char handle] objective_steal_any_car
0381: set_object [object handle] velocity [flt1] [flt2] [flt3]
039C: set_car [car handle] watertight [int]
03AE: remove_particles_from_cube [flt1] [flt2] [flt3] [flt4] [flt5] [flt6]
03C8: set_camera_in_front_of_player
03D3: get_closest_car_node_at [flt1] [flt2] [flt3] with_heading [var1] [var2] [var3] [var4]
0411: set_actor [char handle] use_pednode_seek [int]
0418: set_object [object handle] draw_last [int]
0428: set_car [car handle] avoid_level_transitions [int]
04E3: set_player [player handle] mood [int1] duration [int2]
054B: attach_object [object handle] to_car [car handle]

• "GTA 3 only" changed opcode descriptions
00AC: car [car handle] alive
015E: car [car handle] in_air
023E: set_car [car handle] flash [int]
0240: set_object [object handle] flash [int]
029C: car [car handle] boat
02A1: message_wait [int1] [int2]
0344: set_text_draw_center_size [int]
0367: init_rampage_headshot
03f8: get_body_cast_health [var]
0438: set_actor [char handle] avoid_level_transitions [int]
0447: player [player handle] lifting_phone
044f: make_car [car handle] bit_stronger [int]
045E: place_object [object handle] relative_to_object [object handle] offset [flt1] [flt2] [flt3]

• "GTA 3 only" added opcodes
0195: set_actor [char handle] guard_area [flt1] [flt2] [flt3] [flt4]
021F: set_all_taxi_lights [int]
023F: set_actor [char handle] flash [int]
0246: set_player [player handle] walk_style_to [int]
02C4: save_player_coords
02D6: actor [char handle] firing_weapons_in_rectangle [flt1] [flt2] [flt3] [flt4] [int]
031B: car [car handle] primary_color [int]
031C: car [car handle] secondary_color [int]
0328: get_random_car_in_zone [string] model [int] store_to [var]
0338: set_car [car handle] visibility [int]
033D: put_out_fire_on_player [player handle]
0413: set_player [player handle] get_out_of_jail_free [int]
046A: get_random_law_enforcement_in_zone [string] store_to [var]


EDIT:
Ooo, new opcode for GTA III
CODE
045D: get_object_at [flt1] [flt2] [flt3] radius [flt4] model [int] store_to [var]

This grabs an object of specified model at a location within a radius and stores it into a variable. It only works with dynamic objects. This was never used in the default script.
I can add blips to nearby traffic lights with this!
user posted image

This post has been edited by spaceeinstein on Wednesday, Jan 11 2012, 21:38
Users WebsitePM
  Top
 

 
SilentPL  
Posted: Monday, Jan 23 2012, 11:32
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




QUOTE (spaceeinstein @ Friday, Dec 23 2011, 04:46)
The SCM from the mobile version seems formatted exactly the same as the PC version, but with two extra opcodes:
CODE
03A8 - 1 parameter
03A9 - 0 parameter

Add these to Sanny Builder's SCM.INI file if you want it to decompile correctly:
CODE
03A8=1,
03A9=0,

According to real SCM source, the opcodes are:

CODE
03a8=1,save_float_to_debug_file %1d%
03a9=0,save_newline_to_debug_file


I bet they are NOPs in final build though.
Users WebsitePMMSNXbox Live
  Top
 

 
spaceeinstein  
Posted: Tuesday, Feb 7 2012, 01:13
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




CODE
0323: ANCHOR_BOAT [car handle] [int]

Can anyone explain to me how is this suppose to work? I first learned this from Towncivilian and R*'s GTA III source code confirms this, but I have been testing this extensively and found no apparent effect in VC. It is always used with boats. If anchor is suppose to mean not being able to move, this opcode doesn't do that. I can still push boats, drive them, and have NPCs drive them.
Users WebsitePM
  Top
 

 
Deji  
Posted: Tuesday, Feb 7 2012, 23:17
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



It is a bit of a weird one... I'd identified it as being that before even the III source code but was never sure of what the actual effects were. I'll try and check the SA IDB again tomorrow and see if I can find out if it's even used. Bad programmer-mission coder communication seems to be a likely culprit of many weird SCM phenomenons.

In SA, it's used mainly in the mission where you plant a bug on a boat and CJ explains his unfortunate encounter with a condom (Amphibious Assault?).

If I'd have to guess, I'd say it does make the boat stick to a position (even if not keeping completely still, like the "make char stay in kinda the same position" opcode), but probably not under the circumstances that you tested it in. Did you try getting the handles of a random (or just the closest) boat and using the opcode? It may have more of an effect, since the boat doesn't have a goal of sailing to a particular spot, it's just cruising. 00A8 is CAR_WANDER_RANDOMLY if you want to make a vehicle cruise. No idea if it works on boats, though.


I've listed most of the III command names, as well as related IV ones, in the v2 Opcode Database. I can provide you with a generated list, if you want.


EDIT

Couldn't help myself. I had a quick look. The most striking thing is that the flag which is set doesn't stop the boat from doing something. A small amount of code is run if the flag is set. So the flag makes more happen, not less. Kinda the opposite of what the name would make out. I can't yet make much of this very undocumented (absolutely nothing in CBoat is documented) code, but I'll try documenting some stuff later and see if it's any clearer. Still, the code does mess with the boats matrix a lot... and it seems that if one of that float member values is -99999 (or w/e) the boat will only turn on the spot. So the command name almost definitely isn't lying.

This post has been edited by Deji on Tuesday, Feb 7 2012, 23:57
Users WebsitePM
  Top
 

 
spaceeinstein  
Posted: Wednesday, Feb 8 2012, 08:04
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




00A8 does work on boats; boats correctly search for boat paths. Still doesn't anchor though. I think I can guess why this opcode doesn't work the way I tested it. Boat anchor seems to be set at +0x2F5. Using this opcode in a loop suppose to set the byte value to 1. It works for cars but it never works for boats. Somewhere within the game is forcing the boat to never be anchored. Can it be safely concluded that this opcode is basically useless?
Users WebsitePM
  Top
 

 
Deji  
Posted: Thursday, Feb 9 2012, 10:47
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



Nah. Well, it appears used in SA anyway. When I repair my SA installation (it currently relies on VJ and the VJ source needs a bit of a fixup) I should be able to see for sure whether it's used, using R*'s code.
Users WebsitePM
  Top
 

 
spaceeinstein  
Posted: Thursday, Feb 9 2012, 19:52
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




With more testing and thinking, I found out how this opcode works. The boat must NOT be occupied for the effect to work. When a boat is anchored, it cannot move when being pushed, though push hard enough and it will slowly move. Gravity still have the normal effect. Once the boat is occupied, it is automatically unanchored. Boats are anchored by default when they are spawned without anyone inside it. This works even when boats are grounded.
Users WebsitePM
  Top
 

 
Deji  
Posted: Thursday, Feb 9 2012, 23:12
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



Interesting. Having all boats "anchored" when on ground would add realism, since CJ seems strong enough to push boats all the way across SA tounge.gif
Users WebsitePM
  Top
 

 
spaceeinstein  
Posted: Thursday, Mar 8 2012, 00:54
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




CustomVariables.ini for GTA III
The CustomVariables.ini controls the labeling of global variables when decompiling the main.scm. The labels contained in this list are obtained from the partial source code of GTA III from gtamodding.ru. It is far from complete but it's much better than ones released previously. I will periodically update the list using the same link and will not be posting anymore notices after this unless it's necessary.
Users WebsitePM
  Top
 

 
Deji  
Posted: Thursday, Mar 8 2012, 11:23
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



Ahhh, I started working on the same thing, but hadn't had much time to spend completing it. Good work smile.gif
Users WebsitePM
  Top
 

 
Wesser  
Posted: Wednesday, Jul 11 2012, 11:26
Quote Post


The complexity simplifier, the efficiency optimizer
Group Icon
Group: Members
Joined: Aug 19, 2006

eu.gif

Member Award




Whereas we were talking about the native SCM sintax some posts above, I decided to show in this topic the source (yeah, it's really a code) of GTAIII's american.gxt, available here.
PMMSNPlayStation Network
  Top
 

 
SilentPL  
Posted: Wednesday, Jul 11 2012, 12:21
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




Looks like "THIS LABEL NEEDS TO BE HERE!!!" mystery is solved now tounge.gif

How does it organize stuff in tables though? I can't see their definitions anywhere.
Oh, III lacks tables. My bad.

This post has been edited by SilentPL on Wednesday, Jul 11 2012, 12:26
Users WebsitePMMSNXbox Live
  Top
 

 
SilentPL  
Posted: Thursday, Aug 9 2012, 16:54
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




0439 is a pretty fun opcode. It's never used in III (and it's III-only opcode), and it gets the SCM handle of chase scene vehicles. This way, I could try my best on kidnapping Old Oriental Gentleman by myself:

user posted image

Native name for it is probably TURN_CHASE_CAR_INTO_SCRIPT_CAR, thus opcode is
CODE
0439: turn_chase_car %1d% into_script_car %2d%


This post has been edited by SilentPL on Thursday, Aug 9 2012, 16:57
Users WebsitePMMSNXbox Live
  Top
 

 

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

0 Members:

Pages: (13) « First ... 11 12 [13] 

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



 
IMG IMG