0.5 b684 pt1

[Added] Customizability of units spawned by UAV alert via CfgEpochClient
> uavAlertUnitSpawnTemplate. (Default: I_Soldier_EPOCH)
[Changed] Great White Sharks will now spawn if player is deep enough in
the ocean.
[Changed] Objects or Players that have been given "Crypto" variable can
be accessed via the dynamic menu (Space Bar) for a "Take Crypto" action.
changed zombieRndChance to zombieRngChance and added default entry into
CfgEpochClient
This commit is contained in:
vbawol 2017-02-28 10:34:24 -06:00
parent 51cddfa424
commit 40f2c98f0c
9 changed files with 66 additions and 70 deletions

View File

@ -1,11 +1,14 @@
[Added] 64-bit database extension support for windows servers. (EpochServer_x64.dll)
[Added] Custom event handler and OnEachFrame hooks added. https://github.com/Ignatz-HeMan/Epoch/tree/experimental/Sources/epoch_code/customs Thanks to @Ignatz-HeMan
[Added] Crafting recipe: Mortar (Uses: 12x Rock, 2x dirty water) (Requires: Fire and workbench within 3m). Thanks to @baaljayjay for the suggestion.
[Changed] Optimized database SET and SETEX calls in both SQF and c++.
[Added] Customizability of units spawned by UAV alert via CfgEpochClient > uavAlertUnitSpawnTemplate. (Default: I_Soldier_EPOCH)
[Changed] Optimized database SET and SETEX calls in both SQF and C++.
[Changed] Optimized database GETRANGE call.
[Changed] To prevent issues with ownership only Group Leader can place a Jammer. Thanks to @Ignatz-HeMan
[Changed] Optimized NPC Trading and fixed abort issue if trade failed. Thanks to @Ignatz-HeMan
[Changed] Selling to traders with bank dept greater than -50000(default), pays the bank debt back to below the limit instead of the player. Purchasing is unaffected. Thanks to @Ignatz-HeMan
[Changed] Optimized NPC Trading and fixed issue if trade failed. Thanks to @Ignatz-HeMan
[Changed] Selling to traders with bank debt greater than -50000(default), pays the bank debt back to below the limit instead of the player. Purchasing is unaffected. Thanks to @Ignatz-HeMan
[Changed] Great White Sharks will now spawn if player is deep enough in the ocean.
[Changed] Objects or Players that have been given "Crypto" variable can be accessed via the dynamic menu (Space Bar) for a "Take Crypto" action.
[Fixed] To prevent issues with ownership only Group Leader can place a Jammer. Thanks to @Ignatz-HeMan
[Fixed] Wrong variable name in EPOCH_clientRevive.sqf. Thanks to @Ignatz-HeMan
[Fixed] Sometimes getting stuck only walking. Thanks to @Ignatz-HeMan
[Fixed] Repack of Energy Pack is now possible.

View File

@ -12,60 +12,5 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_supportCopter.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_aiskill","_arrSkills","_arrUnits","_arrVals","_grp","_minAISkill","_player","_unit","_unitCount","_units"];
//[[[end]]]
params ["_pos","_copter"];
_player = player; //need to check on change owner
_unit = objNull;
_grp = createGroup RESISTANCE;
_grp setBehaviour "COMBAT";
_grp setCombatMode "RED";
_minAISkill = getNumber (getMissionConfig "CfgEpochUAVSupport" >> "minAISkill");
_arrUnits = getArray (getMissionConfig "CfgEpochUAVSupport" >> "unitTypes");
_unitCount = getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxUnitNum");
_arrSkills = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];
_arrVals = [
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxAimingAccuracy"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxAimingShake"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxAimingSpeed"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxEndurance"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxSpotDistance"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxSpotTime"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxCourage"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxReloadSpeed"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxCommanding"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxGeneral")
];
_units = [];
for "_i" from 0 to (_unitCount - 1) do {
_unit = _grp createUnit[selectRandom _arrUnits, _pos, [], 0, "FORM"];
_units pushBack _unit;
//_unit setSkill 0.6;
_unit setRank "Private";
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit disableAI "FSM";
for "_i" from 0 to ((count _arrSkills)-1) do {
_aiskill = floor random (_arrVals select _i);
if (_aiskill<_minAISkill) then {_aiskill=_minAISkill};
_unit setSkill [_arrSkills select _i,_arrVals select _i];
};
if (_i == 0) then {
_grp selectLeader _unit;
[_pos,_copter,_player,_unit] execFSM "\x\addons\a3_epoch_code\System\Group_Leader_Brain.fsm";
};
};
// cleanup units or (transfer ownership) if player logs out
_units remoteExec ["EPOCH_localCleanup",2];
_unitClass = ["CfgEpochClient", "uavAlertUnitSpawnTemplate", "I_Soldier_EPOCH"] call EPOCH_fnc_returnConfigEntryV2;
[_unitClass, player, true, _this] call EPOCH_unitSpawn;

View File

@ -15,7 +15,7 @@
//[[[cog import generate_private_arrays ]]]
private ["_bomb","_config","_currentLimit","_disableAI","_driver","_grp","_index","_jammerRange","_jammers","_loop","_nonJammer","_nonTrader","_nonTraderAIRange","_restricted","_sapperNum","_spawnLimit","_targetPos","_unit","_units"];
//[[[end]]]
params ["_unitClass",["_trgt",player],["_doVariable",false]];
params ["_unitClass",["_trgt",player],["_doVariable",false],["_extraData",[]]];
_bomb = objNull;
// diag_log format["DEBUG: Antagonist %1 Spawning on %2. Do variable: %3.", _unitClass, _trgt, _doVariable];
@ -128,6 +128,50 @@ switch _unitClass do {
_units pushBack _unit;
};
};
case "I_Soldier_EPOCH": {
_extraData params ["_pos","_copter"];
_grp = createGroup RESISTANCE;
_grp setBehaviour "COMBAT";
_grp setCombatMode "RED";
_minAISkill = getNumber (getMissionConfig "CfgEpochUAVSupport" >> "minAISkill");
_arrUnits = getArray (getMissionConfig "CfgEpochUAVSupport" >> "unitTypes");
_unitCount = getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxUnitNum");
_arrSkills = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];
_arrVals = [
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxAimingAccuracy"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxAimingShake"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxAimingSpeed"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxEndurance"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxSpotDistance"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxSpotTime"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxCourage"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxReloadSpeed"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxCommanding"),
getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxGeneral")
];
_units = [];
for "_i" from 0 to (_unitCount - 1) do {
_unit = _grp createUnit[selectRandom _arrUnits, _pos, [], 0, "FORM"];
_units pushBack _unit;
_unit setRank "Private";
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit disableAI "FSM";
// randomize skill
for "_i" from 0 to ((count _arrSkills)-1) do {
_aiskill = floor random (_arrVals select _i);
if (_aiskill<_minAISkill) then {_aiskill=_minAISkill};
_unit setSkill [_arrSkills select _i,_arrVals select _i];
};
// spawn brains only on leader
if (_i == 0) then {
_grp selectLeader _unit;
[_pos,_copter,_trgt,_unit] execFSM "\x\addons\a3_epoch_code\System\Group_Leader_Brain.fsm";
};
};
};
};
if(_doVariable && (!isNull _unit) && (!isNull _trgt))then{

View File

@ -16,7 +16,7 @@ if !(surfaceIsWater _position) then {
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
EPOCH_playerIsSwimming = (_offsetZ > 1.7);
if (_offsetZ > 50) then {
"GreatWhite_F" call EPOCH_unitSpawn;
["GreatWhite_F", player, true] call EPOCH_unitSpawn;
};
};
};

View File

@ -3,7 +3,7 @@ if (random EPOCH_droneRndChance < _spawnChance) then {
"I_UAV_01_F" call EPOCH_unitSpawnIncrease;
};
if (EPOCH_mod_Ryanzombies_Enabled) then {
if (random EPOCH_zombieRndChance < _spawnChance) then {
if (random EPOCH_zombieRngChance < _spawnChance) then {
["EPOCH_RyanZombie_1",12] call EPOCH_unitSpawnIncrease;
};
};

View File

@ -20,7 +20,7 @@ _prevEnergy = EPOCH_playerEnergy;
// init config data
EPOCH_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
EPOCH_zombieRndChance = ["CfgEpochClient", "zombieRndChance", 50] call EPOCH_fnc_returnConfigEntryV2;
EPOCH_zombieRngChance = ["CfgEpochClient", "zombieRngChance", 50] call EPOCH_fnc_returnConfigEntryV2;
EPOCH_droneRndChance = ["CfgEpochClient", "droneRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
_baseHTLoss = ["CfgEpochClient", "baseHTLoss", 8] call EPOCH_fnc_returnConfigEntryV2;
_energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2;

View File

@ -70,7 +70,7 @@ if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 9
EPOCH_droneRndChance = 100;
EPOCH_sapperRndChance = 100;
EPOCH_zombieRndChance = 50;
EPOCH_zombieRngChance = 50;
// Custom Keys
EPOCH_keysActionPressed = false; //prevents EH spam

View File

@ -79,7 +79,7 @@ class tra_shop
class player_takeCrypto
{
condition = "dyna_isDeadPlayer";
condition = "(dyna_cursorTarget getVariable [""Crypto"",0]) > 0";
action = "dyna_cursorTarget call EPOCH_takeCrypto;";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\krypto.paa";
tooltip = "Take Krypto";

View File

@ -15,8 +15,10 @@
class CfgEpochClient
{
epochVersion = "0.5.0.0";
sapperRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper
droneRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = // 2% chance (+ 4% chance if in city) (1% - 2% Half if using silencer) to spawn drone if shot fired
sapperRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100
droneRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100
zombieRngChance = 50 // increase number to reduce chances and reduce to increase. Default 50
buildingNearbyMilitary = 0; //1 to allow building nearby
buildingNearbyMilitaryRange = 300; //Define radius of blocked area
buildingNearbyMilitaryClasses[] = {"Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"};
@ -37,12 +39,14 @@ class CfgEpochClient
storageCountPerMember = 5; //ignore if "splitCountLimits=0" & "useGroupCountLimits=0"
maxdoors = 8; // Max allowed doors per Group
maxgates = 5; // Max allowed Gates per Group
disableRemoteSensors = "true"; // disableRemoteSensors true/false
EPOCH_news[] = {"Word is that Sappers have a new boss.","Dogs will often lure them monsters away.","My dog was blown up. I miss him.."};
deathMorphClass[] = {"Epoch_Sapper_F","Epoch_SapperB_F","I_UAV_01_F","Epoch_Cloak_F"}; //Random selection of these classes when player morphs after death. Currently available: Epoch_Cloak_F, Epoch_SapperB_F, Epoch_Sapper_F, I_UAV_01_F
niteLight[] = {1,1.88,22}; //Set ambient lighting at night: {Brightness of light,Height of light}. Default (Low Ambient): {1.88,22} | Twilight: {7.2,88} | Distant: {12.8,142}
ryanZombiesEnabled = "true";
antagonistSpawnIndex[] = {{"Epoch_Cloak_F",1},{"GreatWhite_F",2},{"Epoch_Sapper_F",2},{"Epoch_SapperB_F",1},{"I_UAV_01_F",2},{"PHANTOM",1},{"B_Heli_Transport_01_F",1},{"EPOCH_RyanZombie_1",12}}; // {"type", limit}
antagonistSpawnIndex[] = {{"Epoch_Cloak_F",1},{"GreatWhite_F",2},{"Epoch_Sapper_F",2},{"Epoch_SapperB_F",1},{"I_UAV_01_F",2},{"PHANTOM",1},{"B_Heli_Transport_01_F",1},{"EPOCH_RyanZombie_1",12},{"I_Soldier_EPOCH",1}}; // {"type", limit}
uavAlertUnitSpawnTemplate = "I_Soldier_EPOCH";
customVarsDefaults[] = {{"Temp",98.6,{106.7,95,102,105,96,95}},{"Hunger",1500,{5000,0,5001,5001,1250,0}},{"Thirst",750,{2500,0,2501,2501,625,0}},{"AliveTime",0,{-2,0}},{"Energy",0,{2500,0}},{"Wet",0,{100,0,35,55,-1,-1}},{"Soiled",0,{100,0,35,55,-1,-1}},{"Immunity",0,{100,0}},{"Toxicity",0,{100,0,35,55,-1,-1}},{"Stamina",100,{"EPOCH_playerStaminaMax",0}},{"Crypto",0,{250000,0}},{"HitPoints",{0,0,0,0},{1,0,0.5,1,-1,-1}},{"BloodP",100,{190,0,120,140,70,50}},{"SpawnArray",{},{}},{"Karma",0,{50000,-50000}},{"Alcohol",0,{100,0,35,55,-1,-1}},{"Radiation",0,{100,0,35,55,-1,-1}},{"Nuisance",0,{100,0}},{"MissionArray",{},{}}}; // EPOCH_player + varName, default value, {max,min,high-warn,high-critical,low-warn,low-critical}
hudConfigs[] = {{{"BloodP","","",{"getPlayerDamage",">=",0.7}},"topRight","x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa",{"forceUpdate"}},{{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},"topRight","x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"},{"Hunger","topRight","x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",{"forceBloodRise"}},{"Thirst","topRight","x\addons\a3_epoch_code\Data\UI\thirst_ca.paa",{"forceBloodRise"}},{"Temp","topRight",{"x\addons\a3_epoch_code\Data\UI\hot_ca.paa","x\addons\a3_epoch_code\Data\UI\cold_ca.paa"},{"forceFatigue"}},{"Toxicity","topRight","x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"},{"Alcohol","topRight","x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"},{"Soiled","topRight","x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"},{"Radiation","topRight","x\addons\a3_epoch_code\Data\UI\rads_ca.paa"},{{"HitPoints","getPlayerHitPointDamage","HitLegs"},"topRight","x\addons\a3_epoch_code\Data\UI\broken_ca.paa"}};
group_upgrade_lvl[] = {4,"1000",6,"1500",8,"2000",10,"2500",12,"3000",14,"3500",16,"4000",32,"8000",64,"16000"}; // controls max group limit and cost