Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Cayo Perico Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Opcodes for Bartons Editor (GTA3 + VC)


Opius

Recommended Posts

  • 3 weeks later...
spaceeinstein

Wow, I never thought I would discover anymore opcodes. Here's one brand new opcode:

 

045C: terminate_active_mission

 

This will end the current active mission. Missions seem to need to follow this format because using this opcode instantly jumps to mission cleanup.

 

EDIT: Ohhh, SA already has this opcode. confused.gif I should've checked the list of opcodes first.

Edited by spaceeinstein
Link to post
Share on other sites

Hehe... Still, nice find. It's surprising how many opcodes are left out of VC and III .ini's.

 

I'll post my last night find in the SA topic. The database is updated.

Link to post
Share on other sites
  • 2 weeks later...
spaceeinstein

Can someone help me clarify 014C? I delved into this opcode using the value of "2" but the car still spawns more than two times even after I steal the car many times. Is the description on the wiki complete? This may apply to SA.

Link to post
Share on other sites

SA code which is called after each new vehicle created:

 

 

.text:006F3E28 09C                     mov ax, [edi+CParkedGenerator.Limit].text:006F3E2C 09C                     movzx ecx, ax.text:006F3E2F 09C                     cmp ecx, -1.text:006F3E32 09C                     jge short loc_6F3E39.text:006F3E34 09C                     dec eax.text:006F3E35 09C                     mov [edi+CParkedGenerator.Limit], ax

 

 

It decreases CParkedGenerator.Limit by 1 if it's not -1.

 

CParkedGenerator.Limit is set by 014C.

 

That's why I think it's the limit.

 

Probably in VC it works in another way.

Link to post
Share on other sites
spaceeinstein

At "jge short loc_6F3E39", do all values above -1 jump right away and not get decreased at all?

Link to post
Share on other sites

It jumps if it is greater or equal to -1.. That's all I can be certain of tounge2.gif

 

Hehe.. That snippet of ASM and explanation has given me even more understanding smile.gif The ASM tutorials seem to jump from "this is how hex works" to "a complete history of how processors have worked" rather quickly confused.gif.. I only wanted to find out about ASM for the current generation lol.gif

Link to post
Share on other sites

I was wrong. Actually there is no -1, its 0xFFFFFFFF (4294967295)

 

 

.text:006F3E28 09C                     mov ax, [edi+CParkedGenerator.Limit].text:006F3E2C 09C                     movzx ecx, ax.text:006F3E2F 09C                     cmp ecx, 4294967295.text:006F3E32 09C                     jge short loc_6F3E39.text:006F3E34 09C                     dec eax.text:006F3E35 09C                     mov [edi+CParkedGenerator.Limit], ax

 

Link to post
Share on other sites
  • 3 weeks later...
spaceeinstein

Hmm..., apparently I never posted this here. This opcode was never used in VC but it works.

 

04E9:   is_object $88 in_rectangle 300.0 -1295.0 310.0 -1285.0 sphere 1

 

Its 3D counterpart, 04EA, was used in the game.

Edited by spaceeinstein
Link to post
Share on other sites
  • 3 months later...
spaceeinstein

 

• 038D: draw_texture 1 position 20.0 20.0 size 100.0 100.0 brightness 128 128 128 255

Note: Textures has to be compressed. Uncompressed textures crash the game.

 

EDIT: Amazing work by Towncivilian, many opcodes are now known. Here's an update to the INI file:

VICESCM.INI update

Edited by spaceeinstein
Link to post
Share on other sites
  • 3 months later...

Good to know that someone still updates the opcode list for SB. But what about opcodes.txt? No updates for it? SB's opcode search tool is very useful...

Link to post
Share on other sites
spaceeinstein

Opcodes.txt can be updated through menu bar. The one in SB is automatically generated so it was pointless for me to create one.

Link to post
Share on other sites

Tools > Make opcode.txt? But as I see it generates a list with only used opcodes in a script, not full list (and even VC's default main.scm doesn't use all available opcodes?). And it also generates "junk" like Actor.Dead().

Link to post
Share on other sites
spaceeinstein

You can download Deji's opcodes.txt. His was generated from his own INI file, so not all updates from my INI file were made there, but it should be enough.

Edited by spaceeinstein
Link to post
Share on other sites
BadaBing15

0423: improve_car_handling <car> by <float>

 

can this code be used to create a car that can be used while not on a mission??

Link to post
Share on other sites

Opcode list at gtam doesn't say, that this opcode can used only in missions, so you can use it whenever you want. But maybe it works only for created actors cars?

Link to post
Share on other sites
  • 7 months later...
spaceeinstein

The SCM from the mobile version seems formatted exactly the same as the PC version, but with two extra opcodes:

 

03A8 - 1 parameter03A9 - 0 parameter

 

Add these to Sanny Builder's SCM.INI file if you want it to decompile correctly:

 

03A8=1,03A9=0,

 

Edited by spaceeinstein
Link to post
Share on other sites
fireguy109

Thanks for the info, Spaceeinstein! This will hopefully make mobile scm modding possible! inlove.gif

 

E: indeed it seems to. No more errors decompiling the scm file anymore. cookie.gif

Edited by fireguy109
Link to post
Share on other sites
spaceeinstein

A little odd behavior I found for opcode 0299 for GTA III. It is described as "activate garage", the opposite of 02B9's "deactivate garage". It does what the description says, but with an extra behavior for garage type 11. Using 0299 will also open the door of the garage! Type 11 garage behaves exactly like in VC. The garage door cannot open itself, but once the door is opened, the door will only close if there's nothing in the garage or if nothing is blocking the garage door.

 

0299 was used only once in GTA III, during "Silence The Sneak" when McAffrey attempts to escape by car. The advantage of this opcode is to allow the garage door to open for the car to get out and to remain open as long as something is in the garage, even after the mission. This prevents you, the player, from getting stuck in the garage if the "open/close garage" was used instead.

Edited by spaceeinstein
Link to post
Share on other sites
spaceeinstein

Cool new stuff for III.

 

031B:   is_car [car handle] primary_color [int]031C:   is_car [car handle] secondary_color [int]

 

These check if the primary/secondary color of the car matches the value in question.

 

 

0328: get_car_in_zone '[string]' with_model [int] store_to [var]

 

This searches for a car with the specified model ID and stores that car to a handle.

 

 

046A: get_law_enforcement_in_zone '[string]' store_to [var]

 

This searches for a law enforcement personnel and stores that to a handle.

 

All of these were never used in the original script.

Edited by spaceeinstein
Link to post
Share on other sites
fireguy109

Interesting. I guess R* was too lazy to just use

 

03F3: get_car $EIGHT_CAR color $1581 $1582

 

and then check to see if it matched the integer. tounge.gif

Link to post
Share on other sites
spaceeinstein

I wouldn't consider it lazy when they hadn't used them at all.

 

Big update for the list of opcodes at GTAModding. The major change is the switching of columns and attempting to match R*'s naming conventions. I will create a separate list for Sanny Builder once I am done with GTAMA. I am updating all the opcodes pages to match the more commonly used Sanny Builder format. Instead of numbering the parameters, I used datatypes instead to avoid confusion if some of you are using uncommon INI files. I'm still figuring whether to shove all the opcodes on one page or keep SA's introduced opcodes separate. It is already way too large with what I have done so far.

Edited by spaceeinstein
Link to post
Share on other sites

Really nice spaceeinstein. It'll help me with NSB (take a look at my signature). I'd be pleasure if someone gives me a hand on matching GTA SA opcodes with their real native name (see my pastes here).

 

Anyone noticed "{" before the body of mission which ends with "}"? What's that?

Link to post
Share on other sites
spaceeinstein

Someone at the Russian modding wiki documented the majority of the source code from the SCM file last month. Looking through the names, I am surprised at how many were spot on correct, and surprised at how many were dead wrong.

Edited by spaceeinstein
Link to post
Share on other sites
Silent

 

 

user posted image

 

tounge.gif

 

 

Anyone noticed "{" before the body of mission which ends with "}"? What's that?

 

I believe it's a local variables scope.

 

Link to post
Share on other sites
Really nice spaceeinstein. It'll help me with NSB (take a look at my signature). I'd be pleasure if someone gives me a hand on matching GTA SA opcodes with their real native name (see my pastes here).

 

Anyone noticed "{" before the body of mission which ends with "}"? What's that?

 

Already been through it and added the command names to the Opcode Database.

 

Just tell me what kind of format you want and I can export a list. Currently it also has matched IV command names as well (mainly for SA). So they're not quite as accurate. But as you can see from Silent's post, it makes a nice difference.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.