Road density
6 years ago
Russia

This thread contains information on details of game spawning random peds.

Game attempts to spawn random peds (not counting cop peds with wanted level etc) when current number of spawned peds in below a certain threshold. Threshold's formula is min(X1 ¤ X2 ¤ X3 ¤ X4, 25 ¤ X3). I'll detail them.

First of all, there is a file gta3.ini in everyone's game directory. It contains two numbers: one in car density, another is ped density. Ped density from this file is X3. Obviously in runs this file must stay in its original state so it doesn't really matter (although it might be interesting for testing and other stuff.

Second, there is a mission ped density multiplier (opcode 03DE). In GTA III it's just 0.0 to remove all peds at all and 1.0 to reset it to normal state. This coefficient is X4. For described reasons X3 and X4 can be removed from consideration, basically leaving with min(X1 ¤ X2, 25).

X1 is a zone density multiplier. It is a sum of ped density and car density. which are setup by opcodes 015C and 0152 (second number parameter in both of them). There are different versions for day (8-19) and night (22-5) [evening and morning are interpolated]. This sum is X1.

X2 is a road density multiplier which has a very important effect. It is a sum of lengths of all roads (including multiple lanes) in a rectangle 80x80 meters with player in the center, divided by 2500. (Edit: for those paths framgents, whose both boundary nodes are present in said rectangle, distance counts twice). Its current value can be found at address 0x9415A8 in version 1.1 for testing purposes. And here are the screenshots how it can affect, for example, Trial by Fire.

Here is a picture 1. http://i.imgur.com/NikVw3V.png Here only red lines (car paths) are relevant. In the center of this rectangle coefficient is approximately 1.27 - as it involves 3 roads, one of which is multi-lane. Here, during the night, for example, max peds count is min(16¤1.27, 25) = 20.

Here is a picture 2. http://i.imgur.com/jTw7blv.png Center of this picture has a coefficient of 1.41, which limits ped count at 22, as a northern road is additionally taken into account.

Now here is a picture 3. http://i.imgur.com/vGpdGsG.png Center of this picture, which is just an opposite side of the road shown in picture 1, has coefficient of just 0.64, limiting total number of peds in the night with 10! Even during the day, limit is fairly low, 23¤0.64 = 14. Coefficient is even lower on a road to the west of one shown in the picture. It causes a lot less spawns during, for example, Trial by Fire (using rampage + remote pickup). Choosing a different place with better coefficient might make this mission faster.

Edited by the author 6 years ago
Patrick_, agjents and 4 others like this
Tokyo, Japan

I made a separate thread for the application of this knowledge for Trial by Fire, since this is very important for that mission and for All Missions speedruns in general. Thread: http://www.speedrun.com/gtaiii/thread/xnffq/1#ds08l

Game stats
Followers
1,116
Runs
1,873
Players
310
Latest threads
Posted 1 year ago
12 replies
Posted 3 years ago
14 replies
Posted 7 years ago
0 replies
Posted 7 years ago
0 replies
Posted 1 month ago
3 replies