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. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. 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

Sign in to follow this  

Documenting GTA 3 car spawns per district

Recommended Posts


I wanted to find out which cars spawn at which districts and how often. After some quick searching, I learned that main.scm is responsible for this, more specifically opcode 0152. This is what a 0152 command looks like:

0152: set_zone_car_info 'HARWOOD' 1 8 0 0 0 0 0 0 0 20 400 0 0 300 0 0 

As you can see there are 17 parameters for it. My search had indicated what 4 of them do. I went ahead and created a sheet with the initial setting commands for all districts to better analyze it. After that was done I had solid guesses that most of the parameters are related to gang cars and car "classes" as defined in handling.cfg.


Afterwards I modified main.scm to check whether my hunches were correct. The screenshots show what I found:




Portland View: Mostly Police Cars



Saint Mark's Day: Only Mafia Sentinels



Saint Mark's Night: No cars ("density" argument set to 0)



Hepburn Heights Day: Only Diablo Stallions



Hepburn Heights Night: Only "richfamily" class cars (more about Taxis below)



Red Light District Day: Only "executive" class cars



Red Light District Night: Only "special" class cars



Trenton Day: Only Yakuza Stingers



Trenton Night: Only Cartel Cruisers



Atlantic Quays Day: Only Hoods Rumpo XLs



Atlantic Quays Night: Only Yardie Lobos



Callahan Point Day: Only "poorfamily" class cars (I know they are already common in this location, but you probably got the point by now)



Callahan Point Night: Only "big" class cars



Harwood Day: Only "worker" class cars (again, I know they're common here but still)



Chinatown Day: Only Triad Fish Vans



Chinatown Night: Many cars ("density" argument set to 25 - a subtle difference, might increase it more later to see the results)





Here is the main.scm used to get these screenshots: https://drive.google.com/open?id=1HoZGjVj3iOh16iam8wqKddf0GUwW5IXp

Opcode 0152 is initially called at lines 415 through 708. A new game is needed to see changes.


You can access the sheet here: https://docs.google.com/spreadsheets/d/1fkP1zCBSnk1oINg96o48VPGoNweRJaphhsnxDtt24Mw/edit?usp=sharing


So, what was learned from this?


Opcode 0152 is used in main.scm to set which cars appear on which districts and how often. Let's do a quick breakdown of all its parameters with the names I used for the sheet:


DISTRICT: The district where the cars will appear, as a string


TIME: 0 for night-time spawns, 1 for day-time spawns


DENSITY: 0 means no traffic at all, spawn rates go up with this parameter. Maximum used by default is 24


MAFIA SENTINEL, TRIAD FISH VAN, DIABLO STALLION, YAKUZA STINGER, YARDIE LOBO, CARTEL CRUISER, HOODS RUMPO XL: Chance that this gang car will appear (probably out of 1000, e.g. 150/1000 would be 15%, untested)


POLICE: Chance that Police Car will appear (probably out of 1000)


POORFAMILY, RICHFAMILY, EXECUTIVE, WORKER, SPECIAL, BIG: Chance that a car in this class will appear (probably out of 1000). Car classes are defined in handling.cfg, e.g. Perennial is a "poorfamily" car, Banshee is "executive", Linerunner is "big"


I will continue studying this subject later. Here are some final interesting remarks for now:

-Taxis are nowhere to be seen in arguments, and they appear in every district even if you set it to spawn only one class of car


-Some districts have 0152 opcode set, but no cars ever appear on it, like Portland Beach and Portland Harbor. Some others don't even appear as separate districts in the city, like MAIN_D1 to MAIN_D6 (which are main roads), and FILLIN_1 (I have no idea what could this district be, maybe the Junkyard?). I also don't know what's the use for HOSPI_1 and COPS_1 since they are overriden by Portland View. Lastly, there are 3 different district entries for Shoreside Vale, and WEE_DAM (which could be the lower part of Cochrane Dam) is called, but all of its arguments are 0


-For the "time" parameter day starts at 05:00 and night at around 20:00


-Values for most of the parameters seem to be a chance out of 1000, but on most districts if you add up all the chances you get a number lower than 1000, like 800-ish. Maybe the remaining chance is used by taxis


-Opcode 0152 is called again in main.scm, apparently at some missions. I'll try to find out more about it


-According to what was learned the best place to look for Mr Whoopee is at Portland View during the day : P


That's all, thanks for reading and if you have any questions feel free to ask them. I will post again when I find out more

Edited by Rodrigowski
  • Like 3

Share this post

Link to post
Share on other sites

Thank you for doing research. How about doing same thing for Vice City?

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.

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.

Sign in to follow this  

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