Merge pull request #47 from Ghostrider-DbD-/Version-6.59-Build-63

Version 6 59 build 63
This commit is contained in:
Ghostrider-DbD- 2017-06-10 12:29:58 -04:00 committed by GitHub
commit c5052cede0
26 changed files with 355 additions and 76 deletions

View File

@ -0,0 +1,63 @@
/*
[_item,_crate] call blck_addItemToCrate;
where
_crate is a container such as ammo box or vehicle
_item is a string or array.
If _item is a string then add 1 of that item to the container.
If _item is an array with 2 elements ["itemName",3] then assume that the first element is a string and is the name of the item, and the second is the number to add.
if _item is an array with 3 elements ["itemName",2,6] assume that the first element is the item name (string), the second the min # to add and the third the max # to add.
by Ghostrider-DbD-
11/14/16
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_itemInfo","_crate",["_addAmmo",0]];
private["_isRifle","_isMagazine","_isBackpack"];
_isWeapon = false;
_isMagazine = false;
_isBackpack = false;
_quant = 0;
#ifdef blck_debugMode
diag_log format["blck_addItemToCrate:: -- >> itemInfo = %1 | _crate %2 | _addAmmo %3",_itemInfo, _crate, _addAmmo];
#endif
if (typeName _itemInfo isEqualTo "STRING") then {_item = _itemInfo; _quant = 1}; // case where only the item descriptor was provided
if (typeName _itemInfo isEqualTo "ARRAY") then {
if (count _itemInfo isEqualTo 2) then {_item = _itemInfo select 0; _quant = _itemInfo select 1;}; // case where item descriptor and quantity were provided
if (count _itemInfo isEqualto 3) then {
_item = _itemInfo select 0;
_quant = (_itemInfo select 1) + round(random((_itemInfo select 2) - (_itemInfo select 1)));
}; // case where item descriptor, min number and max number were provided.
};
if (((typeName _item) isEqualTo "STRING") && (_item != "")) then
{
if (isClass(configFile >> "CfgWeapons" >> _item)) then {
_crate addWeaponCargoGlobal [_item,_quant];
_isWeapon = true;
_count = 0;
if (typeName _addAmmo isEqualTo "SCALAR") then
{
_count = _addAmmo;
};
if (typeName _addAmmo isEqualto "ARRAY") then
{
_count = (_addAmmo select 0) + (round(random((_addAmmo select 1) - (_addAmmo select 0))));
};
_ammo = getArray (configFile >> "CfgWeapons" >> _item >> "magazines");
for "_i" from 1 to _count do
{
_crate addMagazineCargoGlobal [selectRandom _ammo,1];
};
};
if (_item isKindOf ["Bag_Base", configFile >> "CfgVehicles"]) then {_crate addBackpackCargoGlobal [_item,_quant]; _isBackpack = true;};
if (isClass(configFile >> "CfgMagazines" >> _item)) then {_crate addMagazineCargoGlobal [_item,_quant]; _isMagazine = true;};
if (!_isWeapon && !_isMagazine && _isBackpack && isClass(configFile >> "CfgVehicles" >> _item)) then {_crate addItemCargoGlobal [_item,_quant]};
};

View File

@ -0,0 +1,57 @@
/*
Depends on blck_fnc_addItemToCrate
call as:
[_item,_crate] call blck_fnc_loadLootFromItemsArray;
where
_crate is a container such as ammo box or vehicle
_loadout is an array containing either 2 or 3 elements. The first array is always an array of items to add. Items can be formated as ["item1","item1"], as [["item1",3],["item2",2]] or as [["item1",2,4],["item2",3,5]].
See GMS_fnc_addItemToCrate for information about the acceptable formates for the items "item1" ... "itemN".
The second and optional third element in the array specify the number of times the script will randomly select an item from the array of items and load it into the crate.
For example:
case 1: [["item1",...,"itemN"],6]; The script will randomly select from the array of item names 6 times and call the loot loader each time.
case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times.
by Ghostrider-DbD-
6/7/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_loadout","_crate",["_addAmmo",0]];
#ifdef blck_debugMode
diag_log format["blck_fnc_loadLootFromItemsArray:: _this %1",_this];
diag_log format["blck_fnc_loadLootFromItemsArray:: _crate %1 | _addAmmo %2 | _loadout %3",_crate,_addAmmo,_loadout];
#endif
if ((_loadout select 0) isEqualTo []) exitWith {};
{
private["_tries","_q","_item"];
_tries = 0;
#ifdef blck_debugMode
diag_log format["blck_fnc_loadLootFromItemsArray:: -- >> now loading for %1",_x];
#endif
_q = _x select 1; // this can be a number or array.
if ( (typeName _q) isEqualTo "ARRAY") then // Assume the array contains a min/max number to add
{
if ((count _q) isEqualTo 2) then {_tries = (_q select 0) + round(random(((_q select 1) - (_q select 0))));} else {_tries = 0;};
};
if ((typeName _q) isEqualTo "SCALAR") then
{
_tries = _q;
};
for "_i" from 1 to _tries do
{
_item = selectRandom (_x select 0);
[_item,_crate,_addAmmo] call blck_fnc_addItemToCrate;
};
}forEach _loadout;

View File

@ -33,15 +33,18 @@ while {true} do
#ifdef DBDserver
[] call blck_fnc_broadcastServerFPS;
#endif
_timer1sec - diag_tickTime;
_timer1sec = diag_tickTime;
};
if (diag_tickTime - _timer5sec > 5) then
{
_timer5sec = diag_tickTime;
[] call blck_fnc_missionGroupMonitor;
};
if (diag_tickTime - _timer20sec > 20) then
{
[] call blck_fnc_cleanupAliveAI;
[] call blck_fnc_cleanupObjects;
[] call blck_fnc_cleanupDeadAI;
[] call blck_fnc_missionGroupMonitor;
_timer20sec = diag_tickTime;
//diag_log format["_mainThread::-->> diag_tickTime = %1",diag_tickTime];
};

View File

@ -155,6 +155,39 @@ _fn_monitorGroupWaypoints = {
} forEach blck_monitoredMissionAIGroups;
};
_fn_simulationMonitor = {
_modType = call blck_fnc_getModType;
if (_modType isEqualTo "Exile") then
{
_playerType = ["Exile_Unit_Player"];
}else{
_playerType = ["Epoch_Male_F","Epoch_Female_F"];
};
{
// player nearEntities [["Car", "Motorcycle", "Tank"], 50];
_players = (leader _x) nearEntities [_playerType, 1800];
if (count _players > 0) then
{
// Be sure simulation is on for all units in the group
if !(_x getVariable["blck_simulationStatus",false]) then
{
_x setVariable["blck_simulationStatus",true];
{
_x enableSimulationGlobal true;
}forEach (units _x);
};
}else{
// Be sure simulation is off for all units in the group.
if !(_x getVariable["blck_simulationStatus",true]) then
{
_x setVariable["blck_simulationStatus",false];
{
_x enableSimulationGlobal false;
}forEach (units _x);
};
};
} forEach blck_monitoredMissionAIGroups;
};
////////
// Start of main function
////////
@ -164,3 +197,7 @@ if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: execut
[] call _fn_removeEmptyOrNullGroups;
uiSleep 0.1;
[] call _fn_monitorGroupWaypoints;
#ifndef useDynamicSimulation
[] call _fn_simulationMonitor;
#endif

View File

@ -37,7 +37,7 @@ if (blck_debugLevel > 1) then
#endif
_groupSpawned = createGroup blck_AI_Side;
_groupSpawned setVariable["groupVehicle",objNull];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
@ -49,6 +49,12 @@ if !(isNull _groupSpawned) then
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]};
#endif
_groupSpawned setVariable["groupVehicle",objNull];
#ifdef useDynamicSimulation
_groupSpawned enableDynamicSimulation true;
#endif
_groupSpawned setcombatmode "RED";
_groupSpawned setBehaviour "COMBAT";
_groupSpawned allowfleeing 0;

View File

@ -19,15 +19,6 @@
params["_crate","_boxLoot","_itemCnts"];
_itemCnts params["_wepCnt","_magCnt","_opticsCnt","_materialsCnt","_itemCnt","_bkcPckCnt"];
/*
_wepCnt // number of types of weapons to load
_magCnt // Number of types of additional, optional magazines to add (this includes building supplies)
_opticsCnt // number of types of optics to be added
_materialsCnt // Number of cinder, motar etc to be added
_itemCnt // number of items (first aid packs, multigun bits) to load
_bkcPckCnt // Number of backpacks to add
*/
if (_wepCnt > 0) then
{

View File

@ -19,7 +19,7 @@ _unit = _this select 0 select 0;
_instigator = _this select 0 select 3;
#ifdef blck_debugMode
if (blck_debugLevel ? 1) then
if (blck_debugLevel > 1) then
{
diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit];
};

View File

@ -41,16 +41,16 @@ for "_i" from 1 to (count blck_liveMissionAI) do
//diag_log format["_fnc_cleanupAliveAI:: (34) evaluating with delete time = %2 and diag_tickTime %1", diag_tickTime, _units select 1];
if (diag_tickTime > (_units select 1) ) then
{
diag_log format["_fnc_cleanupAliveAI:: cleaning up AI group %1",_units];
//diag_log format["_fnc_cleanupAliveAI:: cleaning up AI group %1",_units];
{
diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x];
diag_log format["_fnc_cleanupAliveAI:: vehicle _x = %1",vehicle _x];
diag_log format["_fnc_cleanupAliveAI:: objectParent _x = %1",objectParent _x];
//diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x];
//diag_log format["_fnc_cleanupAliveAI:: vehicle _x = %1",vehicle _x];
//diag_log format["_fnc_cleanupAliveAI:: objectParent _x = %1",objectParent _x];
if ((alive _x) && !(isNull objectParent _x)) then // mark the vehicle for deletion
{
diag_log format["_fnc_cleanupAliveAI: deleteing objectParent %1 [%3] for unit %2",objectParent _x, _x, typeName (objectParent _x), typeOf (objectParent _x)];
//diag_log format["_fnc_cleanupAliveAI: deleteing objectParent %1 [%3] for unit %2",objectParent _x, _x, typeName (objectParent _x), typeOf (objectParent _x)];
[objectParent _x] call blck_fn_deleteAIvehicle;
};
[_x] call blck_fnc_deleteAI;

View File

@ -20,7 +20,12 @@ _unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer, tr
blck_deadAI pushback _unit;
_group = group _unit;
[_unit] joinSilent grpNull;
if (count(units _group) < 1) then {deleteGroup _group;};
if (count(units _group) < 1) then {
#ifdef useDynamicSimulation
_group enableDynamicSimulation false;
#endif
deleteGroup _group;
};
if (blck_launcherCleanup) then {[_unit] spawn blck_fnc_removeLaunchers;};
if (blck_removeNVG) then {[_unit] spawn blck_fnc_removeNVG;};
if !(isPlayer _killer) exitWith {};

View File

@ -19,7 +19,11 @@ params["_unit","_killer"];
private["_modType","_reward","_maxReward","_dist","_killstreakReward","_distanceBonus","_newKillerScore","_newKillerFrags","_money"];
_modType = call blck_fnc_getModType;
//diag_log format["[blckeagles] rewardKiller:: - _modType = %1",_modType];
diag_log format["[blckeagles] rewardKiller:: - _modType = %1",_modType];
if (_modType isEqualTo "Epoch") exitWith {}; // Have players pull crypto from AI bodies now that this feature is available.
/*
if (_modType isEqualTo "Epoch") then
@ -83,9 +87,15 @@ if (_modType isEqualTo "Exile") then
_killstreakBonus = 3 * (_killer getVariable["blck_kills",0]);
_respectGained = 25 + _distanceBonus + _killstreakBonus;
_score = _killer getVariable ["ExileScore", 0];
//diag_log format["GMS_fnc_rewardKiller.sqf:: ExileScore = %1",_killer getVariable ["ExileScore", 0]];
_score = _score + (_respectGained);
//diag_log format["GMS_fnc_rewardKiller.sqf:: _new = %1",_score];
diag_log format["GMS_fnc_rewardKiller.sqf:: ExileScore = %1",_killer getVariable ["ExileScore", 0]];
_score = _score + (_respectGained);
diag_log format["GMS_fnc_rewardKiller.sqf:: _new = %1",_score];
_killer setVariable ["ExileScore", _score];
format["setAccountScore:%1:%2", _score,getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget;
_newKillerFrags = _killer getVariable ["ExileKills", 0];

View File

@ -46,10 +46,10 @@ if (_modType isEqualTo "Exile") then
"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyOrange)),true];};
case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["ExileMoney",4 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["ExileMoney",6 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["ExileMoney",8 + floor(random(blck_maxMoneyOrange)),true];};
};
};
[_ai1] call blck_fnc_removeGear;

View File

@ -30,6 +30,8 @@ blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\cust
blck_fnc_playerInRangeArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRangeArray.sqf"; // GMS_fnc_playerInRangeArray
blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf";
blck_fnc_allPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf";
blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf";
blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf";
#ifdef DBDserver
blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";
@ -57,8 +59,6 @@ blck_fnc_spawnMissionVehiclePatrols = compileFinal preprocessFileLineNumbers "\q
blck_fnc_spawnEmplacedWeaponArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf";
blck_fnc_spawnMissionAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionAI.sqf";
blck_fnc_spawnMissionLootVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionLootVehicles.sqf";
blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addItemToCrate.sqf";
blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc__loadLootItemsFromArray.sqf";
blck_fnc_fillBoxes = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"; // Adds items to an object according to passed parameters. See the script for details.
blck_fnc_smokeAtCrates = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_smokeAtCrates.sqf"; // Spawns a wreck and adds smoke to it
blck_fnc_spawnMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMines.sqf"; // Deploys mines at random locations around the mission center

View File

@ -31,8 +31,10 @@ blck_pendingMissions = [];
blck_missionsRunning = 0;
blck_activeMissions = [];
blck_deadAI = [];
#ifdef useDynamicSimulation
"Group" setDynamicSimulationDistance 1800;
enableDynamicSimulationSystem true;
#endif
// Arrays for use during cleanup of alive AI at some time after the end of a mission
DBD_HeliCrashSites = [];

View File

@ -2,7 +2,7 @@
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 3-21-17
Last Modified 6/7/17
--------------------------
License
@ -12,9 +12,11 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#define modUsed true
//#define DBDserver 1
#define modUsed
//#define DBDserver
#define wpModeMove
#define useAPEX 1
#define useAPEX
#define useDynamicSimulation
//#define blck_debugMode
//#define blck_debugMode3
//#define blck_debugMode3
//#define blck_milServer

View File

@ -0,0 +1,94 @@
// Sets up waypoints for a specified group.
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last modified 6/1/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
diag_log "_fnc_setupWaypoints: blck_debugMode enabled";
#endif
private["_dir","_arc","_noWp","_newpos","_wpradius","_wp"];
params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ];
_wp = [_group, 0];
#ifdef blck_debugMode
diag_log format["_fnc_setupWaypoints (4/29/17): configuring waypoints for group %1: _mode = %2 | _wpPatrolMode = %3 _soldierType = %4",_group, _mode, _wpPatrolMode,_soldierType];
#endif
if (_soldierType isEqualTo "emplaced") then
{
_wp setWaypointType "SENTRY";
_wp setWPPos (getPos leader _group);
_wp setWaypointCompletionRadius 100;
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [1,1.1,1.2];
//_wp setWaypointTimeout [0.1,0.1100,0.1200];
_group setCurrentWaypoint _wp;
_group setVariable["soldierType",_soldierType];
#ifdef blck_debugMode
_wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to an emplaced weapon Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint;"];
#endif
if (blck_debugLevel > 1) then {diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 for emplaced weapon with _soldierType = %1",_soldierType,_group];};
};
if !(_soldierType isEqualTo "emplaced") then
{
_arc = 360/5;
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT";
_group setVariable["patrolCenter",_pos];
_group setVariable["minDis",_minDis];
_group setVariable["maxDis",_maxDis];
_group setVariable["timeStamp",diag_tickTime];
_group setVariable["wpRadius",30];
_group setVariable["wpMode",_mode];
_group setVariable["wpPatrolMode",_wpPatrolMode];
_group setVariable["wpDir",0];
_group setVariable["wpArc",_arc];
_group setVariable["soldierType",_soldierType];
_dir = 0;
_wpradius = 30;
_dis = (_minDis) + random( (_maxDis) - (_minDis) );
_newPos = _pos getPos[_dis,_dir];
_wp setWPPos [_newPos select 0, _newPos select 1];
_wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]);
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [1,1.1,1.2];
_group setCurrentWaypoint _wp;
#ifdef blck_debugMode
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
_marker = createMarker [format["GroupMarker%1",_group],_newPos];
_group setVariable["wpMarker",_marker];
_marker setMarkerColor "ColorBlue";
_marker setMarkerText format["%1 %2",(_group getVariable["soldierType","null"]),_group];
_marker setMarkerType "mil_triangle";
//diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 mobile patrol with _soldierType = %1",_solderType,_group];
diag_log format["_fnc_setupWaypoints: soldier type for mobile _group %1 set to %2",_group, (_group getVariable["soldierType","null"])];
diag_log format["_fnc_setupWaypoints: all variables for the group have been set for group %1",_group];
diag_log format["_fnc_setupWaypoints:: -- >> wpMode %1 _dir %2 _dis 3",_group getVariable["wpMode","random"], _dir, _dis];
diag_log format["_fnc_setupWaypoints:: -- >> group to update is %1 and new position is %2",_group, _newPos];
diag_log format["_fnc_setupWaypoints:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
diag_log format["_fnc_setupWaypoints:: -- >> Waypoint marker for group %1 have been configured as %2 with text set to %3",_group, _group getVariable "wpMarker", markerText (_group getVariable "wpMarker")];
};
#endif
};

View File

@ -4,6 +4,11 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
Contributions by Narines: bug fixes, testing, infinite ammo fix.
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
6/1/17 Version 6.59 Build 59
[changed] Players are no longer given crypto for each AI kill. Crypto added to AI Bodies was increased.
[fixed] error in GMS_fnc_setupWaypoints wherein _arc was not defined early enough in the script.
[fixed] Exile Respect Loss bug (temporary fix only).
5/21/17 Version 6.58 build 58
[Fixed] typos for blck_epochValuables.
[Fixed] All loot was removed from AI vehicles at the time a mission was completed.

View File

@ -1,3 +1,8 @@
private ["_version","_versionDate"];
_blck_version = "6.59 Build 62";
_blck_versionDate = "6-7-17 9:00 PM";
_blck_version = "6.58 Build 60";
_blck_versionDate = "6-3-17 5:00 PM";

View File

@ -3,7 +3,9 @@
// Last Updated 1/11/17
// by Ghostrider-DbD-
//////////////////////////////////////////
blck_fnc_spawnMarker = compileFinal preprocessfilelinenumbers "debug\spawnMarker.sqf";
blck_fnc_deleteMarker = compileFinal preprocessfilelinenumbers "debug\deleteMarker.sqf";
blck_fnc_missionCompleteMarker = compileFinal preprocessfilelinenumbers "debug\missionCompleteMarker.sqf";
if !(isServer) then
{
//diag_log "[blckeagls] initializing client variables";
@ -119,25 +121,25 @@ if !(isServer) then
fn_handleMessage = {
//private["_event","_msg","_mission"];
diag_log format["blck_Message ====] Paremeters = _this = %1",_this];
//diag_log format["blck_Message ====] Paremeters = _this = %1",_this];
params["_event","_message",["_mission",""]];
diag_log format["blck_Message ====] Paremeters _event %1 _message %2 paramter #3 %3",_event,_message,_mission];
diag_log format["blck_Message ====] _message isEqualTo %1",_message];
//diag_log format["blck_Message ====] Paremeters _event %1 _message %2 paramter #3 %3",_event,_message,_mission];
//diag_log format["blck_Message ====] _message isEqualTo %1",_message];
switch (_event) do
{
case "start":
{
playSound "UAV_05";
diag_log "switch start";
//diag_log "switch start";
//_mission = _this select 1 select 2;
[_event,_message,_mission] spawn fn_missionNotification;
};
case "end":
{
playSound "UAV_03";
diag_log "switch end";
//diag_log "switch end";
//_mission = _this select 1 select 2;
[_event,_message,_mission] spawn fn_missionNotification;
};
@ -153,7 +155,7 @@ if !(isServer) then
case "reinforcements":
{
if ( (player distance _mission) < 1000) then {playsound "AddItemOK"; ["Alert",_message] call fn_dynamicNotification;};
diag_log "---->>>> Reinforcements Spotted";
//diag_log "---->>>> Reinforcements Spotted";
};
case "IED":
{

View File

@ -5,8 +5,10 @@
//////////////////////////////////////////
// delete a marker
//diag_log format["blck_fnc_deleteMarker:: _this = %1",_this];
private["_markerName"];
_markerName = _this select 0;
deleteMarker _markerName;
//deleteMarker _markerName;
_markerName = "label" + _markerName;
deleteMarker _markerName;
//diag_log format["deleteMarker complete script for _this = %1",_this];

View File

@ -7,7 +7,7 @@
// this will not show to JIP players
private["_location","_MainMarker","_name"];
//diag_log format["blck_fnc_missionCompleteMarker:: _this = %1",_this];
_location = _this select 0;
_name = str(random(1000000)) + "MarkerCleared";
_MainMarker = createMarker [_name, _location];
@ -16,3 +16,4 @@ _MainMarker setMarkerType "n_hq";
_MainMarker setMarkerText "Mission Cleared";
uiSleep 300;
deleteMarker _MainMarker;
//diag_log format["missionCompleteMarker complete script for _this = %1",_this];

View File

@ -64,7 +64,7 @@ _blck_fn_configureRoundMarker = {
_blck_fn_configureIconMarker = {
private["_MainMarker"];
params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]];
if (blck_debugLevel > 2) then {diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text];};
//diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text];
_name = "label" + _name;
_MainMarker = createMarker [_name, _pos];
@ -74,15 +74,14 @@ _blck_fn_configureIconMarker = {
_MainMarker setMarkerText _text;
};
//diag_log format["spawnMarker:: -- >> _this = %1",_this];
// _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]"
params["_mArray"];
_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
_markerType params["_mShape","_mSize","_mBrush"];
//diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType];
//if (isServer && (blck_debugLevel > 0)) then
//{
if (blck_debugLevel > 1) then {diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType];};
//};
if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon ....
{
switch (_missionType) do {
@ -91,9 +90,10 @@ if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon ....
default {[_missionType,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] call _blck_fn_configureRoundMarker;};
};
};
if !((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then { // Deal with case of an icon
if !((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then
{ // Deal with case of an icon
// params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]];
[_missionType,_markerPos, _markerColor,_markerLabel,_markerType select 0] call _blck_fn_configureIconMarker;
};
//diag_log format["spawnMarker complete script for _this = %1",_this];

View File

@ -3,7 +3,9 @@
// Last Updated 1/11/17
// by Ghostrider-DbD-
//////////////////////////////////////////
blck_fnc_spawnMarker = compileFinal preprocessfilelinenumbers "debug\spawnMarker.sqf";
blck_fnc_deleteMarker = compileFinal preprocessfilelinenumbers "debug\deleteMarker.sqf";
blck_fnc_missionCompleteMarker = compileFinal preprocessfilelinenumbers "debug\missionCompleteMarker.sqf";
if !(isServer) then
{
//diag_log "[blckeagls] initializing client variables";
@ -171,7 +173,7 @@ if !(isServer) then
};
diag_log "blck client loaded ver 1/11/17 2.0 8 PM";
//diag_log "[blckeagls] starting client loop";
diag_log "[blckeagls] starting client loop";
while {true} do
{

View File

@ -5,8 +5,10 @@
//////////////////////////////////////////
// delete a marker
//diag_log format["blck_fnc_deleteMarker:: _this = %1",_this];
private["_markerName"];
_markerName = _this select 0;
deleteMarker _markerName;
//deleteMarker _markerName;
_markerName = "label" + _markerName;
deleteMarker _markerName;
//diag_log format["deleteMarker complete script for _this = %1",_this];

View File

@ -7,7 +7,7 @@
// this will not show to JIP players
private["_location","_MainMarker","_name"];
//diag_log format["blck_fnc_missionCompleteMarker:: _this = %1",_this];
_location = _this select 0;
_name = str(random(1000000)) + "MarkerCleared";
_MainMarker = createMarker [_name, _location];
@ -16,3 +16,4 @@ _MainMarker setMarkerType "n_hq";
_MainMarker setMarkerText "Mission Cleared";
uiSleep 300;
deleteMarker _MainMarker;
//diag_log format["missionCompleteMarker complete script for _this = %1",_this];

View File

@ -74,19 +74,14 @@ _blck_fn_configureIconMarker = {
_MainMarker setMarkerText _text;
};
if (isServer && (blck_debugLevel isEqualTo 3)) then
{
diag_log format["spawnMarker:: -- >> _this = %1",_this];
};
//diag_log format["spawnMarker:: -- >> _this = %1",_this];
// _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]"
params["_mArray"];
_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
_markerType params["_mShape","_mSize","_mBrush"];
//diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType];
if (isServer && (blck_debugLevel isEqualTo 3)) then
{
diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType];
};
if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon ....
{
switch (_missionType) do {
@ -95,9 +90,10 @@ if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon ....
default {[_missionType,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] call _blck_fn_configureRoundMarker;};
};
};
if !((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then { // Deal with case of an icon
if !((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then
{ // Deal with case of an icon
// params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]];
[_missionType,_markerPos, _markerColor,_markerLabel,_markerType select 0] call _blck_fn_configureIconMarker;
};
//diag_log format["spawnMarker complete script for _this = %1",_this];

View File

@ -4,7 +4,11 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
Contributions by Narines: bug fixes, testing, infinite ammo fix.
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
6/1/17 Version 6.59 Build 59
6/1/17 Version 6.59 Build 60
[changed] Players are no longer given crypto for each AI kill. Crypto added to AI Bodies was increased.
[fixed] error in GMS_fnc_setupWaypoints wherein _arc was not defined early enough in the script.
[fixed] Exile Respect Loss bug (temporary fix only).
@ -14,25 +18,14 @@ Ideas or code from that by Vampire and KiloSwiss have been used for certain func
[Fixed] All loot was removed from AI vehicles at the time a mission was completed.
[Fixed] When mission completion criteria included killing all AI, missions could be completed with alive AI in vehicles.
4/29/17 Version 6.58 Build 57
4/6/17 Version 6.58 Build 54
[Added] A FAQ presenting an overview of the mission system and addons.
[Added] Optional helicopter patrols that drop paratroops. These can be configured using variables in blck_configs.sqf:
For example, settings for the blue difficulty for missions are shown below.
blck_chanceParaBlue = 0.1; // [0 - 1] set to 0 to deactivate and 1 to always have paratroops spawn over the center of the mission.
blck_noParaBlue = 3; // [1-N]
[Changed] A new method for dynamically setting waypoints was added and waypoints are now scanned to detect and correct the case that AI get 'stuck', meaning the waypoint is never completed.
[Changes] AI behaviors should be more agressive.
[Changed] License information added to all files.
[Added] Preprocessor definitions included in all files.
[Changed] Helicopter crew waypoint system reverted to that from Build 46.
[Fixed] Mission timouts would prevent new missions from spawning after a while.
[Fixed] blck_timeAcceleration now determines if time acceleration is activated.
[Fixed] Missions did not complete correctly under certain circumstances.
[Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed.
[Fixed] Throws errors when evaluating errors related to certain disallowed types of kills.
[Fixed] Static loot crate spawner spawned empty crates under some circumstances.
Known errors: throws errors with certain loot crate setups (Exile)
3/23/17 Verision 6.58 build 48