red_ned

[Update] Kore Factory v2.1 DMS Static Mission (Altis)

23 posts in this topic

Updated to my latest v2.1 30/07/16 code which is better laid out and more editable, including sliding %chance for vehicle pin code.

Moved to GiThub to allow easier updates and include v1 and v2.0 as zips in the folder.

 

Makes use of much of local map objects to be fairly light on loading.

It was requested to add some extra functionality to the static missions like I did to my Bandit package, well here is one of the 1st 2 reworks:

1. You can now get 4 difficulties of the mission.
2. You get to choose Ai levels independantly for each mission difficulty.
3. Vary reinforcement times and amounts, static gun amounts and also loot and vehicle settings.
4. Configurable for endless combinations with full instructions on how to change it up.

V2.1 Install instructions and how to configure in download from https://github.com/redned70/DMSStaticMissions

V1.0 & V2.0 Install instruction (set Ai and difficulty) and images in download from https://github.com/redned70/DMSStaticMissions

*******************************************************
 "Kore Factory" v2.1 static mission for Altis.
 Created by [CiC]red_ned using templates by eraser1
 Exile_Car_Ural_Covered_Military increases persistent chance with difficulty
 Credits to Pradatoru for mapping
 17 years of CiC
 easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
*******************************************************
 For Altis only.
 Running on DMS System
*******************************************************

Installing.
1.  Copy kore_factory.sqf into a3_dms.pbo missions/static
2.  Copy kore_factory_buildings.sqf into a3_dms.pbo objects/static
3.  Extract  map_configs/altis_config.sqf
4. Find
 DMS_StaticMissionTypes append [["saltflats",1],["slums",1]];
 Change to (or add extra)
 DMS_StaticMissionTypes append [["saltflats",1],["slums",1],["kore_factory",1]];
5. Find
 DMS_BasesToImportOnServerStart append ["saltflatsbase","slums_objects"];
 Change to (or add extra)
 DMS_StaticMissionTypes append ["saltflatsbase","slums_objects","kore_factory_buildings"];
6. Repack altis_config.sqf into PBO
7.  Put a3_dms.pbo into /@ExileServer/addons/ on server and start.

To update from v1.0 or v2.0 to v2.1  just replace the kore_factory.sqf  in the DMS PBO

No BE or InfiSTAR additions apart from what you installed to run DMS. this will not run without DMS.

2016-02-12_00009.jpg

2016-02-12_00010.jpg

2016-02-12_00012.jpg

2016-02-12_00014.jpg

Edited by red_ned
logic update v2.1
  • Like 1

Share this post


Link to post
Share on other sites

It looks great! I'm downloading now. Thank you for sharing these missions red_ned. It keeps it fresh rather than seeing the same missions spawning over and over again. :rock:

Share this post


Link to post
Share on other sites
Advertisement

red, possible for you to do a few missions that can random spawn anywhere on any map instead of map specific static missions?

Share this post


Link to post
Share on other sites
56 minutes ago, CEN said:

red, possible for you to do a few missions that can random spawn anywhere on any map instead of map specific static missions?

Trouble with the none static missions is whatever you build needs to be relative to the centre point of the mission so hours of maths to work it out. There is also the added issue of the mission spawning with more than 6 or 8 objects as you could end up with huge lag spikes if you spawn too many objects with the mission.

Doing some small ones should be simple enough to expand what is already there but you are really only looking at variations of the ones already in the mod.

We tend to prefer the static ones as they make good places to loot when not in a mission and we can push people further into the map - hence why all recent ones have been where people don't usually bother to go.

I will look at it and see what I can do but don't expect too much.

Share this post


Link to post
Share on other sites

Enjoying all your missions @red_ned, is there any easy way to add a vehicle as the reward for this mission? this is what i tried an broke all the things.

added to line 8:   private ["_vehicle", "_vehClass", "_pinCode"];

 

added under _crate1:   _vehicle = ["Exile_Car_Tempest",[(_pos select 0) -30, (_pos select 1) -30,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;

 

and added [_vehicle], to missionObjs

 

But the mission gets to 0 AI and will not end altho the vehicle is spawned, did i forget something? kinda new at this.

Also instead of using _pos is there a way to specify the exact spawn location of the vehicle in the _vehicle statement? like indead of [(_pos select 0) -30, (_pos select 1) -30,0] how would i just use xyz coords?

 

Thanks again,

-Zero

 

 

Edited by xzerokoolx

Share this post


Link to post
Share on other sites
8 hours ago, xzerokoolx said:

Enjoying all your missions @red_ned, is there any easy way to add a vehicle as the reward for this mission? this is what i tried an broke all the things.

added to line 8:   private ["_vehicle", "_vehClass", "_pinCode"];

added under _crate1:   _vehicle = ["Exile_Car_Tempest",[(_pos select 0) -30, (_pos select 1) -30,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;

and added [_vehicle], to missionObjs

But the mission gets to 0 AI and will not end altho the vehicle is spawned, did i forget something? kinda new at this.

Also instead of using _pos is there a way to specify the exact spawn location of the vehicle in the _vehicle statement? like indead of [(_pos select 0) -30, (_pos select 1) -30,0] how would i just use xyz coords?

Thanks again,

-Zero

it should look something like this (but I haven't tested it out)

Spoiler

/*
 "Kore Factory" static mission for Altis. With vehicle.
 Created by [CiC]red_ned using templates by eraser1
 Credits to Pradatoru for mapping
 17 years of CiC http://cic-gaming.co.uk
*/
// for chosing a vehicle
private ["_vehicle", "_pinCode", "_PossibleVehicleClass", "_VehicleClass"];

// For logging purposes
_num = DMS_MissionCount;


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

_pos = [6175.67,16243.9,0]; //insert the centre here

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 =
[
[6317.96,16220.2,0],
[6074.86,16263,0],
[6100.03,16208.9,0],
[6204.37,16222.3,0.878017],
[6062.78,16194.5,15.2872],
[6245.5,16272.7,0.0406151],
[6183.64,16272.5,0],
[6155.11,16228.1,0],
[6212.57,16210,0],
[6156.73,16292.9,0],
[6144.64,16254.9,0],
[6060.77,16222,0],
[6273.74,16219.4,0],
[6214.52,16255.3,0],
[6121.09,16239.8,0],
[6205.06,16235.7,0]
];

// Create AI
_AICount = 20 + (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 =
[
 [
  _pos vectorAdd [-5,0,0],  // 5 meters West of center pos
  _pos vectorAdd [0,-5,0],  // 5 meters South of center pos
  [6272.85,16301.2,15.8243],
  [6129.94,16272.1,1.3512],
  [6242.14,16211.7,0.632]
 ],
 _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 =
[
 [[6158.78,16211.3,0.281509],"I_CargoNet_01_ammo_F"],
 [[6145.2,16262.8,0],"I_CargoNet_01_ammo_F"],
 [[6055.41,16237.9,0],"I_CargoNet_01_ammo_F"],
 [[6297.12,16218.4,0],"I_CargoNet_01_ammo_F"],
 [[6112.29,16229.5,0],"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;

// Enable smoke on the crates due to size of area
{
 _x setVariable ["DMS_AllowSmoke", true];
} 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
  [
   [
    0,  // Let's limit number of units instead...
    0
   ],
   [
    50, // Maximum 100 units can be given as reinforcements.
    0
   ]
  ],
  [
   60,  // About a 1 minute delay between reinforcements.
   diag_tickTime
  ],
  _AISoldierSpawnLocations,
  "random",
  _difficulty,
  _side,
  "reinforce",
  [
   20,   // Reinforcements will only trigger if there's fewer than 10 members left in the group
   5   // 7 reinforcement units per wave.
  ]
 ]
];

//Start vehicle and pincode selection
//create possible vehicle list
_PossibleVehicleClass   = [ 
        "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"
       ];
//choose the vehicle
_VehicleClass = _PossibleVehicleClass call BIS_fnc_selectRandom;
  
//DMS_fnc_SpawnPersistentVehicle will automatically turn the pincode into a string and format it.
_pinCode = (1000 +(round (random 8999)));
_vehicle = [_VehicleClass,[6180.67,16248.9],_pinCode] call DMS_fnc_SpawnPersistentVehicle;


// Define mission-spawned objects and loot values + permenant vehicle
_missionObjs =
[
 _staticGuns,   // static gun(s). Note, we don't add the base itself because it already spawns on server start.
 [_vehicle],        //this is prize vehicle
 [[_crate0,[25,25,2]],[_crate1,[12,50,10]]]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "CiC-Admins are raiding a factory"];

// Define Mission Win message + announce pincode of vehicle
_msgWIN = ['#0080ff',format ["Convicts have successfully killed the CiC-Admins and stolen all the cratesand made off with the vehicle, entry code %1...",_pinCode]];

// Define Mission Lose message
_msgLOSE = ['#FF0000',"CiC-Admins got bored and buggered off taking all the goodies..."];

// Define mission name (for map marker and logging)
_missionName = "Kore Factory";

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

_circle = _markers select 1;
_circle setMarkerDir 0;
_circle setMarkerSize [275,100];


_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;
};

list the vehicles you want it to chose from under _PossibleVehicleClass   

then you can play with the spawn location like this:

Quote

_vehicle = [_VehicleClass,[6180.67,16248.9],_pinCode] call DMS_fnc_SpawnPersistentVehicle;

you don't need height as it spawns just above the ground (and sometimes will bug if you set it manually) but I just shifted it 5m North and 5m East

 

this

Quote

_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;

just says: using _pos = [6175.67,16243.9,0]; (the centre of the mission defined at top of file) make vehicle spawn at (6175.67 - 30m), (16243.9 -30m),0

Share this post


Link to post
Share on other sites
10 hours ago, red_ned said:

it should look something like this (but I haven't tested it out)

  Reveal hidden contents

/*
 "Kore Factory" static mission for Altis. With vehicle.
 Created by [CiC]red_ned using templates by eraser1
 Credits to Pradatoru for mapping
 17 years of CiC http://cic-gaming.co.uk
*/
// for chosing a vehicle
private ["_vehicle", "_pinCode", "_PossibleVehicleClass", "_VehicleClass"];

// For logging purposes
_num = DMS_MissionCount;


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

_pos = [6175.67,16243.9,0]; //insert the centre here

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 =
[
[6317.96,16220.2,0],
[6074.86,16263,0],
[6100.03,16208.9,0],
[6204.37,16222.3,0.878017],
[6062.78,16194.5,15.2872],
[6245.5,16272.7,0.0406151],
[6183.64,16272.5,0],
[6155.11,16228.1,0],
[6212.57,16210,0],
[6156.73,16292.9,0],
[6144.64,16254.9,0],
[6060.77,16222,0],
[6273.74,16219.4,0],
[6214.52,16255.3,0],
[6121.09,16239.8,0],
[6205.06,16235.7,0]
];

// Create AI
_AICount = 20 + (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 =
[
 [
  _pos vectorAdd [-5,0,0],  // 5 meters West of center pos
  _pos vectorAdd [0,-5,0],  // 5 meters South of center pos
  [6272.85,16301.2,15.8243],
  [6129.94,16272.1,1.3512],
  [6242.14,16211.7,0.632]
 ],
 _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 =
[
 [[6158.78,16211.3,0.281509],"I_CargoNet_01_ammo_F"],
 [[6145.2,16262.8,0],"I_CargoNet_01_ammo_F"],
 [[6055.41,16237.9,0],"I_CargoNet_01_ammo_F"],
 [[6297.12,16218.4,0],"I_CargoNet_01_ammo_F"],
 [[6112.29,16229.5,0],"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;

// Enable smoke on the crates due to size of area
{
 _x setVariable ["DMS_AllowSmoke", true];
} 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
  [
   [
    0,  // Let's limit number of units instead...
    0
   ],
   [
    50, // Maximum 100 units can be given as reinforcements.
    0
   ]
  ],
  [
   60,  // About a 1 minute delay between reinforcements.
   diag_tickTime
  ],
  _AISoldierSpawnLocations,
  "random",
  _difficulty,
  _side,
  "reinforce",
  [
   20,   // Reinforcements will only trigger if there's fewer than 10 members left in the group
   5   // 7 reinforcement units per wave.
  ]
 ]
];

//Start vehicle and pincode selection
//create possible vehicle list
_PossibleVehicleClass   = [ 
        "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"
       ];
//choose the vehicle
_VehicleClass = _PossibleVehicleClass call BIS_fnc_selectRandom;
  
//DMS_fnc_SpawnPersistentVehicle will automatically turn the pincode into a string and format it.
_pinCode = (1000 +(round (random 8999)));
_vehicle = [_VehicleClass,[6180.67,16248.9],_pinCode] call DMS_fnc_SpawnPersistentVehicle;


// Define mission-spawned objects and loot values + permenant vehicle
_missionObjs =
[
 _staticGuns,   // static gun(s). Note, we don't add the base itself because it already spawns on server start.
 [_vehicle],        //this is prize vehicle
 [[_crate0,[25,25,2]],[_crate1,[12,50,10]]]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "CiC-Admins are raiding a factory"];

// Define Mission Win message + announce pincode of vehicle
_msgWIN = ['#0080ff',format ["Convicts have successfully killed the CiC-Admins and stolen all the cratesand made off with the vehicle, entry code %1...",_pinCode]];

// Define Mission Lose message
_msgLOSE = ['#FF0000',"CiC-Admins got bored and buggered off taking all the goodies..."];

// Define mission name (for map marker and logging)
_missionName = "Kore Factory";

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

_circle = _markers select 1;
_circle setMarkerDir 0;
_circle setMarkerSize [275,100];


_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;
};

list the vehicles you want it to chose from under _PossibleVehicleClass   

then you can play with the spawn location like this:

you don't need height as it spawns just above the ground (and sometimes will bug if you set it manually) but I just shifted it 5m North and 5m East

 

this

just says: using _pos = [6175.67,16243.9,0]; (the centre of the mission defined at top of file) make vehicle spawn at (6175.67 - 30m), (16243.9 -30m),0

Thanks ned, helped a lot and was also able to implement it to your chelonisi mission as well :)

 

-Zero

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.