Warsheep

[Guide] Custom Vehicle Spawn (Air/Ground/Water)

65 posts in this topic

Posted (edited)

Enable Boats near coast and Helicopters near Airfields
Enable collored debugmarkers
Enable 2 debug logs (full/important)
a lot of more 

Example for debugmarkers

Spoiler

Black Air

Blue Water

Green Ground

Yellow Spawnzone

20160814212422_1.jpg
Only with 2 steps

Step1:
overwrite in 

exile_server_config\config.cpp
the whole class VehicleSpawn 

Spoiler

class VehicleSpawn
    {    
        /**
        * Array of hotspots Positions 
        * not included now
        **/
        hotSpots[] =
        {};
        /**
        * Array of blacklisted Positions
        * not included now
        **/
        blackList[] =
        {};
        /**
        *chosed loging format
        **/
        vehicleDebugLog = 1; //"0"=Disabled "1"=Full "2"=Important
        /**
        * Vehicle ammount 
        * donot set rhis to high,
        * serverstart will take long time 
        * 70 Vehicles ~ 3 minutes
        */
        groundVehicleAmount = 40; //"0"=Disabled
        waterVehicleAmount = 20; //"0"=Disabled
        airVehicleAmount = 10; //"0"=Disabled
        /**
        * Creates global markers for vehicle spawn tweeking,
        * after you are satisfied with vehicle ammount and spread set this to 0.
        */
        groundDebugMarkers = 1; //"0"=Disabled "1"=Enabled
        waterDebugMarkers = 1; //"0"=Disabled "1"=Enabled
        airDebugMarkers = 1; //"0"=Disabled "1"=Enabled
        /**
         * Radius of spawn around Road/Coast/Airfields
         * Dont set it smaller then 50
         */
        groundSpawnRadius = 100; //around Roads
        waterSpawnRadius = 50; //around Coasts
        airSpawnRadius = 200; //around Airfields +750(default)
        /**
        * The server will apply random damage up to this value when spawning a vehicle.
        */
        groundDamageChance = 20; // 20% chance for a vehicle HITPOINT to be damaged
        waterDamageChance = 20; // 20% chance for a vehicle HITPOINT to be damaged
        airDamageChance = 20; // 20% chance for a vehicle HITPOINT to be damaged
        
        groundMaximumDamage = 10; // vehicle HITPOINT to be damaged
        waterMaximumDamage = 10; // vehicle HITPOINT to be damaged
        airMaximumDamage = 10; // vehicle HITPOINT to be damaged
        /**
         * Enables or disables nightvision optics on ALL vehicles
         *
         * 0 = off
         * 1 = on
         */
        NightVision = 1;

        /**
         * Enables or disables thermal optics on ALL vehicles
         *
         * 0 = off
         * 1 = on
         */
        ThermalVision = 1;

        /**
         * Set this to 1 to unlock vehicles on server boot if they are in safe zones
         *
         * 0 = off
         * 1 = on
         */
        UnlockInSafeZonesAfterRestart = 1;

        // Stuff to spawn on roads
        ground[] = 
        {
            
            "Exile_Car_BRDM2_HQ",
            "Exile_Car_BTR40_MG_Camo",
            "Exile_Car_BTR40_Camo",
            "Exile_Car_Golf_Black",
            "Exile_Car_Hatchback_Black",
            "Exile_Car_Hatchback_Sport_Admin",
            "Exile_Car_HEMMT",
            "Exile_Car_HMMWV_M134_Desert",
            "Exile_Car_HMMWV_M2_Desert",
            "Exile_Car_HMMWV_UNA_Desert",
            "Exile_Car_Hunter",
            "Exile_Car_Ifrit",
            "Exile_Car_Ikarus_Party",
            "Exile_Car_Kart_RedStone",
            "Exile_Car_Lada_Hipster",
            "Exile_Car_LandRover_Urban",
            "Exile_Car_LandRover_Ambulance_Green",
            "Exile_Car_MB4WD",
            "Exile_Car_MB4WDOpen",
            "Exile_Car_Octavius_Black",
            "Exile_Car_Offroad_Guerilla06",
            "Exile_Car_Offroad_Armed_Guerilla12",
            "Exile_Car_Offroad_Repair_Civillian",
            "Exile_Car_OldTractor_Red",
            "Exile_Car_ProwlerUnarmed",
            "Exile_Car_QilinUnarmed",
            "Exile_Car_Strider",
            "Exile_Car_SUV_Black",
            "Exile_Car_SUVXL_Black",
            "Exile_Car_SUV_Armed_Black",
            "Exile_Car_Tempest",
            "Exile_Car_TowTractor_White",
            "Exile_Car_Tractor_Red",
            "Exile_Car_UAZ_Green",
            "Exile_Car_UAZ_Open_Green",
            "Exile_Car_Ural_Covered_Military",
            "Exile_Car_Ural_Open_Military",
            "Exile_Car_V3S_Covered",
            "Exile_Car_V3S_Open",
            "Exile_Car_Van_Guerilla02",
            "Exile_Car_Van_Box_Guerilla04",
            "Exile_Car_Van_Fuel_Guerilla03",
            "Exile_Car_Volha_Black",
            "Exile_Car_Zamak",
            "Exile_Car_MountainBike",
            "Exile_Car_OldBike",
            "Exile_Car_QuadBike_Csat"
        };
        
        // Stuff to spawn on water
        water[] = 
        {
            "Exile_Car_BRDM2_HQ",
            "Exile_Car_Strider",
            "Exile_Boat_MotorBoat_Police",
            "Exile_Boat_MotorBoat_Orange",
            "Exile_Boat_MotorBoat_White",
            "Exile_Boat_RubberDuck_CSAT",
            "Exile_Boat_RubberDuck_Digital",
            "Exile_Boat_RubberDuck_Orange",
            "Exile_Boat_RubberDuck_Blue",
            "Exile_Boat_RubberDuck_Black",
            "Exile_Boat_SDV_CSAT",
            "Exile_Boat_SDV_Digital",
            "Exile_Boat_SDV_Grey"
        };
        
        // Stuff to spawn on airfield
        air[] = 
        {
            "Exile_Chopper_Hellcat_Green",
            "Exile_Chopper_Huey_Green",
            "Exile_Chopper_Huey_Armed_Green",
            "Exile_Chopper_Hummingbird_Green",
            "Exile_Chopper_Hummingbird_Civillian_ION",
            "Exile_Chopper_Huron_Black",
            "Exile_Chopper_Mohawk_FIA",
            "Exile_Chopper_Orca_CSAT",
            "Exile_Chopper_Taru_CSAT",
            "Exile_Chopper_Taru_Covered_CSAT",
            "Exile_Chopper_Taru_Transport_CSAT",
            "Exile_Plane_AN2_Green",
            "Exile_Plane_BlackfishInfantry",
            "Exile_Plane_BlackfishVehicle",
            "Exile_Plane_Ceasar",
            "Exile_Plane_Cessna"
        };
    
    };

Step 2
overwrite the whole 

exile_server\code\ExileServer_world_spawnVehicles content
 

Spoiler

/**
 * ExileServer_world_spawnVehicles
 * edited by Warsheep(GER)
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_worldName","_worldSize","_middle","_quarter","_threeQuarter","_southwestPos","_southPos","_southeastPos","_westPos","_middlPos","_eastPos","_northwestPos","_northPos","_northeastPos","_groundVehicleAmount","_waterVehicleAmount","_airVehicleAmount","_vehicleAmount","_vehicleCount","_errorCount","_ground","_groundVehicleCount","_groundVehicleClassNames","_groundDebugMarkers","_groundDebugMarker","_groundSpawnRadiusRoad","_groundDamageChance","_groundMaximumDamage","_water","_waterVehicleCount","_waterVehicleClassNames","_waterDebugMarkers","_waterDebugMarker","_waterSpawnRadiusCoast","_waterDamageChance","_waterMaximumDamage","_air","_airVehicleCount","_airVehicleClassNames","_airDebugMarkers","_airDebugMarker","_airSpawnRadiusAirField","_airDamageChance","_airMaximumDamage","_mapPos","_spawnedPositions","_airportPositions"];

_debugLog                    = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehicleDebugLog");

_worldName                     = worldName;
_worldSize                    = worldSize;
_middle                        = worldSize / 2;
_quarter                    = worldSize / 4;
_threeQuarter                = _quarter * 3;

_southwestPos                = [_quarter,_quarter,0];
_southPos                    = [_middle,_quarter,0];
_southeastPos                = [_threeQuarter,_quarter,0];
_westPos                    = [_quarter,_middle,0];
_middlPos                    = [_middle,_middle,0];
_eastPos                    = [_threeQuarter,_middle,0];
_northwestPos                = [_quarter,_threeQuarter,0];
_northPos                    = [_middle,_threeQuarter,0];
_northeastPos                = [_threeQuarter,_threeQuarter,0];

_groundVehicleAmount            = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "groundVehicleAmount");
_waterVehicleAmount                = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "waterVehicleAmount");
_airVehicleAmount                = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "airVehicleAmount");
_vehicleAmount                    = _groundVehicleAmount + _waterVehicleAmount + _airVehicleAmount;
_vehicleCount                    = 0;
_errorCount                        = 0;

if(_vehicleAmount isEqualTo 0)exitWith{
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Spawning Dynamic Vehicles Disabled."] call ExileServer_util_log;
    };
};

if(_groundVehicleAmount isEqualTo 0) then {
    _ground                     = 0;
    if(_debugLog >= 1) then {                    
        format ["||WARSHEEP||Spawning Dynamic Ground Vehicles Disabled."] call ExileServer_util_log;
    };
}else{ 
    _ground                     = 1;
    _groundVehicleCount            = 0;
    _groundVehicleClassNames    = getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "ground");
    _groundDebugMarkers            = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "groundDebugMarkers")) isEqualTo 1);
    _groundSpawnRadiusRoad        = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "groundSpawnRadius");
    _groundDamageChance            = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "groundDamageChance");
    _groundMaximumDamage        = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "groundMaximumDamage");
};

if(_waterVehicleAmount isEqualTo 0) then {
    _water                         = 0;
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Spawning Dynamic Water Vehicles Disabled."] call ExileServer_util_log;
    };
}else{ 
    _water                         = 1;
    _waterVehicleCount            = 0;
    _waterVehicleClassNames        = getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "water");
    _waterDebugMarkers            = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "waterDebugMarkers")) isEqualTo 1);
    _waterSpawnRadiusCoast        = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "waterSpawnRadius");
    _waterDamageChance            = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "waterDamageChance");
    _waterMaximumDamage            = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "waterMaximumDamage");
};

if(_airVehicleAmount isEqualTo 0) then {
    _air                         = 0;
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Spawning Dynamic Air Vehicles Disabled."] call ExileServer_util_log;
    };
}else{ 
    _air                         = 1;
    _airVehicleCount            = 0;
    _airVehicleClassNames        = getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "air");
    _airDebugMarkers            = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "airDebugMarkers")) isEqualTo 1);
    _airSpawnRadiusAirField        = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "airSpawnRadius");
    _airDamageChance            = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "airDamageChance");
    _airMaximumDamage            = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "airMaximumDamage");
};

_mapPos                     = [_southwestPos,_middlPos,_southPos,_middlPos,_southeastPos,_middlPos,_westPos,_middlPos,_eastPos,_middlPos,_northwestPos,_middlPos,_northPos,_middlPos,_northeastPos,_middlPos];
_spawnedPositions             = [];
_airportPositions             = call ExileClient_util_world_getAllAirportPositions;

if(_debugLog >= 1) then {
    format ["||WARSHEEP||Spawning Dynamic Vehicles. Config loaded!"] call ExileServer_util_log;
};
while {_vehicleCount < _vehicleAmount} do {
    if (_ground isEqualTo 1) then {
        if (_groundVehicleCount < _groundVehicleAmount) then {
            _pos = selectRandom _mapPos;
            _vehiclePosition = [_pos, _middle] call ExileClient_util_world_findRoadPosition;
            _positionReal = [_vehiclePosition, 1, _groundSpawnRadiusRoad, 2, 0 , 0 , 0 , _spawnedPositions] call BIS_fnc_findSafePos;
            if(count _positionReal isEqualTo 3 ) then {
                _groundVehicleAmount = _groundVehicleAmount - 1;
                _vehicleAmount = _vehicleAmount - 1;
                _errorCount = _errorCount + 1;
                _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]];
                _spawnedPositions pushBack _spawnControl;
                if(_debugLog isEqualTo 1) then {
                    format ["||WARSHEEP||%1 Error Position",_positionReal] call ExileServer_util_log;
                };
            }else{
                _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]];
                _spawnedPositions pushBack _spawnControl;
                _positionReal pushBack 0;
                _vehicleClassName = selectRandom _groundVehicleClassNames;
                _vehicle = [_vehicleClassName, _positionReal, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle;
                if(_debugLog isEqualTo 1) then {
                    format ["||WARSHEEP||%1 Spawned",_vehicleClassName] call ExileServer_util_log;
                };
                _hitpointsData = getAllHitPointsDamage _vehicle;
                if !(_hitpointsData isEqualTo []) then {
                    _hitpoints = _hitpointsData select 0;{
                        if ((random 100) < _groundDamageChance) then{
                            _vehicle setHitPointDamage [_x, random _groundMaximumDamage];
                        };
                    }forEach _hitpoints;
                };
                if (_groundDebugMarkers) then{
                    _groundDebugMarker = createMarker ["vehicleMarkerGround#"+str _groundVehicleCount, _positionReal];
                    _groundDebugMarker setMarkerColor "ColorGreen";
                    _groundDebugMarker setMarkerType "mil_dot_noShadow";
                };
                _groundVehicleCount = _groundVehicleCount + 1;
                _vehicleCount = _vehicleCount + 1;
            };
        }else{
            _ground = 0;
        };
    };
    
    if (_water isEqualTo 1) then {
        if (_waterVehicleCount < _waterVehicleAmount) then {
            _pos = selectRandom _mapPos;
            _vehiclePosition = [_pos, 1, _middle, 2, 1, 0, 1, _spawnedPositions] call BIS_fnc_findSafePos;
            _posSafe = _vehiclePosition call ExileClient_util_world_findCoastPosition;
            _positionReal = [_posSafe, 1, _waterSpawnRadiusCoast, 1, 2 , 0 , 0 , _spawnedPositions] call BIS_fnc_findSafePos;
            if(count _positionReal isEqualTo 3 ) then {
                _waterVehicleAmount = _waterVehicleAmount - 1;
                _vehicleAmount = _vehicleAmount - 1;
                _errorCount = _errorCount + 1;
                _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]];
                _spawnedPositions pushBack _spawnControl;
                if(_debugLog isEqualTo 1) then {
                    format ["||WARSHEEP||%1 Error Position",_positionReal] call ExileServer_util_log;
                };
            }else{
                _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]];
                _spawnedPositions pushBack _spawnControl;
                _positionReal pushBack 0;
                _vehicleClassName = selectRandom _waterVehicleClassNames;
                _vehicle = [_vehicleClassName, _positionReal, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle;
                if(_debugLog isEqualTo 1) then {
                    format ["||WARSHEEP||%1 Spawned",_vehicleClassName] call ExileServer_util_log;
                };
                _hitpointsData = getAllHitPointsDamage _vehicle;
                if !(_hitpointsData isEqualTo []) then {
                    _hitpoints = _hitpointsData select 0;{
                        if ((random 100) < _waterDamageChance) then{
                            _vehicle setHitPointDamage [_x, random _waterMaximumDamage];
                        };
                    }forEach _hitpoints;
                };
                if (_waterDebugMarkers) then{
                    _waterDebugMarker = createMarker ["vehicleMarkerWater#"+str _waterVehicleCount, _positionReal];
                    _waterDebugMarker setMarkerColor "ColorBlue";
                    _waterDebugMarker setMarkerType "mil_dot_noShadow";
                };
                _waterVehicleCount = _waterVehicleCount + 1;
                _vehicleCount = _vehicleCount + 1;
            };
        }else{
            _water = 0;
        };
    };
    
    if (_air isEqualTo 1) then {
        if (_airVehicleCount < _airVehicleAmount) then {
            _pos = selectRandom _airportPositions;
            _vehiclePosition = [_pos, 750] call ExileClient_util_world_findRoadPosition;
            _positionReal = [_vehiclePosition, 1, _airSpawnRadiusAirField, 7, 0 , 0 , 0 , _spawnedPositions] call BIS_fnc_findSafePos;
            if(count _positionReal isEqualTo 3 ) then {
                _airVehicleAmount = _airVehicleAmount - 1;
                _vehicleAmount = _vehicleAmount - 1;
                _errorCount = _errorCount + 1;    
                _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]];
                _spawnedPositions pushBack _spawnControl;
                if(_debugLog isEqualTo 1) then {
                    format ["||WARSHEEP||%1 Error Position",_positionReal] call ExileServer_util_log;
                };
            }else{
                _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]];
                _spawnedPositions pushBack _spawnControl;
                _positionReal pushBack 0;
                _vehicleClassName = selectRandom _airVehicleClassNames;
                _vehicle = [_vehicleClassName, _positionReal, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle;
                if(_debugLog isEqualTo 1) then {
                    format ["||WARSHEEP||%1 Spawned",_vehicleClassName] call ExileServer_util_log;
                };
                _hitpointsData = getAllHitPointsDamage _vehicle;
                if !(_hitpointsData isEqualTo []) then {
                    _hitpoints = _hitpointsData select 0;{
                        if ((random 100) < _airDamageChance) then{
                            _vehicle setHitPointDamage [_x, random _airMaximumDamage];
                        };
                    }forEach _hitpoints;
                };
                if (_airDebugMarkers) then{
                    _airDebugMarker = createMarker ["vehicleMarkerAir#"+str _airVehicleCount, _positionReal];
                    _airDebugMarker setMarkerColor "ColorBlack";
                    _airDebugMarker setMarkerType "mil_dot_noShadow";
                };
                _airVehicleCount = _airVehicleCount + 1;
                _vehicleCount = _vehicleCount + 1;
            };
        }else{
            _air = 0;
        };
    };
};
if (_errorCount > 0)then {
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Dynamic Vehicles Error. Count : %1",_errorCount] call ExileServer_util_log;
    };
};
if (_groundVehicleAmount > 0) then {
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Dynamic Ground Vehicles Spawned. Count : %1/%2",_groundVehicleCount,_groundVehicleAmount] call ExileServer_util_log;
    };
};
if (_waterVehicleAmount > 0) then {
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Dynamic Water Vehicles Spawned. Count : %1/%2",_waterVehicleCount,_waterVehicleAmount] call ExileServer_util_log;
    };
};
if (_airVehicleAmount > 0) then {
    if(_debugLog >= 1) then {
        format ["||WARSHEEP||Dynamic Air Vehicles Spawned. Count : %1/%2",_airVehicleCount,_airVehicleAmount] call ExileServer_util_log;
    };
};
if(_debugLog >= 1) then {
        format ["||WARSHEEP||Dynamic Vehicles Spawned. Count : %1/%2",_vehicleCount,_vehicleAmount] call ExileServer_util_log;
};

Extras (spawnzone debug markers)

1.add in class BambiSettings

exile_server_config\config.cpp

Spoiler

/**
        * Creates global markers for vehicle spawn tweeking,
        * after you are satisfied with vehicle ammount and spread set this to 0.
        */
        vehiclesDebugMarkers = 0;


2.overwrite the full
exile_server\code\ExileServer_world_spawnSpawnZoneVehicles

Spoiler

/**
 * ExileServer_world_spawnSpawnZoneVehicles
 * editet by warsheep(GER)
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_debugMarker","_debugMarkers","_vehicleCount","_spawnRadius","_vehiclesToSpawn","_markerName","_markerCenterPosition","_numberOfVehiclesToSpawn","_vehicleClassName","_i","_vehiclePosition","_vehicleDirection"];
"Creating spawn zone vehicles..." call ExileServer_util_log;
_debugMarkers = ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "vehiclesDebugMarkers")) isEqualTo 1);
_vehicleCount = 0;
_spawnRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius");
_vehiclesToSpawn = getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneVehicles");
{
    _markerName = _x;
    if (getMarkerType _markerName == "ExileSpawnZone") then
    {
        _markerCenterPosition = getMarkerPos _markerName;
        {
            _numberOfVehiclesToSpawn = _x select 0;
            _vehicleClassName = _x select 1;
            for "_i" from 1 to _numberOfVehiclesToSpawn do
            {
                _vehiclePosition = [_markerCenterPosition, _spawnRadius] call ExileClient_util_world_findRoadPosition;
                if(_vehiclePosition isEqualTo [])exitWith{};
                _vehicleDirection = (random 360);
                [_vehicleClassName, _vehiclePosition, _vehicleDirection, true] call ExileServer_object_vehicle_createNonPersistentVehicle;
            };
            if (_debugMarkers) then
            {
                _debugMarker = createMarker ["vehicleMarkerSpawn#"+str _vehicleCount, _vehiclePosition];
                _debugMarker setMarkerColor "ColorYellow";
                _debugMarker setMarkerType "mil_dot_noShadow";
            };
            _vehicleCount = _vehicleCount + 1;
        }
        forEach _vehiclesToSpawn;
    };
}
forEach allMapMarkers;

format ["Dynamic Spawn Zone Vehicle spawned. Count : %1",_vehicleCount] call ExileServer_util_log;
true

 

 

fix for kohlrabi update 

 

Edited by Warsheep
9 people like this

Share this post


Link to post
Share on other sites

Posted (edited)

overworked 

 

if u have any wishes or some feedback/bugs ec. tell me :D

Edited by Warsheep

Share this post


Link to post
Share on other sites
Advertisement

Awesome this is so cool and what i was searching for. Thanks a bunch. :D

Share this post


Link to post
Share on other sites
2 hours ago, serveratze said:

hi @Warsheep  unlock vehicles after restart not work in a safe zone.  I hope they can help me  

 

        /**
         * Set this to 1 to unlock vehicles on server boot if they are in safe zones
         *
         * 0 = off
         * 1 = on
         */
        UnlockInSafeZonesAfterRestart = 1;

night vision and thermal not work all disables

my settings:

        /**
         * Enables or disables nightvision optics on ALL vehicles
         *
         * 0 = off
         * 1 = on
         */
        nightVision = 1;

        /**
         * Enables or disables thermal optics on ALL vehicles
         *
         * 0 = off
         * 1 = on
         */
        thermalVision = 1;

ahh sry my mistake. 
mainpost updatet.

fix:
u need to change  in ur exile_server_config 

Spoiler

class VehiclesSpawn

to 

Spoiler

class VehicleSpawn


and in all 3  ExileServer_world_spawnVehiclesXxx.sqf
in the lines 15-22 change

Spoiler

configFile >> "CfgSettings" >> "VehiclesSpawn" >> 


to

Spoiler

configFile >> "CfgSettings" >> "VehicleSpawn" >>


its just a misstaket S 
changed to often the classname in my files , im sorry

Share this post


Link to post
Share on other sites

Posted (edited)

3 hours ago, Warsheep said:

your welcome

 

Edit:
files download enabled now here

mainpost updated for the download

thanks for this man, its awesome, 

just one question 

how do i change this to have a 50% chance of damage? 

        groundDamageChance = 0; // 20% chance for a vehicle HITPOINT to be damaged

Edited by blaez

Share this post


Link to post
Share on other sites
46 minutes ago, blaez said:

thanks for this man, its awesome, 

just one question 

how do i change this to have a 50% chance of damage? 

        groundDamageChance = 0; // 20% chance for a vehicle HITPOINT to be damaged

its standart 20 so u need to be 50 

Share this post


Link to post
Share on other sites
1 hour ago, Warsheep said:

its standart 20 so u need to be 50 

ive been messing about with it for ages and i cant seem too get it just right, i want is some of the cars too spawn without a wheel or two

Share this post


Link to post
Share on other sites
1 hour ago, blaez said:

ive been messing about with it for ages and i cant seem too get it just right, i want is some of the cars too spawn without a wheel or two

then u need to ad some damagechance higher 
  groundDamageChance = 50; // 20% chance for a vehicle HITPOINT to be damaged

groundMaximumDamage = 60; // vehicle HITPOINT to be damaged

Share this post


Link to post
Share on other sites

Posted (edited)

fixed classnames (missed to removed my tank stuff/added all exile classnames)

todo findout cessna amphibian classname 

exile_server_config/config.cpp

Spoiler

class VehicleSpawn
    {    
        /** Grid Size for Vehicle spawning,
        * smaller the number more Vehicle,
        * you get the point
        */
        groundGridSize = 10000;
        waterGridSize = 10000;
        airGridSize = 10000;

        /**
        * Vehicle ammount per grid
        * kinda self explanitory
        */
        groundGridAmount = 17;
        waterGridAmount = 5;
        airGridAmount = 7;
        /**
        * Creates global markers for vehicle spawn tweeking,
        * after you are satisfied with vehicle ammount and spread set this to 0.
        */
        groundDebugMarkers = 0;
        waterDebugMarkers = 0;
        airDebugMarkers = 0;
        /**
         * Radius of spawn around Airport.
         */
        groundSpawnRadius = 9000;
        waterSpawnRadius = 5000;
        airSpawnRadius = 2000;
        /**
         * Radius of spawn around Road/Coast
         */
        groundSpawnRadiusRoad = 10;
        waterSpawnRadiusCoast = 50;
        airSpawnRadiusRoad = 50;
        /**
        * The server will apply random damage up to this value when spawning a vehicle.
        */
        groundDamageChance = 0; // 20% chance for a vehicle HITPOINT to be damaged
        waterDamageChance = 0; // 20% chance for a vehicle HITPOINT to be damaged
        airDamageChance = 0; // 20% chance for a vehicle HITPOINT to be damaged
        
        groundMaximumDamage = 0; // vehicle HITPOINT to be damaged
        waterMaximumDamage = 0; // vehicle HITPOINT to be damaged
        airMaximumDamage = 0; // vehicle HITPOINT to be damaged
        /**
         * Enables or disables nightvision optics on ALL vehicles
         *
         * 0 = off
         * 1 = on
         */
        NightVision = 1;

        /**
         * Enables or disables thermal optics on ALL vehicles
         *
         * 0 = off
         * 1 = on
         */
        ThermalVision = 1;

        /**
         * Set this to 1 to unlock vehicles on server boot if they are in safe zones
         *
         * 0 = off
         * 1 = on
         */
        UnlockInSafeZonesAfterRestart = 1;

        // Stuff to spawn on roads
        ground[] = 
        {
            
            "Exile_Bike_OldBike",
            "Exile_Bike_MountainBike",
            "Exile_Bike_QuadBike_Black",
            "Exile_Bike_QuadBike_Blue",
            "Exile_Bike_QuadBike_Red",
            "Exile_Bike_QuadBike_White",
            "Exile_Bike_QuadBike_Nato",
            "Exile_Bike_QuadBike_Csat",
            "Exile_Bike_QuadBike_Fia",
            "Exile_Bike_QuadBike_Guerilla01",
            "Exile_Bike_QuadBike_Guerilla02",
            "Exile_Car_Kart_BluKing",
            "Exile_Car_Kart_RedStone",
            "Exile_Car_Kart_Vrana",
            "Exile_Car_Kart_Green",
            "Exile_Car_Kart_Blue",
            "Exile_Car_Kart_Orange",
            "Exile_Car_Kart_White",
            "Exile_Car_Kart_Yellow",
            "Exile_Car_Kart_Black",
            "Exile_Car_Kart_Yellow",
            "Exile_Car_Kart_Yellow",
            "Exile_Car_Kart_Yellow",
            "Exile_Car_Hatchback_Beige",
            "Exile_Car_Hatchback_Green",
            "Exile_Car_Hatchback_Blue",
            "Exile_Car_Hatchback_BlueCustom",
            "Exile_Car_Hatchback_BeigeCustom",
            "Exile_Car_Hatchback_Yellow",
            "Exile_Car_Hatchback_Grey",
            "Exile_Car_Hatchback_Black",
            "Exile_Car_Hatchback_Dark",
            "Exile_Car_Hatchback_Rusty1",
            "Exile_Car_Hatchback_Rusty2",
            "Exile_Car_Hatchback_Rusty3",
            "Exile_Car_Ikarus_Blue",
            "Exile_Car_Ikarus_Red",
            "Exile_Car_Ikarus_Party",
            "Exile_Car_Ural_Open_Blue",
            "Exile_Car_Ural_Open_Yellow",
            "Exile_Car_Ural_Open_Worker",
            "Exile_Car_Ural_Open_Military",
            "Exile_Car_Ural_Covered_Blue",
            "Exile_Car_Ural_Covered_Yellow",
            "Exile_Car_Ural_Covered_Worker",
            "Exile_Car_Ural_Covered_Military",
            "Exile_Car_SUVXL_Black",
            "Exile_Car_Tractor_Red",
            "Exile_Car_OldTractor_Red",
            "Exile_Car_TowTractor_White",
            "Exile_Car_Octavius_White",
            "Exile_Car_Octavius_Black",
            "Exile_Car_UAZ_Green",
            "Exile_Car_UAZ_Open_Green",
            "Exile_Car_LandRover_Red",
            "Exile_Car_LandRover_Urban",
            "Exile_Car_LandRover_Green",
            "Exile_Car_LandRover_Sand",
            "Exile_Car_LandRover_Desert",
            "Exile_Car_LandRover_Ambulance_Green",
            "Exile_Car_LandRover_Ambulance_Desert",
            "Exile_Car_LandRover_Ambulance_Sand",
            "Exile_Car_Lada_Green",
            "Exile_Car_Lada_Taxi",
            "Exile_Car_Lada_Red",
            "Exile_Car_Lada_White",
            "Exile_Car_Lada_Hipster",
            "Exile_Car_Volha_Blue",
            "Exile_Car_Volha_White",
            "Exile_Car_Volha_Black",
            "Exile_Car_Hatchback_Sport_Red",
            "Exile_Car_Hatchback_Sport_Blue",
            "Exile_Car_Hatchback_Sport_Orange",
            "Exile_Car_Hatchback_Sport_White",
            "Exile_Car_Hatchback_Sport_Beige",
            "Exile_Car_Hatchback_Sport_Green",
            "Exile_Car_HEMMT",
            "Exile_Car_Hunter",
            "Exile_Car_Ifrit",
            "Exile_Car_Offroad_Red",
            "Exile_Car_Offroad_Beige",
            "Exile_Car_Offroad_White",
            "Exile_Car_Offroad_Blue",
            "Exile_Car_Offroad_DarkRed",
            "Exile_Car_Offroad_BlueCustom",
            "Exile_Car_Offroad_Guerilla01",
            "Exile_Car_Offroad_Guerilla02",
            "Exile_Car_Offroad_Guerilla03",
            "Exile_Car_Offroad_Guerilla04",
            "Exile_Car_Offroad_Guerilla05",
            "Exile_Car_Offroad_Guerilla06",
            "Exile_Car_Offroad_Guerilla07",
            "Exile_Car_Offroad_Guerilla08",
            "Exile_Car_Offroad_Guerilla09",
            "Exile_Car_Offroad_Guerilla10",
            "Exile_Car_Offroad_Guerilla11",
            "Exile_Car_Offroad_Guerilla12",
            "Exile_Car_Offroad_Rusty1",
            "Exile_Car_Offroad_Rusty2",
            "Exile_Car_Offroad_Rusty3",
            "Exile_Car_Offroad_Armed_Guerilla01",
            "Exile_Car_Offroad_Armed_Guerilla02",
            "Exile_Car_Offroad_Armed_Guerilla03",
            "Exile_Car_Offroad_Armed_Guerilla04",
            "Exile_Car_Offroad_Armed_Guerilla05",
            "Exile_Car_Offroad_Armed_Guerilla06",
            "Exile_Car_Offroad_Armed_Guerilla07",
            "Exile_Car_Offroad_Armed_Guerilla08",
            "Exile_Car_Offroad_Armed_Guerilla09",
            "Exile_Car_Offroad_Armed_Guerilla10",
            "Exile_Car_Offroad_Armed_Guerilla11",
            "Exile_Car_Offroad_Armed_Guerilla12",
            "Exile_Car_Offroad_Repair_Civillian",
            "Exile_Car_Offroad_Repair_Red",
            "Exile_Car_Offroad_Repair_Beige",
            "Exile_Car_Offroad_Repair_White",
            "Exile_Car_Offroad_Repair_Blue",
            "Exile_Car_Offroad_Repair_DarkRed",
            "Exile_Car_Offroad_Repair_BlueCustom",
            "Exile_Car_Offroad_Repair_Guerilla01",
            "Exile_Car_Offroad_Repair_Guerilla02",
            "Exile_Car_Offroad_Repair_Guerilla03",
            "Exile_Car_Offroad_Repair_Guerilla04",
            "Exile_Car_Offroad_Repair_Guerilla05",
            "Exile_Car_Offroad_Repair_Guerilla06",
            "Exile_Car_Offroad_Repair_Guerilla07",
            "Exile_Car_Offroad_Repair_Guerilla08",
            "Exile_Car_Offroad_Repair_Guerilla09",
            "Exile_Car_Offroad_Repair_Guerilla10",
            "Exile_Car_Offroad_Repair_Guerilla11",
            "Exile_Car_Offroad_Repair_Guerilla12",
            "Exile_Car_Strider",
            "Exile_Car_SUV_Red",
            "Exile_Car_SUV_Black",
            "Exile_Car_SUV_Grey",
            "Exile_Car_SUV_Orange",
            "Exile_Car_Tempest",
            "Exile_Car_Van_Black",
            "Exile_Car_Van_White",
            "Exile_Car_Van_Red",
            "Exile_Car_Van_Guerilla01",
            "Exile_Car_Van_Guerilla02",
            "Exile_Car_Van_Guerilla03",
            "Exile_Car_Van_Guerilla04",
            "Exile_Car_Van_Guerilla05",
            "Exile_Car_Van_Guerilla06",
            "Exile_Car_Van_Guerilla07",
            "Exile_Car_Van_Guerilla08",
            "Exile_Car_Van_Box_Black",
            "Exile_Car_Van_Box_White",
            "Exile_Car_Van_Box_Red",
            "Exile_Car_Van_Box_Guerilla01",
            "Exile_Car_Van_Box_Guerilla02",
            "Exile_Car_Van_Box_Guerilla03",
            "Exile_Car_Van_Box_Guerilla04",
            "Exile_Car_Van_Box_Guerilla05",
            "Exile_Car_Van_Box_Guerilla06",
            "Exile_Car_Van_Box_Guerilla07",
            "Exile_Car_Van_Box_Guerilla08",
            "Exile_Car_Van_Fuel_Black",
            "Exile_Car_Van_Fuel_White",
            "Exile_Car_Van_Fuel_Red",
            "Exile_Car_Van_Fuel_Guerilla01",
            "Exile_Car_Van_Fuel_Guerilla02",
            "Exile_Car_Van_Fuel_Guerilla03",
            "Exile_Car_Zamak"
        };
        
        // Stuff to spawn on water
        water[] = 
        {
            "Exile_Boat_MotorBoat_Police",
            "Exile_Boat_MotorBoat_Orange",
            "Exile_Boat_MotorBoat_White",
            "Exile_Boat_RubberDuck_CSAT",
            "Exile_Boat_RubberDuck_Digital",
            "Exile_Boat_RubberDuck_Orange",
            "Exile_Boat_RubberDuck_Blue",
            "Exile_Boat_RubberDuck_Black",
            "Exile_Boat_SDV_CSAT",
            "Exile_Boat_SDV_Digital",
            "Exile_Boat_SDV_Grey"
        };
        
        // Stuff to spawn on airfield
        air[] = 
        {
            "Exile_Chopper_Huey_Green",
            "Exile_Chopper_Huey_Desert",
            "Exile_Chopper_Huey_Armed_Green",
            "Exile_Chopper_Huey_Armed_Desert",
            "Exile_Chopper_Hellcat_Green",
            "Exile_Chopper_Hellcat_FIA",
            "Exile_Chopper_Hummingbird_Green",
            "Exile_Chopper_Hummingbird_Civillian_Blue",
            "Exile_Chopper_Hummingbird_Civillian_Red",
            "Exile_Chopper_Hummingbird_Civillian_ION",
            "Exile_Chopper_Hummingbird_Civillian_BlueLine",
            "Exile_Chopper_Hummingbird_Civillian_Digital",
            "Exile_Chopper_Hummingbird_Civillian_Elliptical",
            "Exile_Chopper_Hummingbird_Civillian_Furious",
            "Exile_Chopper_Hummingbird_Civillian_GrayWatcher",
            "Exile_Chopper_Hummingbird_Civillian_Jeans",
            "Exile_Chopper_Hummingbird_Civillian_Light",
            "Exile_Chopper_Hummingbird_Civillian_Shadow",
            "Exile_Chopper_Hummingbird_Civillian_Sheriff",
            "Exile_Chopper_Hummingbird_Civillian_Speedy",
            "Exile_Chopper_Hummingbird_Civillian_Sunset",
            "Exile_Chopper_Hummingbird_Civillian_Vrana",
            "Exile_Chopper_Hummingbird_Civillian_Wasp",
            "Exile_Chopper_Hummingbird_Civillian_Wave",
            "Exile_Chopper_Huron_Black",
            "Exile_Chopper_Huron_Green",
            "Exile_Chopper_Mohawk_FIA",
            "Exile_Chopper_Orca_CSAT",
            "Exile_Chopper_Orca_Black",
            "Exile_Chopper_Orca_BlackCustom",
            "Exile_Chopper_Taru_Transport_CSAT",
            "Exile_Chopper_Taru_Transport_Black",
            "Exile_Chopper_Taru_CSAT",
            "Exile_Chopper_Taru_Black",
            "Exile_Chopper_Taru_Covered_CSAT",
            "Exile_Chopper_Taru_Covered_Black",
            "Exile_Plane_Cessna"
        };
    
    };

mainpost updated

Edited by Warsheep

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.