Merge pull request #969 from EpochModTeam/experimental

release 1.1
This commit is contained in:
vbawol 2018-03-15 12:16:49 -05:00 committed by GitHub
commit c503237163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
142 changed files with 46896 additions and 2039 deletions

View File

@ -4,14 +4,14 @@ InstanceID = NA123
LogAbuse = 1
LogLimit = 999
IP = 127.0.0.1
Port = 2306
Password = changeme
Port = 2307
Password = changemen0w
[Redis]
IP = 127.0.0.1
Port = 6379
DB = 0
Password = foobared
Password = Changeme9832
[SteamAPI]
Logging = 0

View File

@ -1,123 +1,179 @@
serverRestart = "false"; // true sends #shutdown command to server after the time specified in ForceRestartTime
forceRestartTime = 14400; // 4 hour restarts
StorageSlotsLimit = 1500; // Max storage slots allowed. Warning! Higher the number lower performance.
BuildingSlotsLimit = 1500; // Max building slots allowed. Warning! Higher the number lower performance.
serverRestart = "false"; // true sends #shutdown command to server after the time specified in ForceRestartTime
forceRestartTime = 14400; // 4 hour restarts
// Time based
StaticDateTime[] = {}; // {0,0,0,8,0} would forces the server to start at 8am each time it is started while allowing the year, month and day to stay real time. Any values left at 0 will result in no change.
timeDifference = 0; // Server uses real time this will allow you to offset just the hour.
timeMultiplier = 4; // Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems.
lootMultiplier = 0.5; // 1 = max loot bias. This controls how much loot can payout per Epoch loot container.
StaticDateTime[] = {}; // {0,0,0,8,0} would forces the server to start at 8am each time it is started while allowing the year, month and day to stay real time. Any values left at 0 will result in no change.
timeDifference = 0; // Server uses real time this will allow you to offset just the hour.
timeMultiplier = 4; // Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems.
lootMultiplier = 0.5; // 1 = max loot bias. This controls how much loot can payout per Epoch loot container.
// Events
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, -1, {} ,{"VR"}}, // SECOND <scalar>, EVENT <string>, INIT <scalar> 1 = run script at startup or 0 normal delay, PREPOSTFIX <scalar> 1 = use pre/postfix path (inside epoch settings pbo) 0 = use full file path, RUNNUMTIMES <scalar> -1 infinite, execVM payload <array>, disallowed worlds <array>
// { 1800, "PaydayEvent", 0, 1},
// { 1200, "MessageServer", 0, 1},
{ 2700, "AirDrop", 0 , 1, -1, {} ,{"VR"}},
{ 2400, "EarthQuake", 0 , 1, -1, {} ,{"VR"}},
{ 2700, "Satellite", 0 , 1, -1, {} ,{"VR"}},
{ 900, "ChangeWeather", 1 , 1, -1, {} ,{"VR"}},
{ 1200, "ContainerSpawner", 0 , 1, -1, {} ,{"VR"}},
{ 1440, "GardenManager", 0 , 1, -1, {} ,{"VR"}},
{ 300, "PlantSpawner", 0 , 1 , -1, {} ,{"VR"}} //No comma on last Entry
};
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, // SECOND <scalar>,
"CarnivalSpawner", // EVENT <string>
0, //INIT <scalar> 1 = run script at startup or 0 normal delay
2, //PREPOSTFIX <scalar> 1 = (epoch_settings pbo) 2 = (epoch_events pbo) 0 = use full file path
-1, //RUNNUMTIMES <scalar> -1 infinite
{}, //execVM payload <array>
{"VR"} //disallowed worlds <array>
},
// { 1800, "PaydayEvent", 0, 2},
// { 1200, "MessageServer", 0, 2},
{ 2700, "AirDrop", 0 , 2, -1, {} ,{"VR"}},
{ 2400, "EarthQuake", 0 , 2, -1, {} ,{"VR"}},
{ 2700, "Satellite", 0 , 2, -1, {} ,{"VR"}},
{ 900, "ChangeWeather", 1 , 2, -1, {} ,{"VR"}},
{ 1200, "ContainerSpawner", 0 , 2, -1, {} ,{"VR"}},
{ 1440, "GardenManager", 0 , 2, -1, {} ,{"VR"}},
{ 900, "MoneyDrop", 0 , 2 , -1, {} ,{"VR"}},
{ 300, "PlantSpawner", 0 , 2 , -1, {} ,{"VR"}} //No comma on last Entry
};
// Antagonists
antagonistChancePDeath = 0.33; //33% chance when player was killed from a other player (selfkill doesn't count)
antagonistChancePDeath = 0.33; //33% chance when player was killed from a other player (selfkill doesn't count)
// 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
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
// Default Loadout
defaultUniformFemale = "U_Test_uniform";
defaultVestFemale = "V_F41_EPOCH";
defaultUniformMale = "U_Test1_uniform";
defaultVestMale = "V_41_EPOCH";
defaultGoggles = "";
defaultHeadgear = "";
defaultBackpack = "";
defaultprimaryWeapon[] = {}; // {"arifle_MX_pointer_F","","acc_pointer_IR","",{"30Rnd_65x39_caseless_mag",29},{},""};
defaultsecondaryWeapon[] = {}; // {"launch_NLAW_F","","","",{"NLAW_F",1},{},""};
defaulthandgunWeapon[] = {}; // {"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""};
defaultuniformItems[] = {}; // {{"FAK",1},{"30Rnd_65x39_caseless_mag",2,30},{"Chemlight_green",1,1}};
defaultvestItems[] = {}; // {{"30Rnd_65x39_caseless_mag",3,30},{"16Rnd_9x21_Mag",2,16},{"SmokeShell",1,1},{"SmokeShellGreen",1,1},{"SmokeShellBlue",1,1},{"SmokeShellOrange",1,1},{"Chemlight_green",1,1}};
defaultbackpackItems[] = {}; // {{"Medikit",1},{"FAK",10},{{"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""},1}};
defaultassignedItems[] = {}; // {"Rangefinder","","","",{},{},""}
defaultlinkedItems[] = {
"ItemMap", // "ItemMap"
"", // "ItemGPS" or "ItemGeigerCounter_EPOCH",
"EpochRadio0", // "EpochRadio0" through "EpochRadio9"
"", // "ItemCompass"
"", // "ItemWatch"
"" // "NVG_EPOCH" or "radiation_mask_epoch"
};
defaultUniformFemale = "U_Test_uniform";
defaultVestFemale = "V_F41_EPOCH";
defaultUniformMale = "U_Test1_uniform";
defaultVestMale = "V_41_EPOCH";
defaultGoggles = "";
defaultHeadgear = "";
defaultBackpack = "";
defaultprimaryWeapon[] = {}; // {"arifle_MX_pointer_F","","acc_pointer_IR","",{"30Rnd_65x39_caseless_mag",29},{},""};
defaultsecondaryWeapon[] = {}; // {"launch_NLAW_F","","","",{"NLAW_F",1},{},""};
defaulthandgunWeapon[] = {}; // {"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""};
defaultuniformItems[] = {}; // {{"FAK",1},{"30Rnd_65x39_caseless_mag",2,30},{"Chemlight_green",1,1}};
defaultvestItems[] = {}; // {{"30Rnd_65x39_caseless_mag",3,30},{"16Rnd_9x21_Mag",2,16},{"SmokeShell",1,1},{"SmokeShellGreen",1,1},{"SmokeShellBlue",1,1},{"SmokeShellOrange",1,1},{"Chemlight_green",1,1}};
defaultbackpackItems[] = {}; // {{"Medikit",1},{"FAK",10},{{"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""},1}};
defaultassignedItems[] = {}; // {"Rangefinder","","","",{},{},""}
defaultlinkedItems[] = {
"ItemMap", // "ItemMap"
"", // "ItemGPS" or "ItemGeigerCounter_EPOCH",
"", // "EpochRadio0" through "EpochRadio9"
"", // "ItemCompass"
"", // "ItemWatch"
"" // "NVG_EPOCH" or "radiation_mask_epoch"
};
// vehicles - Max vehicle slots is calculated from per vehicle limits below. Warning! Higher the number lower the performance.
disableAutoRefuel = "true"; // Removes auto refuel from all buildings at server startup.
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.
vehicleLockTime = 1800; // Controls how many seconds it takes to allow another person/group to unlock vehicle.
VehLockMessages = "true"; // Give players a hint, that the Vehicle is locked / unlocked
removevehweapons[] = { // remove these Weapons from spawned Vehicles
"missiles_DAR","gatling_30mm","gatling_20mm","missiles_DAGR","cannon_30mm_Plane_CAS_02_F","Missile_AA_03_Plane_CAS_02_F","Missile_AGM_01_Plane_CAS_02_F","Rocket_03_HE_Plane_CAS_02_F",
"Rocket_03_AP_Plane_CAS_02_F","Bomb_03_Plane_CAS_02_F","Bomb_04_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F","Rocket_04_HE_Plane_CAS_01_F","Missile_AGM_02_Plane_CAS_01_F","Missile_AA_04_Plane_CAS_01_F",
"Gatling_30mm_Plane_CAS_01_F","GBU12BombLauncher_Plane_Fighter_03_F","missiles_ASRAAM","missiles_SCALPEL","Twin_Cannon_20mm","missiles_Zephyr","rockets_skyfire","gatling_30mm_vtol_02"
};
removevehmagazinesturret[] = { // Remove these Magazines from the given Turret from spawned Vehicles
{"24Rnd_missiles",{-1}},
{"200Rnd_40mm_G_belt",{0}}
};
disableVehicleTIE = "true";
ReservedVehSlots = 50; // Reserved Vehicle Slots (only needed, if you manually spawn in additional Vehicles - AdminTool / Blackmarket...)
disableAutoRefuel = "true"; // Removes auto refuel from all buildings at server startup.
VehLockMessages = "true"; // Give players a hint, that the Vehicle is locked / unlocked
removevehweapons[] = { // remove these Weapons from spawned Vehicles
"missiles_DAR","gatling_30mm","gatling_20mm","missiles_DAGR","cannon_30mm_Plane_CAS_02_F","Missile_AA_03_Plane_CAS_02_F","Missile_AGM_01_Plane_CAS_02_F","Rocket_03_HE_Plane_CAS_02_F",
"Rocket_03_AP_Plane_CAS_02_F","Bomb_03_Plane_CAS_02_F","Bomb_04_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F","Rocket_04_HE_Plane_CAS_01_F","Missile_AGM_02_Plane_CAS_01_F","Missile_AA_04_Plane_CAS_01_F",
"Gatling_30mm_Plane_CAS_01_F","GBU12BombLauncher_Plane_Fighter_03_F","missiles_ASRAAM","missiles_SCALPEL","Twin_Cannon_20mm","missiles_Zephyr","rockets_skyfire","gatling_30mm_vtol_02"
};
removevehmagazinesturret[] = { // Remove these Magazines from the given Turret from spawned Vehicles
{"24Rnd_missiles",{-1}},
{"200Rnd_40mm_G_belt",{0}}
};
disableVehicleTIE = "true";
// BaseBuilding
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
IndestructibleBaseObjects[] = { // Can be Names or Classes
"Constructions_static_F",
"Buildable_Storage",
"PlotPole_EPOCH",
"LockBox_EPOCH",
"Safe_EPOCH"
};
ExceptedBaseObjects[] = { // Not Indestructible, also if in a Class of IndestructibleBaseObjects
"CinderWallGarage_EPOCH",
"WoodLargeWallDoorL_EPOCH",
"WoodLargeWallDoor_EPOCH",
"WoodWall4_EPOCH"
StorageSlotsLimit = 1500; // Max storage slots allowed. Warning! Higher the number lower performance.
BuildingSlotsLimit = 1500; // Max building slots allowed. Warning! Higher the number lower performance.
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
IndestructibleBaseObjects[] = { // Can be Names or Classes
"Constructions_static_F",
"Buildable_Storage",
"PlotPole_EPOCH",
"LockBox_EPOCH",
"Safe_EPOCH"
};
ExceptedBaseObjects[] = { // Not Indestructible, also if in a Class of IndestructibleBaseObjects
"CinderWallGarage_EPOCH",
"WoodLargeWallDoorL_EPOCH",
"WoodLargeWallDoor_EPOCH",
"WoodWall4_EPOCH"
};
UseDeSimulateObjects = "true"; // Disable Simulation for specifed Base Objects
DeSimulateObjects[] = { // Base Objects to disable Simulation. Can be Names or Classes
"PlotPole_EPOCH",
"WoodFoundation_EPOCH","Foundation_EPOCH",
"WoodQuarterFloor_EPOCH","WoodHalfFloor_EPOCH","WoodFloor_EPOCH",
"MetalQuarterFloor_EPOCH","MetalHalfFloor_EPOCH","MetalFloor_EPOCH",
"CinderQuarterFloor_EPOCH","CinderHalfFloor_EPOCH","CinderFloor_EPOCH",
"WoodLargeWall_EPOCH","WoodLargeWallDoorway_EPOCH","WoodLargeWallCor_EPOCH","WoodWall1_EPOCH","WoodWall2_EPOCH","WoodWallWindow_EPOCH",
"CinderWallHalf_EPOCH","CinderWall_EPOCH",
"WoodRamp_EPOCH","WoodStairs_EPOCH","WoodStairs2_EPOCH",
"SolarGen_EPOCH","SandbagWall_EPOCH","BarbedWire_EPOCH","Sink_EPOCH","BagBunker_EPOCH","WaterPump_EPOCH","Scaffolding_EPOCH","SunShade_EPOCH","WatchTower_EPOCH","SandbagWallLong_EPOCH","TankTrap_EPOCH"
};
ExceptedDeSymObjects[] = { // Not Desymulated, also if in a Class of DeSimulateObjects
};
// Dynamic Simulation System
enableDynamicSimulationSystem = "true"; // enable / disable the complete dynamic simulation system
//Individual toggles for testing
vehicleDynamicSimulationSystem = "true"; // type car, air, boat
playerDynamicSimulationSystem = "true"; // clients
baseDynamicSimulationSystem = "true"; // plot pole and base pieces
// Distances and Coef
isMovingCoefValue = 2;
groupDynSimDistance = 500;
vehicleDynSimDistance = 350;
emptyVehicleDynSimDistance = 250;
propDynSimDistance = 50;
// Traders
taxRate = 0.1; // controls the price increase for purchases
starterTraderItems[] = { { "ItemSodaBurst", "meatballs_epoch", "MortarBucket", "CinderBlocks", "VehicleRepair", "CircuitParts", "ItemCorrugated", "PartPlankPack", "ItemRock", "ItemRope", "ItemStick" }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 } }; // Starter Items for fresh spawned trader first array is classnames second is quantity.
NPCSlotsLimit = 30; // Max number of traders static or dynamic. Warning! Higher the number lower performance.
forceStaticTraders = "true"; // disables traders moving from work to home
taxRate = 0.1; // controls the price increase for purchases
starterTraderItems[] = { // Starter Items for fresh spawned trader first array is classnames second is quantity.
{"ItemSodaBurst","meatballs_epoch","MortarBucket","CinderBlocks","VehicleRepair","CircuitParts","ItemCorrugated","PartPlankPack","ItemRock","ItemRope","ItemStick"},
{5,5,5,5,5,5,5,5,5,5,5}
};
NPCSlotsLimit = 30; // Max number of traders static or dynamic. Warning! Higher the number lower performance.
forceStaticTraders = "true"; // disables traders moving from work to home
TraderGodMode = "false"; // If true, Trader can not be killed by Players
storedVehicleLimit = 15; // Vehicles more than x stored in ALL Traders will automatically be deleted on Restart.
StaticTraderItemPurge[] = {100,15}; // {ItemCount,ReducePercent} - If a static trader have more than x different items, on restart the items will be reduced by y percent
DynamicTraderRespawnCount = 100; // If a dynamic Trader have more than x different Items, he will respawn on another Spot (with start Items)
TraderItemCountPerItem[] = {50,5}; // If the Trader has more than x pieces of an Item, it will be reduced to y pieces (on Restart)
TraderItemsDeleteInstant[] = { // List of Items, that will be deleted from Trader instant after sell
// "ItemVehDoc1",
// "ItemVehDoc2",
// "ItemVehDoc3",
// "ItemVehDoc4"
};
TraderItemsDeleteRestart[] = { // List of Items, that will be deleted from Trader on Restart
// "ItemLockbox",
// "ItemSafe",
// "ItemGoldBar10oz"
};
forcedVehicleSpawnTable = ""; // leave blank for default. Options: "allowedVehiclesList","allowedVehiclesList_CUP","allowedVehiclesList_MAD","allowedVehiclesList_MADCUP"
forcedLootSpawnTable = ""; // leave blank for default. Options: "CfgLootTable","CfgLootTable_CUP","CfgLootTable_MAD","CfgLootTable_MADCUP"
// Spawntables
forcedVehicleSpawnTable = ""; // leave blank for default. Options: "allowedVehiclesList","allowedVehiclesList_CUP","allowedVehiclesList_MAD","allowedVehiclesList_MADCUP"
forcedLootSpawnTable = ""; // leave blank for default. Options: "CfgLootTable","CfgLootTable_CUP","CfgLootTable_MAD","CfgLootTable_MADCUP"
// Markers
showEarthQuakes = "true"; // show mineral viens caused by earthquakes
showSatellites = "true"; // show crashed Satellites
showShippingContainers = "true"; // Show location of events based loots (plants, shipping container, Carnival)
SHOW_TRADERS = "true"; // Show locations of traders
SHOW_JAMMERS = "false"; // Shows location of base jammers
SHOW_BOATLOOT = "true"; // Shows the location of shipwreck loot
DEBUG_VEH = "false"; // DEBUG ONLY used to debug spawing of vehicles
showEarthQuakes = "true"; // show mineral viens caused by earthquakes
showSatellites = "true"; // show crashed Satellites
showShippingContainers = "true"; // Show location of events based loots (plants, shipping container, Carnival)
SHOW_TRADERS = "true"; // Show locations of traders
SHOW_JAMMERS = "false"; // Shows location of base jammers
SHOW_BOATLOOT = "true"; // Shows the location of shipwreck loot
DEBUG_VEH = "false"; // DEBUG ONLY used to debug spawing of vehicles
// Hive Related
expiresBuilding = "604800"; // expiration date in seconds for buildings
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
expiresCommunityStats = "7776000"; // expiration date in seconds for players community stats
vehicleLockTime = "1800"; // Controls how many seconds it takes to allow another person/group to unlock vehicle.
expiresBuilding = "604800"; // expiration date in seconds for buildings
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
expiresCommunityStats = "7776000"; // expiration date in seconds for players community stats
// Admin Features
hiveAdminCmdExec = "false"; // true = enables extra (To Be Released) feature to allow execution of code via hive.
hiveAdminSavePlayerList = "true"; // true = enables saving of playerUID array to hive value PLAYERS:#InstanceID.
hiveAdminCmdTime = 5; // how many seconds between each command queue call.
hiveAdminCmdExec = "false"; // true = enables extra (To Be Released) feature to allow execution of code via hive.
hiveAdminSavePlayerList = "true"; // true = enables saving of playerUID array to hive value PLAYERS:#InstanceID.
hiveAdminCmdTime = 5; // how many seconds between each command queue call.
// DEBUG
useOldLoadVehicles = "false";
enableUnitTestOnStart = 1; // enable extra debug for database calls. 1 = enabled.
useOldLoadVehicles = "false";
enableUnitTestOnStart = 1; // enable extra debug for database calls. 1 = enabled.

View File

@ -0,0 +1,179 @@
serverRestart = "false"; // true sends #shutdown command to server after the time specified in ForceRestartTime
forceRestartTime = 14400; // 4 hour restarts
// Time based
StaticDateTime[] = {}; // {0,0,0,8,0} would forces the server to start at 8am each time it is started while allowing the year, month and day to stay real time. Any values left at 0 will result in no change.
timeDifference = 0; // Server uses real time this will allow you to offset just the hour.
timeMultiplier = 4; // Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems.
lootMultiplier = 0.5; // 1 = max loot bias. This controls how much loot can payout per Epoch loot container.
// Events
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, // SECOND <scalar>,
"CarnivalSpawner", // EVENT <string>
0, //INIT <scalar> 1 = run script at startup or 0 normal delay
2, //PREPOSTFIX <scalar> 1 = (epoch_settings pbo) 2 = (epoch_events pbo) 0 = use full file path
-1, //RUNNUMTIMES <scalar> -1 infinite
{}, //execVM payload <array>
{"VR"} //disallowed worlds <array>
},
// { 1800, "PaydayEvent", 0, 1},
// { 1200, "MessageServer", 0, 1},
{ 2700, "AirDrop", 0 , 2, -1, {} ,{"VR"}},
{ 2400, "EarthQuake", 0 , 2, -1, {} ,{"VR"}},
{ 2700, "Satellite", 0 , 2, -1, {} ,{"VR"}},
{ 900, "ChangeWeather", 1 , 2, -1, {} ,{"VR"}},
{ 1200, "ContainerSpawner", 0 , 2, -1, {} ,{"VR"}},
{ 1440, "GardenManager", 0 , 2, -1, {} ,{"VR"}},
{ 900, "MoneyDrop", 0 , 2 , -1, {} ,{"VR"}},
{ 300, "PlantSpawner", 0 , 2 , -1, {} ,{"VR"}} //No comma on last Entry
};
// Antagonists
antagonistChancePDeath = 0.33; //33% chance when player was killed from a other player (selfkill doesn't count)
// 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
// Default Loadout
defaultUniformFemale = "U_Test_uniform";
defaultVestFemale = "V_F41_EPOCH";
defaultUniformMale = "U_Test1_uniform";
defaultVestMale = "V_41_EPOCH";
defaultGoggles = "";
defaultHeadgear = "";
defaultBackpack = "";
defaultprimaryWeapon[] = {}; // {"arifle_MX_pointer_F","","acc_pointer_IR","",{"30Rnd_65x39_caseless_mag",29},{},""};
defaultsecondaryWeapon[] = {}; // {"launch_NLAW_F","","","",{"NLAW_F",1},{},""};
defaulthandgunWeapon[] = {}; // {"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""};
defaultuniformItems[] = {}; // {{"FAK",1},{"30Rnd_65x39_caseless_mag",2,30},{"Chemlight_green",1,1}};
defaultvestItems[] = {}; // {{"30Rnd_65x39_caseless_mag",3,30},{"16Rnd_9x21_Mag",2,16},{"SmokeShell",1,1},{"SmokeShellGreen",1,1},{"SmokeShellBlue",1,1},{"SmokeShellOrange",1,1},{"Chemlight_green",1,1}};
defaultbackpackItems[] = {}; // {{"Medikit",1},{"FAK",10},{{"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""},1}};
defaultassignedItems[] = {}; // {"Rangefinder","","","",{},{},""}
defaultlinkedItems[] = {
"ItemMap", // "ItemMap"
"", // "ItemGPS" or "ItemGeigerCounter_EPOCH",
"", // "EpochRadio0" through "EpochRadio9"
"", // "ItemCompass"
"", // "ItemWatch"
"" // "NVG_EPOCH" or "radiation_mask_epoch"
};
// vehicles - Max vehicle slots is calculated from per vehicle limits below. Warning! Higher the number lower the performance.
ReservedVehSlots = 50; // Reserved Vehicle Slots (only needed, if you manually spawn in additional Vehicles - AdminTool / Blackmarket...)
disableAutoRefuel = "true"; // Removes auto refuel from all buildings at server startup.
VehLockMessages = "true"; // Give players a hint, that the Vehicle is locked / unlocked
removevehweapons[] = { // remove these Weapons from spawned Vehicles
"missiles_DAR","gatling_30mm","gatling_20mm","missiles_DAGR","cannon_30mm_Plane_CAS_02_F","Missile_AA_03_Plane_CAS_02_F","Missile_AGM_01_Plane_CAS_02_F","Rocket_03_HE_Plane_CAS_02_F",
"Rocket_03_AP_Plane_CAS_02_F","Bomb_03_Plane_CAS_02_F","Bomb_04_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F","Rocket_04_HE_Plane_CAS_01_F","Missile_AGM_02_Plane_CAS_01_F","Missile_AA_04_Plane_CAS_01_F",
"Gatling_30mm_Plane_CAS_01_F","GBU12BombLauncher_Plane_Fighter_03_F","missiles_ASRAAM","missiles_SCALPEL","Twin_Cannon_20mm","missiles_Zephyr","rockets_skyfire","gatling_30mm_vtol_02"
};
removevehmagazinesturret[] = { // Remove these Magazines from the given Turret from spawned Vehicles
{"24Rnd_missiles",{-1}},
{"200Rnd_40mm_G_belt",{0}}
};
disableVehicleTIE = "true";
// BaseBuilding
StorageSlotsLimit = 1500; // Max storage slots allowed. Warning! Higher the number lower performance.
BuildingSlotsLimit = 1500; // Max building slots allowed. Warning! Higher the number lower performance.
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
IndestructibleBaseObjects[] = { // Can be Names or Classes
"Constructions_static_F",
"Buildable_Storage",
"PlotPole_EPOCH",
"LockBox_EPOCH",
"Safe_EPOCH"
};
ExceptedBaseObjects[] = { // Not Indestructible, also if in a Class of IndestructibleBaseObjects
"CinderWallGarage_EPOCH",
"WoodLargeWallDoorL_EPOCH",
"WoodLargeWallDoor_EPOCH",
"WoodWall4_EPOCH"
};
UseDeSimulateObjects = "true"; // Disable Simulation for specifed Base Objects
DeSimulateObjects[] = { // Base Objects to disable Simulation. Can be Names or Classes
"PlotPole_EPOCH",
"WoodFoundation_EPOCH","Foundation_EPOCH",
"WoodQuarterFloor_EPOCH","WoodHalfFloor_EPOCH","WoodFloor_EPOCH",
"MetalQuarterFloor_EPOCH","MetalHalfFloor_EPOCH","MetalFloor_EPOCH",
"CinderQuarterFloor_EPOCH","CinderHalfFloor_EPOCH","CinderFloor_EPOCH",
"WoodLargeWall_EPOCH","WoodLargeWallDoorway_EPOCH","WoodLargeWallCor_EPOCH","WoodWall1_EPOCH","WoodWall2_EPOCH","WoodWallWindow_EPOCH",
"CinderWallHalf_EPOCH","CinderWall_EPOCH",
"WoodRamp_EPOCH","WoodStairs_EPOCH","WoodStairs2_EPOCH",
"SolarGen_EPOCH","SandbagWall_EPOCH","BarbedWire_EPOCH","Sink_EPOCH","BagBunker_EPOCH","WaterPump_EPOCH","Scaffolding_EPOCH","SunShade_EPOCH","WatchTower_EPOCH","SandbagWallLong_EPOCH","TankTrap_EPOCH"
};
ExceptedDeSymObjects[] = { // Not Desymulated, also if in a Class of DeSimulateObjects
};
// Dynamic Simulation System
enableDynamicSimulationSystem = "true"; // enable / disable the complete dynamic simulation system
//Individual toggles for testing
vehicleDynamicSimulationSystem = "true"; // type car, air, boat
playerDynamicSimulationSystem = "true"; // clients
baseDynamicSimulationSystem = "true"; // plot pole and base pieces
// Distances and Coef
isMovingCoefValue = 2;
groupDynSimDistance = 500;
vehicleDynSimDistance = 350;
emptyVehicleDynSimDistance = 250;
propDynSimDistance = 50;
// Traders
taxRate = 0.1; // controls the price increase for purchases
starterTraderItems[] = { // Starter Items for fresh spawned trader first array is classnames second is quantity.
{"ItemSodaBurst","meatballs_epoch","MortarBucket","CinderBlocks","VehicleRepair","CircuitParts","ItemCorrugated","PartPlankPack","ItemRock","ItemRope","ItemStick"},
{5,5,5,5,5,5,5,5,5,5,5}
};
NPCSlotsLimit = 30; // Max number of traders static or dynamic. Warning! Higher the number lower performance.
forceStaticTraders = "true"; // disables traders moving from work to home
TraderGodMode = "false"; // If true, Trader can not be killed by Players
storedVehicleLimit = 15; // Vehicles more than x stored in ALL Traders will automatically be deleted on Restart.
StaticTraderItemPurge[] = {100,15}; // {ItemCount,ReducePercent} - If a static trader have more than x different items, on restart the items will be reduced by y percent
DynamicTraderRespawnCount = 100; // If a dynamic Trader have more than x different Items, he will respawn on another Spot (with start Items)
TraderItemCountPerItem[] = {50,5}; // If the Trader has more than x pieces of an Item, it will be reduced to y pieces (on Restart)
TraderItemsDeleteInstant[] = { // List of Items, that will be deleted from Trader instant after sell
// "ItemVehDoc1",
// "ItemVehDoc2",
// "ItemVehDoc3",
// "ItemVehDoc4"
};
TraderItemsDeleteRestart[] = { // List of Items, that will be deleted from Trader on Restart
// "ItemLockbox",
// "ItemSafe",
// "ItemGoldBar10oz"
};
// Spawntables
forcedVehicleSpawnTable = ""; // leave blank for default. Options: "allowedVehiclesList","allowedVehiclesList_CUP","allowedVehiclesList_MAD","allowedVehiclesList_MADCUP"
forcedLootSpawnTable = ""; // leave blank for default. Options: "CfgLootTable","CfgLootTable_CUP","CfgLootTable_MAD","CfgLootTable_MADCUP"
// Markers
showEarthQuakes = "true"; // show mineral viens caused by earthquakes
showSatellites = "true"; // show crashed Satellites
showShippingContainers = "true"; // Show location of events based loots (plants, shipping container, Carnival)
SHOW_TRADERS = "true"; // Show locations of traders
SHOW_JAMMERS = "false"; // Shows location of base jammers
SHOW_BOATLOOT = "true"; // Shows the location of shipwreck loot
DEBUG_VEH = "false"; // DEBUG ONLY used to debug spawing of vehicles
// Hive Related
vehicleLockTime = "1800"; // Controls how many seconds it takes to allow another person/group to unlock vehicle.
expiresBuilding = "604800"; // expiration date in seconds for buildings
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
expiresCommunityStats = "7776000"; // expiration date in seconds for players community stats
// Admin Features
hiveAdminCmdExec = "false"; // true = enables extra (To Be Released) feature to allow execution of code via hive.
hiveAdminSavePlayerList = "true"; // true = enables saving of playerUID array to hive value PLAYERS:#InstanceID.
hiveAdminCmdTime = 5; // how many seconds between each command queue call.
// DEBUG
useOldLoadVehicles = "false";
enableUnitTestOnStart = 1; // enable extra debug for database calls. 1 = enabled.

View File

@ -0,0 +1,34 @@
@echo off
:: Turn off all firewall rules
echo Disabling firewall rules for this server
netsh advfirewall firewall delete rule name="a3Epoch" program="C:\EpochServer\Epochserver_x64.exe"
timeout 2
:: MAKE SURE ALL TASKS ARE REALLY STOPPED
echo Making sure all instances of this server have stopped
taskkill /f /fi "status eq not responding" /im Epochserver_x64.exe
taskkill /f /im Epochserver_x64.exe
timeout 2
:: RESTARTING THE ARMA 3 SERVER BE SURE TO EDIT THIS TO YOUR SERVER .EXE LOCATION -NOTE ALSO THIS IS WHERE YOU DEFINE WHERE YOU CONFIG.CFG IS
echo Starting ARMA 3 Server...
C:\Windows\System32\cmd.exe /C start "arma3" "C:\EpochServer\Epochserver_x64.exe" "-mod=@Epoch;" "-serverMod=@EpochHive;" -config=C:\EpochServer\sc\server.cfg -port=2302 -profiles=sc -cfg=C:\EpochServer\sc\basic.cfg -name=sc -autoINIT -Loadmissiontomemory
echo ARMA 3 Server has started
timeout 60
:: THIS RUNS THE SERVER MONITOR FOR YOU SO YOU DON'T FORGET
echo Starting Server Monitor Loop
set ServerMonitorPath="C:\Epochserver"
cd /d %ServerMonitorPath%
start "" "servermonitor.bat"
echo Server Monitor has started. Have Fun
timeout 5
:: Turn On Firewall rule
timeout 10
echo Turning on Firewall Rule to allow server network traffic
netsh advfirewall firewall add rule name="a3Epoch" dir=in action=allow program="C:\Epochserver\Epochserver_x64.exe" enable=yes
echo Firewall is on and players can join
timeout 5
@exit

View File

@ -1 +1 @@
5 "" !="H_MM_(Buzzard_Gasmask|Helmet)_01" !="V_MM_Vest_01" !="(V|H)_(F|)[0-9]{1,3}_EPOCH" !="(clown|pkin|wolf|radiation|hockey|plague|ghostface|skull|witch)_mask_epoch" !="Item(Map|GPS|Compass|Watch|GeigerCounter_EPOCH)" !="EpochRadio[0-9]" !="B_UavTerminal" !="(U|G|bipod|acc|muzzle|optic)_[0-9A-Z_]{1,100}" !="(NVG|Defib|Heal|Repair|Elcan(_reflex|))_EPOCH" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul|Rod|Sword)|ChainSaw|MultiGun|Rollins_F|Plunger)" !="(ruger_pistol|speargun|1911_pistol|akm|m14|M14Grn|m16|m16Red|m107|m107Tan|m249|m249Tan|m4a3|sr25|l85a2|l85a2_(pink|ugl))_epoch" !="SMG_(01|02|05)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_(camo_|)F" !="arifle_(Katiba|Katiba_C|Katiba_GL|SDAR|TRG21|TRG20|TRG21_GL|Mk20|Mk20C|Mk20C_plain|Mk20_GL|Mk20_plain|Mk20_GL_plain)_F" !="arifle_(MXC|MX|MX_GL|MXM|MXM_Black|MX_GL_Black|MX_Black|MXC_Black|MX_SW|MX_SW_Black)_F" !="srifle_DMR_0[2-7](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F" !"CUP_((h|s)gun|(s|a)rifle|(l|s)mg)_" !"CUP_(optic|muzzle|acc|bipod)_" !"CUP_(Mxx|SVD)_camo"
5 "" !="H_MM_(Buzzard_Gasmask|Helmet)_01" !="V_MM_Vest_01" !="(V|H)_(F|)[0-9]{1,3}_EPOCH" !="(clown|pkin|wolf|radiation|hockey|plague|ghostface|skull|witch)_mask_epoch" !="Item(Map|GPS|Compass|Watch|GeigerCounter_EPOCH)|Power_Sword" !="EpochRadio[0-9]" !="B_UavTerminal" !="(U|G|bipod|acc|muzzle|optic)_[0-9A-Z_]{1,100}" !="(NVG|Defib|Heal|Repair|Elcan(_reflex|))_EPOCH" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul|Rod|Sword)|ChainSaw|MultiGun|Rollins_F|Plunger)" !="(ruger_pistol|speargun|1911_pistol|akm|m14|M14Grn|m16|m16Red|m107|m107Tan|m249|m249Tan|m4a3|sr25|l85a2|l85a2_(pink|ugl))_epoch" !="SMG_(01|02|05)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_(camo_|)F" !="arifle_(Katiba|Katiba_C|Katiba_GL|SDAR|TRG21|TRG20|TRG21_GL|Mk20|Mk20C|Mk20C_plain|Mk20_GL|Mk20_plain|Mk20_GL_plain)_F" !="arifle_(MXC|MX|MX_GL|MXM|MXM_Black|MX_GL_Black|MX_Black|MXC_Black|MX_SW|MX_SW_Black)_F" !="srifle_DMR_0[2-7](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F" !"CUP_((h|s)gun|(s|a)rifle|(l|s)mg)_" !"CUP_(optic|muzzle|acc|bipod)_" !"CUP_(Mxx|SVD)_camo"

View File

@ -1,3 +1,3 @@
5 "" !="Construct_f" !="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_" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="(SatchelCharge|DemoCharge|ClaymoreDirectionalMine)_Remote_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" !"B_Bergen_(mcamo|dgtl|hex|tna)" !"B_AssaultPack_(khk|dgtl|rgr|sgg|cbr|mcamo|ocamo|tna)" !"B_Kitbag_(rgr|mcamo|sgg|cbr)" !"B_TacticalPack_(rgr|mcamo|ocamo|blk|oli)" !"B_FieldPack_(khk|ocamo|oucamo|cbr|blk|oli|ghex)" !"B_Carryall_(ocamo|oucamo|mcamo|khk|cbr|oli|ghex)" !"B_Viper(Light|)Harness_(oli|blk|ghex|hex|khk|oli)" !="B_Parachute" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo"
5 "" !="Construct_f" !="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_" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="(SatchelCharge|DemoCharge|ClaymoreDirectionalMine)_Remote_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" !"B_Bergen_(mcamo|dgtl|hex|tna)" !"B_AssaultPack_(khk|dgtl|rgr|sgg|cbr|mcamo|ocamo|blk|tna_F)" !"B_Kitbag_(rgr|mcamo|sgg|cbr)" !"B_TacticalPack_(rgr|mcamo|ocamo|blk|oli)" !"B_FieldPack_(khk|ocamo|oucamo|cbr|blk|oli|ghex)" !"B_Carryall_(ocamo|oucamo|mcamo|khk|cbr|oli|ghex)" !"B_Viper(Light|)Harness_(oli|blk|ghex|hex|khk|oli)" !="B_Parachute" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo"
5 "_EPOCH" !="BarrelBomb(2|)_EPOCH_Remote_Ammo" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf)_EPOCH" !="(ToolRack|Shoebox|Bunk|Rabbit|Cabinet|toilet|KitchenSink)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !=".+_(SIM|Ghost)_EPOCH" !="smallbackpack_(red|green|teal|pink)_epoch" !="(FirePlace|FirePlaceOn|Jack|Freezer|Tarp|Bobber)_EPOCH" !="Br82nd_(StorageBoxLarge|StorageBox|StorageBoxSmall|WeaponsBox)_(SIM|Ghost)_EPOCH"
5 SeaGull

View File

@ -1,4 +1,4 @@
RConPort 2306
RConPort 2307
RConPassword changemen0w
MaxPing 350

View File

@ -1,4 +1,4 @@
RConPort 2306
RConPort 2307
RConPassword changemen0w
MaxPing 350

View File

@ -1 +1 @@
5 "" !="EPAH_[a-z]{5,10}" !="BIS_fnc_objectVar_obj2_[0-9]{1,10}" !="bis_fnc_sharedObjectives_serverUpdate"
5 "" !="EPAH_[a-z]{5,10}" !="BIS_fnc_objectVar_obj2_[0-9]{1,10}" !="bis_fnc_sharedObjectives_serverUpdate" !="PLAYER_REJECT_ServerVersion"

View File

@ -7,21 +7,21 @@
5 enableFatigue
5 setUnitRecoilCoefficient
5 setWeaponReloadingTime !="_unit setWeaponReloadingTime [_unit,_weapon,1];" !="_unit setWeaponReloadingTime [_unit,_weapon,1];" !="player fire [_muzzle, _muzzle, _item];\nplayer setWeaponReloadingTime [player, _muzzle, 0];"
5 allMissionObjects !="_alljammer = allmissionobjects 'PlotPole_EPOCH';"
5 allMissionObjects !="_alljammer = allmissionobjects 'PlotPole_EPOCH';" !="allMissionObjects \"Timeline_F\""
5 callExtension
5 showCommandingMenu !="showCommandingMenu '';" !="showCommandingMenu '#USER:"
5 enableCollisionWith
5 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];" !="_bobber setVelocity [0,-1,-10];" !="_x setvelocity [0,0,0.1];" !="_veh setVelocity [0,0,0];" !="_this select 0 setvelocity (_this select 1)" !="_zombie setVelocityTransformation [_aslPos,_aslPos,_unitV,_unitV,_unitvDir,_vDir,_unitvUp,_unitvUp,2];"
5 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];" !="_bobber setVelocity [0,-1,-10];" !="_x setvelocity [0,0,0.1];" !="_veh setVelocity [0,0,0];" !="_this select 0 setvelocity (_this select 1)" !="_zombie setVelocityTransformation [_aslPos,_aslPos,_unitV,_unitV,_unitvDir,_vDir,_unitvUp,_unitvUp,2];" !="_smokeg setVelocity _Gvel;"
5 assignAs !"assignAsCargo" !="_unit assignAsGunner _axeCopter;" !="_driver assignAsDriver _axeCopter;" !="axeVIP assignAsDriver vehicle axeVIP;"
5 assignAsCargo !="_x assignAsCargo axeGeneralsBoat;" !="axeVIP assignAsCargo vehicle player;" !="axeVIP assignAsCargo vehicle axeVIP;"
5 allowDamage !="_unit allowDamage false;" !="_unit allowDamage true;" !="player allowDamage true;" !="vehicle player allowDamage true;" !="player allowDamage false;" !="_target allowDamage true;" !="_cargo allowDamage false;"
5 addWeaponCargo !="_acceptHolder addWeaponCargo [_wWeapon, 1] ;" !="CBA_fnc_addWeaponCargo" !="\\fnc_addWeaponCargo" !="\"addWeaponCargo" !="cba_fAddWeaponCargo"
5 onMapSingleClick !="onMapSingleClick '';" !="\"onmapsingleclick\""
5 addMagazine !"addMagazineCargo" !="player addMagazine [_item, _magazineSizeMax];" !="player addMagazine [_item, floor (_magazineSize % _magazineSizeMax)];" !="player addMagazine[_x select 0, _x select 1];" !="player addMagazine \"sledge_swing\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine \"stick_swing\";" !="_wh addMagazineAmmoCargo[_item, 1, _count];" !="CBA_fnc_addMagazine" !="\\fnc_addMagazine" !="\"addMagazine" !="vehicle player addMagazineTurret" !="player addMagazine [_magsTurret,_magAmmo]" !="vehicle player addMagazineTurret" !="player addMagazine [_magsTurret,_magAmmo]" !="EPOCH_fnc_addMagazineOverflow"
5 addMagazine !"addMagazineCargo" !="player addMagazine [_item,_count];" !="player addMagazine \"sledge_swing\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine \"stick_swing\";" !="_wh addMagazineAmmoCargo[_item, 1, _count];" !="CBA_fnc_addMagazine" !="\\fnc_addMagazine" !="\"addMagazine" !="vehicle player addMagazineTurret" !="vehicle player addMagazineTurret" !="EPOCH_fnc_addMagazineOverflow"
5 addMagazineCargo !="_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]" !="_acceptHolder addMagazineCargo [_wAmmo, 1] ;" !="CBA_fnc_addMagazineCargo" !="\\fnc_addMagazineCargo" !="\"addMagazineCargo" !="cba_fAddMagazineCargo"
5 addItem !="{player addItemToVest _x} forEach _vestItems;" !="player addItem _item;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow" !="CBA_fnc_addItem" !="\\fnc_addItem" !="\"addItem" !="fnc_addItemCargo" !="wH = _nearByHolder select 0;\n};\nif !(isNull _wh) then {\n_wh addItemCargoGlobal [_item,1];\n};\n};\n};\n\n_fnc_findItemInContainers = "
5 addItem !="{player addItemToVest _x} forEach _vestItems;" !="player addItem _item;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow" !="CBA_fnc_addItem" !="\\fnc_addItem" !="\"addItem" !="fnc_addItemCargo" !="wH = _nearByHolder select 0;\n};\nif !(isNull _wh) then {\n_wh addItemCargoGlobal [_item,1];\n};\n};\n};\n\n_fnc_findItemInContainers = " !="player addItem 'ItemRope';"
5 addBackPack !="fnc_addBackpackCargo"
5 addMissionEventHandler !="CBA_clientID = [0, 2] select isMultiplayer;\naddMissionEventHandler [\"PlayerConnected\", {\nparams [\"_id\", \"_uid\", \"_name\"" !="addMissionEventHandler [\"EachFrame\", {call cba_common_fnc_onFrame}];" !="addMissionEventHandler [\"HandleDisconnect\"," !="addMissionEventHandler [\"Loaded\"," !="addMissionEventHandler ['Draw3D',_var + \"call Epoch_gui3DCooldownEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dModelPosEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dWorldPosEH;\"];" !="addMissionEventHandler [\n\"ended\",\n{\n\nBIS_fnc_missionHandlers_end = _this;" !="private _ehId = addMissionEventHandler [_event select [2], _code];" !="addMissionEventHandler [\"PlayerViewChanged\", {if (cameraView isEqualTo \"GROUP\") then {vehicle player switchCamera \"Internal\";};}];"
5 addMissionEventHandler !="CBA_clientID = [0, 2] select isMultiplayer;\naddMissionEventHandler [\"PlayerConnected\", {\nparams [\"_id\", \"_uid\", \"_name\"" !="addMissionEventHandler [\"EachFrame\", {call cba_common_fnc_onFrame}];" !="addMissionEventHandler [\"HandleDisconnect\"," !="addMissionEventHandler [\"Loaded\"," !="addMissionEventHandler ['Draw3D',_var + \"call Epoch_gui3DCooldownEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dModelPosEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dWorldPosEH;\"];" !="addMissionEventHandler [\n\"ended\",\n{\n\nBIS_fnc_missionHandlers_end = _this;" !="private _ehId = addMissionEventHandler [_event select [2], _code];" !="addMissionEventHandler [\"PlayerViewChanged\", {if (cameraView isEqualTo \"GROUP\") then {vehicle player switchCamera \"Internal\";};}];" !="addMissionEventHandler [\"EachFrame\",\n{\n\nmissionNamespace setVariable [\"BIS_"
5 removeMissionEventHandler !="removeMissionEventHandler [\"Draw3D\", _id];" !="removeMissionEventHandler [_event select [2], _x select 1];"
5 removeAllWeapons !="removeAllWeapons axeGeneral;"
5 removeAllItems
@ -55,8 +55,8 @@
5 removeEventHandler !="displayRemoveEventHandler" !="player removeEventHandler ['Fired', 0];" !="_currentTarget removeEventHandler[\"EpeContactStart\", _onContactEH]" !=" [_adminVar,objnull];\npublicvariable _adminVar;\nplayer removeeventhandler [\"respawn\",_respawn];" !="_plyr removeEventHandler [\"FiredNear\", _smokeEH];" !="player removeEventHandler [_ehKey, 0];" !="player removeEventHandler [_x, 0];" !="\"CBA_fnc_removeEventHandler\"" !="\\fnc_removeEventHandler" !="\"removeEventHandler"
5 switchCamera !="vehicle player switchCamera" !="_antagonist switchCamera \"Internal\";"
5 remoteControl !="fn_moduleRemoteControl.sqf" !="\"BIS_fnc_moduleRemoteControl\""
5 drawIcon3D !="EPOCH_drawIcon3dStability" !="EPOCH_drawIcon3d" !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !="if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\"" !="drawIcon3D\n[\n(_x getVariable [\"bis_fnc_reviveGet3dIcons_textures" !="drawIcon3D[\"x\addons\a3_epoch_code\Data\UI\snap_ca.paa\""
5 drawLine3D !="{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari"
5 drawIcon3D !="EPOCH_drawIcon3dStability" !="EPOCH_drawIcon3d" !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !="if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\"" !="drawIcon3D\n[\n(_x getVariable [\"bis_fnc_reviveGet3dIcons_textures" !="drawIcon3D[\"x\addons\a3_epoch_code\Data\UI\snap_ca.paa\"" !="drawIcon3D [\"\a3\ui_f\data\map\diary\icons\unitgroup_ca.paa\""
5 drawLine3D !="{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari" !="drawLine3D [ASLToAGL (getposasl _SnapObj1),ASLToAGL (getposasl _SnapObj2), [1,0,0,1]];"
5 ctrlCreate !="_parent ctrlcreate [\"RscMessageBox\",2351];" !="_c = _dsp ctrlCreate [\"rmx_drag_RscActivePicture\", call epoch_getIDC];" !="_c = _dsp ctrlCreate [\"rmx_t1\", call epoch_getIDC];" !="ctrlCreate [\"RscProgress\",_idc + 1];" !="ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];" !="ctrlCreate !="_prevButton = _display ctrlCreate [\"RscButtonMenu\", 90110, _dbg];" [\"RscControlsGroupNoScrollbars\",call epoch_getIDC];" !="ctrlCreate [\"rmx_rscPicture\",(66600 + _e)];" !="ctrlCreate [\"RscStructuredText\",call epoch_getIDC];" !="_bar = _display ctrlCreate [\"RscCustomProgress\"" !="_group = _dsp ctrlCreate [\"rmx_rscControlsGroup\", call Epoch_getIDC]" !="_control = _display ctrlCreate [\"RscControlsGroupNoScrollbars\", 5678910];"
5 ctrlClassName
5 ctrlModel

View File

@ -0,0 +1,23 @@
@echo off
::IMPORTANT TO NAME IT SO WE CAN KILL IT
title servermonitor.bat
:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq Epochserver_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "Epochserver_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo Server is not running, will be started now
start "" /min /wait "c:\EpochServer\restartserver_x64.bat - Shortcut"
timeout 30
echo Server started succesfully
exit
goto started
:loop
cls
echo Server is already running, running monitoring loop
:started
::THE 80 REFERS TO SECONDS AND HOW OFTEN IT WILL CHECK,YOU CAN SET IT TO WHATEVER YOU WANT. I JUST DONT WANT MY SERVER DOWN FOR MUCH LONGER THAN THAT!
::New error fault kill, will check for err fault and clear it and hopefully restart, a little more promise but no guarantee :)
taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq Arma 3"
C:\Windows\System32\timeout /t 150
C:\Windows\System32\tasklist /FI "IMAGENAME eq Epochserver_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "Epochserver_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

View File

@ -0,0 +1,65 @@
/*
Author: He-Man
Contributors:
Description: Autorun script
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/EPOCH_AutoRun.sqf
*/
private ["_myheight","_nextpos","_newheight"];
// _EPOCH_Autorunspeed is NOT a private variable, it is defined in Masterloop init!
_myheight = (getposasl player) select 2;
_nextpos = player modelToWorld [0,1,0];
_nextpos set [2,0];
_newheight = (atltoasl _nextpos) select 2;
if (surfaceiswater position player || ((getposatl player) select 2) > 0.5) then {
_newheight = _myheight;
};
if (_myheight-_newheight > 0.8 || _myheight-_newheight < -0.6) then {
if (_EPOCH_Autorunspeed != 1) then {
player playActionnow 'PlayerWalkF';
}
else {
player playAction 'PlayerWalkF';
};
_EPOCH_Autorunspeed = 1;
}
else {
if (_myheight-_newheight > 0.5 || _myheight-_newheight < -0.35) then {
if (_EPOCH_Autorunspeed != 2) then {
player playActionnow 'PlayerSlowF';
}
else {
player playAction 'PlayerSlowF';
};
_EPOCH_Autorunspeed = 2;
}
else {
if (getFatigue player < 0.8) then {
if (_EPOCH_Autorunspeed != 3) then {
player playActionnow 'FastF';
}
else {
player playAction 'FastF';
};
_EPOCH_Autorunspeed = 3;
}
else {
if (_EPOCH_Autorunspeed != 2) then {
player playActionnow 'PlayerSlowF';
}
else {
player playAction 'PlayerSlowF';
};
_EPOCH_Autorunspeed = 2;
};
};
};

View File

@ -0,0 +1,47 @@
/*
Author: He-Man
Contributors:
Description: Check, if Player can Autorun
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/EPOCH_AutoRun_Check.sqf
Usage: call EPOCH_AutoRun_Check;
Returns:
BOOL
*/
private["_canAutoRun","_currentPos"];
_canAutoRun = true;
if !(alive player) exitwith {
false
};
if !(istouchingground player) exitwith {
false
};
if !((vehicle player) == player) exitwith {
false
};
if ((getPosasl player) select 2 < -0.5) exitwith {
false
};
if ((player getHitPointDamage "HitLegs") >= 0.5) exitwith {
["Can not AutoRun - Your legs are Broken!",5] call Epoch_Message;
false
};
if !(player nearObjects["Const_All_Walls_F", 6] isEqualTo[]) then {
_currentPos = player modelToWorld [0, 1, 1];
if !(surfaceIsWater _currentPos) then {
_currentPos = ATLtoASL _currentPos;
};
if (lineIntersects[eyePos player, _currentPos, player, objNull]) then {
_canAutoRun = false;
};
};
_canAutoRun

View File

@ -31,7 +31,7 @@ if (_item in ["Hatchet","CrudeHatchet"]) then {
player addMagazine "Hatchet_swing";
};
};
if (_item in ["MeleeSledge","MeleeMaul","MeleeSword"]) then {
if (_item in ["MeleeSledge","MeleeMaul","MeleeSword","Power_Sword"]) then {
if !("sledge_swing" in _mags) then {
player addMagazine "sledge_swing";
};

View File

@ -82,10 +82,10 @@ switch _interactOption do {
player removeMagazines _item;
for "_i" from 1 to floor (_magazineSize / _magazineSizeMax) do
{
player addMagazine [_item, _magazineSizeMax];
[_item, _magazineSizeMax] call EPOCH_fnc_addMagazineOverflow;
};
if ((_magazineSize % _magazineSizeMax) > 0) then {
player addMagazine [_item, floor (_magazineSize % _magazineSizeMax)];
[_item, floor (_magazineSize % _magazineSizeMax)] call EPOCH_fnc_addMagazineOverflow;
};
["Ammo Repacked", 5] call Epoch_message;
};
@ -188,7 +188,7 @@ switch _interactOption do {
};
case 5: {
if !(player == vehicle player) exitwith {
["Siphon from outside!", 5] call Epoch_message;
["Fill from outside!", 5] call Epoch_message;
};
_vehicles = player nearEntities [["LandVehicle","Ship","Air","Tank"], 30];
_canCapacity = _interactAttributes param [0,10];
@ -198,15 +198,15 @@ switch _interactOption do {
_newFuel = (((fuel _vehicle) * _fuelCapacity) - _canCapacity) / _fuelCapacity;
if (_newFuel > 0) then {
if (_item call _removeItem) then {
[_interactReturnOnUse,_vehicle,_newFuel] spawn {
params ["_interactReturnOnUse","_vehicle","_newFuel"];
[_interactReturnOnUse,_vehicle,_newFuel,_item] spawn {
params ["_interactReturnOnUse","_vehicle","_newFuel","_item"];
closeDialog 0;
player playMove 'AinvPknlMstpSnonWrflDnon_medic0';
player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd';
uisleep 5;
_interactReturnOnUse call EPOCH_fnc_addItemOverflow;
[_vehicle,_newFuel,player,Epoch_personalToken] remoteExec ["EPOCH_server_fillVehicle",2];
["Fuel Siphoned", 5] call Epoch_message;
[format["%1 Filled",_item call EPOCH_itemDisplayName], 5] call Epoch_message;
};
};
} else {
@ -222,14 +222,14 @@ switch _interactOption do {
if (_transportFuel > _canCapacity) then {
if (_item call _removeItem) then {
[_interactReturnOnUse] spawn {
params ["_interactReturnOnUse"];
[_interactReturnOnUse,_item] spawn {
params ["_interactReturnOnUse","_item"];
closeDialog 0;
player playMove 'AinvPknlMstpSnonWrflDnon_medic0';
player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd';
uisleep 5;
_interactReturnOnUse call EPOCH_fnc_addItemOverflow;
["Fuel Siphoned", 5] call Epoch_message;
[format["%1 Filled",_item call EPOCH_itemDisplayName], 5] call Epoch_message;
};
};
} else {

View File

@ -90,6 +90,12 @@ if (diag_tickTime - EPOCH_lastTrash > 2) then {
};
};
if (!isNull _bankTerminal) then {
_AtmBlockedAtPlot = ["CfgEpochClient", "AtmBlockedAtPlot", false] call EPOCH_fnc_returnConfigEntryV2;
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _buildingJammerRange];
if (!(_jammer isequalto []) && _AtmBlockedAtPlot) exitwith {
["Bank Terminal blocked by Jammer Signal",5] call Epoch_Message;
};
// make balance request
if (isNil "EPOCH_bankTransferActive") then {
[player, [], Epoch_personalToken] remoteExec ["EPOCH_server_storeCrypto",2];

View File

@ -22,11 +22,11 @@ _config = 'CfgEpochClient' call EPOCH_returnConfig;
_nlSettings = getArray( _config >> "niteLight");
_nlSettings params [["_nlEnabled",1],["_nlBright",1.88],["_nlZ",22]];
if (_nlEnabled isEqualTo 1) then {
_pos = (getPosATL player);
_pos = (getPosATL vehicle player);
_pos set [2,_nlZ];
EP_light = "#lightpoint" createvehiclelocal _pos;
EP_light setposATL _pos;
EP_light attachTo [player,[0,8.11,_nlZ]]; //offset infront of player so that the darkness is 'following' them.
EP_light attachTo [vehicle player,[0,8.11,_nlZ]]; //offset infront of vehicle player so that the darkness is 'following' them.
EP_light setLightDayLight false; //Sets light so it can only be used at night.
EP_light setLightBrightness _nlBright;
EP_light setLightAmbient [0.435, 0.439, 0.439];//Using new Colours.

View File

@ -12,36 +12,6 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_onEachFrame.sqf
*/
if (EPOCH_velTransform) then {
if (EPOCH_playerEnergy > 0) then {
_pos1 = getPosASL EPOCH_target;
_vel1 = velocity EPOCH_target;
_dir1 = vectorDir EPOCH_target;
_up1 = vectorUp EPOCH_target;
_interval = 0.1;
if !(EP_velocityTransformation isEqualTo []) then {
EPOCH_target setvelocitytransformation[_pos1, (EP_velocityTransformation select 0), _vel1, (EP_velocityTransformation select 1), _dir1, (EP_velocityTransformation select 2), _up1, (EP_velocityTransformation select 3), _interval];
} else {
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
if !(EPOCH_maxBuildingHeight == 0) then {
if (_pos2 select 2 > EPOCH_maxBuildingHeight) then {
_pos2 set[2, EPOCH_maxBuildingHeight];
};
};
if ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
if ((_pos1 distance _pos2) > 0) then {
_newpos = AGLtoASL _pos2;
if (surfaceiswater _pos2) then {
_newpos = _pos2;
};
EPOCH_target setvelocitytransformation[_pos1, _newpos, _vel1, _vel1, _dir1, _dir1, _up1, _up1, _interval];
};
};
} else {
EPOCH_velTransform = false;
};
};
if (!isNull EPOCH_currentTarget && vehicle player == player) then {
_currentTarget = EPOCH_currentTarget;
@ -137,15 +107,52 @@ if (EPOCH_drawIcon3d) then {
}forEach EPOCH_arr_countdown;
};
{
_distance = player distance _x;
if (_distance < 9) then {
_pos = _x;
_color = [1, 1, 1, 0.7];
_size = 1;
drawIcon3D["x\addons\a3_epoch_code\Data\UI\snap_ca.paa", _color, _pos, _size, _size, 0, "", 1, _size / 60, "PuristaMedium"];
if !(isnull EPOCH_target) then {
if (EPOCH_velTransform) then {
if (EPOCH_playerEnergy > 0) then {
_pos1 = getPosASL EPOCH_target;
_vel1 = velocity EPOCH_target;
_dir1 = vectorDir EPOCH_target;
_up1 = vectorUp EPOCH_target;
_interval = 0.1;
if !(EP_velocityTransformation isEqualTo []) then {
EPOCH_target setvelocitytransformation[_pos1, (EP_velocityTransformation select 0), _vel1, (EP_velocityTransformation select 1), _dir1, (EP_velocityTransformation select 2), _up1, (EP_velocityTransformation select 3), _interval];
} else {
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
if !(EPOCH_maxBuildingHeight == 0) then {
if (_pos2 select 2 > EPOCH_maxBuildingHeight) then {
_pos2 set[2, EPOCH_maxBuildingHeight];
};
};
if ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
if ((_pos1 distance _pos2) > 0) then {
_newpos = AGLtoASL _pos2;
if (surfaceiswater _pos2) then {
_newpos = _pos2;
};
EPOCH_target setvelocitytransformation[_pos1, _newpos, _vel1, _vel1, _dir1, _dir1, _up1, _up1, _interval];
};
};
} else {
EPOCH_velTransform = false;
};
};
}forEach EPOCH_arr_snapPoints;
{
_distance = player distance _x;
if (_distance < 9) then {
_pos = _x;
_color = [1, 1, 0, 0.7];
_size = 1;
drawIcon3D["x\addons\a3_epoch_code\Data\UI\snap_ca.paa", _color, _pos, _size, _size, 0, "", 1, _size / 60, "PuristaMedium"];
};
}forEach EPOCH_arr_snapPoints;
if !(EPOCH_arr_snapObjects isequalto []) then {
EPOCH_arr_snapObjects params [["_SnapObj1",objNull],["_SnapObj2",objNull]];
drawIcon3D ["\a3\ui_f\data\map\diary\icons\unitgroup_ca.paa", [1,0,0,1], ASLtoATL (getposASL _SnapObj1), 1.5, 1.5,0];
drawLine3D [ASLToAGL (getposasl _SnapObj1),ASLToAGL (getposasl _SnapObj2), [1,0,0,1]];
};
};
{
if (!isNull _x) then {

View File

@ -218,6 +218,7 @@ if (isText(_simulClassConfig)) then {
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
_up2 = (vectorUp _nearestObject);
EP_velocityTransformation = [AGLToASL _pos2,_vel2,_dir2,_up2];
EPOCH_arr_snapObjects = [_nearestObject, _currentTarget];
};
};
if (!_isSnap) then {
@ -230,6 +231,7 @@ if (isText(_simulClassConfig)) then {
} else {
EP_velocityTransformation = [];
};
EPOCH_arr_snapObjects = [];
};
};
[_playerEnergyKeyFinal, -_energyCost, 2500 , 0] call EPOCH_fnc_setVariableLimited;
@ -237,6 +239,7 @@ if (isText(_simulClassConfig)) then {
};
_currentTarget removeEventHandler["EpeContactStart", _onContactEH];
EPOCH_velTransform = false;
EPOCH_arr_snapObjects = [];
_disallowed = ["Tarp_SIM_EPOCH", "Freezer_SIM_EPOCH", "Fridge_SIM_EPOCH", "Shelf_SIM_EPOCH", "Pelican_SIM_EPOCH", "Wardrobe_SIM_EPOCH", "Bed_SIM_EPOCH", "Couch_SIM_EPOCH", "Cooker_SIM_EPOCH", "Chair_SIM_EPOCH", "Filing_SIM_EPOCH", "Table_SIM_EPOCH", "Locker_SIM_EPOCH", "ToolRack_SIM_EPOCH", "Shoebox_SIM_EPOCH", "Bunk_SIM_EPOCH", "Jack_SIM_EPOCH", "toilet_SIM_EPOCH", "KitchenSink_SIM_EPOCH"];
if !(_class in _disallowed) then {
_currentTarget spawn EPOCH_countdown;

View File

@ -58,13 +58,14 @@ if (_class != "") then {
_maxHeight = getNumber(_cfgBaseBuilding >> _objType >> "maxHeight");
_simulClass = getText(_cfgBaseBuilding >> _objType >> "simulClass");
_staticClass = getText(_cfgBaseBuilding >> _objType >> "staticClass");
_maxSnapDistance = getNumber (_cfgBaseBuilding >> _objType >> "maxSnapDistance");
_snapChecks = getArray(("CfgSnapChecks" call EPOCH_returnConfig) >> _staticClass >> "nails");
_allowedSnapPoints = getArray(_cfgBaseBuilding >> _class >> "allowedSnapPoints");
_allowedSnapObjects = getArray(_cfgBaseBuilding >> _class >> "allowedSnapObjects");
if (_energyCost == 0) then {_energyCost = 0.1;};
_maxSnapDistance = 1;
if (_maxSnapDistance == 0) then {_maxSnapDistance = 1;};
_lastCheckTime = diag_tickTime;
_stabilityCheck = false;
@ -144,6 +145,7 @@ if (_class != "") then {
_currentOffSet = _offSet;
EPOCH_doRotate = false;
EPOCH_arr_snapPoints = [];
EPOCH_arr_snapObjects = [];
EP_snap = objnull;
_pos2ATL = _pos2;
if (surfaceIsWater _pos2ATL) then {
@ -358,6 +360,7 @@ if (_class != "") then {
};
if (count _arr_snapPoints >= 2) exitWith { EPOCH_arr_snapPoints = _arr_snapPoints; }
} forEach _snapChecks;
EPOCH_arr_snapObjects = [_nearestObject, _currentTarget];
};
};
if (_snapped) exitwith {};
@ -377,6 +380,7 @@ if (_class != "") then {
};
EPOCH_arr_snapPoints = [];
EPOCH_arr_snapObjects = [];
{
detach _x;

View File

@ -13,6 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_getInMan_EH.sqf
*/
params ["_unit","_position","_vehicle"];
call EPOCH_niteLight;
if (_unit == player) then {
// Disable build mode
if (EPOCH_buildMode > 0) then {

View File

@ -13,19 +13,27 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_getOutMan_EH.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_dirTo","_end","_start"];
//[[[end]]]
params ["_unit","_position","_vehicle"];
call EPOCH_niteLight;
if (_unit == player) then {
_start = getPosWorld _vehicle;
// _worldPos set[2, (_worldPos select 2) + 1];
_dirTo = _vehicle getDir player;
_end = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
{
if (_x isKindOf "Const_All_Walls_F") exitWith{
player moveInAny _vehicle;
EPOCH_antiWallCount = EPOCH_antiWallCount + 1;
};
} forEach lineintersectsobjs[_start, AGLToASL _end, player, _vehicle, true, 2];
_this spawn {
private ["_animationstate","_StartTime","_eyepos","_dirTo","_end","_start"];
params ["_unit","_position","_vehicle"];
_animationstate = animationstate player;
_StartTime = diag_ticktime;
waituntil {diag_ticktime - _StartTime > 5 || _animationstate != (animationstate player)};
if (diag_ticktime - _StartTime > 5) exitwith {};
_start = getPosWorld _vehicle;
_eyepos = eyepos player;
_dirTo = _start getDir _eyepos;
_end = _start getPos [(_start distance _eyepos) + 0.5, _dirTo];
_end set [2,_eyepos select 2];
{
if (_x isKindOf "Building") exitWith{
player moveInAny _vehicle;
EPOCH_antiWallCount = EPOCH_antiWallCount + 1;
};
} forEach lineintersectsobjs [_start, _end, player, _vehicle, true, 2];
};
};

View File

@ -43,6 +43,11 @@ if (vehicle _unit != _unit) then {
_unit action["Eject", vehicle _unit];
};
// Close display 999 (BIS_fnc_guiMessage), as it prevent display 46 from closing -> kick to lobby
if (!isnull (finddisplay 999)) then {
(finddisplay 999) closedisplay 0;
};
// save death position
profileNameSpace setVariable["EPOCHLastKnownDeath",[]];
_deathMarkerON = (getNumber(_config >> "playerDeathMarkerGPSOnly") isEqualTo 1);
@ -57,6 +62,8 @@ EPOCH_buildMode = 0;
EPOCH_snapDirection = 0;
EPOCH_Target = objNull;
EPOCH_IsAutoRunning = false;
// playerKilledScreen
_playerKilledScreen = getText(_config >> "playerKilledScreen");
if (_playerKilledScreen isEqualTo "") then {_playerKilledScreen = "TapOut2"};

View File

@ -74,12 +74,14 @@ switch true do {
}forEach((getAllHitPointsDamage _cursorTarget) param[2,[]]);
if (_highestDMG > 0) then {
_newDMG = ((_highestDMG - 0.5) max 0);
["Partially healed / repaired",5] call epoch_message;
if (local _cursorTarget) then {
[_cursorTarget,[[_currentHIT,_newDMG]]] call EPOCH_client_repairVehicle;
} else {
[_cursorTarget,[[_currentHIT,_newDMG]],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
};
} else {
["Full healed / repaired or too much damaged",5] call epoch_message;
if ((damage _cursorTarget) > 0) then {
[_cursorTarget,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
};
@ -95,8 +97,8 @@ switch true do {
};
case (_ammo isKindOf "B_Swing" || _ammo isKindOf "B_Stick") : {
player playActionNow "SledgeSwing";
call EPOCH_mineRocks;
if (_weapon isEqualTo "MeleeSword") then {
if (_weapon in ["MeleeSword","Power_Sword"]) then {
call EPOCH_mineRocks;
call EPOCH_chopWood;
};
if (_weapon isEqualTo "MeleeRod") then {
@ -108,7 +110,7 @@ switch true do {
};
default {
_ammoConfig = (configFile >> "CfgAmmo" >> _ammo);
_nuisanceLevel = ceil(getNumber (_ammoConfig >> "audibleFire") * getNumber (_ammoConfig >> "caliber"));
_nuisanceLevel = ceil ((getNumber (_ammoConfig >> "audibleFire") * getNumber (_ammoConfig >> "caliber"))*Epoch_NuisanceMulti);
// reduce when not in a city or town
if (EPOCH_nearestLocations isEqualTo[]) then{
_nuisanceLevel = _nuisanceLevel / 2;

View File

@ -72,7 +72,7 @@ if (_ctrl && _dikCode == EPOCH_keysVolumeDown) then {
};
// ESC default to cancel
if (_dikCode == 0x01) then {
if (_dikCode in (actionKeys "ingamePause")) then {
if !(isNull EPOCH_Target) then {
if !(EPOCH_Target isKindOf "ThingX") then {
deleteVehicle EPOCH_Target;
@ -242,7 +242,12 @@ if (vehicle player == player) then {
// _handled = call EPOCH_lootTrash;
};
};
if (EPOCH_IsAutoRunning) then {
if (_dikCode in ((actionKeys "moveForward") + (actionKeys "TurnLeft") + (actionKeys "TurnRight") + (actionKeys "moveBack"))) then {
EPOCH_IsAutoRunning = false;
player switchMove "";
};
};
}; // end player only code
EPOCH_favBar_itemConsumed = false;
@ -264,4 +269,29 @@ if (_dikCode in (actionKeys "NightVision")) then {
};
};
if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{
_msg = "";
if(EPOCH_ArmaSlingLoad)then{
if(driver vehicle player isEqualTo player)then{
_slung = ropeAttachedObjects vehicle player;
if(_slung isEqualTo [])then{
if!('ItemRope' in magazines player) then {
_msg = "You need rope to hook";
_handled = true;
}else{
player removeItem 'ItemRope';
};
}else{
player addItem 'ItemRope';
};
};
}else{
_msg = "Hook/Unhook Malfunction, overrode by R3F or AdvSlingLoad";
_handled = true;
};
if!(_msg isEqualTo "")then{
[_msg,5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack;
};
};
_handled

View File

@ -47,5 +47,28 @@ if (_dikCode == EPOCH_keysAction) then {
if (_dikCode in(actionKeys "Gear")) then {
EPOCH_gearKeyPressed = false;
};
if (player == vehicle player) then {
if (_dikCode == EPOCH_keysAutoRun) then {
if (EPOCH_IsAutoRunning) then {
EPOCH_IsAutoRunning = false;
player switchMove "";
}
else {
if (EPOCH_keysAutoRun in (actionKeys "moveForward")) then {
if (EPOCH_LastAutoRunKeyPressed + 0.2 > diag_ticktime) then {
if (call EPOCH_AutoRun_Check) then {
EPOCH_IsAutoRunning = true;
};
};
}
else {
if (call EPOCH_AutoRun_Check) then {
EPOCH_IsAutoRunning = true;
};
};
};
EPOCH_LastAutoRunKeyPressed = diag_ticktime;
};
};
_handled

View File

@ -0,0 +1,81 @@
/*
Author: DirtySanchez - ported from DonkeyPunch eXpoch http://DonkeyPunch.INFO
Contributors:
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/interface_event_handlers/EPOCH_handleUIActions.sqf
*/
private['_msg', '_type', '_disableSlingLoad', '_slung'];
params [
['_actionObj',objNull],
['_player',objNull],
['_index',0],
['_actionName',''],
['_actionDisplayName',''],
['_priority',1],
['_showWindow',false],
['_hideOnUse',true],
['_shortCut',''],
['_visibility',false],
['_eventName','']
];
_blocked = false;
_msg = '';
_type = typeOf _actionObj;
switch(true)do{
case (_actionName isEqualTo 'FireInflame'): {
if!('lighter_epoch' in magazines player) then {
_msg = 'You need a lighter';
_blocked = true;
}else{
[player,'lighter_epoch',-1] call EPOCH_usedItemRepack;
//[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2];
};
};
case (_actionName isEqualTo 'FirePutDown'): {
if(_type isEqualTo 'BurnBarrel_EPOCH')then{
if!('ItemFireExtinguisher' in magazines player) then {
_msg = 'You need an extinguisher';
_blocked = true;
}else{
[player,'ItemFireExtinguisher',-1] call EPOCH_usedItemRepack;
};
};
};
case (_actionName isEqualTo 'HookCargo'): {
if(EPOCH_ArmaSlingLoad)then{
if(driver vehicle player isEqualTo player)then{
_slung = ropeAttachedObjects vehicle player;
if(_slung isEqualTo [])then{
if!('ItemRope' in magazines player) then {
_msg = 'You need rope to hook';
_blocked = true;
}else{
player removeItem 'ItemRope';
};
}else{
player addItem 'ItemRope';
};
};
}else{
_msg = 'Hook Malfunction, overrode by R3F or AdvSlingLoad';
_blocked = true;
};
};
case (_actionName isEqualTo 'UnhookCargo'): {
if(EPOCH_ArmaSlingLoad)then{
player addItem 'ItemRope';
}else{
_msg = 'Unhook Malfunction, overrode by R3F or AdvSlingLoad';
_blocked = true;
};
};
};
if!(_msg isEqualTo '')then{
[_msg,5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack;
};
_blocked

View File

@ -0,0 +1,66 @@
/*
Author: DirtySanchez - ported from DonkeyPunch eXpoch http://DonkeyPunch.INFO
Contributors:
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/inventory/EPOCH_usedItemRepack.sqf
Description:
Allows adjustments to mag with least ammo.
Can be used server and client side as addMagazine is a global command
Local Usage:
[player,'lighter_epoch',-1] call EPOCH_usedItemRepack;
Global Usage:
[_playerObj,'lighter_epoch',-1] call EPOCH_usedItemRepack;
*/
private["_msg","_itemMags","_displayName","_itemAmmoType","_mags","_ammoType","_total","_maxAmmo","_wholeMags","_remainder","_index","_usedItemArray"];
params[
["_player",objNull],
["_item",""],
["_chg",0]
];
if(isNull _player) exitWith {diag_log "[EPOCHDebug] EPOCH_usedItemRepack - player isNull"};
if(_item isEqualTo "") exitWith {diag_log "[EPOCHDebug] EPOCH_usedItemRepack - classname is empty string"};
if!(isClass(configFile >> "CfgMagazines" >> _item)) exitWith {diag_log format["[EPOCHDebug] EPOCH_usedItemRepack - Classname does not exist",_item]};
_msg = "";
_itemMags = [];
_displayName = getText(configFile >> "CfgMagazines" >> _item >> "displayName");
//get all mags of same classname and ammo type
_mags = magazinesAmmo _player;
{
_x params ["_className","_count"];
if(_className isEqualTo _item)then{
_itemMags pushBack _x;
};
}forEach _mags;
// if more than 1 sort them by ammo count
if(count _itemMags > 1)then{
_itemMags = [_itemMags,[],{_x select 1},"ASCEND"] call BIS_fnc_sortBy;
};
// adjust the item
if!(_chg isEqualTo 0)then{
_index = ((count _itemMags) - 1);
_usedItemArray = _itemMags deleteat _index;
_usedItemArray params ["_mag","_count"];
_itemMags pushBack [_mag, (_count + _chg)];
_player removeMagazines _mag;
{
if ((_x select 1) > 0) then { // Do not add back an empty mag, as it can not be handled by any scripts and is useless
_x call EPOCH_fnc_addMagazineOverflow;
};
}forEach _itemMags;
[format["You have used your %1", _displayName],5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack;
};

View File

@ -40,6 +40,7 @@ EPOCH_Z_OFFSET = 0;
EPOCH_X_OFFSET = 0;
EPOCH_Y_OFFSET = 5;
EPOCH_arr_snapPoints = [];
EPOCH_arr_snapObjects = [];
EPOCH_prevTarget = objNull;
EPOCH_interactOption = 0;
EPOCH_playerStaminaMax = 100;
@ -53,3 +54,15 @@ EPOCH_playerStaminaMax = 100;
enableSentences false;
enableRadio false;
player setVariable["BIS_noCoreConversations", true];
EPOCH_ArmaSlingLoad = true;
_r3fON = if(!isNil "R3F_LOG_CFG_can_lift")then{if!(R3F_LOG_CFG_can_lift isEqualTo [])then{true}else{false}}else{false};
_advSling = if(!isNil "ASL_ROPE_INIT")then{if(ASL_ROPE_INIT)then{true}else{false}}else{false};
if (_r3fON || _advSling)then{
EPOCH_ArmaSlingLoad = false;
};
// handle actions, prevactions, nextactions
inGameUISetEventHandler ["Action", "if(!(_this isEqualTo []) && !(_this select 10 in ['PrevAction','NextAction']))then{_this call EPOCH_handleUIActions}"];
//inGameUISetEventHandler ["NextAction", "_this call EPOCH_handleUIActions"];
//inGameUISetEventHandler ["PrevAction", "_this call EPOCH_handleUIActions"];

View File

@ -32,6 +32,7 @@ _keyMap =
["Action","EPOCH_keysAction",0x39],
["Holster Weapon", "EPOCH_keysHolster", 35],
["Debug Monitor", "EPOCH_keysDebugMon", 41],
["AutoRun", "EPOCH_keysAutoRun", 0x11],
["Volume + (ctrl)","EPOCH_keysVolumeUp",0x0D],
["Volume - (ctrl)","EPOCH_keysVolumeDown",0x0C],

View File

@ -66,6 +66,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
waituntil {local _playerObject};
// restart masterloop
EPOCH_forceUpdateNow = nil; // Set to nil and wait later until Masterloop has redefined it
[] spawn EPOCH_masterLoop;
[5, 100] call EPOCH_niteLight;
@ -76,9 +77,10 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
player removeEventHandler [_x, 0];
player addEventHandler [_x,(["CfgEpochClient", _x, ""] call EPOCH_fnc_returnConfigEntryV2)];
} forEach (["CfgEpochClient", "addEventHandler", []] call EPOCH_fnc_returnConfigEntryV2);
waituntil {uisleep 0.5; !isnil "EPOCH_forceUpdateNow"}; // Wait until Materloop is has set this Variable to false
EPOCH_forceUpdateNow = true;
};
} else {
deleteVehicle _playerObject;
};
EPOCH_forceUpdateNow = true;

View File

@ -0,0 +1,11 @@
// runs every 0.4 seconds
if (EPOCH_IsAutoRunning) then {
if (call EPOCH_AutoRun_Check) then {
call EPOCH_AutoRun;
}
else {
EPOCH_IsAutoRunning = false;
player switchMove "";
};
};

View File

@ -418,6 +418,8 @@ if (cameraview isequalto "GROUP") then {
// force update
if (EPOCH_forceUpdateNow) then {
_forceUpdate = false;
EPOCH_forceUpdate = false;
EPOCH_forceUpdateNow = false;
call _fnc_forceUpdate;
};

View File

@ -140,7 +140,6 @@ if ((getFatigue player) >= 0.7 && _airTemp > 100) then {
// toxic fever and immunity increase
_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault];
// _playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
if (_playerToxicity > 0) then {
_playerImmunity = [_playerImmunityKey,0.1,_playerImmunityMax,_playerImmunityMin] call EPOCH_fnc_setVariableLimited;
_playerToxicity = [_playerToxicityKey,-0.1,_playerToxicityMax,_playerToxicityMin] call EPOCH_fnc_setVariableLimited;

View File

@ -7,5 +7,6 @@ if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then {
if (_forceUpdate || EPOCH_forceUpdate) then {
_forceUpdate = false;
EPOCH_forceUpdate = false;
EPOCH_forceUpdateNow = false;
call _fnc_forceUpdate;
};

View File

@ -6,7 +6,7 @@ _powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_
// TODO: add more sources and config based check instead of global var
// _nearestLocations removed as they don't support getVariable
// All sources used as a temp solution
// All sources used as a temp solution, please re-use as much as you can.
_allSources = nearestObjects[player, ["All"], _radiatedObjMaxRange];
_nearbyRadioactiveObjects = _allSources select {(_x getVariable ["EPOCH_Rads", []]) select 0 > 0};
@ -70,16 +70,22 @@ _currentArmorPercent = 100 - (_currentArmor / _maxArmor * 100);
_radsLevel = _currentArmorPercent / 100 * _radsLevel;
//Reduce radiation by 100% TODO: move this to top, no point in doing all this calc if hazmat is on.
if (uniform player == "hazmat_placeholder") then {
_radsLevel = 0;
if (uniform player in ["Epoch_RadiationSuit_F","Epoch_RadiationSuit_M"]) then {
_radsLevel = 0;
};
// Radiation Handler
if (_radsLevel > 0) then {
// increase rads based on radiation levels
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
};
_playerRadiation = missionNamespace getVariable [_playerRadiationKey, _playerRadiationDefault];
_playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
if (_radsLevel > 0) then { // increase rads based on radiation levels
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
} else { //Decrease rad level, but at a cost of immunity loss
if (_playerRadiation > 0) then {
_playerRadiation = [_playerRadiationKey,(_baseRadiationLoss * _playerImmunity / 100),_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
_playerImmunity = [_playerImmunityKey,_baseRadiationLossImmunityPenalty,_playerImmunityMax,_playerImmunityMin] call EPOCH_fnc_setVariableLimited;
};
};
if !(surfaceIsWater _position) then {
if (_nearestLocations isEqualTo []) then{
if (count(player nearEntities["Animal_Base_F", 800]) < 2) then {

View File

@ -111,10 +111,12 @@ _isOnFoot = isNull objectParent player;
_panic = false;
_prevEnergy = missionNamespace getVariable [_playerEnergyKey, _playerEnergyDefault];
_EPOCH_Autorunspeed = 1;
// init config data
_antagonistRndChance = ["CfgEpochClient", "antagonistRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
_baseRadiationLoss = ["CfgEpochClient", "baseRadiationLoss", -0.1] call EPOCH_fnc_returnConfigEntryV2;
_baseRadiationLossImmunityPenalty = ["CfgEpochClient", "baseRadiationLossImmunityPenalty", -0.1] call EPOCH_fnc_returnConfigEntryV2;
_baseHungerLoss = ["CfgEpochClient", "baseHungerLoss", 2] call EPOCH_fnc_returnConfigEntryV2;
_baseThirstLoss = ["CfgEpochClient", "baseThirstLoss", 2] call EPOCH_fnc_returnConfigEntryV2;
_baseAlcoholLoss = ["CfgEpochClient", "baseAlcoholLoss", 0.17] call EPOCH_fnc_returnConfigEntryV2;

View File

@ -1,32 +1,30 @@
/*
Author: Aaron Clark - EpochMod.com
Author: He-Man - Ignatz-Gaming
Contributors: He-Man
Contributors: Raimonds Virtoss
Description:
NPC trade filter code
Filter Items in Trader Dialog
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_NPCTraderMenuFilter.sqf
Example:
onLBSelChanged = "_this call EPOCH_NPCTraderMenuFilter";
Parameter(s):
_this select 0: CONTROL
_this select 1: NUMBER - Index ID
Returns:
NOTHING
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/traders/EPOCH_NPCTraderFilter.sqf
*/
disableSerialization;
//[[[cog import generate_private_arrays ]]]
private ["_FilterArray","_MainCategorie","_MainCategoriearray","_SubCategorieItems","_aiItems","_config","_control","_display","_id","_isPlayerFilter","_item","_itemCount","_itemOfferCount","_items","_name","_offerArray","_picture","_playeritems","_qty","_qtys","_sizeOut","_slot","_sortarray","_subcategories","_type","_vehicles"];
//[[[end]]]
private [ "_PlayerFilerDropDown","_PlayerItemsBox","_PlayerItemsOutBox","_TraderItemsBox","_TraderItemsOutBox","_config","_MainCategoriearray","_FilterArray","_MainCategorie","_subcategories","_SubCategorieItems",
"_slot","_isPlayerFilter","_item","_rounds","_maxrnd","_tooltip","_qty","_id","_vehicles","_VehOfferArray","_sizeOut","_type","_itemCount","_itemOfferCount","_name","_picture","_items","_qtys","_sortarray"
];
params ["_control","_index"];
_PlayerFilerDropDown = 42100;
_PlayerItemsBox = 41500;
_PlayerItemsOutBox = 41501;
_TraderItemsBox = 41503;
_TraderItemsOutBox = 41502;
_config = 'CfgItemSort' call EPOCH_returnConfig;
_MainCategoriearray = getarray (_config >> "MainCategories" >> "Classes");
_FilterArray = [];
@ -46,96 +44,109 @@ if (_index != 0) then {
};
if !(isNull EPOCH_lastNPCtradeTarget) then {
_slot = EPOCH_lastNPCtradeTarget getVariable["AI_SLOT", -1];
_isPlayerFilter = (ctrlIDC _control == 42100);
if (_slot != -1) then {
_isPlayerFilter = (ctrlIDC _control == _PlayerFilerDropDown);
if (_isPlayerFilter) then {
_sizeOut = lbSize 41501;
_offerArray = [];
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [41501, _i];
_offerArray pushBack _item;
};
};
lbClear 41500;
_playeritems = ((items player)+(magazines player));
if (primaryWeapon player != "") then {
_playeritems pushback primaryWeapon player;
};
if (count backpackItems player == 0 && count backpackmagazines player == 0 && backpack player != "") then {
_playeritems pushback backpack player;
};
lbClear _PlayerItemsBox;
{
_item = _x;
_rounds = 1;
if (_item isequaltype []) then {
_item = _x select 0;
_rounds = _x select 1;
};
if !(_item isequalto "") then {
_maxrnd = 1;
_tooltip = "";
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_qty = _rounds/_maxrnd;
if (_qty < 1) then {
_tooltip = format ["%1 rounds left in Magazine",_rounds];
};
if (_index == 0 || (tolower _item) in _FilterArray) then {
_itemCount = {_x == _item} count ((items player)+(magazines player)+[backpack player]+[primaryweapon player]);
_itemOfferCount = {_x == _item} count _offerArray;
if (_itemCount > _itemOfferCount) then {
_offerArray pushBack _item;
_id = lbAdd [41500, _x call EPOCH_itemDisplayName];
lbSetData [41500, _id, _x];
lbSetPicture [41500, _id, _x call EPOCH_itemPicture];
_id = lbAdd [_PlayerItemsBox, _item call EPOCH_itemDisplayName];
lbSetData [_PlayerItemsBox, _id, _item];
lbSetValue [_PlayerItemsBox, _id, _rounds];
lbSetPicture [_PlayerItemsBox, _id, _item call EPOCH_itemPicture];
if !(_tooltip isequalto "") then {
lbSetTooltip [_PlayerItemsBox, _id, _tooltip];
lbSetColor [_PlayerItemsBox,_id,[1,(_rounds/_maxrnd),0,1]];
};
};
};
} forEach _playeritems;
} forEach EPOCH_NpcTradePlayerItems;
_vehicles = player nearEntities [["LandVehicle","Ship","Air","Tank"], 30];
{
if (local _x) then {
_type = typeOf _x;
if (_index == 0 || (tolower _type) in _FilterArray) then {
_itemCount = { typeOf _x == _type } count _vehicles;
_itemOfferCount = { _x == _type } count _offerArray;
if (_itemCount > _itemOfferCount) then {
_offerArray pushBack _type;
_config = configFile >> "CfgVehicles" >> _type;
_name = getText(_config >> "displayName");
_picture = getText(_config >> "picture");
_id = lbAdd[41500, _name];
lbSetData[41500, _id, _type];
lbSetPicture[41500, _id, _picture];
if !(_vehicles isequalto []) then {
_VehOfferArray = [];
_sizeOut = lbSize _PlayerItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [_PlayerItemsOutBox, _i];
if (_item iskindof "Landvehicle" || _item iskindof "AIR" || _item iskindof "SHIP" || _item iskindof "TANK") then {
_VehOfferArray pushBack _item;
};
};
};
} forEach _vehicles;
_display = (findDisplay -8);
_control = (_display displayCtrl 41500);
lbsort _control;
{
if (local _x) then {
_type = typeOf _x;
if (_index == 0 || (tolower _type) in _FilterArray) then {
_itemCount = { typeOf _x == _type } count _vehicles;
_itemOfferCount = { _x == _type } count _VehOfferArray;
if (_itemCount > _itemOfferCount) then {
_config = configFile >> "CfgVehicles" >> _type;
_name = getText(_config >> "displayName");
_picture = getText(_config >> "picture");
_id = lbAdd[_PlayerItemsBox, _name];
lbSetData[_PlayerItemsBox, _id, _type];
lbSetValue [_PlayerItemsBox, _id, 1];
lbSetPicture[_PlayerItemsBox, _id, _picture];
};
};
};
} forEach _vehicles;
};
lbsort ((findDisplay -8) displayCtrl _PlayerItemsBox);
}
else {
lbClear 41503;
_sizeOut = lbSize 41502;
_offerArray = [];
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_id = lbData [41502, _i];
_offerArray pushBack _id;
};
};
_aiItems = EPOCH_lastNPCtradeTarget getVariable["AI_ITEMS", []];
if ((count _aiItems) == 2) then {
_items = _aiItems select 0;
_qtys = _aiItems select 1;
lbClear _TraderItemsBox;
if ((count EPOCH_NpcTradeTraderItems) == 2) then {
_items = EPOCH_NpcTradeTraderItems select 0;
_qtys = EPOCH_NpcTradeTraderItems select 1;
_sortarray = [];
{
_sortarray pushback [_x call EPOCH_itemDisplayName,_x,_qtys select _foreachindex];
} foreach _items;
_sortarray sort true;
{
_item = _x select 1;
_x params ["_displayname","_item","_rounds"];
if !(_item isequalto "") then {
if (_index == 0 || (tolower _item) in _FilterArray) then {
_qty = ((_x select 2) - ({_x == _item} count _offerArray));
_maxrnd = 1;
_tooltip = "";
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_qty = (_rounds/_maxrnd);
if (_qty >= 1) then {
_qty = floor _qty;
}
else {
_qty = ceil _qty;
_tooltip = format ["%1 rounds left in Magazine",_rounds];
};
if (_qty > 0) then {
_id = lnbAddRow[41503, ["", str(_qty),_x select 0]];
lnbSetData [41503, [_id,0], _item];
lnbSetValue [41503, [_id,0], _qty];
lnbSetPicture [41503, [_id,0], _item call EPOCH_itemPicture];
_id = lnbAddRow [_TraderItemsBox, ["", str(_qty),_displayname]];
lnbSetData [_TraderItemsBox, [_id,0], _item];
lnbSetValue [_TraderItemsBox, [_id,0], _rounds];
lnbSetPicture [_TraderItemsBox, [_id,0], _item call EPOCH_itemPicture];
if !(_tooltip isequalto "") then {
lbSetTooltip [_TraderItemsBox, _id*3, _tooltip];
lnbSetColor [_TraderItemsBox,[_id,2],[1,(_rounds/_maxrnd),0,1]];
};
};
};
};

View File

@ -1,7 +1,7 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors: He-Man
Contributors: He-Man - Ignatz-Gaming
Description:
NPC trade code
@ -22,7 +22,7 @@
NOTHING
*/
//[[[cog import generate_private_arrays ]]]
private ["_addWeaponToHands","_arrayIn","_arrayOut","_config","_current_crypto","_errorMsg","_item","_itemTax","_itemWorth","_sizeOut","_tax","_type","_vehSlot","_vehicle","_vehicles"];
private ["_addWeaponToHands","_item","_type"];
//[[[end]]]
params [["_returnIn",[]],["_returnOut",[]],["_message",""]];
@ -31,8 +31,9 @@ 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");
_x params ["_item","_count"];
if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then {
_type = getNumber(configfile >> "CfgWeapons" >> _item >> "type");
_addWeaponToHands = false;
switch (_type) do {
case 1: {
@ -52,15 +53,15 @@ if !(_returnOut isEqualTo[]) then {
};
};
if (_addWeaponToHands) then {
player addWeapon _x;
player addWeapon _item;
}
else {
_x call EPOCH_fnc_addItemOverflow;
_item call EPOCH_fnc_addItemOverflow;
};
}
else {
if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then {
_x call EPOCH_fnc_addItemOverflow;
if ([_item, "CfgMagazines"] call EPOCH_fnc_isAny) then {
[_item,_count] call EPOCH_fnc_addMagazineOverflow;
};
};
} forEach _returnOut;
@ -71,3 +72,4 @@ if !(_message isequalto "") then {
};
EPOCH_TRADE_STARTED = nil;

View File

@ -1,39 +1,91 @@
//[[[cog import generate_private_arrays ]]]
private ["_errormsg","_aiItems","_allowAdd","_array","_config","_cryptoCount","_index","_item","_itemClasses","_itemQtys","_itemTax","_itemWorth","_limit","_qtyIndex","_sizeOut","_slot","_stockLimit","_tax","_uiItem","_worth"];
//[[[end]]]
/*
Author: He-Man - Ignatz-Gaming
Contributors: Raimonds Virtoss
Description:
Move Items in Tradermenu between Playerinventory <-> PlayerOut window
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/traders/EPOCH_npcTraderAdd.sqf
*/
private [ "_PlayerFilerDropDown","_PlayerItemsBox","_PlayerItemsOutBox","_TraderItemsOutBox","_CryptoInCtrl","_CryptoOutCtrl","_allowAdd","_uiItem","_rounds","_itemIcon","_itemColor","_errormsg","_stockLimit","_config",
"_itemClasses","_itemQtys","_qtyIndex","_limit","_sizeOut","_item","_vehicle","_itemName","_index","_maxrnd","_ItemIndex","_cryptoCount","_worth","_itemTax","_tax"
];
params ["_control","_selected"];
_selected params ["_CurControl","_id"];
_PlayerFilerDropDown = 42100;
_PlayerItemsBox = 41500;
_PlayerItemsOutBox = 41501;
_TraderItemsOutBox = 41502;
_CryptoInCtrl = 41004;
_CryptoOutCtrl = 41005;
if !(isNull EPOCH_lastNPCtradeTarget) then {
_allowAdd = true;
_uiItem = _CurControl lbData _id;
_rounds = _CurControl lbValue _id;
_itemIcon = _CurControl lbPicture _id;
_itemColor = _CurControl lbColor _id;
_errormsg = "";
_stockLimit = false;
_uiItem = (_selected select 0) lbData (_selected select 1);
_errormsg = "Limit one per trade";
_config = 'CfgPricing' call EPOCH_returnConfig;
if (isClass(_config >> _uiItem)) then{
if !(_control in[41500, 41503]) then {
// limit adding more if item is over stocked
if (_control == 41501) then {
_slot = EPOCH_lastNPCtradeTarget getVariable["AI_SLOT", -1];
_aiItems = EPOCH_lastNPCtradeTarget getVariable["AI_ITEMS", [[], []] ];
_itemClasses = _aiItems select 0;
_itemQtys = _aiItems select 1;
// find item and get current qty
_qtyIndex = _itemClasses find _uiItem;
if (_qtyIndex != -1) then {
_limit = ["CfgTraderLimits", _uiItem, 100] call EPOCH_fnc_returnConfigEntryV2;
if (_itemQtys select _qtyIndex >= _limit) then{
_stockLimit = true;
_allowAdd = false;
if (isClass (_config >> _uiItem)) then {
if (_control == _PlayerItemsOutBox) then {
_itemClasses = EPOCH_NpcTradeTraderItems select 0;
_itemQtys = EPOCH_NpcTradeTraderItems select 1;
_qtyIndex = _itemClasses find _uiItem;
if (_qtyIndex != -1) then {
_itemQty = _itemQtys select _qtyIndex;
_maxrnd = 1;
if ([_uiItem,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _uiItem >> "count");
};
_itemQty = _itemQty / _maxrnd;
_sizeIn = lbSize _PlayerItemsOutBox;
if (_sizeIn > 0) then {
for "_i" from 0 to (_sizeIn - 1) do {
_InItem = lbData [_PlayerItemsOutBox, _i];
if ((lbData [_PlayerItemsOutBox, _i]) == _uiItem) then {
_itemQty = _itemQty + ((lbValue [_PlayerItemsOutBox, _i])/_maxrnd);
};
};
};
_limit = ["CfgTraderLimits", _uiItem, 100] call EPOCH_fnc_returnConfigEntryV2;
if (_itemQty >= _limit) then{
_stockLimit = true;
_allowAdd = false;
};
};
if (_uiItem isKindOf "Air" || _uiItem isKindOf "Ship" || _uiItem isKindOf "LandVehicle" || _uiItem isKindOf "Tank") then {
_sizeOut = lbSize _PlayerItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData [_PlayerItemsOutBox, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
_errormsg = "Limit one per trade";
};
};
};
if (!_allowAdd) exitwith {};
_sizeOut = lbSize _TraderItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[_TraderItemsOutBox, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
_errormsg = "Limit one per trade";
};
};
};
if (!_allowAdd) exitwith {};
if (["CfgEpochClient", "DisallowSellOnDamage", false] call EPOCH_fnc_returnConfigEntryV2) then {
{
_vehicle = _x;
@ -49,73 +101,87 @@ if !(isNull EPOCH_lastNPCtradeTarget) then {
} foreach ((getAllHitPointsDamage _vehicle) select 0);
};
if (!_allowAdd) exitwith {};
} foreach (EPOCH_lastNPCtradeTarget nearEntities[[_uiItem], 30]);
} foreach (EPOCH_lastNPCtradeTarget nearEntities [[_uiItem], 30]);
};
// check if a vehicle is already on the list
_sizeOut = lbSize 41501;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41501, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
};
};
};
_sizeOut = lbSize 41502;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41502, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
};
};
};
// disallow adding item to list of already one
};
};
if (_allowAdd) then {
_index = lbAdd[_control, ((_selected select 0) lbText(_selected select 1))];
lbSetData[_control, _index, _uiItem];
lbSetPicture[_control, _index, ((_selected select 0) lbPicture(_selected select 1))];
(_selected select 0) lbDelete(_selected select 1);
_itemName = _CurControl lbText _id;
_index = lbAdd [_control, _itemName];
lbSetData [_control, _index, _uiItem];
lbSetValue [_control,_index, _rounds];
lbSetPicture [_control, _index, _itemIcon];
lbSetColor [_control,_index,_itemColor];
if (_control == _PlayerItemsBox && !(_uiItem iskindof "Landvehicle" || _uiItem iskindof "SHIP" || _uiItem iskindof "AIR" || _uiItem iskindof "TANK")) then {
EPOCH_NpcTradePlayerItems pushback [_uiItem,_rounds];
}
else {
if ([_uiItem,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _uiItem >> "count");
if !((_rounds/_maxrnd) >= 1) then {
_tooltip = format ["%1 rounds left in Magazine",_rounds];
lbSetTooltip [_control,_index,_tooltip];
};
};
_ItemIndex = EPOCH_NpcTradePlayerItems find [_uiItem,_rounds];
if (_ItemIndex < 0) then {
_ItemIndex = EPOCH_NpcTradePlayerItems find _uiItem;
};
if (_ItemIndex > -1) then {
EPOCH_NpcTradePlayerItems deleteat _ItemIndex;
};
};
_CurControl lbDelete _id;
_cryptoCount = 0;
_sizeOut = lbSize 41501;
//_array = [];
_sizeOut = lbSize _PlayerItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41501, _i];
//_array pushBack _item;
_worth = getNumber(_config >> _item >> "price");
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [_PlayerItemsOutBox, _i];
_rounds = lbValue [_PlayerItemsOutBox, _i];
_worth = getNumber (_config >> _item >> "price");
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_worth = round (_worth*(_rounds/_maxrnd));
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText[41004, (format["%1 Krypto", _cryptoCount])];
ctrlSetText [_CryptoInCtrl, (format["%1 Krypto", _cryptoCount])];
_cryptoCount = 0;
_sizeOut = lbSize 41502;
_sizeOut = lbSize _TraderItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41502, _i];
_itemWorth = getNumber(_config >> _item >> "price");
_itemTax = getNumber(_config >> _item >> "tax");
_tax = _itemWorth * (EPOCH_taxRate + _itemTax);
_itemWorth = ceil(_itemWorth + _tax);
_cryptoCount = _cryptoCount + _itemWorth;
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [_TraderItemsOutBox, _i];
_rounds = lbValue [_TraderItemsOutBox, _i];
_worth = getNumber (_config >> _item >> "price");
_itemTax = getNumber (_config >> _item >> "tax");
_tax = _worth * (EPOCH_taxRate + _itemTax);
_worth = ceil(_worth + _tax);
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_worth = round (_worth*(_rounds/_maxrnd));
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText[41005, (format["%1 Krypto", _cryptoCount])];
} else {
ctrlSetText [_CryptoOutCtrl, (format["%1 Krypto", _cryptoCount])];
if (_control == _PlayerItemsBox) then {
lbSetCurSel [_PlayerFilerDropDown, 0];
};
}
else {
if (_stockLimit) then{
["Trader has the maximum amount of this item", 5] call Epoch_message;
} else {
}
else {
[_errormsg, 5] call Epoch_message;
};
};
};
} else {
}
else {
closeDialog 0;
};

View File

@ -1,88 +1,156 @@
//[[[cog import generate_private_arrays ]]]
private ["_allowAdd","_array","_config","_cryptoCount","_index","_item","_itemIcon","_itemName","_itemTax","_itemWorth","_qty","_sizeOut","_tax","_uiItem","_uiQty","_worth"];
//[[[end]]]
/*
Author: He-Man - Ignatz-Gaming
Contributors: Raimonds Virtoss
Description:
Move Items in Tradermenu from Traderinventory to TraderOut window
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/traders/EPOCH_npcTraderAdd2.sqf
*/
private [ "_PlayerItemsOutBox","_TraderItemsBox","_TraderItemsOutBox","_CryptoInCtrl","_CryptoOutCtrl","_allowAdd","_uiItem","_rounds","_itemIcon","_itemName","_itemColor","_errormsg","_soldrounds","_tooltip","_config",
"_ItemIndex","_sizeOut","_item","_maxrnd","_uiQty","_index","_cryptoCount","_worth","_itemTax","_tax"
];
params ["_control","_selected"];
_selected params ["_CurControl","_id"];
_allowAdd = true;
_PlayerItemsOutBox = 41501;
_TraderItemsBox = 41503;
_TraderItemsOutBox = 41502;
_CryptoInCtrl = 41004;
_CryptoOutCtrl = 41005;
_uiItem = (_selected select 0) lnbData[(_selected select 1), 0];
_config = 'CfgPricing' call EPOCH_returnConfig;
if (isClass (_config >> _uiItem)) then{
if (_uiItem isKindOf "Air" || _uiItem isKindOf "Ship" || _uiItem isKindOf "LandVehicle" || _uiItem isKindOf "Tank") then {
// check if a vehicle is already on the list
_sizeOut = lbSize 41501;
//_array = [];
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41501, _i];
//_array pushBack _item;
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
if !(isNull EPOCH_lastNPCtradeTarget) then {
_allowAdd = true;
_uiItem = _CurControl lnbData [_id, 0];
_rounds = _CurControl lnbValue [_id, 0];
_itemIcon = _CurControl lnbPicture [_id, 0];
_itemName = _CurControl lnbText [_id, 2];
_itemColor = _CurControl lnbColor [_id, 2];
_errormsg = "";
_soldrounds = 0;
_tooltip = "";
_config = 'CfgPricing' call EPOCH_returnConfig;
if (isClass (_config >> _uiItem)) then{
_ItemIndex = (EPOCH_NpcTradeTraderItems select 0) find _uiItem;
if (_ItemIndex > -1) then {
if (_uiItem isKindOf "Air" || _uiItem isKindOf "Ship" || _uiItem isKindOf "LandVehicle" || _uiItem isKindOf "Tank") then {
_sizeOut = lbSize _PlayerItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData [_PlayerItemsOutBox, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
_errormsg = "Limit one per trade";
};
};
};
if (!_allowAdd) exitwith {};
_sizeOut = lbSize _TraderItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData [_TraderItemsOutBox, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
_errormsg = "Limit one per trade";
};
};
};
};
};
_sizeOut = lbSize 41502;
//_array = [];
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41502, _i];
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") exitWith{
_allowAdd = false;
if (_allowAdd) then {
_maxrnd = 1;
if ([_uiItem,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _uiItem >> "count");
};
if ((_rounds/_maxrnd) >= 1) then {
_soldrounds = _maxrnd;
}
else {
_soldrounds = _rounds;
};
_rounds = _rounds - _soldrounds;
if (_rounds < 1) then {
_CurControl lnbDeleteRow _id;
}
else {
_uiQty = _rounds /_maxrnd;
if (_uiQty >= 1) then {
_uiQty = floor _uiQty;
}
else {
_uiQty = ceil _uiQty;
_tooltip = format ["%1 rounds left in Magazine",_rounds];
};
lnbSetText [_TraderItemsBox, [_id, 1], str (_uiQty)];
lnbSetValue [_TraderItemsBox, [_id, 0], _rounds];
if !(_tooltip isequalto "") then {
lbSetTooltip [_TraderItemsBox, _id*3, _tooltip];
lnbSetColor [_TraderItemsBox,[_id,2],[1,(_rounds/_maxrnd),0,1]];
};
};
if (_soldrounds > 0) then {
_index = lbAdd [_control, _itemName];
lbSetData [_control, _index, _uiItem];
lbSetValue [_control,_index, _soldrounds];
lbSetPicture [_control, _index, _itemIcon];
lbSetColor [_control,_index,_itemColor];
if ([_uiItem,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _uiItem >> "count");
if !((_soldrounds/_maxrnd) >= 1) then {
_tooltip = format ["%1 rounds left in Magazine",_soldrounds];
lbSetTooltip [_control,_index,_tooltip];
};
};
};
(EPOCH_NpcTradeTraderItems select 1) set [_ItemIndex,_rounds];
_cryptoCount = 0;
_sizeOut = lbSize _PlayerItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [_PlayerItemsOutBox, _i];
_rounds = lbValue [_PlayerItemsOutBox, _i];
_worth = getNumber (_config >> _item >> "price");
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_worth = round (_worth*(_rounds/_maxrnd));
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText [_CryptoInCtrl, (format["%1 Krypto", _cryptoCount])];
_cryptoCount = 0;
_sizeOut = lbSize _TraderItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [_TraderItemsOutBox, _i];
_rounds = lbValue [_TraderItemsOutBox, _i];
_worth = getNumber (_config >> _item >> "price");
_itemTax = getNumber (_config >> _item >> "tax");
_tax = _worth * (EPOCH_taxRate + _itemTax);
_worth = ceil(_worth + _tax);
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_worth = round (_worth*(_rounds/_maxrnd));
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText [_CryptoOutCtrl, (format["%1 Krypto", _cryptoCount])];
}
else {
["Limit one per trade", 5] call Epoch_message;
};
};
// disallow adding item to list of already one
};
if (_allowAdd) then {
_itemName = (_selected select 0) lnbText[(_selected select 1), 2];
_index = lbAdd [_control, _itemName];
lbSetData [_control, _index, _uiItem];
_itemIcon = (_selected select 0) lnbPicture [(_selected select 1), 0];
lbSetPicture [_control, _index, _itemIcon];
_uiQty = (_selected select 0) lnbValue [(_selected select 1), 0];
if (_uiQty <= 1) then {
(_selected select 0) lnbDeleteRow (_selected select 1);
} else {
_qty = _uiQty - 1;
lnbSetText[41503, [(_selected select 1), 1], str(_qty)];
lnbSetValue[41503, [(_selected select 1), 0], _qty];
};
_cryptoCount = 0;
_sizeOut = lbSize 41501;
//_array = [];
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [41501, _i];
//_array pushBack _item;
_worth = getNumber(_config >> _item >> "price");
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText [41004, (format ["%1 Krypto", _cryptoCount])];
_cryptoCount = 0;
_sizeOut = lbSize 41502;
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [41502, _i];
_itemWorth = getNumber(_config >> _item >> "price");
_itemTax = getNumber(_config >> _item >> "tax");
_tax = _itemWorth * (EPOCH_taxRate + _itemTax);
_itemWorth = ceil(_itemWorth + _tax);
_cryptoCount = _cryptoCount + _itemWorth;
};
};
ctrlSetText [41005, (format ["%1 Krypto", _cryptoCount])];
} else {
["Limit one per trade", 5] call Epoch_message;
};
};

View File

@ -1,41 +1,72 @@
//[[[cog import generate_private_arrays ]]]
private ["_array","_config","_cryptoCount","_item","_itemTax","_itemWorth","_sizeOut","_tax","_uiItem","_worth"];
//[[[end]]]
params ["_control","_selected"];
/*
Author: He-Man - Ignatz-Gaming
_uiItem = (_selected select 0) lbData(_selected select 1);
Contributors: Raimonds Virtoss
Description:
Move Items in Tradermenu from TraderOut window to Traderinventory
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/traders/EPOCH_npcTraderAdd3.sqf
*/
private ["_TraderFilerDropDown","_PlayerItemsOutBox","_TraderItemsOutBox","_CryptoInCtrl","_CryptoOutCtrl","_uiItem","_rounds","_config","_ItemIndex","_cryptoCount","_sizeOut","_item","_worth","_maxrnd","_itemTax","_tax"];
params ["_control","_selected"];
_selected params ["_CurControl","_id"];
_TraderFilerDropDown = 42101;
_PlayerItemsOutBox = 41501;
_TraderItemsOutBox = 41502;
_CryptoInCtrl = 41004;
_CryptoOutCtrl = 41005;
_uiItem = _CurControl lbData _id;
_rounds = _CurControl lbValue _id;
_config = 'CfgPricing' call EPOCH_returnConfig;
if (isClass (_config >> _uiItem)) then{
(_selected select 0) lbDelete (_selected select 1);
lbSetCurSel[42101, 0];
if (isClass (_config >> _uiItem)) then {
_ItemIndex = (EPOCH_NpcTradeTraderItems select 0) find _uiItem;
if (_ItemIndex >= 0) then {
(EPOCH_NpcTradeTraderItems select 1) set [_ItemIndex,(EPOCH_NpcTradeTraderItems select 1 select _ItemIndex) + _rounds];
};
_CurControl lbDelete _id;
lbSetCurSel [_TraderFilerDropDown, 0];
_cryptoCount = 0;
_sizeOut = lbSize 41501;
//_array = [];
_sizeOut = lbSize _PlayerItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [41501, _i];
//_array pushBack _item;
_worth = getNumber(_config >> _item >> "price");
_item = lbData [_PlayerItemsOutBox, _i];
_rounds = lbValue [_PlayerItemsOutBox, _i];
_worth = getNumber (_config >> _item >> "price");
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_worth = round (_worth*(_rounds/_maxrnd));
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText [41004, (format ["%1 Krypto", _cryptoCount])];
ctrlSetText [_CryptoInCtrl, (format["%1 Krypto", _cryptoCount])];
_cryptoCount = 0;
_sizeOut = lbSize 41502;
_sizeOut = lbSize _TraderItemsOutBox;
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [41502, _i];
_itemWorth = getNumber(_config >> _item >> "price");
_itemTax = getNumber(_config >> _item >> "tax");
_tax = _itemWorth * (EPOCH_taxRate + _itemTax);
_itemWorth = ceil(_itemWorth + _tax);
_cryptoCount = _cryptoCount + _itemWorth;
_item = lbData [_TraderItemsOutBox, _i];
_rounds = lbValue [_TraderItemsOutBox, _i];
_worth = getNumber (_config >> _item >> "price");
_itemTax = getNumber (_config >> _item >> "tax");
_tax = _worth * (EPOCH_taxRate + _itemTax);
_worth = ceil (_worth + _tax);
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_worth = round (_worth*(_rounds/_maxrnd));
_cryptoCount = _cryptoCount + _worth;
};
};
ctrlSetText [41005, (format ["%1 Krypto", _cryptoCount])];
ctrlSetText [_CryptoOutCtrl, (format["%1 Krypto", _cryptoCount])];
};

View File

@ -1,6 +1,19 @@
//[[[cog import generate_private_arrays ]]]
private ["_MainCategoriearray","_categorie","_config","_ok","_slot","_target"];
//[[[end]]]
/*
Author: He-Man - Ignatz-Gaming
Contributors: Raimonds Virtoss
Description:
Start the Trader Trading Menu
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/traders/EPOCH_startNPCTraderMenu.sqf
*/
private ["_config","_MainCategoriearray","_target","_slot","_index","_ok","_categorie"];
_config = 'CfgItemSort' call EPOCH_returnConfig;
_MainCategoriearray = getarray (_config >> "MainCategories" >> "Classes");
_target = cursorTarget;
@ -8,6 +21,20 @@ if (alive _target) then {
_slot = _target getVariable ["AI_SLOT",-1];
if (_slot != -1) then {
EPOCH_lastNPCtradeTarget = _target;
EPOCH_NpcTradePlayerItems = (items player)+(magazinesammo player);
if (primaryWeapon player != "") then {
EPOCH_NpcTradePlayerItems pushback primaryWeapon player;
};
if (count backpackItems player == 0 && count backpackmagazines player == 0 && backpack player != "") then {
EPOCH_NpcTradePlayerItems pushback backpack player;
};
EPOCH_NpcTradeTraderItems = [[],[]];
{
_index = _foreachindex;
{
(EPOCH_NpcTradeTraderItems select _index) pushback _x;
} foreach _x
} foreach (_target getvariable ["AI_Items",[[],[]]]);
closeDialog 0;
_ok = createdialog "TradeNPCMenu";
if (!_ok) exitWith {};
@ -15,10 +42,10 @@ if (alive _target) then {
((uiNamespace getVariable "EPOCH_EpochGameUI2") displayCtrl 21208) ctrlSetText format["%1", EPOCH_playerCrypto];
{
_categorie = _x select 1;
lbAdd[42100,_categorie];
lbAdd[42101,_categorie]
lbAdd [42100,_categorie];
lbAdd [42101,_categorie]
} forEach _MainCategoriearray;
lbSetCurSel[42100, 0];
lbSetCurSel[42101, 0];
lbSetCurSel [42100, 0];
lbSetCurSel [42101, 0];
};
};

View File

@ -1,65 +1,64 @@
/*
Author: Aaron Clark - EpochMod.com
Author: He-Man - Ignatz-Gaming
Contributors: He-Man
Contributors: Raimonds Virtoss
Description:
NPC trade code
Move Items in Tradermenu from TraderOut window to Traderinventory
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
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_addWeaponToHands","_arrayIn","_arrayOut","_config","_current_crypto","_errorMsg","_item","_itemTax","_itemWorth","_sizeOut","_tax","_type","_vehSlot","_vehicle","_vehicles"];
//[[[end]]]
private ["_PlayerItemsOutBox","_TraderItemsOutBox","_config","_current_crypto","_sizeIn","_arrayIn","_item","_rounds","_mags","_itemMags","_index","_sizeOut","_arrayOut","_itemWorth","_itemTax","_tax","_maxrnd"];
if (!isNil "EPOCH_TRADE_STARTED") exitWith{};
if (isNull _this) exitWith{};
if (alive _this) then {
_PlayerItemsOutBox = 41501;
_TraderItemsOutBox = 41502;
_config = 'CfgPricing' call EPOCH_returnConfig;
_current_crypto = EPOCH_playerCrypto;
// _arrayIn = Sell Array
_sizeOut = lbSize 41501;
_sizeIn = lbSize _PlayerItemsOutBox;
_arrayIn = [];
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41501, _i];
if (_sizeIn > 0) then {
for "_i" from 0 to (_sizeIn - 1) do {
_item = lbData [_PlayerItemsOutBox, _i];
_rounds = lbValue [_PlayerItemsOutBox, _i];
if (isClass (_config >> _item)) then{
// test remove items to be sold and add to array
_itemWorth = getNumber (_config >> _item >> "price");
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_itemWorth = round (_itemWorth*(_rounds/_maxrnd));
_added = false;
if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then {
if (_item in items player) then {
player removeItem _item;
_arrayIn pushBack _item;
} else {
_arrayIn pushBack [_item,_rounds];
_added = true;
}
else {
if (_item == primaryweapon player) then {
player removeweapon _item;
_arrayIn pushBack _item;
_arrayIn pushBack [_item,_rounds];
_added = true;
};
};
} else {
}
else {
if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then {
if (_item == backpack player) then {
removeBackpack player;
_arrayIn pushBack _item;
} else {
_arrayIn pushBack [_item,_rounds];
_added = true;
}
else {
_vehicles = _this nearEntities[[_item], 30];
if (!(_vehicles isEqualTo[])) then {
_vehicle = _vehicles select 0;
@ -67,56 +66,66 @@ if (alive _this) then {
if (local _vehicle) then {
_vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"];
if (_vehSlot != "ABORT") then {
_arrayIn pushBack _item;
// will be removed server side
_arrayIn pushBack [_item,_rounds];
_added = true;
};
};
};
};
};
} else {
if (_item in magazines player) then {
player removeMagazine _item;
_arrayIn pushBack _item;
}
else {
_mags = magazinesAmmo player;
_itemMags = [];
{
_x params ["_className","_count"];
if (_className isequalto _item) then {
_itemMags pushBack _x;
};
} forEach _mags;
_index = _itemMags find [_item,_rounds];
if (_index >= 0) then {
_arrayIn pushback (_itemMags deleteat _index);
_added = true;
player removemagazines _item;
{
_x call EPOCH_fnc_addMagazineOverflow;
} foreach _itemMags;
};
};
};
// test
};
};
};
// _arrayOut = Purchase Array
_sizeOut = lbSize 41502;
_arrayOut = [];
if (_sizeOut > 0) then {
for "_i" from 0 to(_sizeOut - 1) do {
_item = lbData[41502, _i];
if (isClass (_config >> _item)) then{
_itemWorth = getNumber(_config >> "price");
_itemTax = getNumber(_config >> "tax");
_tax = _itemWorth * (EPOCH_taxRate + _itemTax);
_itemWorth = ceil(_itemWorth + _tax);
if (_current_crypto >= _itemWorth) then {
_current_crypto = _current_crypto - _itemWorth;
_arrayOut pushBack _item;
if (_added) then {
_current_crypto = _current_crypto + _itemWorth;
};
};
};
};
if (!(_arrayIn isEqualTo[]) || !(_arrayOut isEqualTo[])) then {
_sizeOut = lbSize _TraderItemsOutBox;
_arrayOut = [];
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [_TraderItemsOutBox, _i];
_rounds = lbValue [_TraderItemsOutBox, _i];
if (isClass (_config >> _item)) then {
_itemWorth = getNumber (_config >> _item >> "price");
_itemTax = getNumber (_config >> _item >> "tax");
_tax = _itemWorth * (EPOCH_taxRate + _itemTax);
_itemWorth = ceil (_itemWorth + _tax);
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_itemWorth = round (_itemWorth*(_rounds/_maxrnd));
if (_current_crypto >= _itemWorth) then {
_current_crypto = _current_crypto - _itemWorth;
_arrayOut pushBack [_item,_rounds];
};
};
};
};
if !(_arrayIn isEqualTo[] && _arrayOut isEqualTo[]) then {
EPOCH_TRADE_STARTED = true;
// make trade
[_this, _arrayIn, _arrayOut, player, Epoch_personalToken] remoteExec ["EPOCH_server_makeNPCTrade",2];
// close menu
closeDialog 0;
};
};

View File

@ -1,67 +0,0 @@
disableSerialization;
//[[[cog import generate_private_arrays ]]]
private ["_array","_filterArray","_item","_items","_magazines","_sizeOut","_weapons","_xIndex"];
//[[[end]]]
params ["_control","_index"];
// [weapons, mags, items]
_filterArray = [
[true,true,true], // all
// [true,false,false], // weapons only
[false,true,false], // mags only
[false,false,true] // items only
];
lbClear 1500;
// _weapons = ((_filterArray select _index) select 0);
_magazines = ((_filterArray select _index) select 1);
_items = ((_filterArray select _index) select 2);
_sizeOut = lbSize 1501;
_array = [];
if (_sizeOut > 0) then {
for "_i" from 0 to (_sizeOut - 1) do {
_item = lbData [1501, _i];
_array pushBack _item;
};
};
/*
if (_weapons) then {
{
if !(_x in _array) then {
_xIndex = lbAdd [1500, _x call EPOCH_itemDisplayName];
lbSetData [1500, _xIndex, _x];
lbSetPicture [1500, _xIndex, _x call EPOCH_itemPicture];
} else {
_array set [_array find _x,nil];
};
} forEach weapons player;
};
*/
if (_magazines) then {
{
if (getNumber(configfile >> "CfgMagazines" >> _x >> "count") == 1) then {
if !(_x in _array) then {
_xIndex = lbAdd[1500, _x call EPOCH_itemDisplayName];
lbSetData[1500, _xIndex, _x];
lbSetPicture[1500, _xIndex, _x call EPOCH_itemPicture];
}
else {
_array set[_array find _x, nil];
};
};
} forEach magazines player;
};
if (_items) then {
{
if !(_x in _array) then {
_xIndex = lbAdd [1500, _x call EPOCH_itemDisplayName];
lbSetData [1500, _xIndex, _x];
lbSetPicture [1500, _xIndex, _x call EPOCH_itemPicture];
} else {
_array set [_array find _x,nil];
};
} forEach items player;
};

View File

@ -68,14 +68,14 @@ _respawnButton ctrlEnable false;
[_display] spawn {
disableSerialization;
params ["_display"];
EPOCH_forceUpdate = true;
_startTime = diag_tickTime+5;
waitUntil {
uiSleep 0.2;
(isNull _display) || ((_startTime - diag_tickTime) <= 0)
};
if (!isNull _display) then {
EPOCH_forceUpdate = true;
player setUnitLoadout (getUnitLoadout player);
missionnamespace setvariable ["EPOCH_forceUpdateNow",true];
};
};

View File

@ -37,7 +37,7 @@ if !(_throw isequalto "") then {
}
else {
_itemHasInteraction = str(missionConfigFile >> "CfgItemInteractions" >> _item) != "";
if (_itemHasInteraction) then {
if ((_itemHasInteraction) && (_item in magazines player)) then {
EPOCH_InteractedItem = ["",_item,""];
[] call EPOCH_consumeItem;
EPOCH_favBar_itemConsumed = true;
@ -53,7 +53,11 @@ else {
_Fav_FastWeaponSwitching = ["CfgEpochClient", "Fav_FastWeaponSwitching", false] call EPOCH_fnc_returnConfigEntryV2;
if (_curSlot == _slot && !_Fav_FastWeaponSwitching && _errorCode in [1,2]) then {player playAction "reloadMagazine";};
};
if(_errorCode in [0,3]) then{
if(!(true in EPOCH_modKeys) && (_kee isEqualTo 2))then{player selectWeapon (primaryWeapon player)};
if(!(true in EPOCH_modKeys) && (_kee isEqualTo 3))then{player selectWeapon (handgunWeapon player)};
if(!(true in EPOCH_modKeys) && (_kee isEqualTo 4))then{player selectWeapon (secondaryWeapon player)};
};
if (_errorCode isEqualTo 2) then {"Not enough space, item dropped on the ground!" call epoch_message;};
if (_errorCode isEqualTo 4 && _item != (currentWeapon player)) then {"Not enough space!" call epoch_message;};
if (_errorCode isEqualTo 3) then {"Item not found!" call epoch_message;};

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/both_init.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_cfgDynamicSimulation","_communityStatsInit","_customVarsInit","_dynSimToggle"];
private ["_communityStatsInit","_customVarsInit","_dynSimToggle"];
//[[[end]]]
// Check if Advanced Vehicle Repair is enabled
@ -71,16 +71,3 @@ EPOCH_group_upgrade_lvl = ["CfgEpochClient", "group_upgrade_lvl", [4,"100",6,"30
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
// Enable Dynamic simulation on both server and clients (maybe only needed server side)
// DynSim is handled locally and yes server and clients will need these configurations
_dynSimToggle = ["CfgDynamicSimulation", "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2;
enableDynamicSimulationSystem _dynSimToggle;
if(_dynSimToggle)then
{
_cfgDynamicSimulation = 'CfgDynamicSimulation' call EPOCH_returnConfig;
"IsMoving" setDynamicSimulationDistanceCoef getNumber(_cfgDynamicSimulation >> "isMovingCoefValue");
"Group" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "groupDynSimDistance");
"Vehicle" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "vehicleDynSimDistance");
"EmptyVehicle" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "emptyVehicleDynSimDistance");
"Prop" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "propDynSimDistance");
};

View File

@ -57,6 +57,8 @@ EPOCH_arr_interactedObjs = [];
EPOCH_buildOption = 0;
EPOCH_nearestLocations = [];
EPOCH_lastFiredLocation = [];
EPOCH_IsAutoRunning = false;
EPOCH_LastAutoRunKeyPressed = diag_ticktime;
//Radiation
EPOCH_geiger_shown = false;
@ -80,8 +82,8 @@ EPOCH_keysActionPressed = false; //prevents EH spam
0 call EPOCH_clientKeyMap;
// load some frequently used configs to variables
private _CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
EPOCH_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
EPOCH_maxBuildingHeight = ["CfgEpochClient", "maxBuildingHeight", 100] call EPOCH_fnc_returnConfigEntryV2;
Epoch_NuisanceMulti = ["CfgEpochClient", "NuisanceMulti", 0.5] call EPOCH_fnc_returnConfigEntryV2;
//ON INIT and RESPAWN
call EPOCH_clientInit;

View File

@ -20,6 +20,7 @@ class CfgActionMenu
dyna_cursorTarget = "([10] call EPOCH_fnc_cursorTarget)";
dyna_cursorTargetType = "typeOf ([10] call EPOCH_fnc_cursorTarget)";
dyna_inVehicle = "vehicle player != player";
dyna_IsDriver = "dyna_inVehicle && player == (driver (vehicle player))";
dyna_itemsPlayer = "items player";
dyna_magazinesPlayer = "magazines player";
dyna_assigneditems = "assignedItems player";
@ -47,6 +48,8 @@ class CfgActionMenu
dyna_deathMarker = "profileNameSpace getVariable['EPOCHLastKnownDeath',[]]";
dyna_deathMarkerAvail = "!(dyna_deathMarker isEqualTo [])";
dyna_mapDeathMarker = "(((getArray(('CfgMarkerSets' call EPOCH_returnConfig) >> 'DeathMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)";
dyna_AtHome = "call {_config = 'CfgEpochClient' call EPOCH_returnConfig;_buildingJammerRange = getNumber(_config >> 'buildingJammerRange');_nearjammers = nearestobjects [player,['Plotpole_EPOCH'],_buildingJammerRange];if (_nearjammers isEqualTo []) exitwith {false};_nearestJammer = _nearjammers select 0;((_nearestJammer getVariable['BUILD_OWNER', '-1']) in[getPlayerUID player, Epoch_my_GroupUID])}";
};
class self

View File

@ -116,7 +116,7 @@ class base_mode_attach
class Drink
{
condition = "_nearObjects = nearestObjects [player, [], 2];_check = 'water';_ok = false;{if (alive _x) then {_ok = [_x, _check] call EPOCH_worldObjectType;};if (_ok) exitWith {};} forEach _nearObjects;_ok";
action = "if (currentweapon player == '') then {player playmove 'AinvPknlMstpSnonWnonDnon_Putdown_AmovPknlMstpSnonWnonDnon';}else {if (currentweapon player == handgunweapon player) then {player playmove 'AinvPknlMstpSrasWpstDnon_Putdown_AmovPknlMstpSrasWpstDnon';}else { player playmove 'AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon';};};{_output = _x call EPOCH_giveAttributes;if (_output != '') then {[_output, 5] call Epoch_message;};} foreach [['Toxicity',4,1],['Stamina',10],['Thirst',100]];";
action = "if (currentweapon player == '') then {player playmove 'AinvPknlMstpSnonWnonDnon_Putdown_AmovPknlMstpSnonWnonDnon';}else {if (currentweapon player == handgunweapon player) then {player playmove 'AinvPknlMstpSrasWpstDnon_Putdown_AmovPknlMstpSrasWpstDnon';}else { player playmove 'AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon';};};{_output = _x call EPOCH_giveAttributes;if (_output != '') then {[_output, 5] call Epoch_message_stack;};} foreach [['Toxicity',4,1],['Stamina',10],['Thirst',100]];";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Drink.paa";
tooltip = "Drink";
};

View File

@ -163,13 +163,13 @@ class pack_safe
class VehMaintanance
{
condition = "dyna_isVehicle && !EPOCH_Vehicle_MaintainLock && EPOCH_AdvancedVehicleRepair_Enabled";
condition = "dyna_isVehicle && !EPOCH_Vehicle_MaintainLock";
action = "dyna_cursorTarget call EPOCH_client_VehicleMaintananceCheck;";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_man.paa";
tooltip = "Vehicle Maintanance";
class Repair
{
condition = "!((EPOCH_VehicleRepairs select 0) isequalto []) || !((EPOCH_VehicleRepairs select 2) isequalto [])";
condition = "(!((EPOCH_VehicleRepairs select 0) isequalto []) || !((EPOCH_VehicleRepairs select 2) isequalto [])) && EPOCH_AdvancedVehicleRepair_Enabled";
action = "";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa";
tooltip = "Repair Vehicle";
@ -393,7 +393,7 @@ class VehMaintanance
};
class Remove
{
condition = "!((EPOCH_VehicleRepairs select 1) isequalto [])";
condition = "!((EPOCH_VehicleRepairs select 1) isequalto []) && EPOCH_AdvancedVehicleRepair_Enabled";
action = "";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa";
tooltip = "Remove Parts";

View File

@ -12,6 +12,7 @@ class CfgBaseBuilding
{
upgradeBuilding[] = {};
removeParts[] = {};
maxSnapDistance = 1;
};
class FirePlace_EPOCH : Default
{
@ -41,6 +42,7 @@ class CfgBaseBuilding
snapPointsPara[] = {"N","S","E","W","C"};
snapPointsPerp[] = {};
maxHeight = 2.5;
maxSnapDistance = 4.5;
// snap points for Foundation_EPOCH
C[] = {0,0,0.806411};
N[] = {0,10.463,0};
@ -71,6 +73,7 @@ class CfgBaseBuilding
allowedSnapPoints[] = {"N","S","E","W"};
allowedSnapObjects[] = {"Constructions_foundation_F"};
maxHeight = 2.5;
maxSnapDistance = 3;
// snap points for Foundation_EPOCH
C[] = {0,0,0.806411};
N[] = {0,10.463,0};
@ -199,11 +202,12 @@ class CfgBaseBuilding
simulClass = "WoodFloor_SIM_EPOCH";
staticClass = "WoodFloor_EPOCH";
GhostPreview = "WoodFloor_Ghost_EPOCH";
snapPointsPara[] = {"NF","SF","EF","WF","C","CB","NHF","SHF","EHF","WHF","NQ1","NQ2","SQ1","SQ2","EQ1","EQ2","WQ1","WQ2"};
snapPointsPara[] = {"NF","SF","EF","WF","C","CB","Cx2","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"};
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
energyCost = 0.2;
// snap points for WoodFloor_EPOCH
C[] = {0,0,3.31243};
Cx2[] = {0,0,6.37277};
CB[] = {0,0,0.268722};
CinN[] = {0,2.87136,-0.000576986};
CinE[] = {2.87868,0,-0.000576986};
@ -221,22 +225,32 @@ class CfgBaseBuilding
SF[] = {0,-5.237,0};
EF[] = {5.237,0,0};
WF[] = {-5.237,0,0};
NHF[] = {0,3.92775,0};
SHF[] = {0,-3.92775,0};
EHF[] = {3.92775,0,0};
WHF[] = {-3.92775,0,0};
NQ1[] = {1.30925,3.92775,0};
NQ2[] = {-1.30925,3.92775,0};
SQ1[] = {1.30925,-3.92775,0};
SQ2[] = {-1.30925,-3.92775,0};
EQ1[] = {3.92775,1.30925,0};
EQ2[] = {3.92775,-1.30925,0};
WQ1[] = {-3.92775,1.30925,0};
WQ2[] = {-3.92775,-1.30925,0};
NWQF[] = {-1.30925,3.92775,0};
NQF[] = {0,3.92775,0};
NEQF[] = {1.30925,3.92775,0};
SWQF[] = {-1.30925,-3.92775,0};
SQF[] = {0,-3.92775,0};
SEQF[] = {1.30925,-3.92775,0};
ENQF[] = {3.92775,1.30925,0};
EQF[] = {3.92775,0,0};
ESQF[] = {3.92775,-1.30925,0};
WNQF[] = {-3.92775,1.30925,0};
WQF[] = {-3.92775,0,0};
WSQF[] = {-3.92775,-1.30925,0};
NWHF[] = {-1.30925,5.237,0};
NEHF[] = {1.30925,5.237,0};
SWHF[] = {-1.30925,-5.237,0};
SEHF[] = {1.30925,-5.237,0};
WNHF[] = {-5.237,1.30925,0};
WSHF[] = {-5.237,-1.30925,0};
ENHF[] = {5.237,1.30925,0};
ESHF[] = {5.237,-1.30925,0};
};
class WoodFloor_SIM_EPOCH : WoodFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","C"};
allowedSnapPoints[] = {"NF","SF","EF","WF","C","Cx2"};
allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"};
upgradeBuilding[] = {};
removeParts[] = {};
@ -249,11 +263,12 @@ class CfgBaseBuilding
simulClass = "WoodHalfFloor_SIM_EPOCH";
staticClass = "WoodHalfFloor_EPOCH";
GhostPreview = "WoodHalfFloor_Ghost_EPOCH";
snapPointsPara[] = {"NF","SF","EF","WF","C","CB","NHF","SHF","EHF","WHF","NQ1","NQ2","SQ1","SQ2","EQ1","EQ2","WQ1","WQ2"};
snapPointsPara[] = {"NF","SF","EF","WF","C","Cx2","CB","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"};
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
energyCost = 0.2;
// snap points for WoodHalfFloor_EPOCH
C[] = {0,0,3.31243};
Cx2[] = {0,0,6.37277};
CB[] = {0,0,0.268722};
CinN[] = {0,2.87136,-0.000576986};
CinE[] = {1.444845,0,-0.000576986};
@ -271,22 +286,32 @@ class CfgBaseBuilding
SF[] = {0,-5.237,0};
EF[] = {3.92775,0,0};
WF[] = {-3.92775,0,0};
NHF[] = {0,3.92775,0};
SHF[] = {0,-3.92775,0};
EHF[] = {2.6185,0,0};
WHF[] = {-2.6185,0,0};
NQ1[] = {1.30925,3.92775,0};
NQ2[] = {-1.30925,3.92775,0};
SQ1[] = {1.30925,-3.92775,0};
SQ2[] = {-1.30925,-3.92775,0};
EQ1[] = {3.92775,1.30925,0};
EQ2[] = {3.92775,-1.30925,0};
WQ1[] = {-3.92775,1.30925,0};
WQ2[] = {-3.92775,-1.30925,0};
NWQF[] = {-1.30925,3.92775,0};
NQF[] = {0,3.92775,0};
NEQF[] = {1.30925,3.92775,0};
SWQF[] = {1.30925,-3.92775,0};
SQF[] = {0,-3.92775,0};
SEQF[] = {-1.30925,-3.92775,0};
ENQF[] = {2.6185,1.30925,0};
EQF[] = {2.6185,0,0};
ESQF[] = {2.6185,-1.30925,0};
WNQF[] = {-2.6185,1.30925,0};
WQF[] = {-2.6185,0,0};
WSQF[] = {-2.6185,-1.30925,0};
NWHF[] = {-1.30925,5.237,0};
NEHF[] = {1.30925,5.237,0};
SWHF[] = {-1.30925,-5.237,0};
SEHF[] = {1.30925,-5.237,0};
WNHF[] = {-3.92775,1.30925,0};
WSHF[] = {-3.92775,-1.30925,0};
ENHF[] = {3.92775,1.30925,0};
ESHF[] = {3.92775,-1.30925,0};
};
class WoodHalfFloor_SIM_EPOCH : WoodHalfFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","NHF","SHF","EHF","WHF"};
allowedSnapPoints[] = {"C","Cx2","NF","SF","EF","WF","NQF","SQF","EQF","WQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
@ -299,11 +324,12 @@ class CfgBaseBuilding
simulClass = "WoodQuarterFloor_SIM_EPOCH";
staticClass = "WoodQuarterFloor_EPOCH";
GhostPreview = "WoodQuarterFloor_Ghost_EPOCH";
snapPointsPara[] = {"NF","SF","EF","WF","C","CB","NHF","SHF","EHF","WHF","NQ1","NQ2","SQ1","SQ2","EQ1","EQ2","WQ1","WQ2"};
snapPointsPara[] = {"NF","SF","EF","WF","C","Cx2","CB","NQF","SQF","EQF","WQF"};
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
energyCost = 0.1;
// snap points for WoodQuarterFloor_EPOCH
C[] = {0,0,3.31243};
Cx2[] = {0,0,6.37277};
CB[] = {0,0,0.268722};
CinN[] = {0,1.43568,-0.000576986};
CinE[] = {1.444845,0,-0.000576986};
@ -321,22 +347,14 @@ class CfgBaseBuilding
SF[] = {0,-3.92775,0};
EF[] = {3.92775,0,0};
WF[] = {-3.92775,0,0};
NHF[] = {0,3.92775,0};
SHF[] = {0,-3.92775,0};
EHF[] = {2.6185,0,0};
WHF[] = {-2.6185,0,0};
NQ1[] = {1.30925,3.92775,0};
NQ2[] = {-1.30925,3.92775,0};
SQ1[] = {1.30925,-3.92775,0};
SQ2[] = {-1.30925,-3.92775,0};
EQ1[] = {3.92775,1.30925,0};
EQ2[] = {3.92775,-1.30925,0};
WQ1[] = {-3.92775,1.30925,0};
WQ2[] = {-3.92775,-1.30925,0};
NQF[] = {0,2.6185,0};
SQF[] = {0,-2.6185,0};
EQF[] = {2.6185,0,0};
WQF[] = {-2.6185,0,0};
};
class WoodQuarterFloor_SIM_EPOCH : WoodQuarterFloor_EPOCH
{
allowedSnapPoints[] = {"NHF","SHF","EHF","WHF","NQ1","NQ2","SQ1","SQ2","EQ1","EQ2","WQ1","WQ2"};
allowedSnapPoints[] = {"C","Cx2","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
@ -353,7 +371,7 @@ class CfgBaseBuilding
};
class MetalFloor_SIM_EPOCH : MetalFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","C"};
allowedSnapPoints[] = {"NF","SF","EF","WF","C","Cx2"};
allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"};
upgradeBuilding[] = {};
removeParts[] = {};
@ -369,12 +387,12 @@ class CfgBaseBuilding
energyCost = 0.2;
};
class MetalHalfFloor_SIM_EPOCH : MetalHalfFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","NHF","SHF","EHF","WHF"};
{
allowedSnapPoints[] = {"C","Cx2","NF","SF","EF","WF","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
};
class MetalHalfFloor_Ghost_EPOCH : MetalHalfFloor_SIM_EPOCH {};
class MetalQuarterFloor_EPOCH : WoodQuarterFloor_EPOCH
{
@ -386,59 +404,63 @@ class CfgBaseBuilding
energyCost = 0.1;
};
class MetalQuarterFloor_SIM_EPOCH : MetalQuarterFloor_EPOCH
{
allowedSnapPoints[] = {"NHF","SHF","EHF","WHF","NQ1","NQ2","SQ1","SQ2","EQ1","EQ2","WQ1","WQ2"};
{
allowedSnapPoints[] = {"C","Cx2","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
};
class MetalQuarterFloor_Ghost_EPOCH : MetalQuarterFloor_SIM_EPOCH {};
class MetalTower_EPOCH : Default
class CinderFloor_EPOCH : WoodFloor_EPOCH
{
removeParts[] = {{"ItemCorrugatedLg",2}};
upgradeBuilding[] = {{"CinderTower_EPOCH",{{"CinderBlocks",4},{"MortarBucket",4}}}};
upgradeBuildingPart[] = {{"ItemCorrugatedLg",2}};
removeBuildingPart[] = {{"ItemCorrugatedLg",1}};
simulClass = "MetalTower_SIM_EPOCH";
staticClass = "MetalTower_EPOCH";
GhostPreview = "MetalTower_Ghost_EPOCH";
snapPointsPara[] = {"NF2","SF2","EF2","WF2","NF","SF","EF","WF","C","CB"};
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
persistAnimations[] = {"NWall","EWall","SWall","WWall"};
removeParts[] = {{"CinderBlocks",2},{"MortarBucket",1}};
simulClass = "CinderFloor_SIM_EPOCH";
staticClass = "CinderFloor_EPOCH";
GhostPreview = "CinderFloor_Ghost_EPOCH";
energyCost = 1;
};
class CinderFloor_SIM_EPOCH : CinderFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","C","Cx2"};
allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
class CinderFloor_Ghost_EPOCH : CinderFloor_SIM_EPOCH {};
class CinderHalfFloor_EPOCH : WoodHalfFloor_EPOCH
{
upgradeBuilding[] = {};
removeParts[] = {{"CinderBlocks",1},{"MortarBucket",1}};
simulClass = "CinderHalfFloor_SIM_EPOCH";
staticClass = "CinderHalfFloor_EPOCH";
GhostPreview = "CinderHalfFloor_Ghost_EPOCH";
energyCost = 0.5;
// snap points for MetalTower_EPOCH
NF2[] = {0,5.237,0};
SF2[] = {0,-5.237,0};
EF2[] = {5.237,0,0};
WF2[] = {-5.237,-0.003,0};
C[] = {-0.000251044,-0.00293543,6.36635};
CB[] = {-0.000299305,-0.000390954,3.32569};
CinN[] = {0.0214193,2.87136,3.05666};
CinE[] = {2.87868,-0.000390954,3.05666};
CinS[] = {0.0214193,-2.86826,3.05666};
CinW[] = {-2.88969,-0.000390954,3.05666};
N[] = {0.0195083,2.46379,3.32619};
E[] = {2.47112,-0.000253316,3.32619};
S[] = {0.0195083,-2.46097,3.32619};
W[] = {-2.4783,-0.000253316,3.32619};
NE[] = {2.47112,2.46379,3.32619};
NW[] = {-2.4783,2.46379,3.32619};
SE[] = {2.47112,-2.46097,3.32619};
SW[] = {-2.4783,-2.46097,3.32619};
NF[] = {0,5.237,3.05694};
SF[] = {0,-5.237,3.05694};
EF[] = {5.237,0,3.05694};
WF[] = {-5.237,0,3.05694};
};
class MetalTower_SIM_EPOCH : MetalTower_EPOCH
class CinderHalfFloor_SIM_EPOCH : CinderHalfFloor_EPOCH
{
allowedSnapPoints[] = {"C","Cx2","NF","SF","EF","WF","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
class CinderHalfFloor_Ghost_EPOCH : CinderHalfFloor_SIM_EPOCH {};
class CinderQuarterFloor_EPOCH : WoodQuarterFloor_EPOCH
{
allowedSnapPoints[] = {"NF2","SF2","EF2","WF2","CB"};
allowedSnapObjects[] = {"MetalTower_EPOCH","Const_floors_static_F","Constructions_foundation_F"};
upgradeBuilding[] = {};
removeParts[] = {{"CinderBlocks",1}};
simulClass = "CinderQuarterFloor_SIM_EPOCH";
staticClass = "CinderQuarterFloor_EPOCH";
GhostPreview = "CinderQuarterFloor_Ghost_EPOCH";
energyCost = 0.25;
};
class MetalTower_Ghost_EPOCH : MetalTower_SIM_EPOCH {};
class CinderQuarterFloor_SIM_EPOCH : CinderQuarterFloor_EPOCH
{
allowedSnapPoints[] = {"C","Cx2","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
class CinderQuarterFloor_Ghost_EPOCH : CinderQuarterFloor_SIM_EPOCH {};
class CinderWallGarage_EPOCH : Default
{
removeParts[] = {{"CinderBlocks",4},{"ItemCorrugatedLg",1},{"CircuitParts",1}};
@ -518,56 +540,6 @@ class CfgBaseBuilding
removeParts[] = {};
};
class BarbedWire_Ghost_EPOCH : BarbedWire_SIM_EPOCH {};
class CinderFloor_EPOCH : WoodFloor_EPOCH
{
removeParts[] = {{"CinderBlocks",2},{"MortarBucket",1}};
simulClass = "CinderFloor_SIM_EPOCH";
staticClass = "CinderFloor_EPOCH";
GhostPreview = "CinderFloor_Ghost_EPOCH";
energyCost = 1;
};
class CinderFloor_SIM_EPOCH : CinderFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","C"};
allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
class CinderFloor_Ghost_EPOCH : CinderFloor_SIM_EPOCH {};
class CinderHalfFloor_EPOCH : WoodHalfFloor_EPOCH
{
upgradeBuilding[] = {};
removeParts[] = {{"CinderBlocks",1},{"MortarBucket",1}};
simulClass = "CinderHalfFloor_SIM_EPOCH";
staticClass = "CinderHalfFloor_EPOCH";
GhostPreview = "CinderHalfFloor_Ghost_EPOCH";
energyCost = 0.5;
};
class CinderHalfFloor_SIM_EPOCH : CinderHalfFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","NHF","SHF","EHF","WHF"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
class CinderHalfFloor_Ghost_EPOCH : CinderHalfFloor_SIM_EPOCH {};
class CinderQuarterFloor_EPOCH : WoodQuarterFloor_EPOCH
{
upgradeBuilding[] = {};
removeParts[] = {{"CinderBlocks",1}};
simulClass = "CinderQuarterFloor_SIM_EPOCH";
staticClass = "CinderQuarterFloor_EPOCH";
GhostPreview = "CinderQuarterFloor_Ghost_EPOCH";
energyCost = 0.25;
};
class CinderQuarterFloor_SIM_EPOCH : CinderQuarterFloor_EPOCH
{
allowedSnapPoints[] = {"NHF","SHF","EHF","WHF","NQ1","NQ2","SQ1","SQ2","EQ1","EQ2","WQ1","WQ2"};
allowedSnapObjects[] = {"Const_floors_static_F"};
upgradeBuilding[] = {};
removeParts[] = {};
};
class CinderQuarterFloor_Ghost_EPOCH : CinderQuarterFloor_SIM_EPOCH {};
class CinderWallGarage_SIM_EPOCH : CinderWallGarage_EPOCH
{
@ -633,50 +605,6 @@ class CfgBaseBuilding
E[] = {5.18644,0,0};
W[] = {-5.19304,0,0};
};
class CinderTower_EPOCH : Default
{
removeParts[] = {{"CinderBlocks",2},{"MortarBucket",2}};
upgradeBuildingPart[] = {{"CinderBlocks",2},{"MortarBucket",2}};
removeBuildingPart[] = {{"CinderBlocks",2}};
simulClass = "CinderTower_SIM_EPOCH";
staticClass = "CinderTower_EPOCH";
GhostPreview = "CinderTower_Ghost_EPOCH";
snapPointsPara[] = {"NF2","SF2","EF2","WF2","NF","SF","EF","WF","C","CB"};
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
persistAnimations[] = {"NWall","EWall","SWall","WWall"};
energyCost = 0.4;
// snap points for CinderTower_EPOCH
NF2[] = {0,5.237,0};
SF2[] = {0,-5.237,0};
EF2[] = {5.237,0,0};
WF2[] = {-5.237,-0.003,0};
C[] = {-0.000251044,-0.00293543,6.36635};
CB[] = {-0.000299305,-0.000390954,3.32569};
CinN[] = {0.0214193,2.87136,3.05666};
CinE[] = {2.87868,-0.000390954,3.05666};
CinS[] = {0.0214193,-2.86826,3.05666};
CinW[] = {-2.88969,-0.000390954,3.05666};
N[] = {0.0195083,2.46379,3.32619};
E[] = {2.47112,-0.000253316,3.32619};
S[] = {0.0195083,-2.46097,3.32619};
W[] = {-2.4783,-0.000253316,3.32619};
NE[] = {2.47112,2.46379,3.32619};
NW[] = {-2.4783,2.46379,3.32619};
SE[] = {2.47112,-2.46097,3.32619};
SW[] = {-2.4783,-2.46097,3.32619};
NF[] = {0,5.237,3.05694};
SF[] = {0,-5.237,3.05694};
EF[] = {5.237,0,3.05694};
WF[] = {-5.237,0,3.05694};
};
class CinderTower_SIM_EPOCH : CinderTower_EPOCH
{
allowedSnapPoints[] = {"NF2","SF2","EF2","WF2","CB"};
allowedSnapObjects[] = {"CinderTower_EPOCH","Const_floors_static_F","Constructions_foundation_F"};
};
class CinderTower_Ghost_EPOCH : CinderTower_SIM_EPOCH {};
class WoodLargeWall_EPOCH : Default
{
upgradeBuilding[] = {{"WoodWall1_EPOCH",{{"ItemPlywoodPack",1}}},{"WoodLargeWallCor_EPOCH",{{"ItemCorrugated",1}}}};
@ -918,10 +846,28 @@ class CfgBaseBuilding
SF[] = {0,-5.237,3.06};
EF[] = {5.237,0,3.06};
WF[] = {-5.237,0,3.06};
NWQF[] = {-1.30925,3.92775,3.06};
NQF[] = {0,3.92775,3.06};
NEQF[] = {1.30925,3.92775,3.06};
SWQF[] = {-1.30925,-3.92775,3.06};
SQF[] = {0,-3.92775,3.06};
SEQF[] = {1.30925,-3.92775,3.06};
ENQF[] = {3.92775,1.30925,3.06};
EQF[] = {3.92775,0,3.06};
ESQF[] = {3.92775,-1.30925,3.06};
WNQF[] = {-3.92775,1.30925,3.06};
WQF[] = {-3.92775,0,3.06};
WSQF[] = {-3.92775,-1.30925,3.06};
NWHF[] = {-1.30925,5.237,3.06};
NEHF[] = {1.30925,5.237,3.06};
SWHF[] = {-1.30925,-5.237,3.06};
SEHF[] = {1.30925,-5.237,3.06};
WNHF[] = {-5.237,1.30925,3.06};
WSHF[] = {-5.237,-1.30925,3.06};
ENHF[] = {5.237,1.30925,3.06};
ESHF[] = {5.237,-1.30925,3.06};
};
class WoodStairs_SIM_EPOCH : WoodStairs_EPOCH
{
@ -937,7 +883,7 @@ class CfgBaseBuilding
simulClass = "WoodStairs2_SIM_EPOCH";
staticClass = "WoodStairs2_EPOCH";
GhostPreview = "WoodStairs2_EPOCH";
snapPointsPara[] = {"NF2","SF2","EF2","WF2","NF","SF","EF","WF","C","CB","NQF","SQF","EQF","WQF"};
snapPointsPara[] = {"NF2","SF2","EF2","WF2","NF","SF","EF","WF","C","CB","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"};
snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"};
energyCost = 0.3;
// snap points for WoodStairs_EPOCH
@ -963,10 +909,28 @@ class CfgBaseBuilding
SF[] = {0,-5.237,3.06};
EF[] = {5.237,0,3.06};
WF[] = {-5.237,0,3.06};
NWQF[] = {-1.30925,3.92775,3.06};
NQF[] = {0,3.92775,3.06};
NEQF[] = {1.30925,3.92775,3.06};
SWQF[] = {-1.30925,-3.92775,3.06};
SQF[] = {0,-3.92775,3.06};
SEQF[] = {1.30925,-3.92775,3.06};
ENQF[] = {3.92775,1.30925,3.06};
EQF[] = {3.92775,0,3.06};
ESQF[] = {3.92775,-1.30925,3.06};
WNQF[] = {-3.92775,1.30925,3.06};
WQF[] = {-3.92775,0,3.06};
WSQF[] = {-3.92775,-1.30925,3.06};
NWHF[] = {-1.30925,5.237,3.06};
NEHF[] = {1.30925,5.237,3.06};
SWHF[] = {-1.30925,-5.237,3.06};
SEHF[] = {1.30925,-5.237,3.06};
WNHF[] = {-5.237,1.30925,3.06};
WSHF[] = {-5.237,-1.30925,3.06};
ENHF[] = {5.237,1.30925,3.06};
ESHF[] = {5.237,-1.30925,3.06};
};
class WoodStairs2_SIM_EPOCH : WoodStairs2_EPOCH
{
@ -1018,6 +982,40 @@ class CfgBaseBuilding
energyCost = 0.3;
};
class WoodTower_Ghost_EPOCH : WoodTower_SIM_EPOCH {};
class MetalTower_EPOCH : WoodTower_EPOCH
{
removeParts[] = {{"ItemCorrugatedLg",2}};
upgradeBuilding[] = {{"CinderTower_EPOCH",{{"CinderBlocks",4},{"MortarBucket",4}}}};
upgradeBuildingPart[] = {{"ItemCorrugatedLg",2}};
removeBuildingPart[] = {{"ItemCorrugatedLg",1}};
simulClass = "MetalTower_SIM_EPOCH";
staticClass = "MetalTower_EPOCH";
GhostPreview = "MetalTower_Ghost_EPOCH";
energyCost = 0.4;
};
class MetalTower_SIM_EPOCH : MetalTower_EPOCH
{
allowedSnapPoints[] = {"NF2","SF2","EF2","WF2","CB"};
allowedSnapObjects[] = {"MetalTower_EPOCH","Const_floors_static_F","Constructions_foundation_F"};
};
class MetalTower_Ghost_EPOCH : MetalTower_SIM_EPOCH {};
class CinderTower_EPOCH : WoodTower_EPOCH
{
removeParts[] = {{"CinderBlocks",2},{"MortarBucket",2}};
upgradeBuildingPart[] = {{"CinderBlocks",2},{"MortarBucket",2}};
removeBuildingPart[] = {{"CinderBlocks",2}};
simulClass = "CinderTower_SIM_EPOCH";
staticClass = "CinderTower_EPOCH";
GhostPreview = "CinderTower_Ghost_EPOCH";
energyCost = 0.5;
};
class CinderTower_SIM_EPOCH : CinderTower_EPOCH
{
allowedSnapPoints[] = {"NF2","SF2","EF2","WF2","CB"};
allowedSnapObjects[] = {"CinderTower_EPOCH","Const_floors_static_F","Constructions_foundation_F"};
};
class CinderTower_Ghost_EPOCH : CinderTower_SIM_EPOCH {};
class WoodLadder_EPOCH : Default
{
removeParts[] = {{"PartPlankPack",2}};

View File

@ -1151,13 +1151,13 @@ class CfgBuildingLootPos
class Land_i_Addon_03_V1_F : Default
{
chairPos[] = {{{2.5,-0.929688,-0.0765305},346.611},{{-2.61914,-1.03125,-0.0765266},17.8128}};
palletPos[] = {{{3.56641,2.50391,-10},344},{{-3.58594,2.75,-10},15}};
palletPos[] = {{{3.56641,2.50391,-0.0765305},344},{{-3.58594,2.75,-0.0765305},15}};
};
class Land_i_Addon_04_V1_F : Default
{
chairPos[] = {{{-3.78711,-1.16211,0.050499},21.1258}};
pelicanPos[] = {{{-2.04883,0.263672,0.0532227},215.663}};
palletPos[] = {{{-0.130859,2.37695,-10},344}};
palletPos[] = {{{-0.130859,2.37695,0.050499},344}};
};
class Land_LightHouse_F : Default
{

View File

@ -49,6 +49,8 @@ class CfgClientFunctions
class makeMarker {};
class removeMarker {};
class unit_onKilledEH {};
class AutoRun_Check {};
class AutoRun {};
};
class building
{
@ -79,7 +81,6 @@ class CfgClientFunctions
class startNPCTraderMenu {};
class NPCTraderMenuFilter {};
class startNpcTrade {};
class tradeFilter {};
class takeCrypto {};
class startBankTransfer {};
class calcDamageCost {};
@ -91,6 +92,7 @@ class CfgClientFunctions
};
class KeyUp {};
class onChar {};
class handleUIActions {};
};
class event_handlers
{
@ -207,6 +209,7 @@ class CfgClientFunctions
class refeshUI {};
class equip {};
class itemTypeSlot {};
class usedItemRepack {};
};
class servicepoint
{

View File

@ -1127,9 +1127,9 @@ class CfgCrafting
class SmeltingTools_EPOCH : Part
{
usedIn[] = {"ItemCopperBar","ItemCopperBar10oz","ItemGoldBar","ItemSilverBar","ItemGoldBar10oz","ItemSilverBar10oz"};
previewPosition[] = {0.802374,1,0.26};
previewScale = 0.19;
previewVector = 3.3;
previewPosition[] = {0.8,1,0.25};
previewScale = 0.6;
previewVector = 1.2;
};
class ItemCables : Item
{

View File

@ -1,16 +0,0 @@
class CfgDynamicSimulation
{
//If this is false none of the below settings matter
enableDynamicSimulationSystem = true;
//Individual toggles for testing
vehicleDynamicSimulationSystem = true; // type car, air, boat
playerDynamicSimulationSystem = true; // clients
baseDynamicSimulationSystem = true; // plot pole and base pieces
// Distances and Coef
groupDynSimDistance = 1600;
vehicleDynSimDistance = 1600;
emptyVehicleDynSimDistance = 1600;
propDynSimDistance = 1600;
};

View File

@ -14,17 +14,22 @@
/*[[[cog from arma_config_tools import *; json_to_arma()]]]*/
class CfgEpochClient
{
epochVersion = "1.0.0";
epochVersion = "1.1.0";
ArmAVersion = 176;
debug = "true"; // true = enable extra rpt debug lines, false to disable
antagonistRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100
NuisanceMulti = 0.5; // Multi for Nuisance increase on shooting - higher Nuisance effect at least antagonist spawn change. (0-1, default 0.5)
outOfBoundsRadiation = 10; // how much rads per tick (10sec), when outside play area.
radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; // used for random radioactive locations and to suppress animal spawns within cities.
radiatedObjMaxFalloutDist = 125; // max distance radiated object can affect player (number in meters)
geigerCounterEnergyUsage = 10; // default loss of 10 energy every 10sec of use
radiationEffectsThreshold = 10; // default level for screen effects to indicate a player's rad dosage (0-100)
baseRadiationLoss = -1; //default radiation loss every 1 minute, calculated from total immunity. No immunity no reduction.
baseRadiationLossImmunityPenalty = -1; //immunity is reduced as a penalty for radiation loss effect
baseHungerLoss = 2; // increase number to speed up rate of Hunger loss
baseThirstLoss = 2; // increase number to speed up rate of Thirst loss
accelerateHTALoss = "true"; // use server's time acceleration to increase the rate of Hunger, Thirst and Alcohol loss
@ -51,6 +56,7 @@ class CfgEpochClient
maxdoors = 10; // Max allowed doors per Group
maxgates = 5; // Max allowed Gates per Group
AtmBlockedAtPlot = "true"; // Block ATM's in Plotpole-Range
disableRemoteSensors = "true"; // disableRemoteSensors true/false
epochMessageBackgroundCol[] = {0,0,0,0.2}; //Epoch_message background color (format: {R,G,B,A})

View File

@ -229,6 +229,13 @@ class CfgItemInteractions
interactReturnOnUse = "jerrycan_epoch";
interactAttributes[] = {10};
};
class lighter_epoch : Default
{
interactAction = 5;
interactText = "Fill";
interactReturnOnUse = "lighter_epoch";
interactAttributes[] = {2};
};
class FAK : Default
{
interactAction = 13;
@ -793,7 +800,6 @@ class CfgItemInteractions
class hatchet_swing : Default {};
class WoodLog_EPOCH : Default {};
class ItemCoolerE : Default {};
class lighter_epoch : Default {};
class Item_AssaultPack_cbr : Item_Packed_base
{
interactReturnOnUse = "B_AssaultPack_cbr";

View File

@ -169,7 +169,44 @@ class CfgItemSort
// Marksman Clothing
"U_O_FullGhillie_lsh",
"U_O_FullGhillie_sard",
"U_O_FullGhillie_ard"
"U_O_FullGhillie_ard",
// CIV
"U_I_OfficerUniform",
"U_I_C_Soldier_Para_1_F",
"U_I_C_Soldier_Para_2_F",
"U_I_C_Soldier_Para_3_F",
"U_I_C_Soldier_Para_4_F",
"U_I_C_Soldier_Para_5_F",
"U_I_C_Soldier_Bandit_1_F",
"U_I_C_Soldier_Bandit_2_F",
"U_I_C_Soldier_Bandit_3_F",
"U_I_C_Soldier_Bandit_4_F",
"U_I_C_Soldier_Bandit_5_F",
"U_I_C_Soldier_Camo_F",
"U_C_man_sport_1_F",
"U_C_man_sport_2_F",
"U_C_man_sport_3_F",
"U_C_Man_casual_1_F",
"U_C_Man_casual_2_F",
"U_C_Man_casual_3_F",
"U_C_Man_casual_4_F",
"U_C_Man_casual_5_F",
"U_C_Man_casual_6_F",
"U_C_IDAP_Man_shorts_F",
"U_C_IDAP_Man_casual_F",
"U_C_IDAP_Man_cargo_F",
"U_C_IDAP_Man_Tee_F",
"U_C_IDAP_Man_Jeans_F",
"U_C_IDAP_Man_TeeShorts_F",
"U_C_ConstructionCoverall_Red_F",
"U_C_ConstructionCoverall_Vrana_F",
"U_C_ConstructionCoverall_Black_F",
"U_C_ConstructionCoverall_Blue_F",
"U_I_CombatUniform_shortsleeve",
"U_I_pilotCoveralls",
"U_I_HeliPilotCoveralls",
"U_I_Wetsuit"
};
Vests[] = {
@ -213,6 +250,9 @@ class CfgItemSort
"V_38_EPOCH",
"V_39_EPOCH",
"V_40_EPOCH",
// CIV
"V_Press_F",
// Vests Apex
"V_PlateCarrier1_tna_F",
@ -220,6 +260,7 @@ class CfgItemSort
"V_TacChestrig_oli_F",
"V_TacChestrig_cbr_F",
"V_PlateCarrierSpec_tna_F",
"V_PlateCarrierSpec_blk",
"V_HarnessO_ghex_F",
"V_HarnessOGL_ghex_F",
"V_PlateCarroer2_tna_F",
@ -384,6 +425,12 @@ class CfgItemSort
"H_102_EPOCH",
"H_103_EPOCH",
"H_104_EPOCH",
"H_F0_EPOCH",
"H_F1_EPOCH",
"H_F2_EPOCH",
"H_F3_EPOCH",
"H_F4_EPOCH",
"H_F5_EPOCH",
"wolf_mask_epoch",
"pkin_mask_epoch",
"clown_mask_epoch",
@ -393,7 +440,9 @@ class CfgItemSort
"skull_mask_epoch",
"witch_mask_epoch",
"radiation_mask_epoch",
"H_Cap_surfer",
"H_ShemagOpen_khk",
// Headgear Apex
"H_HelmetLeaderO_ghex_F",
"H_HelmetCrew_O_ghex_F",
@ -577,6 +626,7 @@ class CfgItemSort
"WoodClub",
"Plunger",
"MeleeSword",
"Power_Sword",
"MeleeRod",
"speargun_epoch",
"ChainSaw"
@ -821,6 +871,7 @@ class CfgItemSort
"optic_DMS_ghex_F",
"acc_flashlight",
"acc_flashlight_pistol",
"acc_pointer_IR",
// Bipods Marksman
@ -909,7 +960,12 @@ class CfgItemSort
"nanite_cream_epoch",
"nanite_gun_epoch",
"nanite_pills_epoch",
"iodide_pills_epoch"
"iodide_pills_epoch",
"ItemWaterPurificationTablets",
"ItemBloodbag_Full",
"ItemBloodbag_Empty",
"ItemAntibiotic"
};
Food[] = {
@ -1081,6 +1137,7 @@ class CfgItemSort
"ItemVehDoc2",
"ItemVehDoc3",
"ItemVehDoc4",
"ItemVehDocRara",
// KryptoItems
"ItemTinBar10oz",
@ -1088,7 +1145,6 @@ class CfgItemSort
"ItemCopperBar10oz",
"ItemSilverBar10oz",
"ItemBriefcaseSilver100oz",
"PartOreGold",
"PartOreSilver",
"PartOre",
@ -1113,7 +1169,6 @@ class CfgItemSort
"ItemSodaEmpty",
"ItemBriefcaseE",
"ItemBriefcaseGold100oz",
"PaintCanClear",
"PaintCanBlk",
"PaintCanBlu",
@ -1128,31 +1183,86 @@ class CfgItemSort
"SeedPacket_Hemp",
"SeedPacket_Poppy",
"SeedPacket_Pumpkin",
"SeedPacket_Sunflower"
"SeedPacket_Sunflower",
"ItemFireExtinguisher"
};
Vehicles_Land[] = {
"ebike_epoch", // Motorrad
"ebike_epoch", // Motorcycle
"C_Offroad_01_EPOCH", // Offroader
"C_Offroad_01_EPOCH1",
"C_Offroad_01_EPOCH2",
"C_Offroad_01_EPOCH3",
"C_Offroad_01_EPOCH4",
"C_Quadbike_01_EPOCH", // Quad
"C_Hatchback_01_EPOCH", // Limousine
"C_Hatchback_02_EPOCH", // Sportlimousine
"C_Hatchback_01_EPOCH", // Hatchback
"C_Hatchback_01_EPOCH1",
"C_Hatchback_01_EPOCH2",
"C_Hatchback_01_EPOCH3",
"C_Hatchback_01_EPOCH4",
"C_Hatchback_02_EPOCH", // Hatchback Sport
"C_Hatchback_02_EPOCH1",
"C_Hatchback_02_EPOCH2",
"C_Hatchback_02_EPOCH3",
"C_Hatchback_02_EPOCH4",
"C_SUV_01_EPOCH", // SUV
"C_Van_01_box_EPOCH", // Truck Boxer
"C_SUV_01_EPOCH1",
"C_SUV_01_EPOCH2",
"C_SUV_01_EPOCH3",
"C_SUV_01_EPOCH4",
"C_Van_01_box_EPOCH", // Truck Box
"C_Van_01_box_EPOCH1",
"C_Van_01_box_EPOCH2",
"C_Van_01_box_EPOCH3",
"C_Van_01_box_EPOCH4",
"C_Van_01_transport_EPOCH", // Truck
"C_Van_01_transport_EPOCH1",
"C_Van_01_transport_EPOCH2",
"C_Van_01_transport_EPOCH3",
"C_Van_01_transport_EPOCH4",
"K01", // Kart
"K02", // Kart Blueking
"K03", // Kart Redstone
"K04", // Kart Vrana
"B_Truck_01_transport_EPOCH", // HEMTT Transport - Personen
"B_Truck_01_covered_EPOCH", // HEMTT Transporter abgedeckt
"B_Truck_01_mover_EPOCH", // HEMTT
"B_Truck_01_box_EPOCH",
"O_Truck_02_covered_EPOCH",
"O_Truck_02_transport_EPOCH",
"O_Truck_03_covered_EPOCH",
"O_Truck_03_transport_F",
"B_Truck_01_transport_EPOCH", // HEMTT Transport
"B_Truck_01_transport_EPOCH1",
"B_Truck_01_transport_EPOCH2",
"B_Truck_01_transport_EPOCH3",
"B_Truck_01_transport_EPOCH4",
"B_Truck_01_covered_EPOCH", // HEMTT Covered
"B_Truck_01_covered_EPOCH1",
"B_Truck_01_covered_EPOCH2",
"B_Truck_01_covered_EPOCH3",
"B_Truck_01_covered_EPOCH4",
"B_Truck_01_mover_EPOCH", // HEMTT Mover
"B_Truck_01_mover_EPOCH1",
"B_Truck_01_mover_EPOCH2",
"B_Truck_01_mover_EPOCH3",
"B_Truck_01_mover_EPOCH4",
"B_Truck_01_box_EPOCH", // HEMTT Box
"B_Truck_01_box_EPOCH1",
"B_Truck_01_box_EPOCH2",
"B_Truck_01_box_EPOCH3",
"B_Truck_01_box_EPOCH4",
"O_Truck_02_covered_EPOCH", // Zamak Covered
"O_Truck_02_covered_EPOCH1",
"O_Truck_02_covered_EPOCH2",
"O_Truck_02_covered_EPOCH3",
"O_Truck_02_covered_EPOCH4",
"O_Truck_02_transport_EPOCH", // Zamak Transport
"O_Truck_02_transport_EPOCH1",
"O_Truck_02_transport_EPOCH2",
"O_Truck_02_transport_EPOCH3",
"O_Truck_02_transport_EPOCH4",
"O_Truck_03_covered_EPOCH", // Tempest Covered
"O_Truck_03_covered_EPOCH1",
"O_Truck_03_covered_EPOCH2",
"O_Truck_03_covered_EPOCH3",
"O_Truck_03_covered_EPOCH4",
"O_Truck_03_transport_EPOCH", // Tempest Transport
"O_Truck_03_transport_EPOCH1",
"O_Truck_03_transport_EPOCH2",
"O_Truck_03_transport_EPOCH3",
"O_Truck_03_transport_EPOCH4",
// Funktions Fahrzeuge |Repair,Heal,Tank|
"C_Offroad_01_repair_F",
@ -1162,7 +1272,11 @@ class CfgItemSort
"B_Truck_01_ammo_F",
"B_Truck_01_fuel_F",
"B_Truck_01_medical_F",
"O_Truck_02_box_EPOCH",
"O_Truck_02_box_EPOCH", // Zamak Box (Medical)
"O_Truck_02_box_EPOCH1",
"O_Truck_02_box_EPOCH2",
"O_Truck_02_box_EPOCH3",
"O_Truck_02_box_EPOCH4",
"O_Truck_02_medical_F",
"O_Truck_02_Ammo_F",
"O_Truck_02_fuel_F",
@ -1174,14 +1288,40 @@ class CfgItemSort
"O_G_Offroad_01_armed_F",
"I_G_Offroad_01_armed_F",
"B_G_Offroad_01_armed_F",
"B_G_Offroad_01_armed_EPOCH",
"B_G_Offroad_01_armed_EPOCH1",
"B_G_Offroad_01_armed_EPOCH2",
"B_G_Offroad_01_armed_EPOCH3",
"B_G_Offroad_01_armed_EPOCH4",
"B_MRAP_01_EPOCH",
"B_MRAP_01_EPOCH1",
"B_MRAP_01_EPOCH2",
"B_MRAP_01_EPOCH3",
"B_MRAP_01_EPOCH4",
"O_MRAP_02_F",
"O_MRAP_02_EPOCH",
"O_MRAP_02_EPOCH1",
"O_MRAP_02_EPOCH2",
"O_MRAP_02_EPOCH3",
"O_MRAP_02_EPOCH4",
"I_MRAP_03_F",
"I_MRAP_03_EPOCH",
"I_MRAP_03_EPOCH1",
"I_MRAP_03_EPOCH2",
"I_MRAP_03_EPOCH3",
"I_MRAP_03_EPOCH4",
"B_MRAP_01_hmg_F",
"O_MRAP_02_hmg_F",
"I_MRAP_03_hmg_F",
// Orange DLC
"I_G_Van_02_transport_F", /* Van Transport (Orange DLC) */
"O_G_Van_02_transport_F", /* Van Transport (Orange DLC) */
"B_G_Van_02_transport_F", /* Van Transport (Orange DLC) */
"I_G_Van_02_vehicle_F", /* Van Transport (Orange DLC) */
"O_G_Van_02_vehicle_F", /* Van Transport (Orange DLC) */
"B_G_Van_02_vehicle_F", /* Van Transport (Orange DLC) */
// Apex
"I_C_Offroad_02_unarmed_F",
"I_C_Offroad_02_unarmed_brown_F",
@ -1239,7 +1379,9 @@ class CfgItemSort
"C_Heli_light_01_furious_F",
"C_Heli_light_01_wave_F",
"C_Heli_light_01_sheriff_F",
"C_Heli_Light_01_civil_EPOCH",
"C_Heli_Light_01_civil_2seat_EPOCH",
"C_Heli_Light_01_civil_4seat_EPOCH",
"O_Heli_Light_02_unarmed_EPOCH",
"I_Heli_light_03_unarmed_EPOCH",
"I_Heli_Transport_02_EPOCH",
@ -1259,12 +1401,15 @@ class CfgItemSort
// Apex
"B_T_VTOL_01_vehicle_blue_F",
"B_T_VTOL_01_vehicle_blue_EPOCH",
"B_T_VTOL_01_infantry_blue_F",
"B_T_VTOL_01_infantry_olive_F",
"B_T_VTOL_01_infantry_olive_EPOCH",
"O_T_VTOL_02_vehicle_grey_F",
"O_T_VTOL_02_vehicle_grey_EPOCH",
"O_T_VTOL_02_vehicle_F",
"O_T_VTOL_02_infantry_F"
"O_T_VTOL_02_infantry_F",
"O_T_VTOL_02_infantry_EPOCH"
};
Vehicles_Ship[] = {

View File

@ -202,4 +202,18 @@ class CfgMarkerSets
{"","ICON","EpochShipwreck","ColorOrange",1,{0.5,0.5}}
};
};
class MoneyDrop {
markerArray[] = {
{"","ICON","EpochCash","ColorGreen",1,{0.9,0.9}},
{"","ICON","","ColorBlack",1,{0.8,0.8}},
{"","ICON","","ColorGreen",0.2,{0.8,0.8}}
};
};
class HeliCrash {
markerArray[] = {
{"","ICON","EpochActive_Circle","ColorOrange",1,{0.6,0.6}},
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.6,0.6}},
{"","ICON","EpochHeli2","ColorOrange",1,{0.5,0.5}}
};
};
};

View File

@ -16,6 +16,10 @@ class CfgMasterLoop
{
condition = "alive player";
file = "epoch_code\compile\setup\masterLoop";
class Event0
{
delay = 0.4;
};
class Event1
{
delay = 1;

View File

@ -15,7 +15,7 @@
class EpochMissionList{
// traderMissionClasses[] = {"missionMonster","missionDelivery","missionEscort","missionUav","missionSapper","missionSkull","missionMilitary","gameCaptureTheJammer","gameCarRace","infoTime","infoName","infoNews","infoVehicles","infoPeople","helpAirDrop","debugResetMission"}; //Exclude from here to remove from menu and trigger
traderMissionClasses[] = {"missionfishing","missionMonster","missionDelivery","missionUav","infoTime","infoName","infoNews","infoVehicles","infoPeople","debugResetMission"}; //Exclude from here to remove from menu and trigger
traderMissionClasses[] = {"missionfishing","missionDelivery","missionUav","infoTime","infoName","infoNews","infoVehicles","infoPeople","debugResetMission"}; //Exclude from here to remove from menu and trigger
traderMissionActiveNames[] = {}; //Not currently used (WIP)
traderMissionLongDesc[] = {}; //Not currently used (WIP)
traderMissionActiveLongDesc[] = {}; //Not currently used (WIP)

View File

@ -69,7 +69,7 @@ class CatchFish {
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 600;
abandonTime = 1200;
failedCondition = "!alive player";
faileddialogues[] = {"I guess you have better things to do. - Mission Failed","Mission Failed - You took to long."};
completeCondition = "{_x in magazines player} count ([""CfgEpochClient"", ""fishLoots"", [""ItemTuna"",""ItemSeaBass"",""ItemSeaBass"",""ItemSeaBass"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout""]] call EPOCH_fnc_returnConfigEntryV2) > 0";

View File

@ -1824,6 +1824,10 @@ class CfgPricing
{
price = 50;
};
class ItemFireExtinguisher
{
price = 50;
}
class WoodLog_EPOCH
{
price = 2;
@ -2673,6 +2677,10 @@ class CfgPricing
{
price = 1111;
};
class Power_Sword
{
price = 1111;
};
class MeleeRod
{
price = 100;
@ -4399,10 +4407,18 @@ class CfgPricing
{
price = 1000;
};
class C_Van_01_box_EPOCH1: C_Van_01_box_EPOCH{};
class C_Van_01_box_EPOCH2: C_Van_01_box_EPOCH{};
class C_Van_01_box_EPOCH3: C_Van_01_box_EPOCH{};
class C_Van_01_box_EPOCH4: C_Van_01_box_EPOCH{};
class C_Van_01_transport_EPOCH
{
price = 1000;
};
class C_Van_01_transport_EPOCH1: C_Van_01_transport_EPOCH{};
class C_Van_01_transport_EPOCH2: C_Van_01_transport_EPOCH{};
class C_Van_01_transport_EPOCH3: C_Van_01_transport_EPOCH{};
class C_Van_01_transport_EPOCH4: C_Van_01_transport_EPOCH{};
class C_Boat_Civil_01_EPOCH
{
price = 750;
@ -4427,10 +4443,26 @@ class CfgPricing
{
price = 2500;
};
class B_MRAP_01_EPOCH1: B_MRAP_01_EPOCH{};
class B_MRAP_01_EPOCH2: B_MRAP_01_EPOCH{};
class B_MRAP_01_EPOCH3: B_MRAP_01_EPOCH{};
class B_MRAP_01_EPOCH4: B_MRAP_01_EPOCH{};
class O_MRAP_02_EPOCH
{
price = 2500;
};
class O_MRAP_02_EPOCH1: O_MRAP_02_EPOCH{};
class O_MRAP_02_EPOCH2: O_MRAP_02_EPOCH{};
class O_MRAP_02_EPOCH3: O_MRAP_02_EPOCH{};
class O_MRAP_02_EPOCH4: O_MRAP_02_EPOCH{};
class I_MRAP_03_EPOCH
{
price = 2500;
};
class I_MRAP_03_EPOCH1: I_MRAP_03_EPOCH{};
class I_MRAP_03_EPOCH2: I_MRAP_03_EPOCH{};
class I_MRAP_03_EPOCH3: I_MRAP_03_EPOCH{};
class I_MRAP_03_EPOCH4: I_MRAP_03_EPOCH{};
class B_G_Offroad_01_armed_EPOCH
{
price = 2500;
@ -4439,38 +4471,78 @@ class CfgPricing
class B_G_Offroad_01_armed_EPOCH2: B_G_Offroad_01_armed_EPOCH{};
class B_G_Offroad_01_armed_EPOCH3: B_G_Offroad_01_armed_EPOCH{};
class B_G_Offroad_01_armed_EPOCH4: B_G_Offroad_01_armed_EPOCH{};
class B_Truck_01_transport_EPOCH
{
price = 1000;
};
class B_Truck_01_covered_EPOCH
{
price = 1000;
};
class B_Truck_01_mover_EPOCH
{
price = 1000;
};
class B_Truck_01_mover_EPOCH1: B_Truck_01_mover_EPOCH {};
class B_Truck_01_mover_EPOCH2: B_Truck_01_mover_EPOCH {};
class B_Truck_01_mover_EPOCH3: B_Truck_01_mover_EPOCH {};
class B_Truck_01_mover_EPOCH4: B_Truck_01_mover_EPOCH {};
class B_Truck_01_transport_EPOCH
{
price = 1000;
};
class B_Truck_01_transport_EPOCH1: B_Truck_01_transport_EPOCH {};
class B_Truck_01_transport_EPOCH2: B_Truck_01_transport_EPOCH {};
class B_Truck_01_transport_EPOCH3: B_Truck_01_transport_EPOCH {};
class B_Truck_01_transport_EPOCH4: B_Truck_01_transport_EPOCH {};
class B_Truck_01_covered_EPOCH
{
price = 1000;
};
class B_Truck_01_covered_EPOCH1: B_Truck_01_covered_EPOCH {};
class B_Truck_01_covered_EPOCH2: B_Truck_01_covered_EPOCH {};
class B_Truck_01_covered_EPOCH3: B_Truck_01_covered_EPOCH {};
class B_Truck_01_covered_EPOCH4: B_Truck_01_covered_EPOCH {};
class B_Truck_01_box_EPOCH
{
price = 1000;
};
class O_Truck_02_covered_EPOCH
{
price = 1000;
};
class B_Truck_01_box_EPOCH1: B_Truck_01_box_EPOCH {};
class B_Truck_01_box_EPOCH2: B_Truck_01_box_EPOCH {};
class B_Truck_01_box_EPOCH3: B_Truck_01_box_EPOCH {};
class B_Truck_01_box_EPOCH4: B_Truck_01_box_EPOCH {};
class O_Truck_02_transport_EPOCH
{
price = 1000;
};
class O_Truck_03_covered_EPOCH
class O_Truck_02_transport_EPOCH1: O_Truck_02_transport_EPOCH {};
class O_Truck_02_transport_EPOCH2: O_Truck_02_transport_EPOCH {};
class O_Truck_02_transport_EPOCH3: O_Truck_02_transport_EPOCH {};
class O_Truck_02_transport_EPOCH4: O_Truck_02_transport_EPOCH {};
class O_Truck_02_covered_EPOCH
{
price = 1000;
};
class O_Truck_02_covered_EPOCH1: O_Truck_02_covered_EPOCH {};
class O_Truck_02_covered_EPOCH2: O_Truck_02_covered_EPOCH {};
class O_Truck_02_covered_EPOCH3: O_Truck_02_covered_EPOCH {};
class O_Truck_02_covered_EPOCH4: O_Truck_02_covered_EPOCH {};
class O_Truck_02_box_EPOCH
{
price = 1000;
};
class O_Truck_02_box_EPOCH1: O_Truck_02_box_EPOCH {};
class O_Truck_02_box_EPOCH2: O_Truck_02_box_EPOCH {};
class O_Truck_02_box_EPOCH3: O_Truck_02_box_EPOCH {};
class O_Truck_02_box_EPOCH4: O_Truck_02_box_EPOCH {};
class O_Truck_03_transport_EPOCH
{
price = 1000;
};
class O_Truck_03_transport_EPOCH1: O_Truck_03_transport_EPOCH {};
class O_Truck_03_transport_EPOCH2: O_Truck_03_transport_EPOCH {};
class O_Truck_03_transport_EPOCH3: O_Truck_03_transport_EPOCH {};
class O_Truck_03_transport_EPOCH4: O_Truck_03_transport_EPOCH {};
class O_Truck_03_covered_EPOCH
{
price = 1000;
};
class O_Truck_03_covered_EPOCH1: O_Truck_03_covered_EPOCH {};
class O_Truck_03_covered_EPOCH2: O_Truck_03_covered_EPOCH {};
class O_Truck_03_covered_EPOCH3: O_Truck_03_covered_EPOCH {};
class O_Truck_03_covered_EPOCH4: O_Truck_03_covered_EPOCH {};
class O_Heli_Light_02_unarmed_EPOCH
{
price = 2500;
@ -4487,6 +4559,8 @@ class CfgPricing
{
price = 2500;
};
class C_Heli_Light_01_civil_2seat_EPOCH: C_Heli_Light_01_civil_EPOCH {};
class C_Heli_Light_01_civil_4seat_EPOCH: C_Heli_Light_01_civil_EPOCH {};
class O_Heli_Transport_04_EPOCH
{
price = 2500;
@ -4775,14 +4849,16 @@ class CfgPricing
{
price = 4400;
};
class B_T_VTOL_01_infantry_F
class B_T_VTOL_01_vehicle_blue_EPOCH
{
price = 10000;
};
class B_T_VTOL_01_vehicle_F
{
class B_T_VTOL_01_infantry_olive_EPOCH: B_T_VTOL_01_vehicle_blue_EPOCH {};
class O_T_VTOL_02_infantry_EPOCH
{
price = 10000;
};
};
class O_T_VTOL_02_vehicle_grey_EPOCH: O_T_VTOL_02_infantry_EPOCH {};
class B_UavTerminal
{
price = 10;

View File

@ -79,6 +79,7 @@ class CfgServicePoint {
{"Ship",0},
{"Landvehicle",0}
};
/* Get all Weapons and Turrets with "magazinesAllTurrets vehicle" -> https://community.bistudio.com/wiki/magazinesAllTurrets */
VehiclesAndAmmo[] = {
/*
{

View File

@ -111,4 +111,53 @@ class CfgVehicleUpgrades
ReqMaterials[] = {{1,"ItemVehDocRara"},{1,"PaintCanBlu"},{1,"PaintCanRed"},{1,"CircuitParts"},{1,"ItemBattery"}};
};
};
/*
############ Examples ############
// Upgrade several M900 into Hummingbird or a Hellcat:
class C_Heli_light_01_red_F // Class to Upgrade ("C_Heli_light_01_red_F")
{
upgradeToVehicle[] = {"B_Heli_Light_01_EPOCH","I_Heli_light_03_unarmed_EPOCH"}; // What Classes can be upgraded to (Hummingbird + Hellcat)
class B_Heli_Light_01_EPOCH // Upgrade to: Hummingbird with "KitVehicleUpgradeII_200_EPOCH"
{
ReqMaterials[] = {{1,"KitVehicleUpgradeII_200_EPOCH"}};
};
class I_Heli_light_03_unarmed_EPOCH // Upgrade to: Hellcat with "KitVehicleUpgradeII_200_EPOCH"
{
ReqMaterials[] = {{1,"KitVehicleUpgradeII_200_EPOCH"}};
};
};
class C_Heli_light_01_blue_F : C_Heli_light_01_red_F {}; // Upgrade "C_Heli_light_01_blue_F" to Hummingbird / Hellcat (same setting as for "C_Heli_light_01_red_F")
class C_Heli_light_01_ion_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_graywatcher_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_wasp_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_digital_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_vrana_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_speedy_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_jeans_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_light_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_shadow_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_furious_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_wave_F : C_Heli_light_01_red_F {};
class C_Heli_light_01_sheriff_F : C_Heli_light_01_red_F {};
// Upgrade Offroader into an Ifrit or several Offroader Armed:
class C_Offroad_01_EPOCH // Class to Upgrade ("C_Offroad_01_EPOCH")
{
upgradeToVehicle[] = {{"O_G_Offroad_01_armed_F","I_G_Offroad_01_armed_F","B_G_Offroad_01_armed_F"},"O_MRAP_02_EPOCH"}; // What Classes can be upgraded to
class O_MRAP_02_EPOCH // Upgrade to: Ifrit with "KitVehicleUpgradeIV_200_EPOCH"
{
ReqMaterials[] = {{1,"KitVehicleUpgradeIV_200_EPOCH"}};
};
class O_G_Offroad_01_armed_F // Upgrade to: "Offroader Armed Brown" with "KitVehicleUpgradeIII_200_EPOCH"
{
ReqMaterials[] = {{1,"KitVehicleUpgradeIII_200_EPOCH"}};
};
class I_G_Offroad_01_armed_F : O_G_Offroad_01_armed_F {}; // Upgrade to: Offroader Armed Green (same needed material then for "O_G_Offroad_01_armed_F")
class B_G_Offroad_01_armed_F : O_G_Offroad_01_armed_F {}; // Upgrade to: Offroader Armed Grey (same needed material then for "O_G_Offroad_01_armed_F")
};
*/
};

View File

@ -88,7 +88,6 @@ showHUD[] =
#include "Configs\CfgSwitchMovehandler.hpp"
#include "Configs\CfgVehicleUpgrades.hpp"
#include "Configs\CfgReadingDocuments.hpp"
#include "Configs\CfgDynamicSimulation.hpp"
#include "Configs\CfgMarkerSets.hpp"
// A3 specific configs

View File

@ -13,13 +13,17 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_VAL","_ammoClass","_ammoObj","_anims","_animsData","_arr","_arrCount","_baseObj","_buildingJammerRange","_cfgBaseBuilding","_cfgEpochClient","_class","_color","_damage","_location","_marker","_maxTTL","_owner","_response","_serverSettingsConfig","_storageSlot","_textureSlot","_ttl","_vehHiveKey","_worldspace"];
private ["_Simulated","_DamageAllowed","_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_VAL","_ammoClass","_ammoObj","_anims","_animsData","_arr","_arrCount","_baseObj","_buildingJammerRange","_cfgBaseBuilding","_cfgEpochClient","_class","_color","_damage","_location","_marker","_maxTTL","_owner","_response","_serverSettingsConfig","_storageSlot","_textureSlot","_ttl","_vehHiveKey","_worldspace"];
//[[[end]]]
_maxTTL = parseNumber EPOCH_expiresBuilding;
_serverSettingsConfig = configFile >> "CfgEpochServer";
_baseDynamicSimulationSystem = [_serverSettingsConfig, "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry;
_UseIndestructible = [_serverSettingsConfig, "UseIndestructible", false] call EPOCH_fnc_returnConfigEntry;
_IndestructibleBaseObjects = [_serverSettingsConfig, "IndestructibleBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_UseDeSimulateObjects = [_serverSettingsConfig, "UseDeSimulateObjects", true] call EPOCH_fnc_returnConfigEntry;
_DeSimulateObjects = [_serverSettingsConfig, "DeSimulateObjects", []] call EPOCH_fnc_returnConfigEntry;
_ExceptedDeSymObjects = [_serverSettingsConfig, "ExceptedDeSymObjects", []] call EPOCH_fnc_returnConfigEntry;
_cfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
_buildingJammerRange = getNumber(_cfgEpochClient >> "buildingJammerRange");
@ -30,6 +34,8 @@ _VAL = ["", [], "", "", 0, []];
for "_i" from 0 to _this do {
_vehHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID),_i];
_response = ["Building", _vehHiveKey] call EPOCH_fnc_server_hiveGETTTL;
_Simulated = true;
_DamageAllowed = true;
if ((_response select 0) == 1 && (_response select 1) isEqualType [] && !((_response select 1) isEqualTo [])) then {
_arr = _response select 1;
@ -81,20 +87,30 @@ for "_i" from 0 to _this do {
_baseObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
if (_UseIndestructible) then {
if ({_baseObj iskindof _x} count _ExceptedBaseObjects == 0) then {
if ({_class iskindof _x} count _ExceptedBaseObjects == 0) then {
{
if (_baseObj iskindof _x) exitwith {
if (_class iskindof _x) exitwith {
_baseObj allowdamage false;
_DamageAllowed = false;
};
} foreach _IndestructibleBaseObjects;
};
};
if (_UseDeSimulateObjects) then {
if ({_class iskindof _x} count _ExceptedDeSymObjects == 0) then {
{
if (_class iskindof _x) exitwith {
_baseObj enablesimulationglobal false;
_Simulated = false;
};
} foreach _DeSimulateObjects;
};
};
_baseObj setposATL _location;
_baseObj setVectorDirAndUp _worldspace;
// new Dynamicsimulation
if(["CfgDynamicSimulation", "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
{
if (_Simulated && _baseDynamicSimulationSystem) then { // Only needed, if simulation is not disabled
// new Dynamicsimulation
_baseObj enableSimulationGlobal false; // turn off sim on server start, let dynSim activate it to true
_baseObj enableDynamicSimulation true;
_baseObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
@ -138,7 +154,9 @@ for "_i" from 0 to _this do {
};
_baseObj setDamage _damage;
_baseObj call EPOCH_server_buildingInit;
if (_DamageAllowed) then { // Only needed, if damage is allowed
_baseObj call EPOCH_server_buildingInit;
};
_baseObj setVariable ["BUILD_SLOT", _i, true];
if (_owner != "-1") then {

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_cfgBaseBuilding","_findnextslot","_newVehicle","_objSlot","_oemType","_playerUID","_serverSettingsConfig","_slot","_staticClass","_staticClassConfig","_storageObj","_vehiclePos"];
private ["_cfgBaseBuilding","_findnextslot","_newVehicle","_objSlot","_oemType","_playerUID","_serverSettingsConfig","_slot","_staticClass","_staticClassConfig","_storageObj","_vehiclePos"];
//[[[end]]]
params ["_vehicle", "_player", ["_token","",[""]] ];
@ -25,10 +25,6 @@ _playerUID = getPlayerUID _player;
if (!isNull ropeAttachedTo _vehicle) exitWith{};
_oemType = typeOf _vehicle;
_serverSettingsConfig = configFile >> "CfgEpochServer";
_UseIndestructible = [_serverSettingsConfig, "UseIndestructible", false] call EPOCH_fnc_returnConfigEntry;
_IndestructibleBaseObjects = [_serverSettingsConfig, "IndestructibleBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
_staticClassConfig = (_cfgBaseBuilding >> _oemType >> "staticClass");
if (isText _staticClassConfig) then {
@ -51,16 +47,6 @@ if (isText _staticClassConfig) then {
EPOCH_activeGardens pushBackUnique _storageObj;
};
if (_UseIndestructible) then {
if ({_storageObj iskindof _x} count _ExceptedBaseObjects == 0) then {
{
if (_storageObj iskindof _x) exitwith {
_storageObj allowdamage false;
};
} foreach _IndestructibleBaseObjects;
};
};
if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{
_storageObj setVariable["EPOCH_Locked", false, true];
};
@ -70,8 +56,9 @@ if (isText _staticClassConfig) then {
_storageObj setVariable["STORAGE_SLOT", _slot, true];
_storageObj call EPOCH_server_save_storage;
_storageObj call EPOCH_server_storageInit;
if (isDamageAllowed _storageObj) then { // Only needed, if damage is allowed
_storageObj call EPOCH_server_storageInit;
};
diag_log format["Epoch: STORAGE: %1 created storage %2 at %3 with slot %4", _playerUID, _staticClass, _vehiclePos, _slot];
};
@ -95,16 +82,6 @@ if (isText _staticClassConfig) then {
if (_objSlot != -1) then {
_newVehicle = [_vehicle, false] call EPOCH_server_simulSwap;
if (_UseIndestructible) then {
if ({_newVehicle iskindof _x} count _ExceptedBaseObjects == 0) then {
{
if (_newVehicle iskindof _x) exitwith {
_newVehicle allowdamage false;
};
} foreach _IndestructibleBaseObjects;
};
};
_newVehicle setVariable["BUILD_OWNER", _playerUID, true];
_newVehicle call EPOCH_saveBuilding;
};

View File

@ -35,12 +35,12 @@ if (_objSlot != -1) then {
_textureSlot = _object getVariable["TEXTURE_SLOT", 0];
_damage = damage _object;
//_worldspace = [getposATL _object,vectordir _object,vectorup _object];
//_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
_newObj = [_class,_object] call EPOCH_swapBuilding;
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
_newObj call EPOCH_server_buildingInit;
if (isDamageAllowed _newObj) then { // Only needed, if damage is allowed
_newObj call EPOCH_server_buildingInit;
};
if (_textureSlot != 0) then {
// get texture path from index

View File

@ -29,7 +29,9 @@ if (_objSlot != -1) then {
_class = _upgrade select 0;
_newObj = [_class,_object] call EPOCH_swapBuilding;
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
_newObj call EPOCH_server_buildingInit;
if (isDamageAllowed _newObj) then { // Only needed, if damage is allowed
_newObj call EPOCH_server_buildingInit;
};
_newObj call EPOCH_saveBuilding;
};
} else {

View File

@ -1,6 +1,6 @@
// _newObj = [_class,_object] call EPOCH_swapBuilding;
//[[[cog import generate_private_arrays ]]]
private ["_newObj","_objectPos","_playersNear"];
private ["_newObj","_objectPos"];
//[[[end]]]
params [["_class",""],["_object",objNull],["_method",0]];
_newObj = objNull;
@ -9,14 +9,6 @@ if (!isNull _object && !(_class isEqualTo "")) then {
_newObj = createVehicle [_class, ASLtoAGL _objectPos, [], 0, "CAN_COLLIDE"];
if (!isNull _newObj) then {
_object hideObjectGlobal true;
// new Dynamicsimulation
if(["CfgDynamicSimulation", "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
{
_newObj enableDynamicSimulation true;
_newObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
};
switch (_method) do {
case 0: {
_newObj setposATL (getPosATL _object);
@ -36,10 +28,25 @@ if (!isNull _object && !(_class isEqualTo "")) then {
};
deleteVehicle _object;
// force nearby players to reveal new object faster
_playersNear = _newObj nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 300];
[_newObj, {player reveal _this}] remoteExec ["call", _playersNear];
_serverSettingsConfig = configFile >> "CfgEpochServer";
_UseIndestructible = [_serverSettingsConfig, "UseIndestructible", false] call EPOCH_fnc_returnConfigEntry;
_IndestructibleBaseObjects = [_serverSettingsConfig, "IndestructibleBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
if (_UseIndestructible) then {
if ({_class iskindof _x} count _ExceptedBaseObjects == 0) then {
{
if (_class iskindof _x) exitwith {
_newObj allowdamage false;
};
} foreach _IndestructibleBaseObjects;
};
};
// new Dynamicsimulation
if([configFile >> "CfgEpochServer", "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry)then
{
_newObj enableDynamicSimulation true;
_newObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
};
};
};
_newObj

View File

@ -41,8 +41,8 @@ if (alive _object) then {
if (isClass _config) then {
if (random 1 < getNumber(_config >> "chance")) then {
[_item, _payout] call EPOCH_serverLootObject;
_errorMsg = "You found something!";
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
// force player to open gear on this object.
[_item, {player action["Gear", _this]}] remoteExec ["call", _player];
};
};

View File

@ -38,7 +38,7 @@ if !(isNull _object) then {
};
[_item, _class, true] call EPOCH_serverLootObject;
_errorMsg = "You found something!";
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
// force player to open gear on this object.
[_item, {player action["Gear", _this]}] remoteExec ["call", _player];
};
true

View File

@ -47,12 +47,14 @@ if !(_object in EPOCH_cleanupQueue) then {
};
[_object, _type] call EPOCH_serverLootObject;
_errorMsg = "You found something!";
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
// force player to open gear on this object.
if !(_type isequalto "Cargo_Container") then {
[_object, {player action["Gear", _this]}] remoteExec ["call", _player];
};
} else {
[_object, "Food"] call EPOCH_serverLootObject;
_errorMsg = "You found Food!";
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
// force player to open gear on this object.
[_object, {player action["Gear", _this]}] remoteExec ["call", _player];
};
};

View File

@ -13,29 +13,43 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_worldSize","_shipwrecks","_total","_count","_distFromOthers","_tooClose","_spawnedLoot","_wreck","_item","_markers"];
private ["_cfgEpoch", "_debug", "_worldSize", "_shipwrecks", "_customLocs", "_customWrecks", "_totalCustomLocs", "_customWreck", "_total", "_count", "_distFromOthers", "_spawnedLoot","_tooClose", "_wreck", "_position", "_item", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_rEvents", "_thisEvent"];
//[[[end]]]
_cfgEpoch = configFile >> "CfgEpoch" >> worldname;
_debug = if(getNumber(_cfgEpoch >> "debugShipwreckLoot") isEqualTo 1)then{true}else{false};
// Check for shipwreck loot allowed
if (getNumber(_cfgEpoch >> "shipwreckLootEnabled") isEqualTo 1) then {
// Check for total shipwrecks allowed
_total = getNumber(_cfgEpoch >> "maxSpawnedShipwrecks");
if(_total isEqualTo 0)exitWith{if(_debug)then{diag_log "EPOCHDebug: no shipwrecks allowed"}};
// Load shipwrecks and custom locations
_worldSize = worldSize/2;
_shipwrecks = nearestTerrainObjects [ [_worldSize, _worldSize], ["SHIPWRECK"], _worldSize];
_total = getNumber(_cfgEpoch >> "maxSpawnedShipwrecks");
if(_shipwrecks isEqualTo [])exitWith{diag_log "EPOCHDebug: no shipwrecks found"};
if(_total isEqualTo 0)exitWith{diag_log "EPOCHDebug: no shipwrecks allowed"};
_customLocs = getArray(_cfgEpoch >> "shipwreckCustomLocs");
_customWrecks = getArray(_cfgEpoch >> "shipwreckCustomWrecks");
_totalCustomLocs = count(_customLocs);
if(_totalCustomLocs > 0)then{
for "_c" from 0 to _totalCustomLocs-1 do {
_customWreck = (selectRandom _customWrecks) createVehicle (_customLocs select _c);
_shipwrecks pushBack _customWreck;
};
};
if(_shipwrecks isEqualTo [])exitWith{if(_debug)then{diag_log "EPOCHDebug: no shipwrecks found"}};
// Check combined array count
_count = count(_shipwrecks);
if(_count < _total)then{diag_log "EPOCHDebug: not enough shipwrecks to fill your needs on this map, trying all available locations!"};
if(_count < _total)then{if(_debug)then{diag_log "EPOCHDebug: not enough shipwrecks to fill your needs on this map, trying all available locations!"}};
// Start spawning loot
_distFromOthers = getNumber(_cfgEpoch >> "distFromOtherShipwrecks");
_spawnedLoot = [];
for "_i" from 1 to _total do {
if(_shipwrecks isEqualTo [])exitWith{diag_log "EPOCHDebug: no more shipwrecks found"};
if(_shipwrecks isEqualTo [])exitWith{if(_debug)then{diag_log "EPOCHDebug: no more shipwrecks found"}};
_tooClose = false;
_wreck = selectRandom _shipwrecks;
if(isNil "_wreck")exitWith{};
{
if(!(_spawnedLoot isEqualTo []) && ((_wreck distance _x) < _distFromOthers))exitWith{
diag_log "EPOCHDebug: Shipwreck too close to another shipwreck";
if(_debug)then{diag_log "EPOCHDebug: Shipwreck too close to another shipwreck"};
_tooClose = true;
_i = (_i - 1);
};
@ -46,12 +60,39 @@ if (getNumber(_cfgEpoch >> "shipwreckLootEnabled") isEqualTo 1) then {
_position = [_wreck,1,20,3,1,20,0] call BIS_fnc_findSafePos;
_item = createVehicle["container_epoch",_position, [], 0, "NONE"];
_spawnedLoot pushback _wreck;
_item setMass 220;
if (EPOCH_SHOW_BOATLOOT) then {
_markers = ["Shipwreck",_wreck] call EPOCH_server_createGlobalMarkerSet;
if(_debug)then{
_debugMkr = createMarker [str(_position),_position];
_debugMkr setMarkerShape "ICON";
_debugMkr setMarkerType "mil_dot";
_debugMkr setMarkerColor "ColorRed";
};
_item setMass 220;
_item setVariable["EPOCH_Loot",false,true];
// SET UP THE MARKER.
_markers = [];
_originalColors = [];
_showMarkers = if(getNumber(_cfgEpoch >> "showBoatLootMarkers") isEqualTo 1)then{true}else{false};
_decayMarkerColor = getText(_cfgEpoch >> "shipwreckDecayMarkerColor");
_compromisedColor = getText(_cfgEpoch >> "shipwreckCompromisedColor");
if (_showMarkers) then{
_markers = ["Shipwreck",_position] call EPOCH_server_createGlobalMarkerSet;
{
_originalColors pushBack (getMarkerColor _x);
}forEach _markers;
// Check for HeightenedPlayerVsPlayer false and remove comprimised coloring
if!(getNumber(_cfgEpoch >> "HeightenedPlayerVsPlayer") isEqualTo 1)then{
_compromisedColor = getMarkerColor (_markers select 0);
};
};
_rEvents = missionNameSpace getVariable["EPOCH_RunningEvents",[]];
_thisEvent = [_position, [_item], [], "shipwreckCounter", diag_tickTime, 99999, _showMarkers, _markers, _originalColors, _decayMarkerColor, _compromisedColor];
missionNameSpace setVariable["EPOCH_RunningEvents",_rEvents + [_thisEvent]];
};
};
diag_log format["EPOCHDebug: Safely spawned %1 loot container(s) at these shipwreck locations:%2",count _spawnedLoot , _spawnedLoot];
};
if(_debug)then{
diag_log format["EPOCHDebug: Safely spawned %1 loot container(s) at these shipwreck locations:%2",count _spawnedLoot , _spawnedLoot];
};
};

View File

@ -369,7 +369,7 @@ if (!isNull _player) then {
// [] remoteExec ["bis_fnc_reviveInit",_player];
// new Dynamicsimulation
if(["CfgDynamicSimulation", "playerDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
if([configFile >> "CfgEpochServer", "playerDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry)then
{
_newPlyr enableDynamicSimulation true;
_newPlyr triggerDynamicSimulation true;

View File

@ -102,7 +102,7 @@ if (!local _player) then {
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
// new Dynamicsimulation
if(["CfgDynamicSimulation", "playerDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
if([configFile >> "CfgEpochServer", "playerDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry)then
{
_newPlyr enableDynamicSimulation true;
_newPlyr triggerDynamicSimulation true;
@ -116,6 +116,7 @@ if (!local _player) then {
_newPlyr setVariable ["PUID", _playerUID];
_newPlyr setVariable ["GROUP", _playerGroup];
_newPlyr setVariable ["REVIVE", false];
_newPlyr setVariable ["SERVER_VARS",_player getVariable ["SERVER_VARS",[]]];
// _player playActionNow "Die";

View File

@ -81,30 +81,32 @@ if !(_debugBox isEqualTo "") then {
// spawn area props
{
_class = _x select 0;
_pos = _x select 1;
_dir = _x select 2;
_deSimulate = _class isKindOf "ThingX";
if (count _x >= 4) then {
_deSimulate = (_x select 3) isEqualTo "true";
};
_x params [
["_class",""],
["_pos",[0,0,0]],
["_dir",0],
["_disableSim","true"],
["_dynSim","false"],
["_allowDmg","false"],
["_dmg",0]
];
_ep = createVehicle[_class, _pos, [], 0, "CAN_COLLIDE"];
_ep allowDamage false;
_ep setposATL _pos;
if (_dir isEqualType []) then{
_ep setposATL _pos;
_ep setVectorDirAndUp _dir;
} else {
_ep setposATL _pos;
_ep setDir _dir;
};
if (_deSimulate) then{
_deSimulate = _class isKindOf "ThingX";
if((_deSimulate) || (_disableSim isEqualTo "true"))then{
_ep enableSimulationGlobal false;
};
if([configFile >> "CfgEpochServer", "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry) then {
_ep enableDynamicSimulation (_dynSim isEqualTo "true");
};
_ep allowDamage (_allowDmg isEqualTo "true");
_ep setDamage (_dmg min 0.75);
} forEach(getArray(_configWorld >> "propsPos"));
{

View File

@ -0,0 +1,55 @@
/*
EPOCH_server_isNearChecks
Author: DirtySanchez
Description:
Checks the position provided against distances configured for Traders, Jammers and Players.
_position - position on map
_traderCheck - BOOL - check _position distance near ProtectionZone_Invisible_F
_jammerCheck - BOOL - check _position distance near PlotPole_EPOCH
_playerCheck - BOOL - check _position distance near other Players
_others - ARRAY - positions to check with _distFromOthers
_distFromOthers - NUMBER - How far away from _others array in meters
*/
params [ ["_position",[]], ["_traderCheck",true], ["_jammerCheck",true], ["_playerCheck",true], ["_others",[[0,0,0]]], ["_distFromOthers",2000] ];
_distFromTraders = getNumber(_cfgEpoch >> "spawnDistanceFromTraders");
_distFromJammers = getNumber(_cfgEpoch >> "spawnDistanceFromJammers");
_distFromPlayers = getNumber(_cfgEpoch >> "spawnDistanceFromPlayers");
_return = true;
//CHECK FOR PROTECTED AREA WITIN CONFIG RANGE
if(_traderCheck)then{
_restricted = nearestObjects [_position, ["ProtectionZone_Invisible_F"], _distFromTraders];
if(count _restricted > 0) then {
_return = false;
};
};
//CHECK FOR JAMMERS IN THE AREA WITHIN CONFIG RANGE
if(_jammerCheck)then{
_jammers = nearestObjects[_position, ["PlotPole_EPOCH"], _distFromJammers];
if(count _jammers > 0) then {
_return = false;
};
};
//CHECK TO SEE IF PLAYERS WITHIN CONFIG RANGE
if(_playerCheck)then{
_playersNearby = _position nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _distFromPlayers];
if(count _playersNearby > 0) then {
_return = false;
};
};
//CHECK FOR OTHERS
if!(_others isEqualTo [[0,0,0]])then{
{
if!(_x distance _position > _distFromOthers)then{
_return = false;
};
}forEach _others;
};
_return

View File

@ -29,6 +29,7 @@ if (!isNull _trader) then {
[_player, "UAV"] call EPOCH_server_triggerEvent;
_objHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _slot];
["AI", _objHiveKey] call EPOCH_fnc_server_hiveDEL;
["AI_ITEMS", _objHiveKey] call EPOCH_fnc_server_hiveDEL;
};
// send karma stat to seller
_kIndex = EPOCH_communityStats find "Karma";

View File

@ -13,7 +13,10 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_agent","_aiTables","_arr","_class","_config","_currentStock","_existingStock","_home","_indexStock","_limit","_markers","_objHiveKey","_pos","_randomAIUniform","_response","_schedule","_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_toBeRemoved","_traderSlotIndex","_work"];
private [ "_TraderGodMode","_StaticTraderItemPurge","_DynamicTraderRespawnCount","_TraderItemsDeleteRestart","_TraderInit","_TraderItemsClean","_newstock","_agent","_aiTables",
"_arr","_config","_currentStock","_existingStock","_indexStock","_limit","_markers","_objHiveKey","_pos","_randomAIUniform","_response","_response2","_schedule",
"_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_traderSlotIndex","_work","_arrchanged","_deleteat"
];
//[[[end]]]
params [["_maxTraderLimit",0]];
@ -23,208 +26,186 @@ _config = (configFile >> "CfgEpoch" >> worldName);
_staticTradersArray append getArray(_config >> "staticNpcPos");
_staticTradersArrCount = count _staticTradersArray;
_aiTables = getArray(_config >> "traderUniforms");
_serverSettingsConfig = configFile >> "CfgEpochServer";
_TraderGodMode = [_serverSettingsConfig, "TraderGodMode", false] call EPOCH_fnc_returnConfigEntry;
_storedVehicleLimit = [_serverSettingsConfig, "storedVehicleLimit", 20] call EPOCH_fnc_returnConfigEntry;
_StaticTraderItemPurge = [_serverSettingsConfig, "StaticTraderItemPurge", []] call EPOCH_fnc_returnConfigEntry;
_DynamicTraderRespawnCount = [_serverSettingsConfig, "DynamicTraderRespawnCount", 150] call EPOCH_fnc_returnConfigEntry;
_TraderItemCountPerItem = [_serverSettingsConfig, "TraderItemCountPerItem", [100,100]] call EPOCH_fnc_returnConfigEntry;
_TraderItemsDeleteRestart = [_serverSettingsConfig, "TraderItemsDeleteRestart", []] call EPOCH_fnc_returnConfigEntry;
_TraderInit = {
addToRemainsCollector[_this];
_this allowdamage !_TraderGodMode;
_this addUniform _randomAIUniform;
_this setDir _dir;
_this setVariable ["AI_SLOT", _i, true];
_this setVariable ["AI_ITEMS", _arr, true];
_this disableAI "FSM";
_this setBehaviour "CARELESS";
_this setCombatMode "RED";
_this setSkill 0;
_this addEventHandler ["Killed", { _this call EPOCH_server_traderKilled; }];
};
_TraderItemsClean = {
private ["_idx","_delete","_k"];
_idx = 0;
for "_k" from 1 to (count (_arr select 0)) do {
_delete = false;
_item = _arr select 0 select _idx;
_limit = ["CfgTraderLimits", _item, 100] call EPOCH_fnc_returnConfigEntryV2;
_currentStock = (_arr select 1) param[_idx, 0];
if (_currentStock >= (_TraderItemCountPerItem select 0)) then {
_currentStock = _TraderItemCountPerItem select 1;
(_arr select 1) set [_idx,_currentStock];
_arrchanged = true;
};
if (_limit == 0 || _currentStock == 0) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Removed %2 from Trader | _limit: %3 | _currentStock: %4",_i,str _item, _limit,_currentStock];
_arrchanged = true;
_delete = true;
}
else {
if (_item in _TraderItemsDeleteRestart) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Removed %2 from Trader (Items to remove on Restart)",_i,str _item];
_arrchanged = true;
_delete = true;
}
else {
if (_currentStock > _limit) then {
_arrchanged = true;
(_arr select 1) set [_idx,_limit];
_currentStock = _limit;
};
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") then {
_newstock = 0;
for "_k" from 1 to _currentStock do {
if (EPOCH_storedVehicleCount < _storedVehicleLimit) then {
_newstock = _newstock + 1;
EPOCH_storedVehicleCount = EPOCH_storedVehicleCount + 1;
if !(_item in EPOCH_traderStoredVehicles) then {
EPOCH_traderStoredVehicles pushBack _item;
EPOCH_traderStoredVehiclesCnt pushBack 1;
}
else {
_indexStock = EPOCH_traderStoredVehicles find _item;
if (_indexStock != -1) then {
_existingStock = EPOCH_traderStoredVehiclesCnt select _indexStock;
EPOCH_traderStoredVehiclesCnt set [_indexStock, (_existingStock + 1)];
};
};
};
};
if !(_newstock == _currentStock) then {
_arrchanged = true;
if (_newstock > 0) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Changed stock of %2 from Trader | _currentStock: %3 | _newstock: %4 | EPOCH_storedVehicleCount: %5 | _storedVehicleLimit: %6",_i,str _item,_currentStock,_newstock,EPOCH_storedVehicleCount,_storedVehicleLimit];
(_arr select 1) set [_idx,_newstock];
}
else {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Removed %2 from Trader | EPOCH_storedVehicleCount: %3 | _storedVehicleLimit: %4",_i,str _item,EPOCH_storedVehicleCount,_storedVehicleLimit];
_delete = true;
};
};
};
};
};
if (_delete) then {
(_arr select 0) deleteat _idx;
(_arr select 1) deleteat _idx;
}
else {
_idx = _idx + 1;
};
};
};
EPOCH_storedVehicleCount = 0;
for "_i" from 0 to (_maxTraderLimit-1) do {
_traderSlotIndex = EPOCH_TraderSlots pushBack _i;
_randomAIUniform = selectRandom _aiTables;
_arr = [[], []];
_arrchanged = false;
_objHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _i];
_response = ["AI_ITEMS", _objHiveKey] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_arr = (_response select 1);
if (_arr isEqualTo []) then {
_arr = [[], []];
};
};
if (_arr isEqualTo [[], []]) then{
_arr = EPOCH_starterTraderItems;
_arrchanged = true;
};
call _TraderItemsClean;
// Spawn static traders first
if (_staticTradersArrCount > 0 && _i < _staticTradersArrCount) then {
_staticTrader = _staticTradersArray select _i;
_staticTrader params ["_class","_pos","_dir"];
_agent = createAgent [_class, _pos, [], 0, "CAN_COLLIDE"];
_randomAIUniform = selectRandom _aiTables;
_agent addUniform _randomAIUniform;
_agent setDir _dir;
_agent setPosATL _pos;
_agent setVariable ["AI_SLOT", _i, true];
_agent disableAI "FSM";
_agent setBehaviour "CARELESS";
_agent setCombatMode "RED";
_agent setSkill 0;
_agent addEventHandler ["Killed", { _this call EPOCH_server_traderKilled; }];
_arr = [[], []];
_objHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _i];
_response = ["AI_ITEMS", _objHiveKey] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_arr = (_response select 1);
if (_arr isEqualTo []) then {
_arr = [[], []];
if (count (_arr select 0) > (_StaticTraderItemPurge select 0)) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Cleaning %2 Items from Trader | before: %3",_i,((count (_arr select 0))*(_StaticTraderItemPurge select 1)/100), count (_arr select 0)];
_arrchanged = true;
for "_j" from 1 to ((count (_arr select 0))*(_StaticTraderItemPurge select 1)/100) do {
_deleteat = (round random (count (_arr select 0)-1));
(_arr select 0) deleteAt _deleteat;
(_arr select 1) deleteAt _deleteat;
};
_toBeRemoved = [];
// count vehicles
{
_limit = ["CfgTraderLimits", _x, 100] call EPOCH_fnc_returnConfigEntryV2;
_currentStock = (_arr select 1) param[_forEachIndex, 0];
if (_limit == 0) then {
// mark for removal since limit is 0
_toBeRemoved pushBack _forEachIndex;
_currentStock = 0;
} else {
// lower to limit current qty is over limit
if (_currentStock > _limit) then {
(_arr select 1) set [_forEachIndex,_limit];
_currentStock = _limit;
};
};
if (_x isKindOf "Air" || _x isKindOf "Ship" || _x isKindOf "LandVehicle" || _x isKindOf "Tank") then {
if (EPOCH_storedVehicleCount <= _storedVehicleLimit) then {
EPOCH_storedVehicleCount = EPOCH_storedVehicleCount + _currentStock;
// Count how many of this vehicle are in stock at any trader.
if !(_x in EPOCH_traderStoredVehicles) then {
EPOCH_traderStoredVehicles pushBack _x;
EPOCH_traderStoredVehiclesCnt pushBack _currentStock;
} else {
_indexStock = EPOCH_traderStoredVehicles find _x;
if (_indexStock != -1) then {
_existingStock = EPOCH_traderStoredVehiclesCnt select _indexStock;
EPOCH_traderStoredVehiclesCnt set [_indexStock, (_existingStock + _currentStock)];
};
};
} else {
_toBeRemoved pushBack _forEachIndex;
};
};
} forEach (_arr select 0);
// remove any marked for removal
{
(_arr select 0) deleteAt _x;
(_arr select 1) deleteAt _x
} forEach _toBeRemoved;
};
if (_arr isEqualTo [[], []]) then{
_arr = EPOCH_starterTraderItems;
EPOCH_TraderSlots deleteAt _traderSlotIndex;
_agent = createAgent [_class, _pos, [], 0, "CAN_COLLIDE"];
_agent call _TraderInit;
_agent setPosATL _pos;
if (_arrchanged) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Saved",_i];
["AI_ITEMS", _objHiveKey, EPOCH_expiresAIdata, _arr] call EPOCH_fnc_server_hiveSETEX;
};
_agent setVariable ["AI_ITEMS", _arr, true];
EPOCH_TraderSlots deleteAt _traderSlotIndex;
if (EPOCH_SHOW_TRADERS) then {
_markers = ["StaticTrader",_pos] call EPOCH_server_createGlobalMarkerSet;
_agent setVariable["MARKER_REF", _markers];
};
} else {
}
else {
// Spawn dynamic traders
_objHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _i];
_response = ["AI", _objHiveKey] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType [] && !((_response select 1) isEqualTo [])) then {
_arr = (_response select 1);
_class = _arr select 0; //"C_man_1"
_home = _arr select 1;
_work = _arr select 2;
_response2 = ["AI", _objHiveKey] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response2 select 0) == 1 && (_response2 select 1) isEqualType [] && !((_response2 select 1) isEqualTo [])) then {
(_response2 select 1) params ["_class","_home","_work"];
if (_home isEqualType [] && _work isEqualType []) then {
// check schedule
_pos = _home;
_schedule = [9, 17];
if ((_work select 1) isEqualType []) then {
_schedule = _work select 1;
}
else {
diag_log format ["DEBUG INVAILD SCHEDULE: SLOT: %1 CLASS: %2 POS: %3 WORK: %4", _i, _class, _pos, _work];
// diag_log format ["DEBUG INVAILD SCHEDULE: SLOT: %1 CLASS: %2 POS: %3 WORK: %4", _i, _class, _pos, _work];
};
if (daytime > (_schedule select 0) && daytime < (_schedule select 1)) then {
_pos = (_work select 0);
};
_agent = createAgent [_class, _pos, [], 0, "NONE"];
addToRemainsCollector[_agent];
_randomAIUniform = selectRandom _aiTables;
_agent addUniform _randomAIUniform;
// _agent enableSimulationGlobal false;
_agent setPos _pos;
_agent addEventHandler ["Killed", { _this call EPOCH_server_traderKilled; }];
if !(EPOCH_forceStaticTraders) then {
[_agent, _home, _work] execFSM "\epoch_server\system\Trader_brain.fsm";
};
_agent setVariable ["AI_SLOT", _i, true];
_arr = [[],[]];
_objHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _i];
_response = ["AI_ITEMS", _objHiveKey] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_arr = (_response select 1);
if (_arr isEqualTo []) then {
_arr = [[], []];
};
_toBeRemoved = [];
// count vehicles
{
_limit = ["CfgTraderLimits", _x, 100] call EPOCH_fnc_returnConfigEntryV2;
_currentStock = (_arr select 1) param[_forEachIndex, 0];
if (_limit == 0) then {
// mark for removal since limit is 0
_toBeRemoved pushBack _forEachIndex;
_currentStock = 0;
} else {
// lower to limit current qty is over limit
if (_currentStock > _limit) then {
(_arr select 1) set [_forEachIndex,_limit];
_currentStock = _limit;
};
};
if (_x isKindOf "Air" || _x isKindOf "Ship" || _x isKindOf "LandVehicle" || _x isKindOf "Tank") then {
if (EPOCH_storedVehicleCount <= _storedVehicleLimit) then {
EPOCH_storedVehicleCount = EPOCH_storedVehicleCount + _currentStock;
// Count how many of this vehicle are in stock at any trader.
if !(_x in EPOCH_traderStoredVehicles) then {
EPOCH_traderStoredVehicles pushBack _x;
EPOCH_traderStoredVehiclesCnt pushBack _currentStock;
} else {
_indexStock = EPOCH_traderStoredVehicles find _x;
if (_indexStock != -1) then {
_existingStock = EPOCH_traderStoredVehiclesCnt select _indexStock;
EPOCH_traderStoredVehiclesCnt set [_indexStock, (_existingStock + _currentStock)];
};
};
} else {
_toBeRemoved pushBack _forEachIndex;
};
};
} forEach (_arr select 0);
// remove any marked for removal
{
(_arr select 0) deleteAt _x;
(_arr select 1) deleteAt _x
} forEach _toBeRemoved;
if (_arr isEqualTo [[], []]) then{
_arr = EPOCH_starterTraderItems;
if !(count (_arr select 0) >= _DynamicTraderRespawnCount) then {
EPOCH_TraderSlots deleteAt _traderSlotIndex;
_agent = createAgent [_class, _pos, [], 0, "NONE"];
_dir = random 360;
_agent call _TraderInit;
if (_arrchanged) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Saved",_i];
["AI_ITEMS", _objHiveKey, EPOCH_expiresAIdata, _arr] call EPOCH_fnc_server_hiveSETEX;
};
};
_agent setVariable ["AI_ITEMS", _arr, true];
EPOCH_TraderSlots deleteAt _traderSlotIndex;
if (EPOCH_SHOW_TRADERS) then {
_markers = ["DynamicTrader",_pos] call EPOCH_server_createGlobalMarkerSet;
_agent setVariable["MARKER_REF", _markers];
if !(EPOCH_forceStaticTraders) then {
[_agent, _home, _work] execFSM "\epoch_server\system\Trader_brain.fsm";
};
if (EPOCH_SHOW_TRADERS) then {
_markers = ["DynamicTrader",_pos] call EPOCH_server_createGlobalMarkerSet;
_agent setVariable["MARKER_REF", _markers];
};
}
else {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Supressed Trader Load - Too much items (%2) and will respawn",_i,count (_arr select 0)];
["AI", _objHiveKey] call EPOCH_fnc_server_hiveDEL;
["AI_ITEMS", _objHiveKey] call EPOCH_fnc_server_hiveDEL;
};
};
};

View File

@ -13,8 +13,10 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_acceptableBlds","_agent","_aiClass","_aiTables","_buildingHome","_buildingWork","_buildings","_checkBuilding","_config","_endTime","_home","_homes","_markers","_objHiveKey","_pos","_position","_randomAIUniform","_return","_schedule","_slot","_spawnCount","_startTime","_traderHomes","_usedBuildings","_work"];
private ["_serverSettingsConfig","_acceptableBlds","_agent","_aiClass","_aiTables","_buildingHome","_buildingWork","_buildings","_checkBuilding","_config","_endTime","_home","_homes","_markers","_objHiveKey","_pos","_position","_randomAIUniform","_return","_schedule","_slot","_spawnCount","_startTime","_traderHomes","_usedBuildings","_work"];
//[[[end]]]
_serverSettingsConfig = configFile >> "CfgEpochServer";
_TraderGodMode = [_serverSettingsConfig, "TraderGodMode", false] call EPOCH_fnc_returnConfigEntry;
_spawnCount = count EPOCH_TraderSlots;
_config = (configFile >> "CfgEpoch" >> worldName);
_aiTables = getArray(_config >> "traderUniforms");
@ -55,6 +57,7 @@ for "_i" from 1 to _spawnCount do {
};
_agent = createAgent[_aiClass, _pos, [], 0, "CAN_COLLIDE"];
addToRemainsCollector[_agent];
_agent allowdamage !_TraderGodMode;
_agent addUniform _randomAIUniform;
_slot = EPOCH_TraderSlots deleteAt 0;
_agent setVariable["AI_SLOT", _slot, true];

View File

@ -1,7 +1,7 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Contributors: He-Man - Ignatz-Gaming
Description:
NPC trade mech
@ -12,13 +12,18 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_MaxBankDebit","_SkipOut","_VAL","_aiItems","_bankBalance","_bankData","_cIndex","_config","_currQty","_current_crypto","_current_cryptoRaw","_errorMsg","_final_location","_foundSmoke","_group","_helipad","_helipads","_item","_itemClasses","_itemQty","_itemQtys","_itemTax","_itemWorth","_itemsIn","_itemsOut","_lockOwner","_makeTradeIn","_message","_nearByHolder","_objHiveKey","_objOwner","_playerCryptoLimit","_playerGroup","_playerNetID","_playerUID","_position","_qtyIndex","_response","_return","_returnIn","_returnOut","_road","_serverSettingsConfig","_slot","_smoke","_tax","_tmpposition","_tradeIn","_tradeOut","_tradeQtyTotal","_tradeTotal","_vars","_vehHiveKey","_vehObj","_vehSlot","_vehicle","_vehicleBought","_vehicleSold","_vehicles","_vehslot","_wH","_wHPos","_wp","_kIndex","_playerCStats","_playerKarma","_playerKarmaAdj"];
//[[[end]]]
private [ "_MaxBankDebit","_SkipOut","_VAL","_aiItems","_bankBalance","_bankData","_cIndex","_config","_currQty","_current_crypto","_current_cryptoRaw","_errorMsg","_final_location","_foundSmoke",
"_group","_helipad","_helipads","_item","_itemClasses","_itemQty","_itemQtys","_itemTax","_itemWorth","_itemsIn","_itemsOut","_lockOwner","_makeTradeIn","_message","_nearByHolder",
"_objHiveKey","_objOwner","_playerCryptoLimit","_playerGroup","_playerNetID","_playerUID","_position","_qtyIndex","_response","_return","_returnIn","_returnOut","_road",
"_serverSettingsConfig","_slot","_smoke","_tax","_tmpposition","_tradeIn","_tradeOut","_tradeQtyTotal","_tradeTotal","_vars","_vehHiveKey","_vehObj","_vehSlot","_vehicle","_vehicleBought",
"_vehicleSold","_vehicles","_vehslot","_wH","_wHPos","_wp","_kIndex","_playerCStats","_playerKarma","_playerKarmaAdj"
];
params ["_trader","_itemsIn","_itemsOut","_player",["_token","",[""]] ];
_playerUID = getplayeruid _player;
_serverSettingsConfig = configFile >> "CfgEpochServer";
_vehicleSold = false;
_vehicleBought = false;
@ -53,70 +58,60 @@ if (_slot != -1) then {
_itemClasses = _aiItems select 0;
_itemQtys = _aiItems select 1;
{
_item = _x;
_itemQty = 1;
if (isClass (_config >> _item)) then{
_x params ["_item","_itemQty"];
if (isClass (_config >> _item)) then {
_itemWorth = getNumber(_config >> _item >> "price");
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_itemWorth = round (_itemWorth*(_itemQty/_maxrnd));
_makeTradeIn = false;
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") then{
_vehicles = _trader nearEntities[[_item], 30];
if !(_vehicles isEqualTo[]) then {
_vehicle = _vehicles select 0;
if (!isNull _vehicle) then {
_playerNetID = owner _player;
if (_playerNetID == (owner _vehicle)) then {
_vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"];
if (!_vehicleSold && _vehSlot != "ABORT") then {
_BaseClass = _vehicle getvariable ["VEHICLE_BaseClass",""];
if !(_BaseClass isequalto "") then {
_item = _BaseClass;
_itemsIn set [_foreachindex,_item];
_itemsIn set [_foreachindex,[_item,_itemQty]];
};
removeFromRemainsCollector[_vehicle];
removeFromRemainsCollector [_vehicle];
deleteVehicle _vehicle;
_vehicleSold = true;
_vehHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _vehSlot];
_VAL = [];
["Vehicle", _vehHiveKey, _VAL] call EPOCH_fnc_server_hiveSET;
EPOCH_VehicleSlots pushBack _vehSlot;
missionNamespace setVariable ['EPOCH_VehicleSlotCount', count EPOCH_VehicleSlots, true];
_makeTradeIn = true;
};
};
};
};
} else {
}
else {
_makeTradeIn = true;
};
if (_makeTradeIn) then {
_returnIn pushBack _item;
_qtyIndex = _itemClasses find _item;
if (_qtyIndex == -1) then {
_itemClasses pushBack _item;
_itemQtys pushBack _itemQty;
_tradeIn = _tradeIn + _itemWorth;
_current_crypto = _current_crypto + _itemWorth;
_tradeQtyTotal = _tradeQtyTotal + _itemQty;
} else {
_currQty = _itemQtys select _qtyIndex;
_itemQtys set[_qtyIndex, (_currQty + _itemQty)];
_tradeIn = _tradeIn + _itemWorth;
_current_crypto = _current_crypto + _itemWorth;
_tradeQtyTotal = _tradeQtyTotal + _itemQty;
_returnIn pushBack [_item,_itemQty];
_tradeIn = _tradeIn + _itemWorth;
_current_crypto = _current_crypto + _itemWorth;
_tradeQtyTotal = _tradeQtyTotal + _itemQty;
if !(_item in ([_serverSettingsConfig, "TraderItemsDeleteInstant", []] call EPOCH_fnc_returnConfigEntry)) then {
_qtyIndex = _itemClasses find _item;
if (_qtyIndex == -1) then {
_itemClasses pushBack _item;
_itemQtys pushBack _itemQty;
} else {
_currQty = _itemQtys select _qtyIndex;
_itemQtys set [_qtyIndex, (_currQty + _itemQty)];
};
};
// send karma stat to seller
_kIndex = EPOCH_communityStats find "Karma";
@ -128,81 +123,73 @@ if (_slot != -1) then {
};
};
} forEach _itemsIn;
_response = ["Bank", _playerUID] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_bankData = _response select 1;
if !(_bankData isEqualTo[]) then {
_serverSettingsConfig = configFile >> "CfgEpochServer";
_MaxBankDebit = [_serverSettingsConfig, "MaxBankDebitforTrade", -999999] call EPOCH_fnc_returnConfigEntry;
_bankBalance = _bankData select 0;
if (_bankBalance < _MaxBankDebit) then {
if (_tradeIn > 0) then {
_bankBalance = _bankBalance + _tradeIn;
_return = ["Bank", _playerUID, EPOCH_expiresBank, [_bankBalance]] call EPOCH_fnc_server_hiveSETEX;
_message = _message + "Items sold, but the Money goes to your Bank - to much Bank-Debit";
}
else {
_message = _message + "Purchase not possible - to much Bank-Debit";
};
_current_crypto = _current_cryptoRaw;
_tradeIn = 0;
_itemsIn = [];
_itemsOut = [];
_SkipOut = true;
_response = ["Bank", _playerUID] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_bankData = _response select 1;
if !(_bankData isEqualTo[]) then {
_MaxBankDebit = [_serverSettingsConfig, "MaxBankDebitforTrade", -999999] call EPOCH_fnc_returnConfigEntry;
_bankBalance = _bankData select 0;
if (_bankBalance < _MaxBankDebit) then {
if (_tradeIn > 0) then {
_bankBalance = _bankBalance + _tradeIn;
_return = ["Bank", _playerUID, EPOCH_expiresBank, [_bankBalance]] call EPOCH_fnc_server_hiveSETEX;
_message = _message + "Items sold, but the Money goes to your Bank - to much Bank-Debit";
}
else {
_message = _message + "Purchase not possible - to much Bank-Debit";
};
_current_crypto = _current_cryptoRaw;
_tradeIn = 0;
_itemsIn = [];
_itemsOut = [];
_SkipOut = true;
};
};
};
if (!_SkipOut) then {
{
_item = _x;
_itemQty = 1;
_x params ["_item","_itemQty"];
if (isClass (_config >> _item)) then{
_itemWorth = getNumber(_config >> _item >> "price");
_itemTax = getNumber(_config >> _item >> "tax");
_tax = _itemWorth * (EPOCH_taxRate + _itemTax);
_itemWorth = ceil(_itemWorth + _tax);
_itemWorth = ceil (_itemWorth + _tax);
_maxrnd = 1;
if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then {
_maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count");
};
_itemWorth = round (_itemWorth*(_itemQty/_maxrnd));
_qtyIndex = _itemClasses find _item;
// add items to array
if (_qtyIndex != -1) then {
_currQty = _itemQtys select _qtyIndex;
if (_currQty >= _itemQty) then {
if (_current_crypto >= _itemWorth) then {
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") then{
if (!_vehicleBought) then {
if !(EPOCH_VehicleSlots isEqualTo[]) then {
_position = getPosATL _player;
_helipad = nearestObjects[_player, ["Land_HelipadEmpty_F", "Land_HelipadCircle_F"], 100];
_helipads = [];
_smoke = nearestObject[_player, "SmokeShell"];
if (!isNull _smoke) then {
_helipad pushBack _smoke;
};
// water check
if (_item isKindOf "Ship") then {
{
if (surfaceIsWater (getposATL _x)) then {
_helipads pushBack _x;
}
} forEach _helipad;
} else {
}
else {
{
if !(surfaceIsWater (getposATL _x)) then {
_helipads pushBack _x;
}
} forEach _helipad;
};
if !(_helipads isEqualTo[]) then {
_foundSmoke = false;
{
if (_x isKindOf "SmokeShell") then {
@ -210,7 +197,8 @@ if (_slot != -1) then {
if (_objOwner == owner _player) then {
_position = getPosATL _x;
_foundSmoke = true;
} else {
}
else {
{
if (_objOwner == owner _x) exitWith{
_position = getPosATL _x;
@ -224,12 +212,14 @@ if (_slot != -1) then {
if !(_foundSmoke) then {
_position = getPosATL (_helipads select 0);
};
} else {
}
else {
_tmpposition = [];
if (_item isKindOf "Ship") then {
_tmpposition = [_position, 20, 150, 5, 0, 1000, 1] call BIS_fnc_findSafePos;
_tmpposition = [_tmpposition, 0, 60, 10, 2, 1000, 0] call BIS_fnc_findSafePos;
} else {
}
else {
_tmpposition = [_position, 20, 120, 5, 0, 2000, 0] call BIS_fnc_findSafePos;
};
if ((count _tmpposition) == 2) then {
@ -246,29 +236,21 @@ if (_slot != -1) then {
};
};
};
// select available slot
_vehslot = EPOCH_VehicleSlots select 0;
// Remove from available slots
EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_vehslot];
missionNamespace setVariable ['EPOCH_VehicleSlotCount', count EPOCH_VehicleSlots, true];
_vehicleBought = true;
// Group access
_lockOwner = getPlayerUID _player;
_playerGroup = _player getVariable["GROUP", ""];
if (_playerGroup != "") then {
_lockOwner = _playerGroup;
};
_vehObj = [_item,_position,random 360,true,_vehslot,_lockOwner,"NONE",false,false] call EPOCH_spawn_vehicle;
_final_location = getPosATL _vehObj;
_group = group _player;
_wp = _group addWaypoint [_final_location, 0];
deleteWaypoint [_group, 0];
_returnOut pushBack _item;
_returnOut pushBack [_item,_itemQty];
_itemQtys set[_qtyIndex, (_currQty - _itemQty)];
_tradeOut = _tradeOut - _itemWorth;
_current_crypto = _current_crypto - _itemWorth;
@ -279,8 +261,8 @@ if (_slot != -1) then {
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
};
};
} else {
}
else {
if (_item isKindOf "Bag_Base") then {
_wH = objNull;
_nearByHolder = nearestObjects [_player,["groundWeaponHolder"],3];
@ -290,13 +272,14 @@ if (_slot != -1) then {
_wHPos = ASLToATL _wHPos;
};
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
} else {
}
else {
_wH = _nearByHolder select 0;
};
_wH addBackpackCargoGlobal [_item,1];
};
_returnOut pushBack _item;
_itemQtys set[_qtyIndex, (_currQty - _itemQty)];
_returnOut pushBack [_item,_itemQty];
_itemQtys set [_qtyIndex, (_currQty - _itemQty)];
_tradeOut = _tradeOut - _itemWorth;
_current_crypto = _current_crypto - _itemWorth;
_tradeQtyTotal = _tradeQtyTotal + _itemQty;
@ -314,8 +297,6 @@ if (_slot != -1) then {
};
} forEach _itemsOut;
};
if !(_itemsIn isEqualTo []) then {
if (_itemsIn isEqualTo _returnIn) then {
_message = _message + "All Items sold";
@ -338,10 +319,7 @@ if (_slot != -1) then {
_message = _message + "Not all Items purchased";
};
};
_tradeTotal = _tradeIn + _tradeOut;
if !(_returnIn isequalto [] && _returnOut isEqualTo []) then {
_trader setVariable["AI_ITEMS", [_itemClasses, _itemQtys], true];
_objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _slot];

View File

@ -25,6 +25,9 @@ _getCrypto = _object getVariable["Crypto", 0];
if (_getCrypto > 0) then {
// remove crypto from object
_object setVariable["Crypto", nil, true];
if (_object getvariable ["RemoveOnTake",false]) then {
deletevehicle _object;
};
// send data back to player
[_player,_getCrypto] call EPOCH_server_effectCrypto;
// debug and logging.

View File

@ -105,8 +105,9 @@ for "_i" from 1 to _maxStorageLimit do {
_vehicle setVariable ["STORAGE_SLOT", str(_i), true];
_vehicle call EPOCH_server_storageInit;
if (isDamageAllowed _vehicle) then {
_vehicle call EPOCH_server_storageInit;
};
if (count _arr >= 5) then {
_color = _arr select 4;
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;

View File

@ -29,6 +29,7 @@ _jammerRange = getNumber(_config >> "buildingJammerRange");
_serverSettingsConfig = configFile >> "CfgEpochServer";
_immuneIfStartInBase = [_serverSettingsConfig, "immuneIfStartInBase", true] call EPOCH_fnc_returnConfigEntry;
_vehicleDynamicSimulationSystem = [_serverSettingsConfig, "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry;
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
@ -83,7 +84,7 @@ for "_i" from 1 to _maxVehicleLimit do {
};
// spawn vehicle at temp location.
_vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
_vehicle = createVehicle [_class, [random 500, random 500,500], [], 0, "CAN_COLLIDE"];
// turn off BIS randomization
_vehicle setVariable ["BIS_enableRandomization", false];
if !(isNull _vehicle) then {
@ -116,8 +117,8 @@ for "_i" from 1 to _maxVehicleLimit do {
_vehicle call EPOCH_server_setVToken;
_vehicle call EPOCH_server_vehicleInit;
// set final direction and postion of vehicle
_vehicle setposATL _location;
_vehicle setVectorDirAndUp _worldspace;
_vehicle setposATL _location;
// set fuel level
_vehicle setFuel _fuel;
@ -213,7 +214,7 @@ for "_i" from 1 to _maxVehicleLimit do {
};
// new Dynamicsimulation
if(["CfgDynamicSimulation", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
if(_vehicleDynamicSimulationSystem)then
{
_vehicle enableSimulationGlobal false; // turn it off until activated by dynamicSim
_vehicle enableDynamicSimulation true;

View File

@ -24,7 +24,6 @@ EPOCH_VehicleSlots = [];
_allVehicles = [];
_serverSettingsConfig = configFile >> "CfgEpochServer";
_simulationHandler = [_serverSettingsConfig, "simulationHandlerOld", false] call EPOCH_fnc_returnConfigEntry;
_immuneVehicleSpawn = [_serverSettingsConfig, "immuneVehicleSpawn", false] call EPOCH_fnc_returnConfigEntry;
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
@ -255,10 +254,6 @@ for "_i" from 1 to _maxVehicleLimit do {
_marker setMarkerText _class;
_marker setMarkerColor "ColorGreen";
};
if (_simulationHandler) then{
_vehicle enableSimulationGlobal false;
};
};
};
};

View File

@ -13,81 +13,59 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_fnc_lock","_fnc_unlock","_gArray","_owners","_playerGroup","_playerUID","_response","_type"];
private ["_cfgBaseBuilding","_owners","_playerGroup","_playerUID","_response","_type","_locked","_LockStateChanged","_msg"];
//[[[end]]]
params ["_unit","_lockStatus","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _unit) exitWith{};
if (_player distance _unit > 20) exitWith{};
_VehLockMessages = ['CfgEpochClient' call EPOCH_returnConfig, "VehLockMessages", true] call EPOCH_fnc_returnConfigEntry;
_type = typeOf _unit;
_playerUID = getPlayerUID _player;
_playerGroup = _player getVariable ["GROUP",""];
_playerGroup = _player getVariable["GROUP", ""];
_fnc_lock = {
_this setVariable ["EPOCH_Locked", true, true];
EPOCH_saveStorQueue pushBackUnique _this;
};
_fnc_unlock = {
_this setVariable ["EPOCH_Locked", false, true];
_fnc_Lock_Unlock = {
_locked = !_locked;
_unit setVariable ["EPOCH_Locked", _locked, true];
_LockStateChanged = true;
};
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
if (getNumber(_cfgBaseBuilding >> _type >> "isSecureStorage") == 1) then{
if (getNumber(_cfgBaseBuilding >> _type >> "isSecureStorage") == 1) then {
_owners = _unit getVariable["STORAGE_OWNERS", []];
// locked > unlocked
if !(_unit getVariable ["EPOCH_Locked", true]) then {
// allow group members and owner access
_locked = _unit getVariable ["EPOCH_Locked", true];
_LockStateChanged = false;
if (_playerUID in _owners) then {
call _fnc_Lock_Unlock;
}
else {
if (_playerGroup != "") then {
if (_playerGroup in _owners) then {
_unit call _fnc_lock;
} else {
call _fnc_Lock_Unlock;
}
else {
_response = ["Group", _playerGroup] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_gArray = _response select 1;
if (
{(_x select 0) in _owners}count(_gArray select 3) > 0 ||
{(_x select 0) in _owners}count(_gArray select 4) > 0 ||
_playerUID in _owners
) then {
_unit call _fnc_lock;
};
(_response param [1,[]]) params ["","","",["_modArray",[]],["_memberArray",[]]];
if (
{(_x select 0) in _owners} count _modArray > 0 ||
{(_x select 0) in _owners} count _memberArray > 0
) then {
call _fnc_Lock_Unlock;
};
};
} else {
if (_playerUID in _owners) then {
_unit call _fnc_lock;
};
};
// unlocked > locked
} else {
// allow group members and owner access
if (_playerGroup != "") then {
if (_playerGroup in _owners) then {
_unit call _fnc_unlock;
} else {
_response = ["Group", _playerGroup] call EPOCH_fnc_server_hiveGETRANGE;
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_gArray = _response select 1;
if (
{(_x select 0) in _owners }count(_gArray select 3) > 0 ||
{(_x select 0) in _owners}count(_gArray select 4) > 0 ||
_playerUID in _owners
) then {
_unit call _fnc_unlock;
};
};
};
} else {
if (_playerUID in _owners) then {
_unit call _fnc_unlock;
};
};
};
_msg = "You are not the owner";
if (_LockStateChanged) then {
if (_locked) then {
EPOCH_saveStorQueue pushBackUnique _unit;
_msg = "Storage Locked";
}
else {
_msg = "Storage Unlocked";
};
};
if (_VehLockMessages) then {
[_msg,5] remoteExec ["Epoch_Message",_player];
};
};

View File

@ -50,9 +50,6 @@ _newVeh setVariable ["VEHICLE_SLOT", _slot, true];
_newVeh setVariable ["VEHICLE_BASECLASS", _baseVeh];
_newVeh call EPOCH_server_setVToken;
_newVeh call EPOCH_server_vehicleInit;
_newVeh setdir _dir;
_newVeh setposasl _pos;
// set fuel level
_newVeh setFuel _fuel;
@ -99,7 +96,7 @@ _newHitpoints = getAllHitPointsDamage _newVeh;
} foreach (_OldHitPoints select 0);
// new Dynamicsimulation
if(["CfgDynamicSimulation", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
if([configFile >> "CfgEpochServer", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry)then
{
_newveh enableSimulationGlobal false; // turn it off until activated by dynamicSim
_newveh enableDynamicSimulation true;
@ -131,5 +128,8 @@ if !(_removemagazinesturret isequalto []) then {
} foreach _removemagazinesturret;
};
_newVeh setdir _dir;
_newVeh setposasl _pos;
// save new vehicle to db
_newveh call EPOCH_Server_Save_Vehicle;

View File

@ -21,7 +21,7 @@ _serverSettingsConfig = configFile >> "CfgEpochServer";
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
_disableVehicleTIE = [_serverSettingsConfig, "disableVehicleTIE", true] call EPOCH_fnc_returnConfigEntry;
_vehObj = createVehicle[_vehClass, _position, [], 0, _can_collide];
_vehObj = createVehicle[_vehClass, [random 500,random 500, 500], [], 0, "CAN_COLLIDE"];
// turn off BIS randomization
_vehObj setVariable ["BIS_enableRandomization", false];
if !(isNull _vehObj) then{
@ -115,7 +115,7 @@ if !(isNull _vehObj) then{
};
// new Dynamicsimulation
if(["CfgDynamicSimulation", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
if([configFile >> "CfgEpochServer", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry)then
{
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
_vehObj enableDynamicSimulation true;

View File

@ -112,7 +112,7 @@ for "_i" from 1 to _spawnCount do {
} else {
if (_allCitysDync isEqualTo []) then {
_position = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 1000, 0] call BIS_fnc_findSafePos;
_position = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 3, 0, 1000, 0] call BIS_fnc_findSafePos;
} else {
_selectedCity = _allCitysDync deleteAt (floor random(count _allCitysDync));
_cityPos = getArray(_selectedCity >> "position");

View File

@ -125,6 +125,7 @@ class CfgServerFunctions
class server_removeMarker {};
class server_createGlobalMarkerSet {};
class server_deleteGlobalMarkerSet {};
class server_isNearChecks {};
};
class epoch_missions {
class Server_createObject {};
@ -144,7 +145,7 @@ class CfgServerFunctions
};
class CfgServerVersion
{
client = "1.0.0";
config = "1.0.0";
client = "1.1.0";
config = "1.1.0";
hive = "0.6.0.0";
};

View File

@ -91,7 +91,17 @@ diag_log "Epoch: Init Variables";
call compile preprocessFileLineNumbers "\epoch_server\init\server_variables.sqf";
call compile preprocessFileLineNumbers "\epoch_server\init\server_securityfunctions.sqf";
// Enable Dynamic simulation
_dynSimToggle = [_serverSettingsConfig, "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry;
enableDynamicSimulationSystem _dynSimToggle;
if(_dynSimToggle)then
{
"IsMoving" setDynamicSimulationDistanceCoef ([_serverSettingsConfig, "isMovingCoefValue", 2] call EPOCH_fnc_returnConfigEntry);
"Group" setDynamicSimulationDistance ([_serverSettingsConfig, "groupDynSimDistance", 500] call EPOCH_fnc_returnConfigEntry);
"Vehicle" setDynamicSimulationDistance ([_serverSettingsConfig, "vehicleDynSimDistance", 350] call EPOCH_fnc_returnConfigEntry);
"EmptyVehicle" setDynamicSimulationDistance ([_serverSettingsConfig, "emptyVehicleDynSimDistance", 250] call EPOCH_fnc_returnConfigEntry);
"Prop" setDynamicSimulationDistance ([_serverSettingsConfig, "propDynSimDistance", 50] call EPOCH_fnc_returnConfigEntry);
};
["I", _instanceID, "86400", ["CONTINUE"]] call EPOCH_fnc_server_hiveSETEX;
diag_log format["Epoch: Start Hive, Instance ID: '%1'", _instanceID];
@ -174,8 +184,8 @@ if !(EPOCH_forcedVehicleSpawnTable isEqualTo "") then {
_allowedVehiclesList = getArray(_epochConfig >> worldName >> _allowedVehicleListName);
_vehicleSlotLimit = 0;
{_vehicleSlotLimit = _vehicleSlotLimit + (_x select 1)} forEach _allowedVehiclesList;
_ReservedSlots = 50;
_vehicleSlotLimit = _vehicleSlotLimit + _ReservedSlots;
_ReservedVehSlots = [_serverSettingsConfig, "ReservedVehSlots", 50] call EPOCH_fnc_returnConfigEntry;
_vehicleSlotLimit = _vehicleSlotLimit + _ReservedVehSlots;
if (EPOCH_useOldLoadVehicles) then {
_vehicleSlotLimit call EPOCH_load_vehicles_old;
} else {

View File

@ -501,7 +501,7 @@ for "_i" from 1 to 3 do {
_temp = _temp + "
,['Key Binds',[],'','1',[]]
,[' 3 Key - Teleport In Front',[],'','1',[]]
,[' 5 Key - Teleport In Front',[],'','1',[]]
,[' F2 - Cancel Spectating',[],'','1',[]]
,[' F5 - Delete Target',[],'','1',[]]
];
@ -1815,10 +1815,10 @@ _skn_admincode = compileFinal ("
_cfgPricing = 'CfgPricing' call EPOCH_returnConfig;
if (_this == 61) then {
_airVehicles = ""
(configName _x) iskindof 'AIR' &&
getText(_x >> 'displayName') != '' &&
getText(_x >> 'picture') != '' &&
getNumber(_x >> 'type') != 0 &&
getText (_x >> 'vehicleClass') in ['Air'] &&
isClass(_cfgPricing >> configName _x)
""configClasses (configFile >> 'CfgVehicles');
{
@ -1829,10 +1829,10 @@ _skn_admincode = compileFinal ("
};
if (_this == 62) then {
_landVehicles = ""
(configName _x) iskindof 'LandVehicle' &&
getText(_x >> 'displayName') != '' &&
getText(_x >> 'picture') != '' &&
configName _x != 'PaperCar' &&
getText (_x >> 'vehicleClass') in ['Car'] &&
isClass(_cfgPricing >> configName _x)
""configClasses (configFile >> 'CfgVehicles');
{
@ -1843,10 +1843,10 @@ _skn_admincode = compileFinal ("
};
if (_this == 63) then {
_shipVehicles = ""
(configName _x) iskindof 'SHIP' &&
getText(_x >> 'displayName') != '' &&
getText(_x >> 'picture') != '' &&
getNumber(_x >> 'type') in [1,2,3,4] &&
getText (_x >> 'vehicleClass') in ['Ship'] &&
isClass(_cfgPricing >> configName _x)
""configClasses (configFile >> 'CfgVehicles');
{
@ -2147,7 +2147,6 @@ _skn_admincode = compileFinal ("
};
};
"+_skn_infrontTP+" = {
"+_skn_tg_infrontTP+" = !"+_skn_tg_infrontTP+";
if ("+_skn_tg_infrontTP+") then {
if (vehicle player == player) then {
_distance = 10;

View File

@ -39,7 +39,7 @@ private _configArray = [
["showSatellites", true],
["showShippingContainers", true],
["cloneCost", 100],
["vehicleLockTime", 1800],
["vehicleLockTime", "1800"],
["antagonistChancePDeath", 0.33],
["taxRate", 0.1],
["starterTraderItems", [[], []]],

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
private ["_allRoads","_allowDebris","_debris","_debrisCounter","_debrisLocations","_debrisLocationsKey","_debrisLocationsTMP","_debug","_disallowedLocations","_expiresDebris","_export","_instanceID","_intersections","_marker","_maxDebrisLimit","_nearbyLocations","_newDebrisCounter","_object","_offsetX","_offsetY","_position","_response","_rng","_rngChance","_scriptHiveKey","_seed","_selectedDebris","_upperPos","_worldSize"];
//[[[end]]]
// exit if already ran once.
if (isNil "EPOCH_DynamicDebrisEnabled") exitWith {};
if !(isNil "EPOCH_DynamicDebrisEnabled") exitWith {};
EPOCH_DynamicDebrisEnabled = true;
_debug = false;
_expiresDebris = 604800;

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