diff --git a/Server_Install_Pack/@epochhive/epochconfig.hpp b/Server_Install_Pack/@epochhive/epochconfig.hpp index 59150a90..f1e2c31c 100644 --- a/Server_Install_Pack/@epochhive/epochconfig.hpp +++ b/Server_Install_Pack/@epochhive/epochconfig.hpp @@ -66,6 +66,9 @@ starterTraderItems[] = { { "ItemSodaBurst", "meatballs_epoch", "MortarBucket", " NPCSlotsLimit = 20; // Max number of traders static or dynamic. Warning! Higher the number lower performance. forceStaticTraders = "true"; // disables traders moving from work to home +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 showShippingContainers = "true"; // Show location of events based loots (plants, shipping container, Carnival) diff --git a/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf b/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf index 87b4f353..77e71797 100644 --- a/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf +++ b/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf @@ -24,6 +24,9 @@ diag_log format["Epoch: Attempt Create Object: %1 for %2",_objArr, name _player] _cfgPricing = 'CfgPricing' call EPOCH_returnConfig; _lootTableIndex = if (EPOCH_modCUPVehiclesEnabled) then {if (EPOCH_mod_madArma_Enabled) then {3} else {1}} else {if (EPOCH_mod_madArma_Enabled) then {2} else {0}}; _allowedVehicleListName = ["allowedVehiclesList","allowedVehiclesList_CUP","allowedVehiclesList_MAD","allowedVehiclesList_MADCUP"] select _allowedVehicleIndex; +if !(EPOCH_forcedVehicleSpawnTable isEqualTo "") then { + _allowedVehicleListName = EPOCH_forcedVehicleSpawnTable; +}; _allowedVehiclesList = getArray(configFile >> "CfgEpoch" >> worldName >> _allowedVehicleListName); //diag_log format ["DEBUG: Allowed Vehs: %1",_allowedVehiclesList]; _vehicles = []; diff --git a/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf b/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf index 63e12ba0..f9dfdf44 100644 --- a/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf +++ b/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf @@ -19,6 +19,9 @@ _pricingConfig = 'CfgPricing' call EPOCH_returnConfig; _lootTableIndex = if (EPOCH_modCUPVehiclesEnabled) then {if (EPOCH_mod_madArma_Enabled) then {3} else {1}} else {if (EPOCH_mod_madArma_Enabled) then {2} else {0}}; _lootTableClass = ["CfgLootTable","CfgLootTable_CUP","CfgLootTable_MAD","CfgLootTable_MADCUP"] select _lootTableIndex; +if !(EPOCH_forcedLootSpawnTable isEqualTo "") then { + _lootTableClass = EPOCH_forcedLootSpawnTable; +}; _randomizeMagazineAmmoCount = ["CfgEpochClient", "randomizeMagazineAmmoCount", true] call EPOCH_fnc_returnConfigEntryV2; if !(isNull _object) then{ _lootTable = [_type, "CfgMainTable", "tables"] call EPOCH_weightedArray; diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index 79a42b67..ac846669 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -27,6 +27,7 @@ _abortAndError = { _cfgServerVersion = configFile >> "CfgServerVersion"; _serverSettingsConfig = configFile >> "CfgEpochServer"; +_epochConfig = configFile >> "CfgEpoch"; _clientVersion = getText(_cfgServerVersion >> "client"); _configVersion = getText(_cfgServerVersion >> "config"); @@ -99,7 +100,7 @@ WEST setFriend[EAST, 1]; diag_log format["Epoch: Setup World Settings for %1",worldName]; //World Settings _worldSize = worldSize; -_epochWorldPath = configfile >> "CfgEpoch" >> worldName; +_epochWorldPath = _epochConfig >> worldName; if (isClass _epochWorldPath) then { _configSize = getNumber(_epochWorldPath >> "worldSize"); if (_configSize > 0) then { @@ -140,9 +141,12 @@ diag_log "Epoch: Loading vehicles"; // Vehicle slot limit set to total of all allowed limits _allowedVehicleIndex = if (EPOCH_modCUPVehiclesEnabled) then {if (EPOCH_mod_madArma_Enabled) then {3} else {1}} else {if (EPOCH_mod_madArma_Enabled) then {2} else {0}}; _allowedVehicleListName = ["allowedVehiclesList","allowedVehiclesList_CUP","allowedVehiclesList_MAD","allowedVehiclesList_MADCUP"] select _allowedVehicleIndex; +if !(EPOCH_forcedVehicleSpawnTable isEqualTo "") then { + _allowedVehicleListName = EPOCH_forcedVehicleSpawnTable; +}; // do something here -_allowedVehiclesList = getArray(configFile >> "CfgEpoch" >> worldName >> _allowedVehicleListName); +_allowedVehiclesList = getArray(_epochConfig >> worldName >> _allowedVehicleListName); _vehicleSlotLimit = 0; {_vehicleSlotLimit = _vehicleSlotLimit + (_x select 1)} forEach _allowedVehiclesList; _ReservedSlots = 50; diff --git a/Sources/epoch_server/init/server_variables.sqf b/Sources/epoch_server/init/server_variables.sqf index 7b26cff8..86b10c5e 100644 --- a/Sources/epoch_server/init/server_variables.sqf +++ b/Sources/epoch_server/init/server_variables.sqf @@ -59,7 +59,9 @@ _configArray = [ ["hiveAdminCmdTime", 5], ["DEBUG_VEH", false], ["useOldLoadVehicles", false], - ["enableUnitTestOnStart", 0] + ["enableUnitTestOnStart", 0], + ["forcedVehicleSpawnTable",""], + ["forcedLootSpawnTable",""] ]; EPOCH_fnc_returnConfigEntry = { diff --git a/Sources/epoch_server_settings/config.cpp b/Sources/epoch_server_settings/config.cpp index cb674860..120307a7 100644 --- a/Sources/epoch_server_settings/config.cpp +++ b/Sources/epoch_server_settings/config.cpp @@ -68,6 +68,8 @@ class CfgEpoch telePos[] = {}; propsPos[] = {}; staticNpcPos[] = {}; + forcedVehicleSpawnTable = ""; + forcedLootSpawnTable = ""; allowedVehiclesList[] = { {"C_Offroad_01_EPOCH",8}, {"C_Quadbike_01_EPOCH",8},