0.3.5.029

This commit is contained in:
vbawol 2015-11-08 09:26:38 -06:00
parent 2b5f56d2a9
commit 055b129bcc
34 changed files with 935 additions and 197 deletions

View File

@ -1,11 +1,24 @@
[Added] Hesco barrier.
[Added] Persistent Spike traps.
[Added] Metal Floors as upgrade in-place option for wood floors.
[Added] Gender selection screen improvements.
[Added] New interaction system.
[Added] Documentation on server core framework functions and hive calls.
[Added] Custom Epoch Tank trap.
[Added] New version of the Fishing Rod.
[Added] Persistent wood and metal spike traps.
[Added] New custom 3x wide hesco type barrier.
[Added] New custom tank trap.
[Added] Updated version of the Fishing Rod.
[Added] muzzle_snds_338_sand to loot and pricing tables.
[Changed] Overhaul of secure storage system with support for new UI.
[Added] Client side master loop is now fully config (CfgMasterLoop) based.
[Changed] Final overhaul of secure storage system with support for new UI.
[Changed] Increased reverse token check timeout from 90 to 180 seconds.
[Changed] Server pack Tools folder now contains InstalEpoch.cmd that is an updated version of the command line download Epoch client files download script for steam workshop.
[Fixed] Was unable to use cursorTarget underwater, added new function EPOCH_fnc_cursorTarget that works everywhere.
[Fixed] NPC item trades that cannot fit in the players inventory will be placed at the feet of the player.
[Fixed] If player started a trade with a zero Krypto and then obtained Krypto they had to relog to be able to trade again.
[Fixed] Removed forced weather sync on server startup from server init phase so weather changes are now solely dependent on Epoch Events weather script.
[Fixed] Added private array to all Epoch Event scripts due to feedback.
[Fixed] Not loosing Stamina while swimming.
[Fixed] Removed extra roadway on top of columns.
[Fixed] Force trader data save to save when loading starter items.
[Fixed] Dynamic traders did not correctly track the stored vehicle count and limits.
[Fixed] Error Zero divisor in master loop.
[Fixed] .rpt error after gutting animal added by adding isNull check to animal brain.

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !="Hesco3_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F"
5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !="(Hesco3|Metal|Foundation)_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F"

View File

@ -1,3 +1,3 @@
5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F" !="#smokesource" !="SmokeLauncherAmmo"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="Hesco3(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 SeaGull

View File

@ -1 +1 @@
5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"

View File

@ -931,7 +931,7 @@ class FSM
" }forEach EPOCH_playerHitPoints;" \n
"};" \n
"" \n
"[] spawn EPOCH_masterLoop;" \n
"[] spawn EPOCH_masterLoop_v2;" \n
"true call EPOCH_fnc_Weather;" \n
"[5,100] spawn EPOCH_niteLight;" \n
"" \n

View File

@ -2,7 +2,6 @@ _out = [false, false, false];
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ _out };
if !(isNull EPOCH_Target) exitWith{ _out };
if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; _out };
params ["_object"];
@ -10,6 +9,7 @@ if (isNull _object) exitWith{ _out };
if ((player distance _object) > 9) exitWith { _out };
if !(EPOCH_buildMode > 0) exitWith {_out};
if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; _out };
_objType = typeOf _object;
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;

View File

@ -1,137 +0,0 @@
EPOCH_buildClasses = ["Land_Obstacle_Bridge_F",
"Land_Shoot_House_Wall_F",
"Land_Shoot_House_Wall_Stand_F",
"Land_Shoot_House_Wall_Crouch_F",
"Land_Shoot_House_Wall_Prone_F",
"Land_Shoot_House_Wall_Long_F",
"Land_Shoot_House_Wall_Long_Stand_F",
"Land_Shoot_House_Wall_Long_Crouch_F",
"Land_Shoot_House_Wall_Long_Prone_F",
"Land_Shoot_House_Corner_F",
"Land_Shoot_House_Corner_Stand_F",
"Land_Shoot_House_Corner_Crouch_F",
"Land_Shoot_House_Corner_Prone_F",
"Land_Shoot_House_Panels_F",
"Land_Shoot_House_Panels_Crouch_F",
"Land_Shoot_House_Panels_Prone_F",
"Land_Shoot_House_Panels_Vault_F",
"Land_Shoot_House_Panels_Window_F",
"Land_Shoot_House_Panels_Windows_F",
"Land_Shoot_House_Tunnel_F",
"Land_Shoot_House_Tunnel_Stand_F",
"Land_Shoot_House_Tunnel_Crouch_F",
"Land_Shoot_House_Tunnel_Prone_F",
"Land_Obstacle_RunAround_F","Land_Obstacle_Saddle_F","Land_RampConcrete_F","Land_RampConcreteHigh_F","Land_GH_Stairs_F","Land_Billboard_F","Land_HBarrier_1_F","Land_HBarrier_3_F","Land_HBarrier_5_F","Land_Razorwire_F","Land_HBarrierWall6_F","WoodFloor_EPOCH","WoodLargeWall_EPOCH","Land_BagFence_Long_F","Land_BagFence_Corner_F","Land_BagFence_End_F","Land_BagFence_Round_F","Land_BagFence_Short_F"];
EPOCH_buildClassesCount = count EPOCH_buildClasses - 1;
Epoch_selectedBuildClasIndex = 0;
EPOCH_selectedBuildClass = EPOCH_buildClasses select 0;
EPOCH_buildWorldspace = [[0,0,0],[0,0,0],[0,0,0]];
EPOCH_KeyDownFunctionhandler = {
_dikCode = _this select 1;
_shift = _this select 2;
_ctrl = _this select 3;
_alt = _this select 4;
switch (_dikCode) do {
case 0x39 : {
_worldspace = EPOCH_buildWorldspace;
_newObj = EPOCH_selectedBuildClass createVehicle (_worldspace select 0);
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
_newObj setposASL (_worldspace select 0);
_handled = true;
};
case 0xC9 : {
Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex + 1) min EPOCH_buildClassesCount) max 0;
EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex;
if !(isNull EPOCH_currentBuildObj) then {
deleteVehicle EPOCH_currentBuildObj;
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
EPOCH_currentBuildObj disableCollisionWith player;
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
};
hint EPOCH_selectedBuildClass;
_handled = true;
};
case 0xD1 : {
Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex - 1) min EPOCH_buildClassesCount) max 0;
EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex;
hint EPOCH_selectedBuildClass;
if !(isNull EPOCH_currentBuildObj) then {
deleteVehicle EPOCH_currentBuildObj;
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
EPOCH_currentBuildObj disableCollisionWith player;
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
};
_handled = true;
};
};
_handled
};
[] spawn {
(findDisplay 46) displayRemoveAllEventHandlers "KeyDown";
(findDisplay 46) displayAddEventHandler["KeyDown",{_this call EPOCH_KeyDownFunctionhandler}];
};
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
EPOCH_currentBuildObj disableCollisionWith player;
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
onEachFrame {
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,10],player,EPOCH_currentBuildObj];
if (count _ins == 0) exitWith {EPOCH_currentBuildObj setPosASL [0,0,0]};
_intersectObj = (_ins select 0 select 2);
if (isNull _intersectObj) then {_intersectObj = player};
EPOCH_currentBuildObj setVectorDirAndUp [vectordir _intersectObj,(_ins select 0 select 1)];
EPOCH_currentBuildObj setPosASL (_ins select 0 select 0);
EPOCH_buildWorldspace = [(_ins select 0 select 0),vectordir _intersectObj,(_ins select 0 select 1)];
_currentPos = (_ins select 0 select 0);
_numberOfContacts = 0;
_currentDir = direction EPOCH_currentBuildObj;
_bbr = boundingBoxReal EPOCH_currentBuildObj;
_p1 = _bbr select 0;
_p2 = _bbr select 1;
_maxWidth = abs ((_p2 select 0) - (_p1 select 0)) / 2;
_maxLength = abs ((_p2 select 1) - (_p1 select 1)) / 2;
_maxHeight = abs ((_p2 select 2) - (_p1 select 2)) / 2;
{
_pos1 = EPOCH_currentBuildObj modelToWorld [0,0,_maxHeight];
_pos2 = EPOCH_currentBuildObj modelToWorld _x;
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player,EPOCH_currentBuildObj];
_color = [0,0,1,1];
if (count _ins == 0) then {
_color = [0,0,1,1];
drawIcon3D ["a3\modules_f\data\iconunlock_ca.paa", [1,1,1,1], _pos2, 1, 1, 45, "", 1, 0.05, "TahomaB"];
} else {
_numberOfContacts = _numberOfContacts + 1;
drawIcon3D ["a3\modules_f\data\iconlock_ca.paa", [1,1,1,1], ASLToATL (_ins select 0 select 0), 1, 1, 45, "Snap", 1, 0.05, "TahomaB"];
_color = [1,0,0,1];
};
drawLine3D [
_pos1,
_pos2,
_color
];
} forEach[[_maxWidth,0,_maxHeight], [0,_maxLength,_maxHeight], [-_maxWidth,0,_maxHeight], [0,-_maxLength,_maxHeight], [0,0,-_maxHeight]];
};

View File

@ -5,28 +5,19 @@ _EPOCH_lastSave = missionNamespace getVariable["EPOCH_lastSave", diag_tickTime];
if ((diag_tickTime - _EPOCH_lastSave) >= _time) then {
missionNamespace setVariable["EPOCH_lastSave", diag_tickTime];
// manually set hitpoints array
EPOCH_playerHitPoints = ((getAllHitPointsDamage player) param [2,[]]);
missionNamespace setVariable ["EPOCH_pushPlayer_PVS",
[ player,
[
missionNamespace getVariable "EPOCH_playerTemp",
missionNamespace getVariable "EPOCH_playerHunger",
missionNamespace getVariable "EPOCH_playerThirst",
missionNamespace getVariable "EPOCH_playerAliveTime",
missionNamespace getVariable "EPOCH_playerEnergy",
missionNamespace getVariable "EPOCH_playerWet",
missionNamespace getVariable "EPOCH_playerSoiled",
missionNamespace getVariable "EPOCH_playerImmunity",
missionNamespace getVariable "EPOCH_playerToxicity",
missionNamespace getVariable "EPOCH_playerStamina",
missionNamespace getVariable "EPOCH_playerCrypto",
((getAllHitPointsDamage player) param [2,[]]),
missionNamespace getVariable "EPOCH_playerBloodP",
missionNamespace getVariable "EPOCH_playerSpawnArray"
],
missionNamespace getVariable "Epoch_personalToken"
]
];
// Get all custom variables
_customVars = [];
_customVarsInit = ["CfgEpochClient", "customVarsDefaults", missionNamespace getVariable["EPOCH_customVarsDefaults", []]] call EPOCH_fnc_returnConfigEntryV2;
{
_customVars pushBack (missionNamespace getVariable format["EPOCH_player%1",_x select 0]);
} forEach _customVarsInit;
// TODO: use remoteExec here
missionNamespace setVariable ["EPOCH_pushPlayer_PVS",[player,_customVars,missionNamespace getVariable "Epoch_personalToken"]];
publicVariableServer "EPOCH_pushPlayer_PVS";
};
missionNamespace setVariable["EPOCH_lastSave", diag_tickTime];
};

View File

@ -1,5 +1,5 @@
call EPOCH_clientInit;
[] spawn EPOCH_masterLoop;
[] spawn EPOCH_masterLoop_v2;
[5,100] call EPOCH_niteLight;
Epoch_canBeRevived = true;
@ -7,4 +7,4 @@ Epoch_canBeRevived = true;
[] execFSM "\x\addons\a3_epoch_code\system\gender_selection.fsm";
true
true

View File

@ -12,7 +12,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
Epoch_personalToken = _this select 1;
// call EPOCH_clientInit;
[] spawn EPOCH_masterLoop;
[] spawn EPOCH_masterLoop_v2;
[5, 100] call EPOCH_niteLight;
closeDialog 0;

View File

@ -218,7 +218,9 @@ while {alive player} do {
_vehicle = vehicle player;
if (_vehicle == player) then {
_val = log(abs(speed player));
if (_val>0.7) then {
_staminaThreshold = 0.7;
if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3};
if (_val>_staminaThreshold) then {
EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0;
} else {
_increaseStamina = true;
@ -478,6 +480,7 @@ while {alive player} do {
_position = getPosATL player;
EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300];
EPOCH_playerIsSwimming = false;
if !(surfaceIsWater _position) then {
if (EPOCH_nearestLocations isEqualTo []) then{
@ -489,12 +492,19 @@ while {alive player} do {
} else {
// spawn shark if player is deep water and not in vehicle
if (vehicle player == player) then{
if (((_position vectorDiff getPosASL player) select 2) > 50) then {
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
if (_offsetZ > 1.7) then {
EPOCH_playerIsSwimming = true;
};
if (_offsetZ > 50) then {
"GreatWhite_F" call EPOCH_unitSpawn;
};
};
};
// default power state
EPOCH_nearPower = false;
EPOCH_chargeRate = 0;
// energy Charge from nearby power plants
_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange];
@ -521,11 +531,8 @@ while {alive player} do {
} else {
EPOCH_chargeRate = ceil (_totalCapacity / (count _players));
};
EPOCH_nearPower = true;
};
EPOCH_nearPower = true;
} else {
EPOCH_nearPower = false;
EPOCH_chargeRate = 0;
};
EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer));

View File

@ -0,0 +1,40 @@
// EPOCHMOD.com
disableSerialization;
_config = 'CfgMasterLoop' call EPOCH_returnConfig;
_build_sqf = preprocessFile getText (_config >> "Init" >> "file");
_configs = "true" configClasses (_config >> "Events");
_condition = getText (_config >> "Events" >> "condition");
_file = getText (_config >> "Events" >> "file");
{
_configName = configName _x;
_varName = format["_EPOCH_%1",_configName];
_build_sqf = _build_sqf + '
'+_varName+' = diag_tickTime;
';
}forEach _configs;
_build_sqf = _build_sqf + '
while {'+_condition+'} do {
_tickTime = diag_tickTime;
';
{
_delay = getNumber(_x >> "delay");
_configName = configName _x;
_varName = format["_EPOCH_%1",_configName];
_code = preprocessFile format ["%1\%2.sqf",_file,_configName];
_build_sqf = _build_sqf + '
if ((_tickTime - '+_varName+') > '+str(_delay)+') then {
'+_varName+' = _tickTime;
'+_code+'
};
';
}forEach _configs;
_build_sqf = _build_sqf + '
if (vehicle player != player) then {
if (isNull EPOCH_currentVehicle) then {
EPOCH_currentVehicle = vehicle player;
EPOCH_currentVehicle addEventHandler["GetOut", "_this call EPOCH_antiWall"];
};
};
uiSleep 0.1;
};';
call compile _build_sqf;

View File

@ -0,0 +1,142 @@
// current target
_currentTarget = objNull;
_cursorTarget = ([10] call EPOCH_fnc_cursorTarget);
if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then {
if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{
if (_cursorTarget isKindOf "Animal_Base_F") then {
if !(alive _cursorTarget) then {
_currentTarget = _cursorTarget;
};
} else {
_currentTarget = _cursorTarget;
};
};
};
EPOCH_currentTarget = _currentTarget;
_increaseStamina = false;
_vehicle = vehicle player;
if (_vehicle == player) then {
_val = log(abs(speed player));
_staminaThreshold = 0.7;
if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3};
if (_val>_staminaThreshold) then {
EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0;
} else {
_increaseStamina = true;
};
} else {
if (EPOCH_buildMode > 0) then {
EPOCH_buildMode = 0;
EPOCH_snapDirection = 0;
hintsilent "BUILD MODE: DISABLED";
EPOCH_Target = objNull;
// EPOCH_SURVEY = [];
};
_increaseStamina = true;
switch (typeOf _vehicle) do {
case "jetski_epoch": {
_clock_hour10 = floor ((date select 3)/10);
_clock_minute10 = floor ((date select 4)/10);
{
_vehicle setObjectTexture [_forEachIndex,_x];
}forEach[
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_hour10],
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 3)-(_clock_hour10*10)],
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_minute10],
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 4)-(_clock_minute10*10)],
format["\x\addons\a3_epoch_vehicles\data\fuel%1_ca.paa",floor(fuel _vehicle*10)]
];
};
case "ebike_epoch": {
{
_vehicle setObjectTexture [_forEachIndex,_x];
}forEach[
format["\x\addons\a3_epoch_vehicles\data\speed%1_ca.paa",floor(speed _vehicle/9) max 0],
format["\x\addons\a3_epoch_vehicles\data\energ%1_ca.paa",floor(fuel _vehicle*14)]
];
};
};
};
_envCold = EPOCH_playerTemp <= 95.0;
_envHot = EPOCH_playerTemp >= 106.7;
_hungry = EPOCH_playerHunger <= 0;
_thirsty = EPOCH_playerThirst <= 0;
_warnbloodPressure = EPOCH_playerBloodP > 120;
_thirst ctrlShow (EPOCH_playerThirst <= 625);
if (ctrlShown _thirst) then {
[_thirst,_thirsty] call _fadeUI;
_thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1];
_thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1];
};
_hunger ctrlShow (EPOCH_playerHunger <= 1250);
if (ctrlShown _hunger) then {
[_hunger,_hungry] call _fadeUI;
_hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1];
_hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1];
};
_playerOxygen = getOxygenRemaining player;
_oxygen ctrlShow (_playerOxygen < 1);
if (ctrlShown _oxygen) then {
[_oxygen,(_playerOxygen <= 0.55)] call _fadeUI;
_oxygen ctrlSetTextColor [1, _playerOxygen, _playerOxygen, 1];
};
_hazzard ctrlShow (EPOCH_playerToxicity > 1);
if (ctrlShown _hazzard) then {
[_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI;
_toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1];
_hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1];
};
_broken ctrlShow ((player getHitPointDamage "HitLegs") >= 0.5);
if (ctrlShown _broken) then {
[_broken,true] call _fadeUI;
};
if (_envCold || _envHot || _hungry || _thirsty) then {
if (_envHot || _envCold) then {
player setFatigue 1;
};
EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190;
_increaseStamina = false;
} else {
if (EPOCH_playerStamina > 0) then {
if !(_panic) then {
if (!_warnbloodPressure) then {
player setFatigue 0;
};
EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100;
};
};
};
_critical = (damage player >= 0.7 || _warnbloodPressure);
_emergency ctrlShow _critical;
if (ctrlShown _emergency) then {
[_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI;
_emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1];
_emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1];
};
if (EPOCH_playerBloodP >= 180) then {
true call EPOCH_pushCustomVar;
};
if (_increaseStamina && (getFatigue player) == 0) then {
EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax;
};
if (EPOCH_debugMode) then {
call EPOCH_debugMonitor;
};
call EPOCH_TradeLoop;
onEachFrame EPOCH_onEachFrame;

View File

@ -0,0 +1,94 @@
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2];
EPOCH_arr_interactedObjs = [];
};
if (damage player != _damagePlayer) then {
if (alive player) then {
true call EPOCH_pushCustomVar;
_damagePlayer = damage player;
};
};
if ((rating player) < 0) then {
player addRating abs(rating player);
};
// calculate total available power
// 1. number of power production devices within range 75m
// find share of power based on factors
// 1. number of players
// 2. Other sources of drain (Lights)
_energyValue = EPOCH_chargeRate min _energyRegenMax;
_vehicle = vehicle player;
if (_vehicle != player && isEngineOn _vehicle) then {
_energyValue = _energyValue + 5;
};
if (currentVisionMode player == 1) then { //NV enabled
_energyValue = _energyValue - _energyCostNV;
if (EPOCH_playerEnergy == 0) then {
player action["nvGogglesOff", player];
};
};
EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0;
if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then {
9993 cutRsc["EpochGameUI3", "PLAIN", 0, false];
_display3 = uiNamespace getVariable "EPOCH_EpochGameUI3";
_energyDiff = round(EPOCH_playerEnergy - _prevEnergy);
_diffText = if (_energyDiff > 0) then {format["+%1",_energyDiff]} else {format["%1",_energyDiff]};
// hint str [_energyValue,_prevEnergy,EPOCH_playerEnergy];
(_display3 displayCtrl 21210) ctrlSetText format["%1/%2 %3", round(EPOCH_playerEnergy), EPOCH_playerEnergyMax, _diffText];
_prevEnergy = EPOCH_playerEnergy;
};
if (EPOCH_playerEnergy == 0) then {
if (EPOCH_buildMode > 0) then {
EPOCH_buildMode = 0;
EPOCH_snapDirection = 0;
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Mode Disabled: Need Energy< / t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
EPOCH_Target = objNull;
EPOCH_Z_OFFSET = 0;
EPOCH_X_OFFSET = 0;
EPOCH_Y_OFFSET = 5;
};
};
_attackers = player nearEntities[["Snake_random_EPOCH", "GreatWhite_F", "Epoch_Cloak_F"], 30];
if !(_attackers isEqualTo[]) then {
(_attackers select 0) call EPOCH_client_bitePlayer;
_panic = true;
} else {
// custom poision
_toxicObjs = player nearobjects["SmokeShellCustom", 6];
if!(_toxicObjs IsEqualTo[]) then {
(_toxicObjs select 0) call EPOCH_client_bitePlayer;
_panic = true;
} else {
_panic = false;
};
};
call EPOCH_fnc_Weather;
// Hunger / Thirst
_HTlossRate = _baseHTLoss;
if (EPOCH_playerStamina < 100) then {
if ((getFatigue player) > 0) then {
_HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player));
};
} else {
_HTlossRate = (_HTlossRate / 2);
};
EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0;
EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0;
call _lootBubble;
EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500;

View File

@ -0,0 +1,6 @@
if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then {
_EPOCH_15 = _tickTime;
_prevEquippedItem = EPOCH_equippedItem_PVS;
publicVariableServer "EPOCH_equippedItem_PVS";
};

View File

@ -0,0 +1,17 @@
_nearByBobbersLocal = [];
_nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12];
{
if (local _x) then {
_nearByBobbersLocal pushBack _x
}
} forEach _nearByBobbers;
if !(_nearByBobbersLocal isEqualTo []) then {
if ((random 100) < 50) then {
_bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers));
_bobber setVelocity [0,-1,-1];
_bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime];
};
};

View File

@ -0,0 +1,60 @@
_position = getPosATL player;
EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300];
EPOCH_playerIsSwimming = false;
if !(surfaceIsWater _position) then {
if (EPOCH_nearestLocations isEqualTo []) then{
if (count(_position nearEntities["Animal_Base_F", 800]) < 2) then {
// diag_log "DEBUG: Attempt to spawn animal";
call EPOCH_client_loadAnimalBrain;
};
};
} else {
// spawn shark if player is deep water and not in vehicle
if (vehicle player == player) then{
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
if (_offsetZ > 1.7) then {
EPOCH_playerIsSwimming = true;
};
if (_offsetZ > 50) then {
"GreatWhite_F" call EPOCH_unitSpawn;
};
};
};
// default power state
EPOCH_nearPower = false;
EPOCH_chargeRate = 0;
// energy Charge from nearby power plants
_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange];
if !(_powerSources isEqualTo[]) then {
_totalCapacity = 0;
{
_powerClass = typeOf _x;
_powerCap = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerCapacity");
_powerType = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerType");
if (_powerCap == 0) then {
_powerCap = 100;
};
if (_powerType == 1) then {
if (sunOrMoon < 1) then {
_powerCap = _powerCap/2;
};
};
_totalCapacity = _totalCapacity + _powerCap;
} forEach _powerSources;
if (_totalCapacity > 0) then {
_players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange];
if (_players isEqualTo []) then {
EPOCH_chargeRate = ceil _totalCapacity;
} else {
EPOCH_chargeRate = ceil (_totalCapacity / (count _players));
};
EPOCH_nearPower = true;
};
};
EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer));
EPOCH_clientAliveTimer = _tickTime;

View File

@ -0,0 +1 @@
false call EPOCH_pushCustomVar;

View File

@ -0,0 +1,23 @@
if ((EPOCH_playerSpawnArray select(EPOCH_spawnIndex find "Epoch_Sapper_F")) <= 0) then{
_sapperChance = 1 + (EPOCH_playerSoiled / 2);
if !(EPOCH_nearestLocations isEqualTo[]) then{
_sapperChance = _sapperChance + 2;
};
// 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper every 10 minutes
if (random _sapperRndChance < _sapperChance) then{
"Epoch_Sapper_F" call EPOCH_unitSpawnIncrease;
};
};
_spawnUnits = [];
{
if (_x > 0) then{
_spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex);
};
} forEach EPOCH_playerSpawnArray;
// test spawning one antagonist every 10 minutes select one unit at random to spawn
if !(_spawnUnits isEqualTo[]) then{
(_spawnUnits select(floor random(count _spawnUnits))) call EPOCH_unitSpawn;
};

View File

@ -0,0 +1,179 @@
_prevEquippedItem = [];
_damagePlayer = damage player;
_panic = false;
_prevEnergy = EPOCH_playerEnergy;
// init config data
_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] 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;
_energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2;
_energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2;
EPOCH_chargeRate = 0;
// default data if mismatch
if (count EPOCH_playerSpawnArray != count EPOCH_spawnIndex) then{
{ EPOCH_playerSpawnArray pushBack 0 } forEach EPOCH_spawnIndex;
};
9990 cutRsc ["EpochGameUI","PLAIN",2,false];
_display = uiNamespace getVariable "EPOCH_EpochGameUI";
_thirst = _display displayCtrl 21201;
_hunger = _display displayCtrl 21202;
_broken = _display displayCtrl 21203;
_oxygen = _display displayCtrl 21204;
_hazzard = _display displayCtrl 21205;
_emergency = _display displayCtrl 21206;
{
_x ctrlShow false;
}forEach[_thirst,_hunger,_broken,_oxygen,_hazzard,_emergency];
// find radio
{
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) == "ItemRadio") exitWith{
EPOCH_equippedItem_PVS = [_x, true, player];
};
} forEach assignedItems player;
// lootBubble Init
_loots = ["CfgEpochClient", "lootClasses", EPOCH_lootClasses] call EPOCH_fnc_returnConfigEntryV2;
_lootClasses = ('CfgBuildingLootPos' call EPOCH_returnConfig) call Bis_fnc_getCfgSubClasses;
_lootClasses = _lootClasses - ["Default"];
_lootBubble = {
private["_pos", "_others", "_objects", "_nearObjects", "_building", "_travelDir", "_lootDist", "_xPos", "_yPos", "_lootLoc", "_playerPos", "_distanceTraveled", "_class", "_dir", "_color", "_colors", "_item", "_randomColor", "_positions", "_lootBiasPos", "_lootType", "_config"];
_playerPos = getPosATL vehicle player;
_distanceTraveled = EPOCH_lastPlayerPos distance _playerPos;
if (_distanceTraveled > 10 && _distanceTraveled < 200) then {
_travelDir = [EPOCH_lastPlayerPos, _playerPos] call BIS_fnc_dirTo;
_lootDist = 30 + _distanceTraveled;
_xPos = (_playerPos select 0) + (_lootDist * sin(_travelDir));
_yPos = (_playerPos select 1) + (_lootDist * cos(_travelDir));
_lootLoc = [_xPos, _yPos, 0];
_objects = nearestObjects[_lootLoc, _lootClasses, 30];
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
_jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH"], _buildingJammerRange];
if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then {
_building = _objects select(floor(random(count _objects)));
if !(_building in EPOCH_LootedBlds) then {
_pos = getPosATL _building;
_others = _building nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 15];
if (_others isEqualTo[]) then {
_nearObjects = nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 35];
if (_nearObjects isEqualTo[]) then {
_config = ('CfgBuildingLootPos' call EPOCH_returnConfig) >> (typeOf _building);
if (isClass(_config)) then {
_lootBiasPos = getNumber(_config >> "lootBiasPos");
_lootType = getText(_config >> "lootType");
EPOCH_LootedBlds pushBack _building;
if (count EPOCH_LootedBlds >= 20) then {
EPOCH_LootedBlds deleteAt 0;
};
{
_positions = [] + getArray(_config >> (_x select 0));
if !(_positions isEqualTo[]) then {
_class = _x select 1;
_randomColor = _x select 2;
{
if ((random 100) < _lootBiasPos) then {
_pos = _building modelToWorld(_x select 0);
if (nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 2] isEqualTo[]) then {
if ((typeName _class) == "ARRAY") then {
_class = _class select(floor(random(count _class)));
};
_dir = (_x select 1) + (getDir _building);
if (_dir > 360) then {
_dir = _dir - 360;
};
// Temp for now till we get more
if (_lootType == "mil" && _class == "Bed_EPOCH") then {
_class = "Bunk_EPOCH";
};
_item = createVehicle[_class, _pos, [], 0.0, "CAN_COLLIDE"];
_item setDir _dir;
// force item to ground level is resulting z pos is below ground.
if (_pos select 2 < 0) then {
_pos set[2, 0];
};
if (surfaceIsWater _pos) then {
_item setPosASL _pos;
} else {
_item setPosATL _pos;
};
if (typeName _randomColor isEqualTo "STRING") then {
_randomColor = _randomColor isEqualTo "true";
};
if (_randomColor) then {
_colors = [] + getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures");
if !(_colors isEqualTo[]) then {
_color = _colors select floor(random(count _colors));
_item setObjectTextureGlobal[0, _color];
};
};
};
};
}forEach _positions;
};
}forEach _loots;
};
};
};
};
};
};
EPOCH_lastPlayerPos = _playerPos;
};
// [control,bool] call _fadeUI;
_fadeUI = {
private ["_ctrl"];
_ctrl = _this select 0;
if (_this select 1) then {
if (ctrlFade _ctrl == 0) then {
_ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0.5;
};
if (ctrlFade _ctrl == 1) then {
_ctrl ctrlSetFade 0;
_ctrl ctrlCommit 0.5;
};
} else {
if (ctrlFade _ctrl != 1) then {
_ctrl ctrlSetFade 0;
_ctrl ctrlCommit 0;
};
};
};
_cursorTarget = objNull;

View File

@ -2,7 +2,6 @@ private["_item", "_currQty", "_tradeType", "_itemWorth", "_aiItems", "_itemClass
if (!isNil "EPOCH_TRADE_COMPLETE") exitWith {};
if (!isNil "EPOCH_TRADE_STARTED") exitWith{};
if (EPOCH_playerCrypto <= 0) exitWith {};
if (!isNull _this) then {

View File

@ -185,6 +185,7 @@ class CfgClientFunctions
{
class client_publicEH {};
class masterLoop {};
class masterLoop_v2 {};
class clientInit {};
class clientRespawn {};
class clientRevive {};
@ -339,6 +340,7 @@ class CfgClientFunctions
class postprocessCreate {};
class postprocessAdjust {};
class postprocessDestroy {};
class setDrunk {}; //needs a better name
};
class worldToScreen {
file = "\x\addons\a3_epoch_code\gui\scripts\worldToScreen";

View File

@ -48,6 +48,136 @@ class rmx_rscObject
};
};
class rmx_rscContainer
{
idd = 99440;
movingEnable = 0;
enableSimulation = 1;
enableDisplay = 0;
class Objects
{
class _CT_OBJECT_CONTAINER
{
access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
idc = 99441; // Control identification (without it, the control won't be displayed)
type = 82; // Type
style = ST_LEFT; // Style
blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect.
//model = "\A3\Misc_F\Helpers\UserTexture1m.p3d"; // Displayed model
//model = "\x\addons\a3_epoch_code\gui\terminal2.p3d"; // Displayed model
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\center_plane.p3d";
scale = 0.2; // Model scale
x = 26 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates
y = 21 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates
z = 1; // Depth coordinates
//position[] = {0,0,1}; // Alternative XYZ coordinates, where XY is center of the screen
xBack = 25 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal background coordinates
yBack = 12 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical background coordinates
zBack = 2; // Depth background coordinates
//positionBack[] = {0,0,2}; // Alternative XYZ coordinates, where XY is center of the screen
enableZoom = 1; // Allow foreground/background transformation
zoomDuration = 0.5; // Speed of foreground/background transformation
inBack = 0; // Start in back (Back coordinates are used)
direction[] = {1,0,0.5}; // Model vector dir
up[] = {0.5,1,0}; // Model vector up
tooltip = "CT_OBJECT"; // Tooltip text
tooltipColorShade[] = {0,0,0,1}; // Tooltip background color
tooltipColorText[] = {1,1,1,1}; // Tooltip text color
tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color
class Areas // Configurable UI areas. Normally interactive controls (buttons, listboxes, ...) are not interactive here.
{
class UserTextureL
{
selection = "usertextureL"; // Model selection on which the UI will be rendered
class Controls
{
class _CT_STATIC
{
idc = 1100; // Control identification (without it, the control won't be displayed)
type = CT_STATIC; // Type
style = ST_LEFT + ST_CENTER + ST_MULTI; // Style
x = 0; // Horizontal coordinates (relative to the selection area)
y = 0; // Vertical coordinates (relative to the selection area)
w = 1; // Width (relative to the selection area)
h = 1; // Height (relative to the selection area)
colorBackground[] = {0,0,0,1}; // Fill color
text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text
sizeEx = 6 * GUI_GRID_CENTER_H; // Text size
font = "VT323"; // Font from CfgFontFamilies
colorText[] = {1,0,0,1}; // Text color
lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height)
};
};
};
class UserTexture
{
selection = "usertexture"; // Model selection on which the UI will be rendered
class Controls
{
class _CT_STATIC
{
idc = 11002; // Control identification (without it, the control won't be displayed)
type = CT_STATIC; // Type
style = ST_LEFT + ST_CENTER + ST_MULTI; // Style
x = 0; // Horizontal coordinates (relative to the selection area)
y = 0; // Vertical coordinates (relative to the selection area)
w = 1; // Width (relative to the selection area)
h = 1; // Height (relative to the selection area)
colorBackground[] = {0,0,0,1}; // Fill color
text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text
sizeEx = 6 * GUI_GRID_CENTER_H; // Text size
font = "VT323"; // Font from CfgFontFamilies
colorText[] = {1,0,0,1}; // Text color
lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height)
};
};
};
class UserTextureR
{
selection = "usertextureR"; // Model selection on which the UI will be rendered
class Controls
{
class _CT_STATIC
{
idc = 11001; // Control identification (without it, the control won't be displayed)
type = CT_STATIC; // Type
style = ST_LEFT + ST_CENTER + ST_MULTI; // Style
x = 0; // Horizontal coordinates (relative to the selection area)
y = 0; // Vertical coordinates (relative to the selection area)
w = 1; // Width (relative to the selection area)
h = 1; // Height (relative to the selection area)
colorBackground[] = {0,0,0,1}; // Fill color
text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text
sizeEx = 6 * GUI_GRID_CENTER_H; // Text size
font = "VT323"; // Font from CfgFontFamilies
colorText[] = {1,0,0,1}; // Text color
lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height)
};
};
};
};
};
};
};
class rmx_rscControlsGroup: RscControlsGroup
{
idc = -1;

View File

@ -45,7 +45,7 @@ for "_p" from 0 to 360 step _points do {
_positions2 pushBack [_x + (_center - (_scaleSmallX / 2)),_y + (_center - (_scaleSmallY / 2)),_scaleSmallX,_scaleSmallY];
};
rmx_var_dynaControls = [];
missionNamespace setVariable ["rmx_var_dynaControls",[]];
//_buttonSettings [icon,tooltip,action]
for "_e" from 0 to (_entries - 1) do {
private ["_ctrl","_ctrl2"];
@ -71,8 +71,9 @@ for "_e" from 0 to (_entries - 1) do {
_ctrl2 ctrlSetPosition (_positions2 select _e);
_ctrl2 ctrlCommit 0.1;
rmx_var_dynaControls pushBack _ctrl;
rmx_var_dynaControls pushBack _ctrl2;
_arr = missionNamespace getVariable ["rmx_var_dynaControls",[]];
_arr append [_ctrl,_ctrl2];
missionNamespace setVariable ["rmx_var_dynaControls",_arr];
};
true

View File

@ -0,0 +1,74 @@
/*
Usage:
0.5 call epoch_setDrunk;
[0.2, _time] call epoch_setDrunk;
Notes:
Drunk levels 1-9, 0 to disable
Use low times, wet distortion does not work well when animated over time
*/
private ["_level","_speed"];
params [["_level",0,[0]],["_speed",0,[0]]];
if (isNil "rmx_var_drunkHandles") then {
_priority = 15;
_wd = ["wetdistortion",_priority] call epoch_postProcessCreate;
_db = ["dynamicBlur",_priority] call epoch_postProcessCreate;
rmx_var_drunkHandles = [_wd,_db];
};
switch _level do {
case 0:
{
rmx_var_drunkHandles call epoch_postprocessDestroy;
rmx_var_drunkHandles = nil;
};
case 0.1:
{
[(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.551644,0.0309715,0.202484,0,0,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
};
case 0.2:
{
[(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.551644,0.0309715,0.390503,0,0,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
};
case 0.3:
{
[(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.53718,-0.157049,0.390503,-1,0,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
};
case 0.4:
{
[(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
};
case 0.5:
{
[(rmx_var_drunkHandles select 0), _speed, [1,0.0144616,0.0144629,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), _speed, [0.146676]] call epoch_postprocessAdjust;
};
case 0.6:
{
[(rmx_var_drunkHandles select 0), _speed, [1,0.0144616,0.0144629,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), _speed, [0.334697]] call epoch_postprocessAdjust;
};
case 0.7:
{
[(rmx_var_drunkHandles select 0), _speed, [1,0.0144616,0.0289258,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), _speed, [0.334697]] call epoch_postprocessAdjust;
};
case 0.8:
{
[(rmx_var_drunkHandles select 0), _speed, [1,0.0289245,0.0289258,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), _speed, [0.334697]] call epoch_postprocessAdjust;
};
case 0.9:
{
[(rmx_var_drunkHandles select 0), _speed, [1,0,-0.0867792,0.435939,-0.592987,-0.739664,-1,0.144629,-1,0.103286,0.247918,0,0,1,-0.378086]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), _speed, [0.0940112]] call epoch_postprocessAdjust;
};
case 1:
{
[(rmx_var_drunkHandles select 0), _speed, [1,0.0723131,-0.0433885,1,-0.592987,-0.811979,-1,0.882248,-1,1,1,0,0,0.373996,-1]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), _speed, [0.151864]] call epoch_postprocessAdjust;
};
};

View File

@ -1,7 +1,7 @@
// Init Custom vars
EPOCH_customVars = [];
EPOCH_defaultVars = [];
_customVarsDefaults = [
EPOCH_customVarsDefaults = [
["Temp",98.6],
["Hunger",5000],
["Thirst",2500],
@ -15,9 +15,12 @@ _customVarsDefaults = [
["Crypto",0],
["HitPoints",[0,0,0,0]],
["BloodP",100],
["SpawnArray",[]]
["SpawnArray",[]],
["Karma",0],
["Alcohol",0],
["Radiation",0]
];
_customVarsInit = ["CfgEpochClient", "customVarsDefaults", _customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2;
_customVarsInit = ["CfgEpochClient", "customVarsDefaults", EPOCH_customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2;
{
EPOCH_customVars pushBack (_x select 0);
EPOCH_defaultVars pushBack (_x select 1);

View File

@ -11,6 +11,7 @@ EPOCH_group_level_img = ["x\addons\a3_epoch_code\data\owner.paa", "x\addons\a3_e
if (isNil 'EPOCH_diag_fps') then {
EPOCH_diag_fps = 0;
};
EPOCH_playerIsSwimming = false;
EPOCH_lastTrash = diag_tickTime;
EPOCH_tradeDone = false;
EPOCH_bankBalance = 0;

View File

@ -34,8 +34,13 @@ class CfgBaseBuilding {
};
class WoodFloor_EPOCH : Default
{
upgradeBuilding[] = { { "MetalFloor_EPOCH", { { "ItemCorrugatedLg", 2 } } } };
removeParts[] = { { "PartPlankPack", 2 } };
};
class MetalFloor_EPOCH : Default
{
removeParts[] = { { "ItemCorrugatedLg", 2 } };
};
class CinderWallGarage_EPOCH : Default
{
removeParts[] = { { "CinderBlocks", 4 }, { "ItemCorrugatedLg", 1 }, { "CircuitParts", 1 } };

View File

@ -38,7 +38,10 @@ class CfgEpochClient
{"Crypto",0},
{"HitPoints",{0,0,0,0}},
{"BloodP",100},
{"SpawnArray",{}}
{"SpawnArray",{}},
{"Karma",0},
{"Alcohol",0},
{"Radiation",0}
};
// controls max group limit and cost
@ -63,7 +66,7 @@ class CfgEpochClient
{ "cabinetPos", "Cabinet_EPOCH", false }
};
#include "CfgEpochClient\takistan.hpp"
#include "CfgEpochClient\australia.hpp"
#include "CfgEpochClient\ProvingGrounds_PMC.hpp"

View File

@ -0,0 +1,42 @@
class CfgMasterLoop
{
class Init
{
file = "\x\addons\a3_epoch_code\compile\setup\masterLoop\init.sqf";
};
class Events
{
condition = "alive player";
file = "\x\addons\a3_epoch_code\compile\setup\masterLoop";
class Event1
{
delay = 1; // in seconds
};
class Event2
{
delay = 10;
};
class Event3
{
delay = 15;
};
class Event4
{
delay = 30;
};
class Event5
{
delay = 60;
};
class Event6
{
delay = 300;
};
class Event7
{
delay = 600;
};
};
};

View File

@ -2709,6 +2709,21 @@ class CfgVehicles
energyCost = 0.2;
slingLoadCargoMemoryPoints[] = { "N", "S", "E", "W" };
};
class MetalFloor_SIM_EPOCH : Constructions_modular_F
{
scope = 2;
model = "\x\addons\a3_epoch_assets_1\models\metal_floor.p3d";
displayName = "Metal Floor";
simulClass = "MetalFloor_SIM_EPOCH";
staticClass = "MetalFloor_EPOCH";
GhostPreview = "MetalFloor_Ghost_EPOCH";
snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" };
snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" };
allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" };
allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" };
energyCost = 0.5;
slingLoadCargoMemoryPoints[] = { "N", "S", "E", "W" };
};
class WoodLargeWall_SIM_EPOCH: Constructions_modular_F
{
@ -4064,7 +4079,19 @@ class CfgVehicles
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
allowedSnapPoints[] = {"NF","SF","EF","WF","C"};
energyCost = 0.2;
removeParts[] = { { "PartPlankPack", 2 } };
};
class MetalFloor_EPOCH : Const_floors_static_F
{
scope = 2;
model = "\x\addons\a3_epoch_assets_1\models\metal_floor.p3d";
displayName = "Metal Floor";
simulClass = "MetalFloor_SIM_EPOCH";
staticClass = "MetalFloor_EPOCH";
GhostPreview = "MetalFloor_Ghost_EPOCH";
snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" };
snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" };
allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" };
energyCost = 0.5;
};
// Wood wall seed item lvl 0
@ -4140,6 +4167,20 @@ class CfgVehicles
ladders[] = {};
};
class MetalFloor_Ghost_EPOCH : Const_Ghost_EPOCH
{
scope = 2;
model = "\x\addons\a3_epoch_assets_1\models\metal_floor_ghost.p3d";
displayName = "Metal Floor Ghost";
staticClass = "MetalFloor_EPOCH";
snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" };
snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" };
allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" };
allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" };
ladders[] = {};
};
class WoodLadder_Ghost_EPOCH : Const_Ghost_EPOCH
{

View File

@ -40,6 +40,7 @@ class CfgAddons
#include "\x\addons\a3_epoch_config\Configs\cfgCrafting.hpp"
#include "\x\addons\a3_epoch_config\Configs\cfgPricing.hpp"
#include "\x\addons\a3_epoch_config\Configs\CfgEpochClient.hpp"
#include "\x\addons\a3_epoch_config\Configs\CfgMasterLoop.hpp"
#include "\x\addons\a3_epoch_config\Configs\CfgBaseBuilding.hpp"
#include "\x\addons\a3_epoch_config\Configs\CfgBuildingLootPos.hpp"
#include "\x\addons\a3_epoch_config\Configs\CfgActionMenu\CfgActionMenu_core.hpp"
@ -103,7 +104,7 @@ class CfgAnimationSourceSounds
class CfgCommands
{
// allowedHTMLLoadURIs[] += // think this adds to an existing array
allowedHTMLLoadURIs[] =
allowedHTMLLoadURIs[] =
{
"https://raw.githubusercontent.com/epochmodteam/epoch/test/changelog.html" //there are some issues with capitalization used in github links
};

View File

@ -48,7 +48,7 @@ class FSM
init = /*%FSM<STATEINIT""">*/"diag_log ""Loaded Server FSM"";" \n
"" \n
"_serverSettingsConfig = configFile >> ""CfgEpochServer"";" \n
"_ahInitAuthCfg = [_serverSettingsConfig, ""antihack_ahInitAuthCfg"", [0,90]] call EPOCH_fnc_returnConfigEntry;" \n
"_ahInitAuthCfg = [_serverSettingsConfig, ""antihack_ahInitAuthCfg"", [0,180]] call EPOCH_fnc_returnConfigEntry;" \n
"_events = [_serverSettingsConfig, ""events"", [[3600, ""CarnivalSpawner""], [2400, ""EarthQuake""], [1800, ""ChangeWeather""], [1200, ""ContainerSpawner""], [300, ""PlantSpawner""]]] call EPOCH_fnc_returnConfigEntry;" \n
"_simulationHandler = [_serverSettingsConfig, ""simulationHandler"", false] call EPOCH_fnc_returnConfigEntry;" \n
"" \n
@ -464,4 +464,4 @@ class FSM
{
};
};
/*%FSM</COMPILE>*/
/*%FSM</COMPILE>*/