Carregant...

Simple Traffic Creator 1.7

Descarregar
schio84dude

1.193

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, ped and boats traffic, has customization for each point created in addition to performance and behavior settings.

version 1.7:

_fixed the randomCustomization field that was saved as empty when creating new wp in the ini when the value in the config was false, which caused all spawn wp in the game not to load

_fixed a sequential bug when creating wp from the last version, it will always follow the highest wp id registered, avoiding duplication of wp id

_when creating a wp from a parked vehicle (Ctrl+G) the wp will have the destination A B C equal to the source wp id

_Removed parked vehicles spawn limit. Now they do not count towards the total limit of spawns of moving vehicles.

_adjusted the config file that contained resource options that were not yet functional.

_current structure of the ini file of each generated wp:
'wp id',
'wp dest id A',
'wp dest id B',
'wp dest id C'
'position X',
'position Y',
'position Z',
'direction',
'vehicle name or group',
'ped name or group',
'vehicle or ped speed',
'weapon name or group',
'interval (seconds) between each spawn',
'wait time (milliseconds) before advancing to the next wp',
'ped task name or group',
'pedHP amount of ped health',
'random vehicle tuning (enabled:true or disabled:false)',
'vehicle primary color',
''vehicle secundary color'

version 1.6:

Version focused on restructuring, optimization and performance of the script, for compatibility with the implementation of future features. It is now as lightweight as the first version

_The name of the script and its files have been standardized to 'STC_filename'. You must delete the old 'TrafficWaypointSpawner' files, otherwise you will have many duplication problems. If you have ini files of created wp routes, copy their ini files to the new 'STC_wpAreaMap' folder

_The vehicle, ped, tasks and weapons group files have a new format and are in ini type, so it is easier to create and identify the group name. (credits to @JoyLucien for the idea)

_The script still reads the ini files of the created wp routes of previous versions (as long as they are inside the new 'STC_wpAreaMap' folder, parcial compatibility very old versions)

_Added the possibility of selecting the primary and secondary color of the vehicle that will be spawned in each created wp. The color values ​​can be changed for each wp or you can change the default for the next generated wp in the config file.

Default values ​​that you can set for primary and secondary colors, with one field for each 'color', you can mix them if you want:
'defaut' = keeps the vehicles spawning randomly in the default colors of each model.
'rgb' = makes vehicles appear in completely random and unpredictable colors via rgb.
'0.0.0' = rgb value, in this case it spawns in black, change these values ​​from 0 to 250 to the desired color, the vehicle spawned in this wp will only be in this color.

_removed redundancies and simplified task checking in general (there are a lot of things I won't even mention here because the list is long), now even with the ontick at '0' the FPS drop caused by the script is minimal, the FPS drop is now due to the excess of entities on the screen.

_removed the resource of limiting spawns per wp individually, because it was heavy and was causing a lot of stuttering.

version 1.5:

Optimized script, reduced resource consumption by 90%:

_added general rule configuration for ontick frame skips, default value: 'ontickFrameSkip=10'

_added configuration for marker display frame skips when active (Ctrl+M) default value: 'showmarkersFrameSkip=0' (this value minimizes the problem of WP ID texts flashing on the screen)

After creating many spawn WayPoints in an area, the script was consuming so much resource that the FPS would drop by half while the player was within that wp radius, with this treatment in the script's general management control, the script now consumes less than 10% of what it was consulting. With almost zero impact on the script's functionalities.

version 1.4:

New features for each wp:

_added the possibility for wp to spawn the vehicle with random modifications parts , windows, wheels, tires, stickers, engine, horn, bodywork, suspension, etc. According to the library available for each vehicle, supports mods, works incredibly well, but use it sparingly as it consumes a lot of memory.

_added the possibility of defining the amount of life of the ped to be spawned (default pedHP 200)

_added taks animation for the ped, for now it only performs the animation when stopped, use in wp together with the 'waiting time' column with at least 5000 (5 seconds) so that it has time to perform the animation for the determined time (scenarioTask option)

_added TrafficWaypointSpawner.pedTasks file to create task groups (works the same as the existing group function for vehicle/ped/weapons)

_added control of ped and vehicle spawn limit per wp (default 0 for disabled, consumes performance when enabled) use when you want to set a character/boss spawn so it doesn't multiply

_added Ctrl+R command to create route wp (wp without vehicle and ped)

_added Ctrl+G command to create vehicle wp parked (wp with vehicle without ped)

New general features:

_reorganized config file and added configurations of new features and others that were missing

_added general limit for the number of spawned peds, so a new ped is only generated when another is despawned from memory

_added line that displays the path between wp when displaying markers with ctrl+M (credits to @mitto_backup for the idea)

_added text on the screen displaying the wp ID when displaying markers with ctrl+M

Other adjustments:

_support for reading ini files (wp) from previous versions

_reworked logic for moving between wp, inserting several treatments so that vehicles and peds do not lose their route

_reworked script to improve memory management and deletion of despawned vehicle indexes

version 1.3:

_ peds now follow defined routes (credits to Bradshaw, JoyLucien and Niziul for the tips)

_ fixed problem with wp (vehicles and ped) not loading the weapon and group (now if model is invalid it loads the default weapon: unarmed)

_ fixed bug with wp PED not loading groups of ped models

_ vehicles now switch correctly between up to 3 different destination IDs

_ new created wp peds are saved with speed 1. (1=walk, 2=run). Change in the ini for each wp, or in the config for the next wp in the new line: pedSpeed=1

_ order of the current structure of the wp saved in the .ini file:
wp id, wp destination id A, wp destination id B, wp destination id C, X coordinate, Y coordinate, Z coordinate, R orientation, vehicle name or group, ped name or group, vehicle or ped speed, ped weapon name or group, interval between each spawn (value in seconds, max 9), time that the ped or vehicle will remain stopped in this wp before moving on to the next destination wp (value in milliseconds).

_ fixed many bugs, more features and other improvements are on the way :)

version 1.2: (deleted - many bugs)

_added function for up to 3 destination wp ids, the script still reads the old .ini. New wp's are created with 3 repeated destination ids, and vehicles will randomly go to route ids. Change the destination ids as needed. (credits to @TrueBest for the idea)

_the script still reads the old .ini, I released this update due to the impact of this function on the creation of wp's

version 1.1:

_ optimized script, reviewed route operation and added many other features.

_added in .config the default vehiclemodel for the next wpboost created

_ added Ctrl+H command to create ped wp (a new wp is created in .ini where the vehiclemodel column is blank). For now, the spawned Ped still does not move on to the next wp.

_ reviewed the logic for creating wp id, now the script always continues from the last generated id, no longer counting from the number of lines or the generated file, so that there are no repeated wp id numbers and causing route bugs.

_ added vehicle/ped/weapon groups function, just change the model name to that of a created group and the models included in that group will be randomly spawned, the script dynamically identifies whether the name is of a model or a valid group. (credits to @JoyLucien for the idea)

_added function to read multiple .ini route files, now the wp are saved in the file with the name defined by the player, if the file does not exist the script will create it, the ini files are now inside the TrafficWaypointAreaMap folder in scripts (credits to @JoyLucien for the idea)

_fixed bug of the vehicle entering autopilot mode while the player is driving

_added the following group files to the scripts folder
TrafficWaypointSpawner.pedgroups (pedestrian groups)
TrafficWaypointSpawner.vehgroups (vehicle groups)
TrafficWaypointSpawner.wpngroups (weapon groups)

-you can create the group with the name you want followed by the modelid of each group, respecting the rule of one group per line, there is no limit of vehicles per group, however too many models loaded can cause the game to close. The name can be changed in the .config file, or in each wp generated in the .ini file

NOTE: copy the new .config file that has the new settings and the most optimized WP creation distances that I found

NOTE2: if you have already created WPs in the previous version, just place your file inside the TrafficWaypointAreaMap folder, and continue creating it.

STC - Simple Traffic Creator version 1.0:

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.


---------------------------------- PUT THE FILES IN SCRIPT FOLDER
Show Full Description

Carregat per primera vegada: 13 de Març de 2025
Actualització més recent: fa 3 dies
Últim descarregat: Fa 1 hora

All Versions

 1.7 (current)

92 descàrregues , 20 KB
fa 3 dies

 1.6

138 descàrregues , 20 KB
fa 9 dies

 1.5

146 descàrregues , 20 KB
09 de Abril de 2025

 1.4

134 descàrregues , 20 KB
07 de Abril de 2025

 1.3

222 descàrregues , 3 MB
24 de Març de 2025

 1.1

120 descàrregues , 3 MB
16 de Març de 2025

 1.0

259 descàrregues , 6 KB
13 de Març de 2025

79 Comentaris