Merge pull request #719 from EpochModTeam/experimental

Release 0.5
This commit is contained in:
vbawol 2017-03-30 16:02:47 -05:00 committed by GitHub
commit 7b0729cf89
213 changed files with 2713 additions and 1331 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
Server_Install_Pack/DB/dump.rdb

View File

@ -23,11 +23,12 @@ Epoch Assets Mod Configs - Custom Units, Vehicles, Weapons, Items and more!
* [Paden Sturtevant (SteamPunkGears)](https://www.twitch.tv/steampunkgears): Models, Textures
* [Dan Dalsted (OrangeSherbet)](https://www.twitch.tv/OrangeSherbet): Tester, Videos, Wiki Editor
#### Top Contributors
#### Contributors
* [HeMan](https://github.com/Ignatz-HeMan)
* [$p4rkY](https://github.com/SPKcoding)
* [82ndab-Bravo17](https://github.com/82ndab-Bravo17) - http://www.the82ndab.net
* [Robio](https://github.com/RC-Robio)
* Craig Hauer "ComatoseBadger": additional "Keesha" Female skin textures.
* [Poulmba](https://www.youtube.com/user/poulmba): Wiki Editor, Tester
* [Richie](http://uk-gaming-zone.co.uk): Map Support, Forum Moderator
* [Tobias Solem](http://whatthepoch.com/): Tester
@ -35,10 +36,9 @@ Epoch Assets Mod Configs - Custom Units, Vehicles, Weapons, Items and more!
#### Special Thanks!
* [Bohemia Interactive](http://bistudio.com) for an incredible and versatile game engine.
* Top Donors: dean4310, Robio, rhinoCRUNCH, B3nzi, Madman2077
* Top Donors: survivalservers, RC_Robio, gtxgaming, dean4310, KPABATOK
* [GTXGaming](http://www.gtxgaming.co.uk) - Dedicated Dev Server
* [Survival Servers](https://www.survivalservers.com) - Dedicated Dev Server
* [Vilayer](https://www.vilayer.com) - Dedicated Dev Server
* [Nitrado](https://server.nitrado.net) - Dedicated Dev Server
* [Vert Hosting](https://verthosting.com) - Shared Arma 2 and 3 Dev servers.
* Also a thanks goes to all the testers and supporters we missed, you know who you are!

27
Changelogs/0.5.0.0.txt Normal file
View File

@ -0,0 +1,27 @@
[New] Epoch is leaving alpha and entering beta! All Epoch Asset project sources are now available via our GitHub +LFS and under APL-SA license here: https://github.com/EpochModTeam/EpochCore
[Added] Added Service Point to Rearm, Repair and Refuel. Thanks to @Ignatz-HeMan
[Added] 7 new Keesha camo skins by Craig Hauer aka ComatoseBadger.
[Added] 64-bit database extension support for Windows (EpochServer_x64.dll) and Linux (epochserver_x64.so) servers. Linux support is pending testing.
[Added] Custom event handler and OnEachFrame hooks added. https://github.com/EpochModTeam/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.
[Added] Customizability of units spawned by UAV alert via CfgEpochClient > uavAlertUnitSpawnTemplate. (Default: I_Soldier_EPOCH)
[Added] Toxic Smoke Grenades can now be found in the world.
[Added] Respawn in base feature, each player must interact with Jammer and choose "Make Spawnpoint" to enable.
[Added] Selling to traders with bank debt greater than -50000(default), pays the bank debt back to below the limit instead of the player. Thanks to @Ignatz-HeMan
[Changed] Epoch Message function now supports custom colors. Thanks to @SPKcoding
[Changed] Epoch Event: ChangeWeather has been updated to allow for better random control of weather and defaults to bad weather.
[Changed] Optimized database SET and SETEX calls in both SQF and C++.
[Changed] Optimized database GETRANGE call.
[Changed] Optimized NPC Trading and fixed issue if trade failed. Thanks to @Ignatz-HeMan
[Changed] Great White Sharks will now spawn if the 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] Air Drops are now triggered via Epoch Events server side every 45m at random, instead of randomly triggered client side.
[Changed] To prevent issues with ownership only Group Leader can place a Jammer. jammerGLOnly = 0 in CfgEpochClient to disable. Thanks to @Ignatz-HeMan and @82ndab-Bravo17
[Fixed] Crash bug when opening base building upgrade menu since Arma 3 1.68.
[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.
[Removed] EpochServer extension calls 100 and 101 as they are no longer needed.
[Info] Re-add missing comments in some config files.
[Info] Numerous other fixes and optimizations.
[Info] Requires Arma 3 1.68 or higher.

BIN
Repair_man.paa Normal file

Binary file not shown.

Binary file not shown.

View File

@ -13,8 +13,11 @@ lootMultiplier = 0.5; // 1 = max loot bias. This controls how much loot can payo
WeatherStaticForecast[] = {}; // Default: {75.5,0,{0,0,0},0,{1,1}}; // Clear day; {19,1,{1,1,40},1,{5,5}}; // Cold Foggy Rainy Overcast Windy; Format: {temp <scalar>,rain <scalar>,fog <array>,overcast <scalar>,wind <array>}
events[] = {
{ 3600, "CarnivalSpawner", 0 , 1}, // SECOND <scalar>, EVENT <string>, INIT <scalar> 1 = run script at startup, 0 normal delay, PREPOSTFIX <scalar> 1 = use pre/postfix path (inside epoch settings pbo) 0 = use full file path
// { 1800, "PaydayEvent", 0, 1},
// { 1200, "MessageServer", 0, 1},
{ 2700, "AirDrop", 0 , 1},
{ 2400, "EarthQuake", 0 , 1},
{ 1800, "ChangeWeather", 1 , 1},
{ 900, "ChangeWeather", 1 , 1},
{ 1200, "ContainerSpawner", 0 , 1},
{ 300, "PlantSpawner", 0 , 1} //No comma on last Entry
};
@ -26,6 +29,7 @@ antagonistChanceLoot = 0.09; //9% chance when player click "SEARCH" on a loot ob
// Player Related
cloneCost = 100; // debt incurred on player death
MaxBankDebitforTrade = -50000; // If Player has less money on Bank, Crypto from Trade goes directly to Bank instead to Player
// vehicles - Max vehicle slots is calculated from per vehicle limits below. Warning! Higher the number lower the performance.
simulationHandlerOld = "false"; // When enabled this feature disables simulation on vehicles that are not nea players. Can help improve client fps at the cost of server fps.
@ -76,7 +80,6 @@ expiresPlayer = "2592000"; // expiration date in seconds for players
expiresBank = "7776000"; // expiration date in seconds for players bank
expiresVehicle = "604800"; // expiration date in seconds for vehicles
expiresAIdata = "604800"; // expiration date in seconds for NPC Trader inventory
hiveAsync = "true"; // true = asynchronous hive calls (non blocking), false = synchronous hive calls (blocking)
// Admin Features
hiveAdminCmdExec = "false"; // true = enables extra (To Be Released) feature to allow execution of code via hive.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,5 @@
bind 127.0.0.1
port 6379
maxmemory 1gb
save 900 1
save 300 10

Binary file not shown.

View File

@ -1 +1 @@
5 "" !"B_Parachute" !"B_AssaultPack_(cbr|dgtl|khk|mcamo|ocamo|rgr|sgg|blk)" !"B_Carryall(cbr|khk|mcamo|ocamo|oli|oucamo|hex|ghex)" !"B_FieldPack_(blk|cbr|khk|ocamo|oli|oucamo|ghex_F)" !"B_Kitbag_(cbr|mcamo|rgr|sgg)" !"B_TacticalPack_(blk|mcamo|ocamo|oli|rgr)" !"smallbackpack_(red|green|teal|pink|)_epoch" !"(O|I|B)_UAV_01_backpack_F" !"B_Bergen_(mcamo|dgtl|hex|tna)_F" !"B_Viper(Light|)Harness_(blk|ghex|hex|khk|oli)_F"
5 "" !"B_Parachute" !"B_AssaultPack_(cbr|dgtl|khk|mcamo|ocamo|rgr|sgg|blk)" !"B_Carryall_(cbr|khk|mcamo|ocamo|oli|oucamo|hex|ghex)" !"B_FieldPack_(blk|cbr|khk|ocamo|oli|oucamo|ghex_F)" !"B_Kitbag_(cbr|mcamo|rgr|sgg)" !"B_TacticalPack_(blk|mcamo|ocamo|oli|rgr)" !"smallbackpack_(red|green|teal|pink|)_epoch" !"(O|I|B)_UAV_01_backpack_F" !"B_Bergen_(mcamo|dgtl|hex|tna)_F" !"B_Viper(Light|)Harness_(blk|ghex|hex|khk|oli)_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" !="EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))" !="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 "" !="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|Sapper(B|G)|Cloak)_F" !="EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))" !="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|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 "" !="[0-9]{1,2}:[0-9]{1,4}" !" GroundWeaponHolder$" !" WeaponHolderSimulated$" !" Epoch_(Sapper|SapperB|Cloak|Female_CamoRed)_F$" !" EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))$" !" (Land_MPS|Bobber|Rabbit)_EPOCH$" !" (Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH$" !" (Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Cabinet|Freezer|Tarp)_EPOCH$" !" (SapperHead|Jack|SolarGen)_SIM_EPOCH$" !" (Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH$" !" Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH$" !" (Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH$" !" (Hesco3|Metal|WoodWall[1-4])_(Ghost|SIM)_EPOCH$" !" (Spike|Metal)_TRAP_SIM_EPOCH$" !" (WoodFoundation|Foundation)_Ghost_EPOCH$" !" I_(Soldier[1-3]|Soldier)_EPOCH$" !" I_(helipilot|helicrew)_F$" !" I_UAV_01_F$" !" (I|B|O)_UAV_AI$" !" I_Boat_Armed_01_minigun_F" !" B_Heli_Transport_01_F" !" Land_Cages_F$"
5 "" !="[0-9]{1,2}:[0-9]{1,4}" !" GroundWeaponHolder$" !" WeaponHolderSimulated$" !" Epoch_(Sapper|Sapper(B|G)|Cloak|Female_CamoRed)_F$" !" EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))$" !" (Land_MPS|Bobber|Rabbit)_EPOCH$" !" (Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH$" !" (Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Cabinet|Freezer|Tarp)_EPOCH$" !" (SapperHead|Jack|SolarGen)_SIM_EPOCH$" !" (Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH$" !" Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH$" !" (Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH$" !" (Hesco3|Metal|WoodWall[1-4])_(Ghost|SIM)_EPOCH$" !" (Spike|Metal)_TRAP_SIM_EPOCH$" !" (WoodFoundation|Foundation)_Ghost_EPOCH$" !" I_(Soldier[1-3]|Soldier)_EPOCH$" !" I_(helipilot|helicrew)_F$" !" I_UAV_01_F$" !" (I|B|O)_UAV_AI$" !" I_Boat_Armed_01_minigun_F" !" B_Heli_Transport_01_F" !" Land_Cages_F$"

View File

@ -1 +1 @@
5 "" !="bis_fnc_execvm \[\[.+\],\"initPlayerServer.sqf\"]" !="bis_fnc_effectkilled(airdestruction|secondaries) \[.+\]" !="epoch_server_checkplayer \[[A-Z]{1} [A-Za-z]{4,10} [0-9]{1,3}-[0-9]{1,3}:[0-9]{1,3}( \(.+\)|) REMOTE\]" !="epoch_server_(save(_vehicles|building)|(lock|pack)Storage|(upgrade|remove|paint|maint)build) \[.+\]" !="epoch_server_((load|respawn|dead|invite|revive|teleport)Player|(upgrade|updateplayer|create|delete)Group) \[.+\]" !="epoch_server_(deadplayerdetonate|triggerantagonist|playersetvariable|missioncomms|makemarker|removemarker) \[.+\]" !="epoch_server_(knockDownTree|mineRocks|lootAnimal|handle_(say3d|switchmove|sapperObjs)) \[.+\]" !="epoch_server_((repair|fill|lock)Vehicle|(loot|fill)Container|(store|take)Crypto|make(NPC|)Trade) \[.+\]" !="epoch_server_(tradeRequest|equippeditem|packJack|create(object|AirDrop)|airDropCrate|destroytrash|unpackBackpack) \[.+\]" !="epoch_(localcleanup|fnc_saveplayer|client_bitePlayer|serverlootobject) \[.+\]"
5 "" !="bis_fnc_execvm \[\[.+\],\"initPlayerServer.sqf\"]" !="bis_fnc_effectkilled(airdestruction|secondaries) \[.+\]" !="epoch_server_checkplayer \[[A-Z]{1} [A-Za-z]{4,10} [0-9]{1,3}-[0-9]{1,3}:[0-9]{1,3}( \(.+\)|) REMOTE\]" !="epoch_server_(save(_vehicles|building)|(lock|pack)Storage|(upgrade|remove|paint|maint)build) \[.+\]" !="epoch_server_((load|respawn|dead|invite|revive|teleport)Player|(upgrade|updateplayer|create|delete)Group) \[.+\]" !="epoch_server_(deadplayerdetonate|triggerantagonist|playersetvariable|missioncomms|make(marker|SP)|removemarker) \[.+\]" !="epoch_server_(knockDownTree|mineRocks|lootAnimal|handle_(say3d|switchmove|sapperObjs)) \[.+\]" !="epoch_server_((repair|fill|lock)Vehicle|(loot|fill)Container|(store|take)Crypto|make(NPC|)Trade) \[.+\]" !="epoch_server_(paycrypto|tradeRequest|equippeditem|packJack|create(object|AirDrop)|airDropCrate|destroytrash|unpackBackpack) \[.+\]" !="epoch_(localcleanup|fnc_saveplayer|client_bitePlayer|serverlootobject) \[.+\]"

View File

@ -28,7 +28,7 @@
7 removeAllItems
7 removeAllActions
7 setViewDistance !="setViewDistance 1600"
7 createGroup !="EPOCH_server_createGroup" !="_grp = createGroup RESISTANCE;" !="if (isserver) then {\n_group = creategroup sidelogic;" !="grpVIPGeneral = createGroup RESISTANCE;" !="_grp = createGroup side _plyr;" !="_grp = createGroup side player;" !="_grp = createGroup _side;" !="_grp = createGroup (side _plyr);" !="createcenter sidelogic;\n_grpLogic = creategroup sidelogic;\nbis_functions_mainscope" !="_group = creategroup west;"
7 createGroup !="EPOCH_server_createGroup" !="_grp = createGroup [RESISTANCE, true];" !="if (isserver) then {\n_group = creategroup sidelogic;" !="grpVIPGeneral = createGroup [RESISTANCE, true];" !="_grp = createGroup side _plyr;" !="_grp = createGroup [_side, true];" !="_grp = createGroup [(side _plyr), true];" !="createcenter sidelogic;\n_grpLogic = creategroup sidelogic;\nbis_functions_mainscope" !="_group = createGroup [west, true];"
7 createVehicleCrew !="createvehiclecrew _x;"
7 createVehicleLocal !="\"#particlesource\" createVehicleLocal" !="\"#lightpoint\" createVehicleLocal" !="\"BloodSplat\" createVehicleLocal" !="[\"lightning1_F\", \"lightning2_F\"] call BIS_fnc_selectRandom;\n_lighting = _class createVehicleLocal" !="SLX_XEH_DUMMY createVehicleLocal [0, 0, 0];" !="CBA_eventHandlers = \"Logic\" createVehicleLocal [0, 0];"
7 createUnit !="_driver = _grp createUnit[\"I_UAV_AI\", position _unit, [], 0, \"CAN_COLLIDE\"];" !="axeGeneral = grpVIPGeneral createUnit [\"I_officer_F\", axeGeneralPos, [], 1, \"CAN_COLLIDE\"];" !="bis_functions_mainscope = _grpLogic createunit [\"Logic\",[9,9,9],[],0,\"none\"];" !="_unit = _grp createUnit[selectRandom _arrUnits, _pos, [], 0, \"FORM\"];" !="_driver = (group player) createUnit[\"I_UAV_AI\", position axeUAV, [], 0, \"CAN_COLLIDE\"];"

View File

@ -0,0 +1,12 @@
RConPort 2306
RConPassword changemen0w
MaxPing 350
MaxCreateVehiclePerInterval 72 1
MaxSetPosPerInterval 2 1
MaxSetDamagePerInterval 36 1
MaxAddBackpackCargoPerInterval 12 1
MaxAddMagazineCargoPerInterval 96 1
MaxAddWeaponCargoPerInterval 24 1
MaxDeleteVehiclePerInterval 48 1
MaxAttachToPerInterval 4 1

View File

@ -1,7 +1,7 @@
// EPOCH SERVER CONFIG
// GLOBAL SETTINGS
hostname = "EpochMod.com (0.3.8|1.60) ID02 YourHost";
hostname = "EpochMod.com (0.5|1.68) ID02 YourHost";
password = "";
passwordAdmin = "!CHANGE_THIS_PASSWORD!";
serverCommandPassword = "!CHANGE_THIS_PASSWORD!";

View File

@ -49,10 +49,6 @@ class FSM
itemno = ;
init = /*%FSM<STATEINIT""">*/"//Developer code" \n
"//Author: axeman (Andrew Gregory | andrew@andgregor.co.uk)" \n
"//Licence:" \n
"//You may not copy, reproduce, edit, move or transfer in any way without the express permission of the author." \n
"//All files contained in this MPMission folder also fall under the Epoch Mod Creative Commons Licence: https://creativecommons.org/licenses/by-nc-nd/4.0/" \n
"//Any files triggered, called, execVM'ed, execFSM'ed etc, by this file fall under the same agreement." \n
"" \n
"//systemChat ""INIT WALKING"";" \n
"_unit = _this select 0;" \n

View File

@ -837,7 +837,7 @@ class FSM
priority = 10.000000;
to="ERROR_Wrong_Version_1";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"productVersion select 2 < getNumber(getMissionConfig ""CfgEpochClient"" >> ""ArmAVersion"")"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/

View File

@ -18,7 +18,7 @@ private ["_allpositions","_grp","_nrBuilds","_rndHouse","_startPos","_trgt","_un
_trgt = player;
_nrBuilds = nearestObjects [getPosATL _trgt,["house"],50];
_grp = createGroup RESISTANCE;
_grp = createGroup [RESISTANCE, true];
for "_i" from 1 to 3 step 1 do
{
_startPos = [];

View File

@ -179,3 +179,5 @@ if (EPOCH_ESP_PLAYER || EPOCH_ESP_VEHICLES) then {
};
} forEach EPOCH_ESP_VEHICLEPLAYER;
};
call Epoch_custom_OnEachFrame;

View File

@ -12,60 +12,28 @@
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 {
_minunitCount = getNumber (getMissionConfig "CfgEpochUAVSupport" >> "minUnitNum");
_maxunitCount = getNumber (getMissionConfig "CfgEpochUAVSupport" >> "maxUnitNum");
_unitCount = _minunitCount + round (random (_maxunitCount - _minunitCount));
_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";
_SpawnTypes = [];
_Spawncounts = [];
for "_i" from 1 to _unitCount do {
_UnitType = selectRandom _arrUnits;
_idx = _SpawnTypes find _UnitType;
if (_idx == -1) then {
_SpawnTypes pushback _UnitType;
_Spawncounts pushback 1;
}
else {
_Spawncounts set [_idx,(_Spawncounts select _idx)+ 1];
};
};
// cleanup units or (transfer ownership) if player logs out
_units remoteExec ["EPOCH_localCleanup",2];
{
[_SpawnTypes select _foreachindex, player, true, _x, _this] call EPOCH_unitSpawn;
} forEach _Spawncounts;

View File

@ -15,25 +15,22 @@
//[[[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],["_unitCount",1],["_extraData",[]]];
_bomb = objNull;
// diag_log format["DEBUG: Antagonist %1 Spawning on %2. Do variable: %3.", _unitClass, _trgt, _doVariable];
if(random 100 < 6)then{
[] execFSM "\x\addons\a3_epoch_code\System\Event_Air_Drop.fsm";
};
if(_doVariable)then{_unitClass call EPOCH_unitSpawnIncrease;};//Assumes Antagonist is required.
_index = EPOCH_spawnIndex find _unitClass;
_spawnLimit = 0;
if (_index != -1) then {
_spawnLimit = EPOCH_playerSpawnArray select _index;
};
_currentLimit = count(_trgt nearEntities[_unitClass, 800]);
if (!_doVariable && (_currentLimit >= _spawnLimit)) exitWith {
diag_log format["DEBUG: too many %1 exiting unitspawn",_unitClass];
};
_nonJammer = ["CfgEpochClient", "nonJammerAI", ["B_Heli_Transport_01_F","PHANTOM","EPOCH_Sapper_F","Epoch_SapperB_F","I_UAV_01_F","EPOCH_RyanZombie_1"]] call EPOCH_fnc_returnConfigEntryV2;
_nonTrader = ["CfgEpochClient", "nonTraderAI", ["B_Heli_Transport_01_F","PHANTOM","EPOCH_Sapper_F","Epoch_SapperB_F","I_UAV_01_F","Epoch_Cloak_F","GreatWhite_F","EPOCH_RyanZombie_1"]] call EPOCH_fnc_returnConfigEntryV2;
_nonJammer = ["CfgEpochClient", "nonJammerAI", ["B_Heli_Transport_01_F","PHANTOM","EPOCH_Sapper_F","Epoch_SapperG_F","Epoch_SapperB_F","I_UAV_01_F","EPOCH_RyanZombie_1"]] call EPOCH_fnc_returnConfigEntryV2;
_nonTrader = ["CfgEpochClient", "nonTraderAI", ["B_Heli_Transport_01_F","PHANTOM","EPOCH_Sapper_F","Epoch_SapperG_F","Epoch_SapperB_F","I_UAV_01_F","Epoch_Cloak_F","GreatWhite_F","EPOCH_RyanZombie_1"]] call EPOCH_fnc_returnConfigEntryV2;
_nonTraderAIRange = ["CfgEpochClient", "nonTraderAIRange", 150] call EPOCH_fnc_returnConfigEntryV2;
_loop = false;
_unit = objNull;
@ -55,14 +52,17 @@ _disableAI = {
_units = [];
switch _unitClass do {
case "Epoch_Cloak_F": {
for "_i" from 0 to (_unitCount-1) do {
_unit = createAgent[_unitClass, _targetPos, [], 256, "FORM"];
_units pushBack _unit;
_unit call _disableAI;
[_unit,_trgt] execFSM "\x\addons\a3_epoch_code\System\cloak.fsm";
};
};
case "GreatWhite_F": {
if (surfaceIsWater _targetPos) then{
if (((_targetPos vectorDiff getPosASL _trgt) select 2) > 25) then{
for "_i" from 0 to (_unitCount-1) do {
_unit = createAgent[_unitClass, _targetPos, [], 120, "FORM"];
_units pushBack _unit;
_unit call _disableAI;
@ -70,6 +70,7 @@ switch _unitClass do {
};
};
};
};
case "Epoch_Sapper_F": {
if(random 100 < 6 && isNull _trgt)then{
_config = 'CfgEpochSapper' call EPOCH_returnConfig;
@ -79,28 +80,47 @@ switch _unitClass do {
};
[_trgt,_sapperNum] execVM "epoch_code\compile\EPOCH_callSapperMigration.sqf";
}else{
for "_i" from 0 to (_unitCount-1) do {
_unit = createAgent[_unitClass, _targetPos, [], 256, "FORM"];
_units pushBack _unit;
_bomb = createVehicle ["Sapper_Charge_Ammo", _targetPos, [], 0, "CAN_COLLIDE"];
_bomb attachTo [_unit, [0,0,0],"Pelvis"];
_unit call _disableAI;
sapperHndl = [_unit, _bomb, _trgt] execFSM "\x\addons\a3_epoch_code\System\Sapper_Brain.fsm";
_unit addEventHandler ["FiredNear", "sapperHndl setFSMVariable [""_sFiredNear"",[_this select 1, _this select 2]];"];
_unit addEventHandler ["Hit", "sapperHndl setFSMVariable [""_sHit"",[_this select 1, _this select 2]];"];
_sapperHndl = [_unit, _bomb, _trgt] execFSM "\x\addons\a3_epoch_code\System\Sapper_Brain.fsm";
_unit setVariable ["sapperHndl",_sapperHndl];
_unit addEventHandler ["FiredNear", format ["%1 setFSMVariable [""_sFiredNear"",[_this select 1, _this select 2]];",_sapperHndl]];
_unit addEventHandler ["Hit", format ["%1 setFSMVariable [""_sHit"",[_this select 1, _this select 2]];",_sapperHndl]];
};
};
};
case "Epoch_SapperG_F": {
for "_i" from 0 to (_unitCount-1) do {
_unit = createAgent[_unitClass, _targetPos, [], 256, "FORM"];
_units pushBack _unit;
_bomb = createVehicle ["SmokeShellToxicSapper", _targetPos, [], 0, "CAN_COLLIDE"];
_bomb attachTo [_unit, [0,0,0],"Pelvis"];
_unit call _disableAI;
_sapperHndl = [_unit, _bomb, _trgt] execFSM "\x\addons\a3_epoch_code\System\Sapper_Brain2.fsm";
_unit setVariable ["sapperHndl",_sapperHndl];
_unit addEventHandler ["FiredNear", format ["%1 setFSMVariable [""_sFiredNear"",[_this select 1, _this select 2]];",_sapperHndl]];
_unit addEventHandler ["Hit", format ["%1 setFSMVariable [""_sHit"",[_this select 1, _this select 2]];",_sapperHndl]];
};
};
case "Epoch_SapperB_F": {
for "_i" from 0 to (_unitCount-1) do {
_unit = createAgent[_unitClass, _targetPos, [], 256, "FORM"];
_units pushBack _unit;
_bomb = createVehicle["SapperB_Charge_Ammo", _targetPos, [], 0, "CAN_COLLIDE"];
_bomb attachTo[_unit, [0, 0, 0], "Pelvis"];
_unit call _disableAI;
sapperHndl = [_unit, _bomb, _trgt] execFSM "\x\addons\a3_epoch_code\System\Sapper_Brain2.fsm";
_unit addEventHandler["FiredNear", "sapperHndl setFSMVariable [""_sFiredNear"",[_this select 1, _this select 2]];"];
_unit addEventHandler["Hit", "sapperHndl setFSMVariable [""_sHit"",[_this select 1, _this select 2]];"];
_sapperHndl = [_unit, _bomb, _trgt] execFSM "\x\addons\a3_epoch_code\System\Sapper_Brain2.fsm";
_unit setVariable ["sapperHndl",_sapperHndl];
_unit addEventHandler ["FiredNear", format ["%1 setFSMVariable [""_sFiredNear"",[_this select 1, _this select 2]];",_sapperHndl]];
_unit addEventHandler ["Hit", format ["%1 setFSMVariable [""_sHit"",[_this select 1, _this select 2]];",_sapperHndl]];
};
};
case "I_UAV_01_F": {
_targetPos = getPosATL _trgt;
for "_i" from 0 to (_unitCount-1) do {
_targetPos = [_targetPos, 600, 1200, 5, 0, 400, 0] call BIS_fnc_findSafePos;
_targetPos set[2, 600];
_unit = createVehicle["I_UAV_01_F", _targetPos, [], 0, "FLY"];
@ -108,11 +128,12 @@ switch _unitClass do {
_units pushBack _unit;
addToRemainsCollector[_unit];
_unit flyInHeight 600;
_grp = createGroup RESISTANCE;
_grp = createGroup [RESISTANCE, true];
_driver = _grp createUnit["I_UAV_AI", position _unit, [], 0, "CAN_COLLIDE"];
_driver moveInAny _unit;
[_unit, _trgt] execFSM "\x\addons\a3_epoch_code\System\Copter_brain.fsm";
};
};
case "PHANTOM": {
[] execFSM "\x\addons\a3_epoch_code\System\Phantom_Brain.fsm";
};
@ -126,6 +147,52 @@ switch _unitClass do {
_units pushBack _unit;
};
};
case "I_Soldier_EPOCH": {
_extraData params [["_pos",[]],["_copter",objnull]];
if (_pos isEqualTo []) then {
_pos = [_targetPos,80,150,1,true] call EPOCH_fnc_findSafePos;
};
_pos set [2,0];
_grp = createGroup [RESISTANCE, true];
_grp setBehaviour "COMBAT";
_grp setCombatMode "RED";
_minAISkill = getNumber (getMissionConfig "CfgEpochSoldier" >> "minAISkill");
_arrUnits = getArray (getMissionConfig "CfgEpochSoldier" >> "unitTypes");
_arrSkills = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];
_arrVals = [
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxAimingAccuracy"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxAimingShake"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxAimingSpeed"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxEndurance"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxSpotDistance"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxSpotTime"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxCourage"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxReloadSpeed"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxCommanding"),
getNumber (getMissionConfig "CfgEpochSoldier" >> "maxGeneral")
];
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

@ -23,7 +23,7 @@
BOOL
*/
//[[[cog import generate_private_arrays ]]]
private ["_alljammer","_buildingAllowed","_buildingCountLeader","_buildingCountLimit","_buildingCountPerMember","_buildingJammerRange","_bypassJammer","_c","_cfgBaseBuilding","_config","_isAllowed","_jammer","_jammerPerGroup","_limitNearby","_maxBuildingHeight","_membercount","_minjammerdistance","_myPosATL","_nearestJammer","_obj","_objType","_objectCount","_ownedJammerExists","_range","_restricted","_restrictedArray","_restrictedLocations","_restrictedLocationsArray","_restrictedLocationsRange","_simulClass","_staticClass","_storageCountLeader","_storageCountPerMember","_scl","_gcl","_storageCountLimit","_useGroupCountLimits","_ghostClass"];
private ["_alljammer","_buildingAllowed","_buildingCountLeader","_buildingCountLimit","_buildingCountPerMember","_buildingJammerRange","_bypassJammer","_c","_cfgBaseBuilding","_config","_ghostClass","_isAllowed","_jammer","_jammerGLOnly","_jammerPerGroup","_limitNearby","_maxBuildingHeight","_membercount","_minJammerDistance","_myPosATL","_nearestJammer","_obj","_objType","_objectscount","_ownedJammerExists","_range","_restricted","_restrictedArray","_restrictedLocations","_restrictedLocationsArray","_restrictedLocationsRange","_simulClass","_staticClass","_storageCountLeader","_storageCountLimit","_storageCountPerMember","_useGroupCountLimits","_useSplitCountLimits"];
//[[[end]]]
_buildingAllowed = true;
@ -31,6 +31,7 @@ _ownedJammerExists = false;
_useSplitCountLimits = false;
_useGroupCountLimits = true;
_nearestJammer = objNull;
_jammerGLOnly = true;
// reject building if in vehicle
if (vehicle player != player)exitWith{["Building Disallowed: Inside Vehicle", 5] call Epoch_message; false };
@ -50,6 +51,7 @@ _maxBuildingHeight = getNumber(_config >> "maxBuildingHeight");
_jammerPerGroup = getNumber(_config >> "jammerPerGroup");
if(getNumber(_config >> "useGroupCountLimits") == 0)then{_useGroupCountLimits=false};
if(getNumber(_config >> "splitCountLimits") == 1)then{_useSplitCountLimits=true};
if(getNumber(_config >> "jammerGLOnly") == 0)then{_jammerGLOnly=false};
if(_buildingJammerRange == 0)then{_buildingJammerRange = 75};
if(_buildingCountLimit == 0)then{_buildingCountLimit = 200};
if(_buildingCountLeader == 0)then{_buildingCountLeader = _buildingCountLimit};
@ -96,9 +98,14 @@ if !(_jammer isEqualTo []) then {
_ownedJammerExists = true;
if(_useGroupCountLimits)then{
_membercount = 0;
if(count Epoch_my_Group > 0)then{
_membercount = count (Epoch_my_Group select 3) + count (Epoch_my_Group select 4)
};
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
["_groupSize",0],
["_modArray",[]],
["_memberArray",[]]
];
_membercount = count _modArray + count _memberArray;
_storageCountLimit = _storageCountLeader + (_storageCountPerMember * _membercount);
_buildingCountLimit = _buildingCountLeader + (_buildingCountPerMember * _membercount);
};
@ -131,6 +138,10 @@ if !(_jammer isEqualTo []) then {
}
else {
if (_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
if (!(EPOCH_my_groupUID isequalto "") && !((getplayeruid player) isequalto EPOCH_my_groupUID) && _jammerGLOnly) exitwith {
_buildingAllowed = false;
["The Group Leader must place the Jammer!", 5] call Epoch_message;
};
// TODO: rework not ideal to use allmissionobjects
_alljammer = allmissionobjects 'PlotPole_EPOCH';
_c = 0;

View File

@ -101,14 +101,7 @@ if (isText(_simulClassConfig)) then {
_lastCheckTime = diag_tickTime;
_rejectMove = !(EPOCH_target call EPOCH_isBuildAllowed);
};
if (_rejectMove) exitWith{
// remove object and refund items
deleteVehicle EPOCH_target;
_removeParts = getArray(('CfgBaseBuilding' call EPOCH_returnConfig) >> _objType >> "removeParts");
{
[_x select 0,_x select 1] call EPOCH_fnc_addItemOverflow;
} forEach _removeParts;
};
if (_rejectMove) exitWith { EPOCH_target = objNull; };
_playerdistance = player distance EPOCH_target;
if (_playerdistance < 10) then {
_isSnap = false;

View File

@ -0,0 +1,19 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
A3 Epoch InventoryClosed Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryClosed.sqf
*/
params ["_unit","_container"];
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2];
EPOCH_arr_interactedObjs = [];
};

View File

@ -0,0 +1,37 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
A3 Epoch InventoryOpened Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryOpened.sqf
*/
params ["_unit","_container","_sec"];
setMousePosition[0.5, 0.5];
call EPOCH_showStats;
_this spawn EPOCH_initUI;
_containerlocked = (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false]);
_seclocked = false;
if !(isNull _sec) then {
_seclocked = (locked _sec in [2, 3] || _sec getVariable['EPOCH_Locked', false]);
};
_blocked = (_containerlocked && _seclocked);
if (!_blocked && _containerlocked || _seclocked) then {
[] spawn {
disableSerialization;
waitUntil {!isNull findDisplay 602};
_d = findDisplay 602;
_cargo = _d displayCtrl 6401;
_ground = _d displayCtrl 6321;
_cargo ctrlEnable false;
ctrlSetFocus _ground;
ctrlActivate _ground;
};
};
_blocked

View File

@ -32,6 +32,9 @@ params ["_display","_dikCode","_shift","_ctrl","_alt"];
_handled = false;
_this call Epoch_custom_EH_KeyDown;
if (_handled) exitWith{ true };
if !(alive player) exitWith{ false };
EPOCH_doRotate = false;
@ -80,6 +83,7 @@ if (_dikCode == EPOCH_keysDebugMon) then {
//Action Menu
if (_dikCode == EPOCH_keysAction) then {
//_handled = true;
{player reveal _x;} foreach (player nearObjects 50);
if !(EPOCH_keysActionPressed) then {
EPOCH_keysActionPressed = true;
if (cursorTarget isKindOf "AllVehicles") then {
@ -147,6 +151,9 @@ if (vehicle player == player) then {
_currentPos = ATLtoASL _currentPos;
};
player forceWalk(lineIntersects[eyePos player, _currentPos, player, objNull]);
}
else {
player forceWalk false;
};
};
};

View File

@ -30,6 +30,10 @@ private ["_handled"];
//[[[end]]]
params ["_display","_dikCode","_shift","_ctrl","_alt"];
_handled = false;
_this call Epoch_custom_EH_KeyUp;
if (_handled) exitWith{ true };
//Main actions
if (_dikCode == EPOCH_keysAction) then {
EPOCH_keysActionPressed = false;

View File

@ -49,7 +49,7 @@ if !(_interactActions isEqualTo []) then {
};
// ammo repack
if (_magCount > 1) then {
_button_texts pushBack ["REPACK"];
_button_texts pushBack ["REPACK","[0] call EPOCH_consumeItem;"];
};
_config = 'CfgCrafting' call EPOCH_returnConfig;

View File

@ -16,7 +16,7 @@
private ["_unit"];
//[[[end]]]
for "_i" from 0 to 4 step 1 do {
_unit = createGroup RESISTANCE createUnit ["Epoch_Female_F", getPos player, [], 400, "CAN_COLLIDE"];
_unit = createGroup [RESISTANCE, true] createUnit ["Epoch_Female_F", getPos player, [], 400, "CAN_COLLIDE"];
_unit addBackPack "B_FieldPack_blk";
_unit addWeapon "Hatchet";
_unit addMagazine "hatchet_swing";

View File

@ -6,7 +6,7 @@ _unit = createVehicle["I_UAV_01_F", _targetPos, [], 0, "FLY"];
_unit disableTIEquipment true;
addToRemainsCollector[_unit];
_unit flyInHeight 600;
_grp = createGroup RESISTANCE;
_grp = createGroup [RESISTANCE, true];
_driver = _grp createUnit["I_UAV_AI", position _unit, [], 0, "CAN_COLLIDE"];
_driver moveInAny _unit;
[_unit, _trgt] execFSM "\x\addons\a3_epoch_code\System\Copter_brain.fsm";

View File

@ -0,0 +1,14 @@
if (vehicle player == player) exitwith {false};
if !(local vehicle player) exitwith {false};
if (speed vehicle player > 2 || speed vehicle player < -2) exitwith {false};
if (((getpos vehicle player) select 2) > 1) exitwith {false};
_config = 'CfgServicePoint' call EPOCH_returnConfig;
_servicepoints = getArray (_config >> worldname >> 'ServicePoints');
_servicepointDist = ["CfgServicePoint", "ServicePointDist", 40] call EPOCH_fnc_returnConfigEntryV2;
if (_servicepoints isequalto []) exitwith {false};
if !(({player distance _x < _servicepointDist} count _servicepoints > 0)) exitwith {false};
_Vehicle = vehicle player;
if (!(_Vehicle iskindof 'ship') && (((getposasl _Vehicle) select 2) < 1)) exitwith {false};
true

View File

@ -0,0 +1,30 @@
params ['_vehicle','_ammotype','_turret','_reloagmags','_ammocount','_costs'];
private ['_magname'];
_vehtype = typeof _vehicle;
_VehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
if (!local _vehicle) exitWith {
_line = 'Rearm denied - Vehicle is not local to you!';
[_line,5] call Epoch_message;
};
if(count (crew _vehicle) > 1) exitWith {
_line = 'Rearm denied - All Passengers must exit the Vehicle!';
[_line,5] call Epoch_message;
};
if (EPOCH_playerCrypto < _costs) exitWith {
_line = format ['You need %1 Crypto to re-arm %2', _costs,_VehName];
[_line,5] call Epoch_message;
};
if(_costs > 0)then{
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
};
_vehicle removeMagazinesTurret [_ammotype,_turret];
for '_i' from 1 to _reloagmags do {
_vehicle addMagazineTurret [_ammotype, _turret, _ammocount];
};
_magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName');
if (_magname isequalto '') then {
_magname = _ammotype;
};
_line = format ['%1 rearmed with %2', _VehName, _magname];
[_line,5] call Epoch_message;

View File

@ -0,0 +1,33 @@
private ['_vehicle','_args','_servicePoint','_costs','_updateInterval','_amount','_type','_name','_textMissing'];
_vehicle = _this select 0;
if (!local _vehicle) exitWith {};
_args = _this select 1;
_costs = _args select 0;
_updateInterval = _args select 1;
_amount = _args select 2;
_type = typeOf _vehicle;
_name = getText(configFile >> 'cfgVehicles' >> _type >> 'displayName');
if (EPOCH_playerCrypto < _costs) exitWith {
_line = format ['You need %1 Crypto to refuel %2', _costs,_name];
[_line,5] call Epoch_message;
};
if(_costs > 0)then{
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
};
_vehicle engineOn false;
if ((vehicle player != _vehicle) || (!local _vehicle) || speed _vehicle < -2 || speed _vehicle > 2) exitWith {
_line = format ['Fueling of %1 stopped', _name];
[_line,5] call Epoch_message;
};
while {(vehicle player == _vehicle) && (local _vehicle)} do {
if (speed _vehicle > 2 || speed _vehicle < -2 ) exitWith {
_line = format ['Refueling of %1 stopped', _name];
[_line,5] call Epoch_message;
};
_vehicle setFuel ((Fuel _vehicle)+_amount);
if (Fuel _vehicle > 0.99) exitWith {
_line = format ['%1 Refueled', _name];
[_line,5] call Epoch_message;
};
uisleep _updateInterval;
};

View File

@ -0,0 +1,50 @@
private ['_Ignatz_vehicle','_args','_servicePoint','_costs','_repairTime','_type','_name','_hitpoints','_allRepaired'];
_Ignatz_vehicle = _this select 0;
if (!local _Ignatz_vehicle) exitWith {
diag_log format['Error: called service_point_repair.sqf with non-local vehicle: %1', _Ignatz_vehicle]
};
_args = _this select 1;
_costs = _args select 0;
_repairTime = _args select 1;
_type = typeOf _Ignatz_vehicle;
_name = getText(configFile >> 'cfgVehicles' >> _type >> 'displayName');
if (EPOCH_playerCrypto < _costs) exitWith {
_line = format ['You need %1 Crypto to Repair %2', _costs,_name];
[_line,5] call Epoch_message;
};
if(_costs > 0)then{
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
};
_Ignatz_vehicle engineOn false;
_repaired = [];
_allRepaired = true;
_allHitPointsDamage = getAllHitPointsDamage _Ignatz_vehicle;
{
if ((vehicle player != _Ignatz_vehicle) || (!local _Ignatz_vehicle) || speed _Ignatz_vehicle < -2 || speed _Ignatz_vehicle > 2) exitWith {
_allRepaired = false;
_line = format ['Repairing of %1 stopped', _name];
[_line,5] call Epoch_message;
};
if (!(_x in _repaired) && !(_x isequalto "") && (_allHitPointsDamage select 2 select _foreachindex) > 0) then {
_partName = toarray _x;
_partName set [0,20];
_partName set [1,45];
_partName set [2,20];
_partName = toString _partName;
_Ignatz_vehicle setHitPointDamage [_x,0];
_line = format ['Repairing%1 ...', _partName];
[_line,5] call Epoch_message;
_repaired pushback _x;
uisleep _repairTime;
};
} foreach (_allHitPointsDamage select 0);
if (_allRepaired) then {
if ((damage _Ignatz_vehicle) > 0) then {
[_Ignatz_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
};
_pos = getposatl _Ignatz_vehicle;
_pos set [2,(_pos select 2)+0.25];
_Ignatz_vehicle setposatl _pos;
_line = format ['%1 full Repaired', _name];
[_line,5] call Epoch_message;
};

View File

@ -0,0 +1,104 @@
Ignatz_Refuel = nil;
Ignatz_Repair = nil;
Ignatz_Rearm0 = nil;
Ignatz_Rearm1 = nil;
Ignatz_Rearm2 = nil;
Ignatz_Rearm3 = nil;
if (vehicle player == player) exitwith {false};
if !(local vehicle player) exitwith {false};
if (speed vehicle player > 2 || speed vehicle player < -2) exitwith {false};
if (((getpos vehicle player) select 2) > 1) exitwith {false};
private ['_missingammo','_ownedcompletemags','_magname','_actionTitle','_costs','_vehicle','_refuel_costs','_refuel_updateInterval','_refuel_amount','_costsFree','_repair_costs','_repair_repairTime','_fnc_getCosts','_fnc_actionTitle'];
_config = 'CfgServicePoint' call EPOCH_returnConfig;
_servicepoints = getArray (_config >> worldname >> 'ServicePoints');
_servicepointDist = ["CfgServicePoint", "ServicePointDist", 40] call EPOCH_fnc_returnConfigEntryV2;
if !(({player distance _x < _servicepointDist} count _servicepoints > 0)) exitwith {false};
_Vehicle = vehicle player;
if (!(_Vehicle iskindof 'ship') && (((getposasl _Vehicle) select 2) < 1)) exitwith {false};
_repair_costs = ["CfgServicePoint", "repair_costs", []] call EPOCH_fnc_returnConfigEntryV2;
_refuel_costs = ["CfgServicePoint", "refuel_costs", []] call EPOCH_fnc_returnConfigEntryV2;
_refuel_updateInterval = ["CfgServicePoint", "refuel_updateInterval", 1] call EPOCH_fnc_returnConfigEntryV2;
_refuel_amount = ["CfgServicePoint", "refuel_amount", 0.1] call EPOCH_fnc_returnConfigEntryV2;
_repairTime = ["CfgServicePoint", "repairTime", 1.2] call EPOCH_fnc_returnConfigEntryV2;
_VehiclesAndAmmo = ["CfgServicePoint", "VehiclesAndAmmo", []] call EPOCH_fnc_returnConfigEntryV2;
_Ignatz_SP_Array = [];
_costsFree = 'free';
_fnc_getCosts = {
private ['_typeName','_vehicle','_costs','_cost'];
_vehicle = _this select 0;
_costs = _this select 1;
_cost = 0;
{
_typeName = _x select 0;
if (_vehicle isKindOf _typeName) exitWith {
_cost = _x select 1;
};
} forEach _costs;
_cost
};
_fnc_actionTitle = {
private ['_itemName','_displayName','_actionName','_costs','_costsText','_actionTitle'];
_actionName = _this select 0;
_costs = _this select 1;
_costsText = _costsFree;
if (_costs > 0) then {
_costsText = format ['%1 Crypto',_costs];
};
_actionTitle = format ['%1 (%2)', _actionName, _costsText];
_actionTitle
};
{
if ((typeof _vehicle) == _x select 0) exitwith {
{
_ammotype = _x select 0;
_turret = _x select 1;
_maxmags = _x select 2;
_costs = _x select 3;
_ammocount = getNumber (configfile >> "CfgMagazines" >> (_x select 0) >> "count");
_maxammototal = _maxmags*_ammocount;
_totalammocount = 0;
{
if (_ammotype isequalto (_x select 0) && _turret isequalto (_x select 1)) then {
_totalammocount = _totalammocount + (_x select 2);
};
} foreach (magazinesAllTurrets _vehicle);
if (_totalammocount < _maxammototal) then {
for '_i' from 1 to 10 do {
if (_totalammocount < _i*_ammocount) exitwith {
_ownedcompletemags = _i-1;
_missingammo = _ammocount*_i - _totalammocount;
_costs = round (_costs/_ammocount*_missingammo);
};
};
_magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName');
if (_magname isequalto '') then {
_magname = _ammotype;
};
_reloagmags = _ownedcompletemags+1;
_actionTitle = format['Rearm %1 with %2 round %3 (%4 Crypto)',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName'),_missingammo,_magname, _costs];
_Ignatz_SP_Array pushback [_actionTitle,[_vehicle,_ammotype,_turret,_reloagmags,_ammocount,_costs]];
};
} foreach (_x select 1);
};
} foreach _VehiclesAndAmmo;
_costs = [_vehicle, _refuel_costs] call _fnc_getCosts;
_actionTitle = [format['Refuel %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Refuel = [_actionTitle,[_vehicle,[_costs, _refuel_updateInterval,_refuel_amount]]];
_costs = [_vehicle, _repair_costs] call _fnc_getCosts;
_actionTitle = [format['Repair %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]]];
if (count _Ignatz_SP_Array > 0) then {Ignatz_Rearm0 = _Ignatz_SP_Array select 0;};
if (count _Ignatz_SP_Array > 1) then {Ignatz_Rearm1 = _Ignatz_SP_Array select 1;};
if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;};
if (count _Ignatz_SP_Array > 3) then {Ignatz_Rearm3 = _Ignatz_SP_Array select 3;};
true

View File

@ -42,7 +42,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
params ["_playerObject","_personalToken","_loadAbs"];
// get current player object
_prevPlayerObjectect = player;
_prevPlayerObject = player;
// wait for loadAbs to sync
waitUntil {_loadAbs isEqualTo (loadAbs _playerObject)};

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

@ -0,0 +1,73 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: He-Man
Description:
NPC trade code
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/traders/EPOCH_startNpcTrade.sqf
Example:
cursorTarget call EPOCH_startNpcTrade;
Parameter(s):
_this: OBJECT
Returns:
NOTHING
*/
//[[[cog import generate_private_arrays ]]]
private ["_addWeaponToHands","_arrayIn","_arrayOut","_config","_current_crypto","_errorMsg","_item","_itemTax","_itemWorth","_sizeOut","_tax","_type","_vehSlot","_vehicle","_vehicles"];
//[[[end]]]
params [["_returnIn",[]],["_returnOut",[]],["_message",""]];
if (isNil "EPOCH_TRADE_STARTED") exitWith{};
if !(_returnOut isEqualTo[]) then {
// add purchased items
{
if ([_x, "CfgWeapons"] call EPOCH_fnc_isAny) then {
_type = getNumber(configfile >> "CfgWeapons" >> (_x) >> "type");
_addWeaponToHands = false;
switch (_type) do {
case 1: {
if (primaryWeapon player == "") then {
_addWeaponToHands = true;
};
};
case 4: {
if (secondaryWeapon player == "") then {
_addWeaponToHands = true;
};
};
case 2: {
if (handgunWeapon player == "") then {
_addWeaponToHands = true;
};
};
};
if (_addWeaponToHands) then {
player addWeapon _x;
}
else {
_x call EPOCH_fnc_addItemOverflow;
};
}
else {
if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then {
_x call EPOCH_fnc_addItemOverflow;
};
};
} forEach _returnOut;
};
if !(_message isequalto "") then {
[_message, 5] call Epoch_message;
};
EPOCH_TRADE_STARTED = nil;

View File

@ -25,7 +25,6 @@
private ["_addWeaponToHands","_arrayIn","_arrayOut","_config","_current_crypto","_errorMsg","_item","_itemTax","_itemWorth","_sizeOut","_tax","_type","_vehSlot","_vehicle","_vehicles"];
//[[[end]]]
if (!isNil "EPOCH_TRADE_COMPLETE") exitWith {};
if (!isNil "EPOCH_TRADE_STARTED") exitWith{};
if (isNull _this) exitWith{};
@ -119,74 +118,5 @@ if (alive _this) then {
// close menu
closeDialog 0;
[_arrayIn, _arrayOut] spawn{
waitUntil{ uiSleep 0.1; !isNil "EPOCH_TRADE_COMPLETE" };
// SOLD ITEMS ARRAY
if !((EPOCH_TRADE_COMPLETE select 0) isEqualTo[]) then {
if ((EPOCH_TRADE_COMPLETE select 0) isEqualTo(_this select 0)) then {
['Items Sold', 5] call Epoch_message;
}
else {
['Failed To Sell Items', 5] call Epoch_message;
};
};
// PURCHASED ITEMS ARRAY
if !((EPOCH_TRADE_COMPLETE select 1) isEqualTo[]) then {
if ((EPOCH_TRADE_COMPLETE select 1) isEqualTo(_this select 1)) then {
_errorMsg = 'Items Purchased: ';
// add purchased items
{
if ([_x, "CfgWeapons"] call EPOCH_fnc_isAny) then {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgWeapons" >> (_x) >> "displayName")];
_type = getNumber(configfile >> "CfgWeapons" >> (_x) >> "type");
_addWeaponToHands = false;
switch (_type) do {
case 1: {
if (primaryWeapon player == "") then {
_addWeaponToHands = true;
};
};
case 4: {
if (secondaryWeapon player == "") then {
_addWeaponToHands = true;
};
};
case 2: {
if (handgunWeapon player == "") then {
_addWeaponToHands = true;
};
};
};
if (_addWeaponToHands) then {
player addWeapon _x;
}
else {
_x call EPOCH_fnc_addItemOverflow;
};
} else {
if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgMagazines" >> (_x) >> "displayName")];
_x call EPOCH_fnc_addItemOverflow;
} else {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgVehicles" >> (_x) >> "displayName")];
};
};
} forEach(_this select 1);
[_errorMsg, 5] call Epoch_message;
}
else {
['Failed To Purchase Items', 5] call Epoch_message;
};
};
EPOCH_TRADE_COMPLETE = nil;
EPOCH_TRADE_STARTED = nil;
};
};
};

View File

@ -0,0 +1,15 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch FiredMan Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_FiredMan.sqf
*/
params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile"];

View File

@ -0,0 +1,16 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch GetInMan Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_GetInMan.sqf
*/
params ["_unit","_position","_vehicle"];

View File

@ -0,0 +1,16 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch GetOutMan Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_GetOutMan.sqf
*/
params ["_unit","_position","_vehicle"];

View File

@ -0,0 +1,15 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch InventoryClosed Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Take.sqf
*/
params ["_unit","_container"];

View File

@ -0,0 +1,21 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch InventoryOpened Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_InventoryOpened.sqf
*/
params ["_unit","_container","_sec"];
// Start Custom Code
// End Custom Code
false

View File

@ -0,0 +1,19 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch KeyUp Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_KeyDown.sqf
*/
params ["_display","_dikCode","_shift","_ctrl","_alt"];
_handled = false;
_handled

View File

@ -0,0 +1,19 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch KeyUp Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_KeyUp.sqf
*/
params ["_display","_dikCode","_shift","_ctrl","_alt"];
_handled = false;
_handled

View File

@ -0,0 +1,15 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch Killed Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Killed.sqf
*/
params [["_unit",objNull,[objNull]],["_killer",objNull,[objNull]] ];

View File

@ -0,0 +1,15 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch Put Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Put.sqf
*/
params ["_unit","_container","_itemclass"];

View File

@ -0,0 +1,15 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch Take Eventhandler
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_Take.sqf
*/
params ["_unit","_container","_itemclass"];

View File

@ -0,0 +1,14 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: [Ignatz] He-Man
Description:
Custom A3 Epoch OnEachFrame
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_OnEachFrame.sqf
*/

View File

@ -137,7 +137,7 @@ if (_buttonSettings isEqualTo []) then {_selfOrTarget = "self"; call _checkConfi
_entries = count _buttonSettings;
if !(_entries <= 0) then {
[_entries, _buttonSettings] call epoch_dynamicMenuPopulate;
[_entries, _buttonSettings] spawn epoch_dynamicMenuPopulate;
} else {
true call Epoch_dynamicMenuCleanup;
};

View File

@ -15,6 +15,7 @@
//[[[cog import generate_private_arrays ]]]
private ["_cfg","_cleanupVars","_close"];
//[[[end]]]
disableSerialization;
_close = param [0,false,[false]];
_cleanupVars = {
@ -26,7 +27,10 @@ _cleanupVars = {
};
if (_close) then {
(findDisplay 66600) closeDisplay 1;
_display = findDisplay 66600;
if !(isNull _display) then {
_display closeDisplay 1;
};
};
if (uiNamespace getVariable ["rmx_var_dynamicMenuInProgress",false]) then {

View File

@ -20,6 +20,8 @@ params ["_entries","_buttonSettings"];
disableSerialization;
_inProgress = uiNamespace getVariable ["rmx_var_dynamicMenuInProgress", false];
waitUntil{!isNull (findDisplay 66600)};
_display = findDisplay 66600;
if (_inProgress) then {

View File

@ -13,36 +13,46 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/group/EPOCH_Group_BtnInvite.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_BtnInvite","_InvitePlayerCombo","_currentMaxMember","_currentMember","_found","_playerName","_playerUID","_ret","_txt","_upgradePrice","_upgradeSlots"];
private ["_BtnInvite","_InvitePlayerCombo","_groupSize","_currentMember","_found","_playerName","_playerUID","_ret","_txt","_upgradePrice","_upgradeSlots"];
//[[[end]]]
disableSerialization;
_BtnInvite = (findDisplay -1300) displayCtrl 30;
_playerUID = getPlayerUID player;
if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (Epoch_my_Group select 3) > 0) then {
_currentMember = count(Epoch_my_Group select 3) + count(Epoch_my_Group select 4) + 1;
_currentMaxMember = Epoch_my_Group select 2;
if (_currentMember < _currentMaxMember) then {
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
["_groupSize",0],
["_modArray",[]],
["_memberArray",[]]
];
if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (_modArray) > 0) then {
_currentMember = count(_modArray) + count(_memberArray) + 1;
if (_currentMember < _groupSize) then {
_InvitePlayerCombo = (findDisplay -1300) displayCtrl 41;
_playerUID = _InvitePlayerCombo lbData (lbCurSel _InvitePlayerCombo);
_playerName = _InvitePlayerCombo lbText (lbCurSel _InvitePlayerCombo);
if (_playerUID != "" && _playerName != "" && ({_playerUID in _x} count (Epoch_my_Group select 3) == 0) && ({_playerUID in _x} count (Epoch_my_Group select 4) == 0) && !(_playerUID == Epoch_my_GroupUID)) then {
if (_playerUID != "" && _playerName != "" && ({_playerUID in _x} count (_modArray) == 0) && ({_playerUID in _x} count (_memberArray) == 0) && !(_playerUID == Epoch_my_GroupUID)) then {
_txt = format["Do you want to add %1 to your Group?",_playerName];
[_playerUID,_txt] spawn {
_ret = [_this select 1,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
[_playerUID,_txt,_groupName] spawn {
params ["_playerUID","_txt","_groupName"];
_ret = [_txt,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
if (_ret) then {
[_this select 0,Epoch_my_GroupUID,Epoch_my_Group select 0,player,Epoch_personalToken] remoteExec ["EPOCH_server_invitePlayer",2];
[_playerUID,Epoch_my_GroupUID,_groupName,player,Epoch_personalToken] remoteExec ["EPOCH_server_invitePlayer",2];
};
};
};
} else {
_found = EPOCH_group_upgrade_lvl find _currentMaxMember;
_found = EPOCH_group_upgrade_lvl find _groupSize;
if (count EPOCH_group_upgrade_lvl >= (_found+3)) then {
_upgradePrice = parseNumber (EPOCH_group_upgrade_lvl select (_found+3));
if ((EPOCH_playerCrypto-_upgradePrice) >= 0) then {
_upgradeSlots = EPOCH_group_upgrade_lvl select (_found+2);
_txt = format["Do you want to upgrade your group from %1 to %2 slots for %3 Krypto?",_currentMaxMember,_upgradeSlots,_upgradePrice];
_txt = format["Do you want to upgrade your group from %1 to %2 slots for %3 Krypto?",_groupSize,_upgradeSlots,_upgradePrice];
[_txt,_upgradePrice] spawn {
_ret = [_this select 0,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
params ["_txt","_upgradePrice"];
_ret = [_txt,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
if (_ret) then {
[Epoch_my_GroupUID,player,Epoch_personalToken] remoteExec ["EPOCH_server_upgradeGroup",2];
};

View File

@ -19,7 +19,16 @@ disableSerialization;
_BtnKick = (findDisplay -1300) displayCtrl 33;
_playerUID = getPlayerUID player;
if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (Epoch_my_Group select 3) > 0) then {
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
["_groupSize",0],
["_modArray",[]],
["_memberArray",[]]
];
if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (_modArray) > 0) then {
_group = (findDisplay -1300) displayCtrl 40;
_selected = lbCurSel _group;
if (_selected >= 0) then {
@ -28,9 +37,10 @@ if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (Epoch_m
if (_playerUID != "" && _playerName != "") then {
_txt = format["Do you want to kick %1 from your Group?",_playerName];
[_playerUID,_txt] spawn {
_ret = [_this select 1,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
params ["_playerUID","_txt"];
_ret = [_txt,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
if (_ret) then {
[Epoch_my_GroupUID,_this select 0,false,false,player,Epoch_personalToken] remoteExec ["EPOCH_server_updatePlayerGroup",2];
[Epoch_my_GroupUID,_playerUID,false,false,player,Epoch_personalToken] remoteExec ["EPOCH_server_updatePlayerGroup",2];
};
};
};

View File

@ -17,9 +17,16 @@ private ["_BtnLeave","_ret","_txt"];
//[[[end]]]
disableSerialization;
_BtnLeave = (findDisplay -1300) displayCtrl 31;
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
["_groupSize",0],
["_modArray",[]],
["_memberArray",[]]
];
if (getPlayerUID player == Epoch_my_GroupUID) then {
_BtnLeave ctrlSetText "Delete Group";
_txt = format["Do you want to delete your Group called %1?",Epoch_my_Group select 0];
_txt = format["Do you want to delete your Group called %1?",_groupName];
_txt spawn {
_ret = [_this,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
if (_ret) then {
@ -27,7 +34,7 @@ if (getPlayerUID player == Epoch_my_GroupUID) then {
};
};
} else {
_txt = format["Do you want to leave the %1 Group?",Epoch_my_Group select 0];
_txt = format["Do you want to leave the %1 Group?",_groupName];
_txt spawn {
_ret = [_this,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
if (_ret) then {

View File

@ -30,9 +30,10 @@ if (getPlayerUID player == Epoch_my_GroupUID) then {
};
[_playerUID,_isMember,_txt] spawn {
_ret = [_this select 2,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
params ["_playerUID","_isMember","_txt"];
_ret = [_txt,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;
if (_ret) then {
[Epoch_my_GroupUID,_this select 0,true,_this select 1,player,Epoch_personalToken] remoteExec ["EPOCH_server_updatePlayerGroup",2];
[Epoch_my_GroupUID,_playerUID,true,_isMember,player,Epoch_personalToken] remoteExec ["EPOCH_server_updatePlayerGroup",2];
};
};
};

View File

@ -14,16 +14,24 @@
*/
disableSerialization;
//[[[cog import generate_private_arrays ]]]
private ["_BtnInvite","_ctrl","_currentMaxMember","_currentMember","_playerUID","_selected"];
private ["_BtnInvite","_ctrl","_currentMember","_playerUID","_selected"];
//[[[end]]]
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
["_groupSize",0],
["_modArray",[]],
["_memberArray",[]]
];
_ctrl = _this select 0;
_selected = _this select 1;
_playerUID = getPlayerUID player;
if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (Epoch_my_Group select 3) > 0) then {
if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (_modArray) > 0) then {
_BtnInvite = (findDisplay -1300) displayCtrl 30;
_currentMember = count(Epoch_my_Group select 3) + count(Epoch_my_Group select 4) + 1;
_currentMaxMember = Epoch_my_Group select 2;
if (_currentMember < _currentMaxMember) then {
_currentMember = count(_modArray) + count(_memberArray) + 1;
if (_currentMember < _groupSize) then {
_BtnInvite ctrlSetText format ["Invite %1",_ctrl lbtext _selected];
};
true

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/group/EPOCH_Group_onLoad.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_BtnInvite","_GroupMemberList","_InvitePlayerCombo","_currentMaxMember","_currentMember","_display","_found","_index","_myPlayerUID","_onlinePUID","_picture","_playerIsLeader","_playerIsMod","_playerUID","_players"];
private ["_BtnInvite","_GroupMemberList","_InvitePlayerCombo","_currentMaxMember","_display","_found","_index","_myPlayerUID","_onlinePUID","_picture","_playerIsLeader","_playerIsMod","_playerUID","_players"];
//[[[end]]]
disableSerialization;
_display = findDisplay -1300;
@ -22,13 +22,21 @@ _BtnInvite = _display displayCtrl 30;
_GroupMemberList = _display displayCtrl 40;
_InvitePlayerCombo = _display displayCtrl 41;
_currentMaxMember = count(Epoch_my_Group select 3) + count(Epoch_my_Group select 4) + 1;
_currentMember = Epoch_my_Group select 2;
(_display displayCtrl 21) ctrlSetText format["Group Name: %1 (%2/%3 Slots)",Epoch_my_Group select 0,_currentMaxMember,_currentMember];
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
["_groupSize",0],
["_modArray",[]],
["_memberArray",[]]
];
_currentMaxMember = count(_modArray) + count(_memberArray) + 1;
(_display displayCtrl 21) ctrlSetText format["Group Name: %1 (%2/%3 Slots)",_groupName,_currentMaxMember,_groupSize];
_myPlayerUID = getPlayerUID player;
_playerIsLeader = _myPlayerUID == Epoch_my_GroupUID;
_playerIsMod = {_x select 0 == _myPlayerUID}count (Epoch_my_Group select 3) > 0;
_playerIsMod = {_x select 0 == _myPlayerUID}count (_modArray) > 0;
(_display displayCtrl 32) ctrlEnable false;
(_display displayCtrl 33) ctrlEnable false;
@ -37,7 +45,7 @@ _onlinePUID = [];
_onlinePUID pushBack (getPlayerUID _x);
}forEach (units group player);
if (_currentMaxMember < _currentMember) then {
if (_currentMaxMember < _groupSize) then {
_players = player nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], 10];
if (_playerIsLeader || _playerIsMod) then {
@ -90,7 +98,7 @@ if (_currentMaxMember < _currentMember) then {
}forEach _x;
}forEach
[
[[Epoch_my_GroupUID,Epoch_my_Group select 1]],
Epoch_my_Group select 3,
Epoch_my_Group select 4
[[Epoch_my_GroupUID,_leaderName]],
_modArray,
_memberArray
];

View File

@ -12,26 +12,35 @@
Usage:
"TEST" call Epoch_message
TODO: Add colors
*/
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
_msg = param [0, "No input"];
_time = param [1, 2];
_customCol = param[2,[]];
private["_bgCol","_txtCol"];
if(_customCol isEqualTo [])then{
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_bgCol = getArray(_config >> "epochMessageBackgroundCol");
_txtCol = getArray(_config >> "epochMessageTextCol");
if !(_bgCol isEqualTypeAll 0)then{_bgCol = [0,0,0,0.2]};
if !(_txtCol isEqualTypeAll 0)then{_txtCol = [1,1,1,0.95]};
}else{
_bgCol = if((_customCol select 0)isEqualTypeAll 0)then[{_customCol select 0},{_bgCol = [0,0,0,0.2]}];
_txtCol = if((_customCol select 1)isEqualTypeAll 0)then[{_customCol select 1},{_txtCol = [1,1,1,0.95]}];
};
_msg = str (parseText str _msg); //Parses and converts text back to small string
if !(isNil "rmx_var_msgQueue") exitWith { rmx_var_msgQueue pushBack [_msg, _time];};
if !(isNil "rmx_var_msgQueue") exitWith {rmx_var_msgQueue pushBack [_msg, _time, [_bgCol,_txtCol]]};
rmx_var_msgQueue = [[_msg, _time]];
rmx_var_msgQueue = [[_msg, _time, [_bgCol,_txtCol]]];
[] spawn {
private ["_c1pos","_c2pos","_c3pos","_clr","_dsp"];
disableSerialization;
_dsp = findDisplay 46;
_yPos = 15;
_ySize = 2;
_c1StartPos = [safeZoneX,((_yPos - _ySize) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
@ -39,20 +48,20 @@ rmx_var_msgQueue = [[_msg, _time]];
_c2pos = [safeZoneX,((_yPos + _ySize) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
_c3pos = [safeZoneX,((_yPos + _ySize * 2) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
_getClr = call Epoch_getColorScheme;
_clr = [_getClr select 0, _getClr select 1, _getClr select 2, 0.2];
//Start anim
_msg = "";
_time = (rmx_var_msgQueue select 0 select 1);
_col = (rmx_var_msgQueue select 0)select 2;
_fnc_animFirst = {
private "_ctrl";
_ctrl = param [0];
_msg = param [1];
_ctrl ctrlSetBackgroundColor [_clr select 0, _clr select 1, _clr select 2, 0.2];
_col = param [2];
_ctrl ctrlSetBackgroundColor (_col select 0);
_ctrl ctrlSetText _msg;
_ctrl ctrlSetTextColor (_col select 1);
_ctrl ctrlSetPosition _c1StartPos;
_ctrl ctrlSetFade 1;
@ -76,28 +85,30 @@ rmx_var_msgQueue = [[_msg, _time]];
_ctrl ctrlCommit 0.3;
};
_tick = diag_tickTime; _ctrlArr = [];
_tick = diag_tickTime;
_ctrlArr = [];
while {(diag_tickTime - _tick) < _time} do {
if !(rmx_var_msgQueue isEqualTo []) then {
_msg = (rmx_var_msgQueue select 0 select 0);
_time = (rmx_var_msgQueue select 0 select 1);
_col = (rmx_var_msgQueue select 0)select 2;
_tick = diag_tickTime;
rmx_var_msgQueue deleteAt 0;
_uniqueID =
//_uniqueID =
switch (count _ctrlArr) do {
case 0:
{
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
_ctrlArr = [[_c, _msg]];
[_c, _msg] call _fnc_animFirst;
[_c, _msg, _col] call _fnc_animFirst;
};
case 1:
{
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
_ctrlArr set [count _ctrlArr, [_c, _msg]];
[_c, _msg] call _fnc_animFirst;
[_c, _msg, _col] call _fnc_animFirst;
[_ctrlArr select 0 select 0, 0.5, 0.035, _c2pos] call _fnc_animShiftCtrl;
};
@ -105,7 +116,7 @@ rmx_var_msgQueue = [[_msg, _time]];
{
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
_ctrlArr set [count _ctrlArr, [_c, _msg]];
[_c, _msg] call _fnc_animFirst;
[_c, _msg, _col] call _fnc_animFirst;
[_ctrlArr select 1 select 0, 0.5, 0.035, _c2pos] call _fnc_animShiftCtrl;
[_ctrlArr select 0 select 0, 0.75, 0.03, _c3pos] call _fnc_animShiftCtrl;
@ -119,7 +130,7 @@ rmx_var_msgQueue = [[_msg, _time]];
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
_ctrlArr pushBack [_c, _msg];
[_c, _msg] call _fnc_animFirst;
[_c, _msg, _col] call _fnc_animFirst;
[_ctrlArr select 1 select 0, 0.5, 0.035, _c2pos] call _fnc_animShiftCtrl;
[_ctrlArr select 0 select 0, 0.75, 0.03, _c3pos] call _fnc_animShiftCtrl;

View File

@ -66,6 +66,7 @@ _antagonistSpawnDefaults = [
["Epoch_Cloak_F", 1],
["GreatWhite_F", 2],
["Epoch_Sapper_F",2],
["Epoch_SapperG_F",1],
["Epoch_SapperB_F",1],
["I_UAV_01_F",2],
["PHANTOM",1],

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

Some files were not shown because too many files have changed in this diff Show More