Sign in to follow this  
Followers 0
NRP

DMS Chernarus Zelenogorsk Bandit Mission

3 posts in this topic

Hi all,

This is my first contribution a Static AI mission for Chernarus in Zelenogorsk.

This has been tested by myself and a couple of players on my server and has no issues that i can see.

Mission name: Bandit Base

AI: 27 + 3 Static .50 cal gunners

2 x Loot crates.

Static base spawnable mission with Ai and crates with DMS.

a3_dms\config.sqf around line 286 to 292

Spoiler

    DMS_StaticMissionsOnServerStart =    [                                // List of STATIC missions with spawn chances.
                                            //"saltflats"            //<--Example
                                            //"slums"                //<--Example
                                            //"occupation"            //<--Example
                                            //"sectorB"                //<--Example for Taviana
                                            "zelenogorsk"
                                        ];

a3_dms\missions\static\zelenogorsk.sqf

Spoiler

/*
    "Zelenogorsk Bandit Base" static mission for Chernarus.
    Created by NRP
*/

// For logging purposes
_num = DMS_MissionCount;


// Set mission side (only "bandit" is supported for now)
_side = "bandit";

_pos = [2532.023,5068.978,0];

if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};


// Set general mission difficulty
_difficulty = "hardcore";


// Define spawn locations for AI Soldiers. These will be used for the initial spawning of AI as well as reinforcements.
// The center spawn location is added 3 times so at least 3 AI will spawn initially at the center location, and so that future reinforcements are more likely to spawn at the center.
_AISoldierSpawnLocations =
[
    [2528.1,5049.9,0],
    [2530.9,5092.6,0],
    [2482.5,5079.1,0],
    [2556.9,5125.8,0],
    [2563.3,5050.2,0],
    [2456.1,5047.2,0]
];

// Create AI
_AICount = 25 + (round (random 5));


_group =
[
    _AISoldierSpawnLocations+[_pos,_pos,_pos],            // Pass the regular spawn locations as well as the center pos 3x
    _AICount,
    _difficulty,
    "random",
    _side
] call DMS_fnc_SpawnAIGroup_MultiPos;


_staticGuns =
[
    [
        [2575.9,5106.4,0],
        [2530.4,5021.8,2.005],
        [2576.8,5051.2,2.005]
    ],
    _group,
    "assault",
    _difficulty,
    "bandit",
    "random"
] call DMS_fnc_SpawnAIStaticMG;

 

// Define the classnames and locations where the crates can spawn (at least 2, since we're spawning 2 crates)
_crateClasses_and_Positions =
[
    [[2523.9,5070.8,0.04],"I_CargoNet_01_ammo_F"],
    [[2531.1,5059.9,0.04],"I_CargoNet_01_ammo_F"],
    [[2516.2,5082.6,0.04],"I_CargoNet_01_ammo_F"]
];

{
    deleteVehicle (nearestObject _x);        // Make sure to remove any previous crates.
} forEach _crateClasses_and_Positions;

// Shuffle the list
_crateClasses_and_Positions = _crateClasses_and_Positions call ExileClient_util_array_shuffle;


// Create Crates
_crate0 = [_crateClasses_and_Positions select 0 select 1, _crateClasses_and_Positions select 0 select 0] call DMS_fnc_SpawnCrate;
_crate1 = [_crateClasses_and_Positions select 1 select 1, _crateClasses_and_Positions select 1 select 0] call DMS_fnc_SpawnCrate;

// Disable smoke on the crates so that the players have to search for them >:D
{
    _x setVariable ["DMS_AllowSmoke", false];
} forEach [_crate0,_crate1];

/*
// Don't think an armed AI vehicle fit the idea behind the mission. You're welcome to uncomment this if you want.
_veh =
[
    [
        [_pos,100,random 360] call DMS_fnc_SelectOffsetPos,
        _pos
    ],
    _group,
    "assault",
    _difficulty,
    _side
] call DMS_fnc_SpawnAIVehicle;
*/


// Define mission-spawned AI Units
_missionAIUnits =
[
    _group         // We only spawned the single group for this mission
];

// Define the group reinforcements
_groupReinforcementsInfo =
[
    [
        _group,            // pass the group
        [
            [
                -1,        // Let's limit number of units instead...
                0
            ],
            [
                100,    // Maximum 100 units can be given as reinforcements.
                0
            ]
        ],
        [
            240,        // About a 4 minute delay between reinforcements.
            diag_tickTime
        ],
        _AISoldierSpawnLocations,
        "random",
        _difficulty,
        _side,
        "reinforce",
        [
            10,            // Reinforcements will only trigger if there's fewer than 10 members left in the group
            7            // 7 reinforcement units per wave.
        ]
    ]
];

// Define mission-spawned objects and loot values
_missionObjs =
[
    _staticGuns,            // static gun(s). Note, we don't add the base itself because it already spawns on server start.
    [],
    [[_crate0,[50,120,10]],[_crate1,[20,150,15]]]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "A large group of bandits are stockpiling multiple weapon crates..."];

// Define Mission Win message
_msgWIN = ['#0080ff',"The bandit base has been successfully captured!"];

// Define Mission Lose message
_msgLOSE = ['#FF0000',"The bandit have heli lifted the weapon crates from there base..."];

// Define mission name (for map marker and logging)
_missionName = "Bandit Base";

// Create Markers
_markers =
[
    _pos,
    _missionName,
    _difficulty
] call DMS_fnc_CreateMarker;

_circle = _markers select 1;
_circle setMarkerDir 20;
_circle setMarkerSize [150,50];


_time = diag_tickTime;

// Parse and add mission info to missions monitor
_added =
[
    _pos,
    [
        [
            "kill",
            _group
        ],
        [
            "playerNear",
            [_pos,100]
        ]
    ],
    _groupReinforcementsInfo,
    [
        _time,
        DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    _difficulty,
    []
] call DMS_fnc_AddMissionToMonitor_Static;

// Check to see if it was added correctly, otherwise delete the stuff
if !(_added) exitWith
{
    diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];

    _cleanup = [];
    {
        _cleanup pushBack _x;
    } forEach _missionAIUnits;

    _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));

    {
        _cleanup pushBack (_x select 0);
    } foreach (_missionObjs select 2);

    _cleanup call DMS_fnc_CleanUp;


    // Delete the markers directly
    {deleteMarker _x;} forEach _markers;


    // Reset the mission count
    DMS_MissionCount = DMS_MissionCount - 1;
};


// Notify players
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;

 

if (DMS_DEBUG) then
{
    (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
};

 

mpmissions\Exile.Chernarus\initServer.sqf

Spoiler

///////////////////////////////////////////////////////////////////////////////////////////////////
// Zelenogorsk Bandit Mission
///////////////////////////////////////////////////////////////////////////////////////////////////
// 72 Vehicles
private _vehicles = [
["76n6ClamShell", [2559.05, 5100.23, 212.761], [0.882713, 0.469912, -0.000607066], [0, 0.00129187, 0.999999], true],
["Land_Mil_Barracks_i", [2531.33, 5107.71, 195.427], [0.849131, 0.527944, -0.0158469], [0.0186593, 0, 0.999826], true],
["Land_Mil_Barracks_i", [2518.29, 5104.94, 195.498], [0.852152, 0.523294, 0], [0, 0, 1], true],
["Land_Mil_Barracks_i", [2504.63, 5103.44, 195.498], [0.853691, 0.520779, 0], [0, 0, 1], true],
["Land_Mil_Barracks_i", [2489.85, 5103.39, 195.498], [0.864168, 0.503203, 0], [0, 0, 1], true],
["Land_Mil_Barracks_i", [2478.5, 5096.81, 195.498], [0.869398, 0.494113, 0], [0, 0, 1], true],
["Fort_Nest", [2577.11, 5050.99, 194.966], [-0.52717, 0.84976, 0], [0, 0, 1], true],
["Fort_Nest", [2530.26, 5022.47, 194.956], [-0.519803, 0.854286, 0], [0, 0, 1], true],
["Land_fort_bagfence_corner", [2527.51, 5019.95, 194.368], [-0.512567, 0.858647, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2534.25, 5022.69, 194.368], [0.532438, -0.846469, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2575.11, 5047.52, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2572.52, 5046, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2569.92, 5044.46, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2567.32, 5042.95, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2564.79, 5041.46, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2562.19, 5039.95, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2559.63, 5038.47, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2557.09, 5036.99, 194.378], [0.50734, -0.861746, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2536.78, 5024.29, 194.368], [0.532438, -0.846469, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2539.29, 5025.86, 194.368], [0.532438, -0.846469, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2541.81, 5027.46, 194.368], [0.532438, -0.846469, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2544.31, 5029.02, 194.368], [0.532438, -0.846469, 0], [0, 0, 1], true],
["Land_fort_bagfence_corner", [2545.55, 5031.39, 194.37], [-0.83205, -0.554698, -0.00185419], [-0.00133721, -0.00133688, 0.999998], true],
["Land_fort_bagfence_corner", [2554.33, 5036.75, 194.378], [-0.518515, 0.855069, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2581.07, 5051.11, 194.376], [0.50241, -0.864629, -0.000648902], [0.00129158, 0, 0.999999], true],
["Land_fort_bagfence_long", [2581.83, 5052.88, 194.375], [0.857771, 0.514031, -0.00110788], [0.00129158, 0, 0.999999], true],
["Land_fort_bagfence_long", [2580.31, 5055.37, 194.377], [0.857771, 0.514031, -0.00110788], [0.00129158, 0, 0.999999], true],
["Land_fort_bagfence_long", [2578.84, 5057.82, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2577.31, 5060.33, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2575.78, 5062.85, 194.378], [-0.85423, -0.519896, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2574.25, 5065.38, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2572.74, 5067.92, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2571.22, 5070.44, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2569.71, 5072.96, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2568.24, 5075.43, 194.378], [0.857772, 0.514031, 0], [0, 0, 1], true],
["Land_fort_bagfence_long", [2566.68, 5077.96, 194.378], [0.852467, 0.522782, 0], [0, 0, 1], true],
["Land_Barrack2_EP1", [2501.73, 5044.31, 195.235], [-0.498465, -0.866907, -0.00199226], [-0.00399675, 0, 0.999992], true],
["Land_Barrack2_EP1", [2512.4, 5038.39, 195.228], [-0.498468, -0.866907, 0.00132196], [0.00265204, 0, 0.999996], true],
["Land_Barrack2_EP1", [2522.81, 5032.58, 195.218], [-0.498469, -0.866907, 0], [0, 0, 1], true],
["CampEast_EP1", [2514.62, 5081.47, 195.352], [0.844002, 0.536341, 0], [0, 0, 1], true],
["CampEast_EP1", [2501.38, 5073.32, 195.42], [0.843999, 0.536221, 0.0115318], [-0.00265204, -0.0173281, 0.999846], true],
["CampEast_EP1", [2508.62, 5061.21, 195.347], [0.844001, 0.536341, 0.00109034], [-0.00129187, 0, 0.999999], true],
["CampEast_EP1", [2522.13, 5069.6, 195.352], [0.844002, 0.536341, 0], [0, 0, 1], true],
["CampEast_EP1", [2515.87, 5050.29, 195.357], [0.844001, 0.536341, -0.00109009], [0.00129158, 0, 0.999999], true],
["CampEast_EP1", [2529.11, 5058.44, 195.35], [0.844001, 0.536341, -0.00109009], [0.00129158, 0, 0.999999], true],
["CampEast_EP1", [2548.07, 5054.88, 195.442], [0.844002, 0.536341, 0], [0, 0, 1], true],
["CampEast_EP1", [2561.31, 5063.02, 195.352], [0.844002, 0.536341, 0], [0, 0, 1], true],
["CampEast_EP1", [2554.33, 5074.19, 195.352], [0.844002, 0.536341, 0], [0, 0, 1], true],
["CampEast_EP1", [2540.82, 5065.79, 195.352], [0.844002, 0.536341, 0], [0, 0, 1], true],
["CampEast_EP1", [2533.59, 5077.91, 195.351], [0.844002, 0.53634, -0.000692883], [0, 0.00129187, 0.999999], true],
["CampEast_EP1", [2546.82, 5086.05, 195.352], [0.844002, 0.536341, 0], [0, 0, 1], true],
["Land_Hlidac_budka", [2552.64, 5038.77, 195.07], [0.860552, 0.509363, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2521.67, 5021.99, 195.03], [0.511523, 0.85927, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2514.4, 5025.98, 195.032], [0.511523, 0.859269, 0.00110981], [0, -0.00129158, 0.999999], true],
["Land_HBarrier_large", [2507.23, 5029.92, 195.044], [0.511522, 0.85927, 0.000464895], [0.00133688, -0.00133688, 0.999998], true],
["Land_HBarrier_large", [2500.23, 5033.84, 195.044], [0.511522, 0.85927, 0.000660821], [-0.00129187, 0, 0.999999], true],
["Land_HBarrier_large", [2492.96, 5037.82, 194.962], [0.511446, 0.85927, 0.00886376], [-0.0173282, 0, 0.99985], true],
["Land_HBarrier_large", [2573.91, 5123, 195.042], [0.902593, 0.430492, 0.00172058], [0, -0.00399675, 0.999992], true],
["Land_HBarrier_large", [2581.52, 5108.39, 195.039], [0.902593, 0.430495, -0.000556144], [0, 0.00129187, 0.999999], true],
["Land_HBarrier_large", [2577.69, 5115.74, 195.031], [0.902593, 0.430495, 0.000556144], [0, -0.00129187, 0.999999], true],
["Land_HBarrier_large", [2570.96, 5128.66, 195.065], [0.902593, 0.430492, 0.00172058], [0, -0.00399675, 0.999992], true],
["Land_HBarrier_large", [2546.53, 5130.69, 194.913], [-0.143768, 0.987529, -0.064162], [-0.00666818, 0.0638674, 0.997936], true],
["Land_HBarrier_large", [2452.23, 5105.85, 194.112], [-0.959013, -0.194505, -0.206063], [-0.210075, 0, 0.977685], true],
["Land_Vez", [2563.82, 5130.34, 197.707], [-0.0845058, 0.995809, -0.0349715], [-0.0053265, 0.0346451, 0.999385], true],
["Land_Vez", [2457.72, 5111.93, 197.825], [-0.226838, 0.973933, 0], [0, 0, 1], true],
["Land_BarGate_F", [2548.5, 5035.81, 198.048], [0.518141, -0.855295, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2570.03, 5130.45, 195.061], [0.902593, 0.430409, -0.00860634], [0, 0.0199917, 0.9998], true],
["Land_HBarrier_large", [2569.77, 5081.94, 195.04], [0.888991, 0.457925, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2565.72, 5089.17, 195.04], [0.888991, 0.457925, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2566.39, 5094.78, 195.04], [0.380365, -0.924837, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2573.94, 5098.2, 195.04], [0.389858, -0.920875, 0], [0, 0, 1], true],
["Land_HBarrier_large", [2580.89, 5101.38, 195.04], [0.389858, -0.920875, 0], [0, 0, 1], true]
];

 

Mission.jpg

Edited by NRP
2 people like this

Share this post


Link to post
Share on other sites

where is this file i cant find it  a3_dms\config.sqf

Share this post


Link to post
Share on other sites
6 hours ago, Sob- said:

where is this file i cant find it  a3_dms\config.sqf

Assuming for a moment you are using DMS on your Exile server......

  1. Unpack the a3_dms.pbo file inside "@ExileServer\addons\" using your preferred PBO unpacker
  2. Navigate to a3_dms\config.sqf
  3. Open with your favourite editor & adjust the file as per @NRP's instructions above (don't forget to save)
  4. Use the PBO Manager to re-pack the pbo
  5. Start the server
  6. Profit!

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.