From 1fa6aaee1a3146bad4ddb8faf3f40cb9965be4ca Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Tue, 8 Nov 2016 20:36:17 -0500 Subject: [PATCH] Version 6.41 Added Killstreaks. Added option to have AI names in kill messages. Added tabs on AI bodies (Exile Only) --- .../CustomMarkers/CustomMarkers_Epoch.sqf | 44 ++++ .../CustomMarkers/CustomMarkers_Exile.sqf | 18 ++ .../CustomMarkers/GMS_fnc_addCustomMarker.sqf | 20 ++ .../CustomMarkers/init_CustomMarkers.sqf | 23 +++ .../Compiles/Units/GMS_fnc_processAIKill.sqf | 37 +++- .../Units/GMS_fnc_processIlleagalAIKills.sqf | 5 +- .../Compiles/Units/GMS_fnc_rewardKiller.sqf | 11 +- .../Compiles/Units/GMS_fnc_spawnUnit.sqf | 17 +- .../custom_server/Compiles/blck_variables.sqf | 2 +- .../custom_server/Compiles/passToHCs.sqf | 188 ++++-------------- .../Configs/blck_configs_epoch.sqf | 17 +- .../Configs/blck_configs_exile.sqf | 13 +- .../Configs/blck_custom_config.sqf | 4 +- @epochhive/addons/custom_server/changeLog.sqf | 22 +- 14 files changed, 232 insertions(+), 189 deletions(-) create mode 100644 @epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Epoch.sqf create mode 100644 @epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Exile.sqf create mode 100644 @epochhive/addons/custom_server/Compiles/CustomMarkers/GMS_fnc_addCustomMarker.sqf create mode 100644 @epochhive/addons/custom_server/Compiles/CustomMarkers/init_CustomMarkers.sqf diff --git a/@epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Epoch.sqf b/@epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Epoch.sqf new file mode 100644 index 0000000..3cd267a --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Epoch.sqf @@ -0,0 +1,44 @@ + +//blck_customMarkers = []; + +private _markers = [ + [31086.898,0,29440.51],"ServerRule","Server Rules:","mil_triangle","ColorRed"], + [[31143.064,0,28674.146],"ServerRule1","No PVP","mil_dot","ColorWhite"], + [[31136.533,0,27647.641],"ServerRule2","No THEFT from dead players, bases or unlocked vehicles.","mil_dot","ColorWhite"], + [[31129.488,0,25672.701],"ServerRule3","Don't go to players bases. Not to look, not hang around.","mil_dot","ColorWhite"], + [[31136.486,20.089996,26683.422],"ServerRule4","Racism, hacking, glitching, duping or theft will result in a ban.","mil_dot","ColorWhite"], + [[31137.244,5.0910034,24665.658],"ServerRule5","Please be respectful of other players and admins. What an Admin says is final.","mil_dot","ColorWhite"], + [[31140.377,28.001938,23660.883],"ServerRule6","Don't leave vehicles at the traders. These will be unlocked at restarts.","mil_dot","ColorWhite"], + [[93.216553,5.6385589e+013,-577.87292],"MissionsRule","Mission Rules:","mil_triangle","ColorRed"], + [[63.282959,5.6385589e+013,-1236.0565],"MissionRule1","Call missions in side chat and place a marker on the map with your name at the location of the mission you are headed to.","mil_dot","ColorWhite"], + [[58.716553,0,-2213.2051],"MissionRule2","You call the mission when you are on the way to it, not when you are going to do something else.","mil_dot","ColorWhite"], + [[52.185303,0,-3239.7109],"MissionRule3","Don't go to other players missions, you have nothing there to do.","mil_dot","ColorWhite"], + [[45.140381,0,-5214.6504],"MissionRule4","First to call out the mission owns it, thats includes AI gear and mission loot. (If you haven't marked and called it out, you will loose if someone do that.)","mil_dot","ColorWhite"]; + [[52.138428,0,-4203.9287],"MissionRule5","You/Your group can only call one mission at time.","mil_dot","ColorWhite"], + [[52.89624,0,-6221.6934],"MissionRule6","You don't need to call a out a mission if it is in the PVP zone. But if you are doing it from the outside of pvp zone, you will still be a target for PVP.","mil_dot","ColorWhite"], + [[56.029053,7.7267151,-7226.4678],"MissionRule7","Mission that spawns inside or if the mission marker touches the pvp marker will be marked as pvp.","mil_dot","ColorWhite"], + [[-12477.028,0,38781.328],"BuildingsRules","Buildings Rules:","mil_triangle","ColorRed"], + [[{-12420.862,0,38014.969],"BuildingsRules1","Do not build in pre-buildings.","mil_dot","ColorWhite"], + [[-12427.394,0,36988.461],"BuildingsRules2","Do not build on or so as to block roads.","mil_dot","ColorWhite"], + [[-12434.438,2.7021473e+037,35013.523],"BuildingsRules3","When you build, look around and see if your flag will effect any loot spawning. Your flag has a 150m radius, so to be on the safe side build at least 175-200m from loot spawns.","mil_dot","ColorWhite"], + [[-12427.44,0,36024.242],"BuildingsRules4","Do not build in or near high loot areas such as office buildings, airport hangers, or military installations. Flag poles block loot from spawning at these locations.","mil_dot","ColorWhite"], + [[-12426.683,0,34006.477]],"BuildingsRules5","Do not build and sniperbases near mafia places, stronghold. (They are not your personal mission.)","mil_dot","ColorWhite"], + [[-12423.55,0,33001.707,"BuildingsRules6","No air bases. Your base has to touch the ground.","mil_dot","ColorWhite"], + [[-12419.35,0,32066.854],"BuildingsRules7","Admin will delete bases that are breaking these rules, and you will get nothing back.","mil_dot","ColorWhite"], + [[24.283001,-4.3682598e-035,-8286.0889],"PVPZonesRule","PVP Zones Rules:","mil_triangle","ColorYellow"], + [[80.448997,5.0616355e+037,-9052.4521],"PVPZonesRule1","Any things goes.","mil_dot","ColorWhite"], + [[73.917999,-1.3038923e-012,-10078.958,"PVPZonesRule2","You can't be running around just outside the pvp zone and call pve if you get shoot, if you are there, you are a target.","mil_dot","ColorWhite"], + [[66.873001,-6.6600447e-037,-12053.896],"PVPZonesRule3","Mission that spawns inside or if the mission marker touches the pvp marker will be marked as pvp.","mil_dot","ColorWhite"], + [[73.871002,-7.911346e-021,-11043.177],"PVPZonesRule4","If anyone of your team/group is in the pvpzone and you are near it you will consider a legite target.","mil_dot","ColorWhite"], + [[-12857.771,4.3924521e+035,45162.469],,"Good to know:","mil_triangle","ColorOrange"], + [[-12801.605,0,44396.109],"GoodToKnow1","If you building or park your vehicles where missions spawns, be preper to login to a place where your vehicle are gone. As AI and player will have battles there.","mil_dot","ColorWhite"], + [[-12808.137,0,43369.598],"GoodToKnow2","ArmA is a glitchy game. Don't park vehicles on floors/roofs. It may work 1 server session but go boom the next. And they will not be replaced by Admins.","mil_dot","ColorWhite"], + [[12815.182,23135064,41394.66],"GoodToKnow3","What you do will effect your whole group. What your friends do will effect you. It's your job to look after your friends.","mil_dot","ColorWhite"], + [[-12808.184,0,42405.379],"GoodToKnow4","If you gone park your vehicle inside your base, make sure your base is big enough to hold them in there.","mil_dot",,"ColorWhite"], + [[-12833.245,-2.2216157e-031,40349.613],"GoodToKnow5","Use commen sense. Ask your self, would I like this happen too me?","mil_dot","ColorWhite"], + [[-12848.92,-1.4167476e-034,39791.008],"GoodToKnow6","ON EPOCH: Don't hord vehicles, 1 air, 2 land per player. Admin will delete them if think your breaking the limit.","mil_dot","ColorWhite"] +]; + +{ + _x call blck_fnc_addcustomMarker; +}forEach _markers; \ No newline at end of file diff --git a/@epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Exile.sqf b/@epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Exile.sqf new file mode 100644 index 0000000..f65ae26 --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/CustomMarkers/CustomMarkers_Exile.sqf @@ -0,0 +1,18 @@ + +blck_customMarkers = []; +blck_fnc_addCustomMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\CustomMarkers\GMS_fnc_addCustomMarkers.sqf"; +if (!isServer) exitWith{}; +_modType = call blck_getModType; +if (_modType isEqualTo "Epoch") then +{ + [] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Epoch.sqf"; +}; + +if (_modType isEqualTo "Exile") then +{ + [] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Exile.sqf"; +}; + +{ + +}forEach blck_customMarkers; diff --git a/@epochhive/addons/custom_server/Compiles/CustomMarkers/GMS_fnc_addCustomMarker.sqf b/@epochhive/addons/custom_server/Compiles/CustomMarkers/GMS_fnc_addCustomMarker.sqf new file mode 100644 index 0000000..990a0c0 --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/CustomMarkers/GMS_fnc_addCustomMarker.sqf @@ -0,0 +1,20 @@ + +/* +GMS_fnc_addCustomMarker.sqf +adds a custom marker to the array of custom markers that should be shown. +*/ + +params["_marker"]; +_type = []; +if (typeName _marker select 3 isEqualTo "STRING") then {_type = [_marker select 3,[],""]}; +if (typeName _marker select 3 isEqualTo "ARRAY" and count (_marker select 3) isEqualTo 3) then {_type = _marker select 3}; +private _m = [format["cm%1%2",_marker select 0 select 0,_marker select 0 select 1],_marker select 0,_marker select 1,_marker select 2,"",_marker select 4,_type]; +diag_log format["customMarkers_Epoch.sqf:: _m = %1",_m]; +if !(_type isEqualTo []) then +{ + blck_customMarkers pushback _m; +}; + +true + + diff --git a/@epochhive/addons/custom_server/Compiles/CustomMarkers/init_CustomMarkers.sqf b/@epochhive/addons/custom_server/Compiles/CustomMarkers/init_CustomMarkers.sqf new file mode 100644 index 0000000..64cbf57 --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/CustomMarkers/init_CustomMarkers.sqf @@ -0,0 +1,23 @@ +diag_log "-- >> Loading Custom Markers for blckeagls Mission System"; + +blck_customMarkers = []; +blck_fnc_addCustomMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\CustomMarkers\GMS_fnc_addCustomMarker.sqf"; + +if (!isServer) exitWith{}; + +_modType = call blck_getModType; +if (_modType isEqualTo "Epoch") then +{ + [] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Epoch.sqf"; +}; + +if (_modType isEqualTo "Exile") then +{ + [] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Exile.sqf"; +}; + +{ + [_x] execVM "debug\spawnMarker.sqf"; +}forEach blck_customMarkers; + +diag_log "-- >> Custom Markers Loaded"; \ No newline at end of file diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf index d140575..4ef18d7 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf @@ -1,18 +1,14 @@ /* - Deal with the various processes of: - removing the AI from the list of active AI - Alerting nearby units - Rewarding for legal kills - + Handle AI Deaths + Last Modified 11/6/16 By Ghostrider-DBD- Copyright 2016 */ - +private["_group","_isLegal","_weapon","_lastkill","_kills","_message","_killstreakMsg"]; params["_unit","_killer","_isLegal"]; //diag_log format["#- processAIKill.sqf -# called for unit %1",_unit]; - _unit setVariable ["GMS_DiedAt", (diag_tickTime),true]; blck_deadAI pushback _unit; @@ -24,10 +20,31 @@ if (count(units _group) < 1) then {deleteGroup _group;}; if !(isPlayer _killer) exitWith {}; [_unit,_killer] call blck_fnc_alertNearbyUnits; _isLegal = [_unit,_killer] call blck_fnc_processIlleagalAIKills; -if (_isLegal) then {[_unit,_killer] call blck_fnc_rewardKiller;}; +_lastkill = _killer getVariable["blck_lastkill",diag_tickTime]; +_killer setVariable["blck_lastkill",diag_tickTime]; +_kills = (_killer getVariable["blck_kills",0]) + 1; +if ((diag_tickTime - _lastkill) < 240) then +{ + _killer setVariable["blck_kills",_kills]; +} else { + _killer setVariable["blck_kills",0]; +}; +if (_isLegal) then {[_unit,_killer,_kills] call blck_fnc_rewardKiller;}; _weapon = currentWeapon _killer; -_message = format["[blck] %1: AI killed with %2 from %3 meters",name _killer,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _killer)]; -//diag_log format["[blck] unit killed message is %1",_message,""]; +if (_kills > 1) then +{ + _killstreakMsg = format[" %1X KILLSTREAK",_kills]; +}else{ + _killstreakMsg = ""; +}; +if (blck_useKilledAIName) then +{ + _message = format["[blck] %2: killed by %1 from %3m",name _killer,name _unit,round(_unit distance _killer)]; +}else{ + _message = format["[blck] %1 killed with %2 from %3 meters",name _killer,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _killer)]; +}; +_message =_message + _killstreakMsg; +diag_log format["[blck] unit killed message is %1",_message,""]; ["aikilled",_message,"victory"] call blck_fnc_messageplayers; { _unit removeAllEventHandlers _x; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf index 149a356..9aae183 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf @@ -1,7 +1,6 @@ /* by Ghostrider - 9-20-15 - Because this is precompiled there is less concern about keeping comments in. + 11-7-16 */ private["_missionType","_wasRunover","_launcher","_legal"]; @@ -32,7 +31,7 @@ _legal = true; fn_applyVehicleDamage = { // apply a bit of damage private["_vd"]; params["_vk"]; - _vk = _this select 0; + //_vk = _this select 0; _vd = getDammage _vk; _vk setDamage (_vd + blck_RunGearDamage); }; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf index e233f07..eeb9d18 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf @@ -6,7 +6,7 @@ NOTE the dependency on HALV_server_takegive_crypto !! */ -params["_unit","_killer"]; +params["_unit","_killer","_kills"]; //diag_log format["rewardKiller:: _unit = %1 and _killer %2",_unit,_killer]; private["_modType","_reward"]; @@ -33,8 +33,9 @@ if (_modType isEqualTo "Epoch") then if (_dist < 100) then { _reward = _maxReward - (_maxReward / 1.5); _reward }; if (_dist < 800) then { _reward = _maxReward - (_maxReward / 2); _reward }; if (_dist > 800) then { _reward = _maxReward - (_maxReward / 4); _reward }; - - //diag_log format["fnd_rewardKiller:: _bonus returned will be %1",_reward]; + + _reward=+(_kills*2); + diag_log format["fnd_rewardKiller:: _bonus returned will be %1",_reward]; [_killer,_reward] call blck_fnc_giveTakeCrypto; }; }; @@ -53,12 +54,10 @@ if (_modType isEqualTo "Exile") then _newKillerFrags = _newKillerFrags + 1; _killer setVariable ["ExileKills", _newKillerFrags]; format["addAccountKill:%1", getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget; - _money = _killer getVariable ["ExileMoney", 0]; - _money = _money + (_overallRespectChange/2); + _money = _money + (_overallRespectChange/2) + (_kills * 2); _killer setVariable ["ExileMoney", _money]; format["setAccountMoney:%1:%2", _money, (getPlayerUID _killer)] call ExileServer_system_database_query_fireAndForget; - _message = ["showFragRequest",_overallRespectChange]; //_message remoteExecCall ["ExileClient_system_network_dispatchIncomingMessage", (owner _killer)]; _killer call ExileServer_object_player_sendStatsUpdate; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf index e89358f..1b09acb 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -25,10 +25,24 @@ _modType = call blck_getModType; if (_modType isEqualTo "Epoch") then { "I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"]; + switch(_skillLevel) do + { + case "blue":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyBlue)),true];}; + case "red":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyRed)),true];}; + case "green":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyGreen)),true];}; + case "orange":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyOrange)),true];}; + }; }; if (_modType isEqualTo "Exile") then { "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "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];}; + }; }; [_ai1] call blck_fnc_removeGear; _skin = selectRandom _uniforms; // call BIS_fnc_selectRandom; @@ -132,8 +146,9 @@ if (_Launcher != "none") then if(sunOrMoon < 0.2 && blck_useNVG)then { - _ai1 addWeapon "NVG_EPOCH"; + _ai1 addWeapon selectRandom blck_NVG; _ai1 setVariable ["hasNVG", true]; + } else { diff --git a/@epochhive/addons/custom_server/Compiles/blck_variables.sqf b/@epochhive/addons/custom_server/Compiles/blck_variables.sqf index 13017c6..5be5935 100644 --- a/@epochhive/addons/custom_server/Compiles/blck_variables.sqf +++ b/@epochhive/addons/custom_server/Compiles/blck_variables.sqf @@ -6,7 +6,7 @@ Last modified 10/25/16 */ //blck_variablesLoaded = false; -blck_debugON = false; +blck_debugON = true; blck_debugLevel = 3; blck_minFPS = 13; diff --git a/@epochhive/addons/custom_server/Compiles/passToHCs.sqf b/@epochhive/addons/custom_server/Compiles/passToHCs.sqf index a57ef4e..4eeed69 100644 --- a/@epochhive/addons/custom_server/Compiles/passToHCs.sqf +++ b/@epochhive/addons/custom_server/Compiles/passToHCs.sqf @@ -11,7 +11,7 @@ * */ -if (!isServer) exitWith {}; +if (!isServer || !blck_useHC) exitWith {}; diag_log "passToHCs: Started"; @@ -19,173 +19,65 @@ diag_log "passToHCs: Started"; //waitUntil {!isNull HC}; _wait = true; while {_wait} do{ - if (isNil "HC") then + if (isNil "HC1") then { - diag_log "passToHCs: HC not connected";} else - { - diag_log format["passToHCs: owner HC = %1", owner HC]; + diag_log "passToHCs: HC not connected"; + } else { + diag_log format["passToHCs: owner HC1 = %1", owner HC1]; _wait = false; }; - sleep 5; + sleep 15; }; -_HC_ID = -1; // Will become the Client ID of HC +_HC1_ID = -1; // Will become the Client ID of HC _HC2_ID = -1; // Will become the Client ID of HC2 _HC3_ID = -1; // Will become the Client ID of HC3 -rebalanceTimer = 60; // Rebalance sleep timer in seconds +rebalanceTimer = 10; // Rebalance sleep timer in seconds cleanUpThreshold = 200; // Threshold of number of dead bodies + destroyed vehicles before forcing a clean up diag_log format["passToHCs: First pass will begin in %1 seconds", rebalanceTimer]; while {true} do { - // Rebalance every rebalanceTimer seconds to avoid hammering the server - uisleep rebalanceTimer; - - // Do not enable load balancing unless more than one HC is present - // Leave this variable false, we'll enable it automatically under the right conditions - _loadBalance = false; - - // Get HC Client ID else set variables to null + uisleep rebalanceTimer; try { - _HC_ID = owner HC; + _HC1_ID = owner HC1; - if (_HC_ID > 2) then { - //diag_log format ["passToHCs: Found HC with Client ID %1", _HC_ID]; + if (_HC1_ID > 2) then { + diag_log format ["passToHCs: Found HC with Client ID %1", _HC1_ID]; } else { - //diag_log "passToHCs: [WARN] HC disconnected"; + diag_log "passToHCs: [WARN] HC disconnected"; - HC = objNull; - _HC_ID = -1; + HC1 = objNull; + _HC1_ID = -1; }; - } catch { diag_log format ["passToHCs: [ERROR] [HC] %1", _exception]; HC = objNull; _HC_ID = -1; }; - - // Get HC2 Client ID else set variables to null - if (!isNil "HC2") then { - try { - _HC2_ID = owner HC2; - - if (_HC2_ID > 2) then { - //diag_log format ["passToHCs: Found HC2 with Client ID %1", _HC2_ID]; - } else { - //diag_log "passToHCs: [WARN] HC2 disconnected"; - - HC2 = objNull; - _HC2_ID = -1; - }; - } catch { diag_log format ["passToHCs: [ERROR] [HC2] %1", _exception]; HC2 = objNull; _HC2_ID = -1; }; - }; - - // Get HC3 Client ID else set variables to null - if (!isNil "HC3") then { - try { - _HC3_ID = owner HC3; - - if (_HC3_ID > 2) then { - //diag_log format ["passToHCs: Found HC2 with Client ID %1", _HC3_ID]; - } else { - //diag_log "passToHCs: [WARN] HC3 disconnected"; - - HC3 = objNull; - _HC3_ID = -1; - }; - } catch { diag_log format ["passToHCs: [ERROR] [HC3] %1", _exception]; HC3 = objNull; _HC3_ID = -1; }; - }; - - // If no HCs present, wait for HC to rejoin - //if ( (isNull HC) && (isNull HC2) && (isNull HC3) ) then { waitUntil {!isNull HC}; }; - - // Check to auto enable Round-Robin load balancing strategy - //if ( (!isNull HC && !isNull HC2) || (!isNull HC && !isNull HC3) || (!isNull HC2 && !isNull HC3) ) then { _loadBalance = true; }; - - if ( _loadBalance ) then { - //diag_log "passToHCs: Starting load-balanced transfer of AI groups to HCs"; - } else { - // No load balancing - //diag_log "passToHCs: Starting transfer of AI groups to HC"; - }; - - // Determine first HC to start with - _currentHC = 0; - - if (!isNull HC) then { _currentHC = 1; } else { - if (!isNull HC2) then { _currentHC = 2; } else { _currentHC = 3; }; - }; - - // Pass the AI - _numTransfered = 0; + } catch { diag_log format ["passToHCs: [ERROR] [HC] %1", _exception]; HC = objNull; _HC1_ID = -1; }; { - _swap = false; - - // If a player is in this group, don't swap to an HC - - // If the group belongs to the blckeagls mission system then transfer it to the HC - - if (_x getVariable["blck_group",false]) then { - //diag_log format["group belongs to blckeagls mission system so time to transfer it"]; - _id = groupOwner _x; - //diag_log format["Owner of group %1 is %2",_x,_id]; - if (_id > 2) then - { - //diag_log format["group %1 is already assigned to an HC with _id of %2",_x,_id]; - _swap = false; - } else { - //diag_log format["group %1 should be moved to an HC",_x]; - _swap = true; - }; + if (!isNull HC1) then + { + // Pass the AI + _numTransfered = 0; - } else { - //diag_log format["group %1 does not belong to blckeagls mission system",_x]; - }; - // If load balance enabled, round robin between the HCs - else pass all to HC - if ( _swap ) then { - _rc = false; + if (_x getVariable["blck_group",false]) then { + diag_log format["group belongs to blckeagls mission system so time to transfer it"]; + _id = groupOwner _x; + diag_log format["Owner of group %1 is %2",_x,_id]; + if (_id > 2) then + { + diag_log format["group %1 is already assigned to an HC with _id of %2",_x,_id]; + _swap = false; + } else { + if (_numTransfered < 5) then + { + diag_log format["group %1 should be moved to an HC",_x]; + _rc = _x setGroupOwner _HC1_ID; + if ( _rc ) then { _numTransfered = _numTransfered + 1; }; + }; + }; + + } else { + diag_log format["group %1 does not belong to blckeagls mission system",_x]; + }; - if ( _loadBalance ) then { - switch (_currentHC) do { - case 1: { _rc = _x setGroupOwner _HC_ID; if (!isNull HC2) then { _currentHC = 2; } else { _currentHC = 3; }; }; - case 2: { _rc = _x setGroupOwner _HC2_ID; if (!isNull HC3) then { _currentHC = 3; } else { _currentHC = 1; }; }; - case 3: { _rc = _x setGroupOwner _HC3_ID; if (!isNull HC) then { _currentHC = 1; } else { _currentHC = 2; }; }; - default { diag_log format["passToHCs: [ERROR] No Valid HC to pass to. _currentHC = %1", _currentHC]; }; - }; - } else { - switch (_currentHC) do { - case 1: { _rc = _x setGroupOwner _HC_ID; }; - case 2: { _rc = _x setGroupOwner _HC2_ID; }; - case 3: { _rc = _x setGroupOwner _HC3_ID; }; - default { diag_log format["passToHCs: [ERROR] No Valid HC to pass to. _currentHC = %1", _currentHC]; }; - }; - }; - - // If the transfer was successful, count it for accounting and diagnostic information - if ( _rc ) then { _numTransfered = _numTransfered + 1; }; - }; } forEach (allGroups); - - if (_numTransfered > 0) then { - // More accounting and diagnostic information - - diag_log format ["passToHCs: Transfered %1 AI groups to HC(s)", _numTransfered]; - - _numHC = 0; - _numHC2 = 0; - _numHC3 = 0; - - { - switch (owner ((units _x) select 0)) do { - case _HC_ID: { _numHC = _numHC + 1; }; - case _HC2_ID: { _numHC2 = _numHC2 + 1; }; - case _HC3_ID: { _numHC3 = _numHC3+ 1; }; - }; - } forEach (allGroups); - - if (_numHC > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC", _numHC]; }; - if (_numHC2 > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC2", _numHC2]; }; - if (_numHC3 > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC3", _numHC3]; }; - - diag_log format ["passToHCs: %1 AI groups total across all HC(s)", (_numHC + _numHC2 + _numHC3)]; - } else { - diag_log "passToHCs: No rebalance or transfers required this round"; - }; - }; \ No newline at end of file diff --git a/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf b/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf index 24bb452..8d1ffb6 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf @@ -24,6 +24,9 @@ Last modified 8/1/15 GENERAL MISSION SYSTEM CONFIGURATION ***********************************************************/ + //////// + // Headless Client Configurations + blck_useHC = true; // MISSION MARKER CONFIGURATION // blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type @@ -49,9 +52,10 @@ Last modified 8/1/15 blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC",/*"HMG_M2",*/"HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o // GLOBAL MISSION PARAMETERS - blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. + blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player and AI unit killed are shown. + blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Note that this is a default and that mission-specific settings can be defined for each mission using the template blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. - blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out. + blck_killEmptyAIVehicles = true; // when true, the AI vehicle will be extensively damaged once all AI have gotten out. blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases //Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission. @@ -59,8 +63,8 @@ Last modified 8/1/15 blck_enableGreenMissions = 1; blck_enableRedMissions = 1; blck_enableBlueMissions = 1; - blck_enableHunterMissions = 2; - blck_enableScoutsMissions = 2; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; // AI VEHICLE PATROL PARAMETERS //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high @@ -177,6 +181,11 @@ Last modified 8/1/15 ["aimingAccuracy",0.1],["aimingShake",0.25],["aimingSpeed",0.3],["endurance",0.50],["spotDistance",0.4],["spotTime",0.4],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] ]; + blck_maxMoneyOrange = 25; + blck_maxMoneyGreen = 20; + blck_maxMoneyRed = 15; + blck_maxMoneyBlue = 10; + // AI Settings for scouts, Hunters and crashes are definded in thos missions. /********************************************************************************* diff --git a/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf b/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf index 8de4190..2e1a020 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf @@ -52,7 +52,8 @@ Last modified 8/1/15 blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC","HMG_M2","HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","DShKM","DSHKM","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o // GLOBAL MISSION PARAMETERS - blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. + blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player and AI unit killed are shown. + blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Note that this is a default and that mission-specific settings can be defined for each mission using the template blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out. blck_AIPatrolVehicles = ["Exile_Car_Offroad_Armed_Guerilla01","Exile_Car_Offroad_Armed_Guerilla02","Exile_Car_HMMWV_M2_Green","Exile_Car_HMMWV_M2_Desert","Exile_Car_BTR40_MG_Green","Exile_Car_BTR40_MG_Camo"]; // Type of vehicle spawned to defend AI bases @@ -61,9 +62,9 @@ Last modified 8/1/15 blck_enableOrangeMissions = 1; blck_enableGreenMissions = 1; blck_enableRedMissions = 1; - blck_enableBlueMissions = -1; - blck_enableHunterMissions = 2; - blck_enableScoutsMissions = 2; + blck_enableBlueMissions = 1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; // AI VEHICLE PATROL PARAMETERS //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high @@ -216,6 +217,10 @@ Last modified 8/1/15 ["aimingAccuracy",0.10],["aimingShake",0.2],["aimingSpeed",0.55],["endurance",0.50],["spotDistance",0.65],["spotTime",0.80],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] ]; + blck_maxMoneyOrange = 25; + blck_maxMoneyGreen = 20; + blck_maxMoneyRed = 15; + blck_maxMoneyBlue = 10; /********************************************************************************* AI WEAPONS, UNIFORMS, VESTS AND GEAR diff --git a/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf b/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf index 548dc55..06f97f7 100644 --- a/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf @@ -13,7 +13,7 @@ switch (_world) do case"tanoa": {blck_maxCrashSites = 2}; case"namalsk": { blck_enableOrangeMissions = 1; - blck_enableGreenMissions = 1; + blck_enableGreenMissions = -1; blck_enableRedMissions = 1; blck_enableBlueMissions = -1; blck_enableHunterMissions = 1; @@ -43,7 +43,7 @@ if (blck_debugON) then blck_cleanupCompositionTimer = 5; // Time after mission completion at which items in the composition are deleted. blck_AliveAICleanUpTime = 10; // Time after mission completion at which any remaining live AI are deleted. - blck_bodyCleanUpTimer = 20; + //blck_bodyCleanUpTimer = 20; blck_SpawnEmplaced_Orange = 4; // Number of static weapons at Orange Missions blck_SpawnEmplaced_Green = 3; // Number of static weapons at Green Missions diff --git a/@epochhive/addons/custom_server/changeLog.sqf b/@epochhive/addons/custom_server/changeLog.sqf index ea465ca..60efca1 100644 --- a/@epochhive/addons/custom_server/changeLog.sqf +++ b/@epochhive/addons/custom_server/changeLog.sqf @@ -4,18 +4,20 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2 Contributions by Narines: bug fixes, testing, 'fired' event handler Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. -Version 6.4 10/25/16 -Reworked all code for spawning, monitoring and cleaning up vehicle patrols and static weapons. -This consolidated a bunch of code used to spawn these items and eliminated quite a few spawned loops used to monitor the condition of vehicles. -Switched from a system that simply destroyed a vehicle when all AI in it were dead to one that destroys wheels, motor and guns rendering the vehicle inoperable. -Redid the code that blocks players from getting in unless that is allowed by blck_killEmptyAIVehicles = false +11/2/16 Version 6.41 Build 9 +Added a parameter blck_useKilledAIName that, when true, changes the kill messages to show player name and AI unit name +Added message to players for killstreaks and a crypto/Tabs bonus for killstreaks. +Exile: AI spawn with a few tabs. +//Epoch: AI spawn with a few Crypto +Corrected an error that would spawn Epoch NVG on AI in Exile. -Version 6.3-16 -system for cleanup of mission objects, live AI and dead AI was re-worked to minimize the number of spawned code running at one time and reduced the number of loops checked. +10/25/16 Version 6.4 Build 8 +Reworked the code to spawn vehicle patrols and static weapons and clean them up. +Reworked the code that messages players to be sure that calling titleText does not hang the messaging function and delay hints or system chat notifications. - -10/22/16 Version 6.2 Build 8-14-16 -bug fixes +10/22/16 v 6.3 Build 8-14-16 +Moved routines that delete dead AI, Alive AI and mission objects from individual loops to a single loop spawned by blck_init.sqf. +Added functions to cache these data with time stamps for later time-based deletion. 10/21/16 Version 6.2 Build 7 Redid system for markers which are now defined in the mission template reducing dependence on client side configurations for each mission or marker type.