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

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Opius

Opcodes for Bartons Editor (GTA3 + VC)

Recommended Posts

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

Share this post


Link to post
Share on other sites
Deji

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.

Share this post


Link to post
Share on other sites
spaceeinstein

I have put together a giant list of custom variables for VC. This is for reference only and is not recommended for normal usage. It makes understanding the script so much easier reading plain English instead of numbers.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Seemann

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.

Share this post


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?

Share this post


Link to post
Share on other sites
Deji

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

Share this post


Link to post
Share on other sites
Seemann

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

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
xNCx

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...

Share this post


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.

Share this post


Link to post
Share on other sites
xNCx

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().

Share this post


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

Share this post


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??

Share this post


Link to post
Share on other sites
xNCx

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?

Share this post


Link to post
Share on other sites
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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Deji

GTA III Mobile Source tounge.gif

 

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

Share this post


Link to post
Share on other sites
Wesser

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?

Share this post


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

Share this post


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.

 

Share this post


Link to post
Share on other sites
Deji
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.