Description
I’ve been working on this script for months, it’s something I’ve wanted in the game for a long time. It’s open for general editing, just don’t forget to credit me if you do 🙂
STC – Simple Traffic Creator Version 1.0:
With this script you can finally create vehicle traffic in a simple and customizable way in any location and even in mod maps. This script simulates only vehicle traffic, has customization for each point created in addition to performance and behavior settings.
I wrote this script to meet the need to bring mod maps to life without being blocked by the limits of the x z y coordinates and the predefined number of nodes in the game’s native trafficpath areas, in addition to the work of not having to edit the popcycle, popgroup, popzone and zonebind files.
How It Works:
_ The player adds waypoints called wp (waypoint) with the Ctrl+N keys (standard speed)
_ The player can also add wp waypoints with the Ctrl+B keys (boost speed) indicated for highways and circuits
_ During the game, use the Ctrl+C keys to reload the wp from the TrafficWaypointSpawner.ini file and the settings from the TrafficWaypointSpawner.config file, if you edit them outside the game.
_ Delete the last waypoint created with the Ctrl+X keys, be careful if there is an active vehicle using this last wp it may crash the script, requiring you to restart the game.
_ Possibility to show or hide the markings of the wp created in the game with the Ctrl+M keys, used to help in editing the wp.
_ Set the total limit of vehicles spawned at the same time in the game, so that new vehicles only spawn when another one is despawned, adjust according to your PC’s performance.
_ Set the minimum and maximum distance from the player that the wp will spawn new vehicles (spawn radius: leave the ‘spawnMinDistance’ at least ‘180’ and the ‘spawnMaxDistance’ at least ‘190’)
_ Distance that the vehicles will despawn, adjust smaller values if you have performance problems, but a value lower than 200 causes visible vehicle popups on the screen.
_ Vehicles are spawned in the game through each wp marker as long as they are within a minimum and maximum spawn distance from the player’s current position.
_ Each created wp receives a registration id and another destination id sequentially.
_ The vehicle generated in ‘wp id 1’ goes autonomously towards the ‘destination wp id 2’, and when it reaches wp id 2 it goes to the next destination id set in that wp, which by default will be id 3, and so on.
_ Each added wp has individual and customizable rules and settings, which are stored in the TrafficWaypointSpawner.ini file in the following sequence:
- wp id, and destination wp id, can be changed to create looping routes and closed circuits, for example we can change the destination wp in wp 11 from 12 to destination wp 1, this way whenever the vehicle reaches wp id 11 it will head to destination wp 1 and redo the entire route again.
- position on the map in integer values x, y, z, and rotation so that the vehicle is spawned in a certain direction.
- define the model of the vehicle to be generated in each wp (supports mods), leave blank if you do not want a vehicle to be spawned in that wp. Use to simulate sections of a circuit or reduce the volume of cars (default vehicle: adder)
- define the model of the ped to be generated as the driver of the vehicle in each wp, used to insert police peds in vehicles so that there is a route and police chase (default ped: a_m_y_skater_01), leave blank to generate parked vehicles without a driver.
- set the vehicle speed, with this the vehicle will leave with the set speed until the next wp, speed is in game units, default 15 (~33km), boost 30 (~100km)
- set a weapon to the ped to be spawned in the vehicle (default weapon: WEAPON_PISTOL), leave blank for ped without weapon.
- Interval in seconds between each vehicle spawn (default 5 seconds for the next spawn)
- waiting time for the vehicle to stop and go to the next wp, value measured in milliseconds, (default 0), use this to simulate vehicles in blits, or even at some intersections, optional.
When starting the game with the script, it will load the following default settings from the TrafficWaypointSpawner.config file. These settings also have an impact on new wp to be created by the player:
- despawnDistance=200 (initial vehicle despawn distance)
- spawnMinDistance=180 (minimum vehicle spawn distance)
- spawnMaxDistance=190 (maximum vehicle spawn distance)
- maxVehicles=100 (limit of vehicles spawned at the same time, counting vehicles spawned by other means)
- vehicleSpeed=15 (default vehicle speed, approximately 34Km/h)
- boostSpeed=30 (boost vehicle speed, approximately 100Km/h)
- autoSpawnEnabled=true (enables or disables vehicle spawns)
- vehicleModel=adder (change the vehicle model to be generated in the new created wp here)
- pedModel=a_m_y_skater_01 (change the ped pilot model of the vehicle to be generated in the new created wp here)
- logsEnabled=true (enable or disable the mod’s behavior log)
- notificationsEnabled=true (enable or disable the messages below during the game)
- messageWPAdded=traffic Waypoints added! (change the message here when saving a normal wp)
- messageWPDeleted=traffic Waypoints deleted! (change the message here when saving a boost wp)
- messageConfigReloaded=Configurations and traffic Waypoints reloaded! (change the message here when reloading the saved settings and wp)
- hotkeyCreate=N (change the button here to activate the default wp creation function)
- hotkeyReload=C (change the button here to reload the saved settings and wp)
- hotkeyDelete=X (change the button here to delete the last wp created)
- hotkeyShowMarkers=M (change the button here to show or hide the markings of wp created in the game)
- hotkeyBoost=B (change the button here to activate the wp boost creation function)
- showMarkers=true (change here if the game’s default will be to show or hide the markings of wp created when starting)
- vehicleCheckRadius=10 (Tolerance radius for wp route validation, used so that the vehicle can consider the arrival at this wp as completed and only then continue towards the next wp.)
- minWaypointDistance=10 (A wp cannot spawn a vehicle while another vehicle is too close to it (default radius of 10 units, avoids stacking vehicles)
Important Notes:
The vehicles generated by this script have a ‘wakeup’ behavior, so they avoid obstacles and other vehicles and do not float on the ground and only move if there is a character driving.
The recommended speed for vehicles in cities and on quiet roads is 10 speeds. This way, vehicles tend to respect lines and avoid accidents.
At very high speeds above 25 speeds, vehicles tend not to use the brakes much on curves.
Known Bugs:
- at specific points in the game, vehicles may simply ignore the next wp and follow a random direction, I was unable to find the cause, behavior or pattern to solve this problem.
- if you spawn vehicles without a ped, when you enter some of them they may force automatic piloting.
PUT THE FILES IN SCRIPT FOLDER
💡 Others also downloaded: Enhanced Taxi Missions Redux, Vehicle System Overhaul, Tunable Lung Capacity.
Authors: schio84dude
Share Your Gameplay!
Submit a screenshot of this mod!
Submit a YouTube video.

