Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,008 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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

    2. Red Dead Redemption

    3. 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. Forum Support

    2. Site Suggestions

Sign in to follow this  
Rodrigowski

Documenting GTA 3 car spawns per district

Recommended Posts

Rodrigowski
Posted (edited)

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:

 

 

unknown.png

Portland View: Mostly Police Cars

 

unknown.png

Saint Mark's Day: Only Mafia Sentinels

 

unknown.png

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

 

unknown.png?width=1202&height=676

Hepburn Heights Day: Only Diablo Stallions

 

unknown.png

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

 

unknown.png

Red Light District Day: Only "executive" class cars

 

unknown.png?width=1202&height=676

Red Light District Night: Only "special" class cars

 

unknown.png

Trenton Day: Only Yakuza Stingers

 

trenton_night.jpg

Trenton Night: Only Cartel Cruisers

 

unknown.png

Atlantic Quays Day: Only Hoods Rumpo XLs

 

atalntic_night.jpg

Atlantic Quays Night: Only Yardie Lobos

 

unknown.png

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

Callahan Point Night: Only "big" class cars

 

unknown.png

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

 

unknown.png

Chinatown Day: Only Triad Fish Vans

 

photo_2018-01-01_02-04-27.jpg

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

Share this post


Link to post
Share on other sites
zmudziak32

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

Share this post


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
Sign in to follow this  

×

Important Information

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