CassiusMaximus 10 Report post Posted October 30, 2015 Is there any mod to change so the spawning vehicles will spawn along the roads rather than in the open field? Share this post Link to post Share on other sites
Rod Serling 59 Report post Posted November 4, 2015 AVS (Advanced Vehicle System) can do this for Persistent vehicles. It's MIT licensed so you can take the code and adapt it for non-persistent vehicles aswell. Share this post Link to post Share on other sites
Guest Report post Posted April 18, 2016 Hello @CassiusMaximus, You don't need to add AVS just to spawn vehicles on road across the map, I have made a custom script that does this by overwriting ExileServer_world_spawnVehicles instead. gooby Share this post Link to post Share on other sites
kuplion 1785 Report post Posted April 18, 2016 1 hour ago, gooby said: Hello @CassiusMaximus, You don't need to add AVS just to spawn vehicles on road across the map, I have made a custom script that does this by overwriting ExileServer_world_spawnVehicles instead. gooby Any chance you could share this? Share this post Link to post Share on other sites
Guest Report post Posted April 18, 2016 12 minutes ago, kuplion said: Any chance you could share this? Sure! I have optimized the script for Chernarus, so make sure you know the position cords for your map. Define how many vehicles you want spawned: _max = 40; Representing the center of map: [7700, 8500, 0] Representing roads within radius 11,000 meters from center of map: nearRoads 11000 Replace file "ExileServer_world_spawnVehicles.sqf" in "@ExileServer/addons/exile_server/code" with this: private["_max", "_count", "_roads", "_road", "_position", "_vehicle", "_hitpoints"]; _max = 40; _count = 0; for "_i" from 1 to _max do { _road = getPos (([7700, 8500, 0] nearRoads 11000) call BIS_fnc_selectRandom); _position = [_road, 0, 5, 5, 0, 99999, 0] call BIS_fnc_findSafePos; _vehicle = [((getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "ground")) call BIS_fnc_selectRandom), _road, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle; _hitpoints = (getAllHitPointsDamage _vehicle) select 0; { if ((random 75) < (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "damageChance"))) then { _vehicle setHitPointDamage [_x, random (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "maximumDamage"))]; }; } forEach _hitpoints; _count = _count + 1; }; format ["Vehicles Spawned: %1", _count] call ExileServer_util_log; true Enjoy gooby Share this post Link to post Share on other sites
kuplion 1785 Report post Posted April 18, 2016 Brilliant, thank you. Share this post Link to post Share on other sites
blaez 10 Report post Posted May 23, 2016 On 4/18/2016 at 0:27 PM, gooby said: Sure! I have optimized the script for Chernarus, so make sure you know the position cords for your map. Define how many vehicles you want spawned: _max = 40; Representing the center of map: [7700, 8500, 0] Representing roads within radius 11,000 meters from center of map: nearRoads 11000 Replace file "ExileServer_world_spawnVehicles.sqf" in "@ExileServer/addons/exile_server/code" with this: private["_max", "_count", "_roads", "_road", "_position", "_vehicle", "_hitpoints"]; _max = 40; _count = 0; for "_i" from 1 to _max do { _road = getPos (([7700, 8500, 0] nearRoads 11000) call BIS_fnc_selectRandom); _position = [_road, 0, 5, 5, 0, 99999, 0] call BIS_fnc_findSafePos; _vehicle = [((getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "ground")) call BIS_fnc_selectRandom), _road, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle; _hitpoints = (getAllHitPointsDamage _vehicle) select 0; { if ((random 75) < (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "damageChance"))) then { _vehicle setHitPointDamage [_x, random (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "maximumDamage"))]; }; } forEach _hitpoints; _count = _count + 1; }; format ["Vehicles Spawned: %1", _count] call ExileServer_util_log; true Enjoy gooby what would i need to change to have the vehicles spawn with a random amount of damage say from 20% too 90%? i would like to have some of them spawn without wheels Share this post Link to post Share on other sites
Warsheep 126 Report post Posted May 23, 2016 why??????????? exile have alredy near road spawn inside his code , on ExileServer_world_spawnVehicles.sqf just take line 35 _positionReal = [_position, 25, _gridSize, 5, 0 , 1 , 0 , _spawnedPositions] call BIS_fnc_findSafePos; and take from ExileServer_world_spawnSpawnZoneVehicles.sqf line 26 _vehiclePosition = [_markerCenterPosition, _spawnRadius] call ExileClient_util_world_findRoadPosition; then just look for the variables and finished is the rdm roadspawn , u dont need to change all stuff clientside Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted May 25, 2016 On 4/18/2016 at 7:27 AM, gooby said: Sure! I have optimized the script for Chernarus, so make sure you know the position cords for your map. Define how many vehicles you want spawned: _max = 40; Representing the center of map: [7700, 8500, 0] Representing roads within radius 11,000 meters from center of map: nearRoads 11000 Replace file "ExileServer_world_spawnVehicles.sqf" in "@ExileServer/addons/exile_server/code" with this: private["_max", "_count", "_roads", "_road", "_position", "_vehicle", "_hitpoints"]; _max = 40; _count = 0; for "_i" from 1 to _max do { _road = getPos (([7700, 8500, 0] nearRoads 11000) call BIS_fnc_selectRandom); _position = [_road, 0, 5, 5, 0, 99999, 0] call BIS_fnc_findSafePos; _vehicle = [((getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "ground")) call BIS_fnc_selectRandom), _road, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle; _hitpoints = (getAllHitPointsDamage _vehicle) select 0; { if ((random 75) < (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "damageChance"))) then { _vehicle setHitPointDamage [_x, random (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "maximumDamage"))]; }; } forEach _hitpoints; _count = _count + 1; }; format ["Vehicles Spawned: %1", _count] call ExileServer_util_log; true Enjoy gooby @Eichi This would be a great feature of Exile - spawning vehicles "near" the roads to prevent them from spawning way out in "debug land". Share this post Link to post Share on other sites
kuplion 1785 Report post Posted May 25, 2016 8 minutes ago, BetterDeadThanZed said: @Eichi This would be a great feature of Exile - spawning vehicles "near" the roads to prevent them from spawning way out in "debug land". I agree. I've never understood why by default the majority of vehicles spawn in the middle of fields. Some, sure, but not all. Share this post Link to post Share on other sites