mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add toggleable Bury and Butcher Bodies by salival
This also re-arranges the configVariables.sqf and loads the variables for both (server and client) first. This allows to check for certain variables like Z_SingleCurrency and stops the loading of all other Z_SingleCurrency variables even when Z_SingleCurrency was not on.
This commit is contained in:
85
SQF/dayz_code/actions/buryActions.sqf
Normal file
85
SQF/dayz_code/actions/buryActions.sqf
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Bury/Butcher body script by salival (https://github.com/oiad)
|
||||
*/
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_action","_backPackMag","_backPackWpn","_crate","_corpse","_cross","_gain","_isBury","_grave","_name","_playerNear","_backPack","_position","_sound","_notOnRoad"];
|
||||
|
||||
_corpse = (_this select 3) select 0;
|
||||
if (isNull _corpse) exitWith {dayz_actionInProgress = false; systemChat localize "str_cursorTargetNotFound";};
|
||||
|
||||
_playerNear = {isPlayer _x} count (([_corpse] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1;
|
||||
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
|
||||
|
||||
_action = (_this select 3) select 1;
|
||||
_notOnRoad = false; // Restrict burying/butchering on roads?
|
||||
|
||||
player removeAction s_player_bury_human;
|
||||
s_player_bury_human = -1;
|
||||
player removeAction s_player_butcher_human;
|
||||
s_player_butcher_human = -1;
|
||||
|
||||
_position = getPosATL _corpse;
|
||||
_isBury = _action == "bury";
|
||||
|
||||
if (_notOnRoad && {isOnRoad _position}) exitWith {dayz_actionInProgress = false; format[localize "STR_CL_BA_ROAD",if (_isBury) then {localize "STR_CL_BA_BURY1"} else {"STR_CL_BA_BUTCHER1"}] call dayz_rollingMessages;};
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished) exitWith {dayz_actionInProgress = false;localize "str_epoch_player_26" call dayz_rollingMessages;};
|
||||
|
||||
_corpse setVariable["isBuried",true,true];
|
||||
|
||||
_backPack = typeOf (unitBackPack _corpse);
|
||||
|
||||
_crate = createVehicle ["DZ_AmmoBoxSmallUS",_position,[],0,"CAN_COLLIDE"];
|
||||
_crate setPosATL [(_position select 0)+1,(_position select 1)+1.5,_position select 2];
|
||||
_crate setVariable ["permaLoot",true,true];
|
||||
_crate setVariable ["bury",true,true];
|
||||
|
||||
_grave = createVehicle ["Grave",_position,[],0,"CAN_COLLIDE"];
|
||||
_grave setPosATL [(_position select 0)+1,_position select 1,_position select 2];
|
||||
_grave setVariable ["bury",true,true];
|
||||
|
||||
if (_isBury) then {
|
||||
_name = _corpse getVariable["bodyName","unknown"];
|
||||
_cross = createVehicle ["GraveCross1",_position,[],0,"CAN_COLLIDE"];
|
||||
_cross setPosATL [(_position select 0)+1,(_position select 1)-1.2,_position select 2];
|
||||
_cross setVariable ["bury",true,true];
|
||||
};
|
||||
|
||||
{_crate addWeaponCargoGlobal [_x,1]} forEach weapons _corpse;
|
||||
{_crate addMagazineCargoGlobal [_x,1]} forEach magazines _corpse;
|
||||
|
||||
if (_backPack != "") then {
|
||||
_backPackWpn = getWeaponCargo unitBackpack _corpse;
|
||||
_backPackMag = getMagazineCargo unitBackpack _corpse;
|
||||
|
||||
if (count _backPackWpn > 0) then {{_crate addWeaponCargoGlobal [_x,(_backPackWpn select 1) select _forEachIndex]} forEach (_backPackWpn select 0);};
|
||||
if (count _backPackMag > 0) then {{_crate addMagazineCargoGlobal [_x,(_backPackMag select 1) select _forEachIndex]} forEach (_backPackMag select 0);};
|
||||
|
||||
_crate addBackpackCargoGlobal [_backPack,1];
|
||||
};
|
||||
|
||||
_sound = _corpse getVariable ["sched_co_fliesSource",nil];
|
||||
if (!isNil "_sound") then {
|
||||
detach _sound;
|
||||
deleteVehicle _sound;
|
||||
};
|
||||
|
||||
deleteVehicle _corpse;
|
||||
|
||||
if (_isBury) then {
|
||||
if (_name != "unknown") then {
|
||||
format[localize "STR_CL_BA_RIP",_name] call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "STR_CL_BA_RIP_UNKNOWN" call dayz_rollingMessages;
|
||||
};
|
||||
} else {
|
||||
["knives",0.2] call fn_dynamicTool;
|
||||
};
|
||||
|
||||
_gain = if (_isBury) then {DZE_Bury_Body_Value} else {DZE_Butcher_Body_Value};
|
||||
_gain call player_humanityChange;
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
@@ -808,16 +808,41 @@ if (!isNull _cursorTarget && {!_inVehicle && !_isPZombie && _canDo && player dis
|
||||
} else {
|
||||
player removeAction s_player_fillgen;
|
||||
s_player_fillgen = -1;
|
||||
};
|
||||
|
||||
if (DZE_Take_Clothes) then {
|
||||
if (_isMan && !_isAlive && !_isZombie && {!(_cursorTarget isKindOf "Animal")} && {!(_cursorTarget getVariable["clothesTaken",false])} && {_typeOfCursorTarget in AllPlayers} && {!(_typeOfCursorTarget in DZE_Disable_Take_Clothes)}) then {
|
||||
if (s_player_clothes < 0) then {
|
||||
s_player_clothes = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_TC_TAKE_CLOTHES"],"\z\addons\dayz_code\actions\takeClothes.sqf",_cursorTarget,0, false,true];
|
||||
};
|
||||
|
||||
if (!_isAlive && _isMan && !_isZombie && {!(_cursorTarget isKindOf "Animal")}) then {
|
||||
if (DZE_Take_Clothes) then {
|
||||
if (!(_cursorTarget getVariable["clothesTaken",false]) && {_typeOfCursorTarget in AllPlayers} && {!(_typeOfCursorTarget in DZE_Disable_Take_Clothes)}) then {
|
||||
if (s_player_clothes < 0) then {
|
||||
s_player_clothes = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_TC_TAKE_CLOTHES"],"\z\addons\dayz_code\actions\takeClothes.sqf",_cursorTarget,0, false,true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_clothes;
|
||||
s_player_clothes = -1;
|
||||
};
|
||||
};
|
||||
|
||||
if (DZE_Bury_Body) then {
|
||||
local _hasShovel = ("ItemEtool" in _itemsPlayer || "ItemShovel" in _itemsPlayer);
|
||||
if (_hasShovel && !(_cursorTarget getVariable ["bodyButchered",false])) then {
|
||||
if (s_player_bury_human < 0) then {
|
||||
s_player_bury_human = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_BA_BURY"],"\z\addons\dayz_code\actions\buryActions.sqf",[_cursorTarget,"bury"],0,false,true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_bury_human;
|
||||
s_player_bury_human = -1;
|
||||
};
|
||||
};
|
||||
|
||||
if (DZE_Butcher_Body) then {
|
||||
if (({_x in ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1"]} count _itemsPlayer > 0) && !(_cursorTarget getVariable ["bodyButchered",false])) then {
|
||||
if (s_player_butcher_human < 0) then {
|
||||
s_player_butcher_human = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_BA_BUTCHER"],"\z\addons\dayz_code\actions\buryActions.sqf",[_cursorTarget,"butcher"],0,false,true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_butcher_human;
|
||||
s_player_butcher_human = -1;
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_clothes;
|
||||
s_player_clothes = -1;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1095,6 +1120,10 @@ if (!isNull _cursorTarget && {!_inVehicle && !_isPZombie && _canDo && player dis
|
||||
s_player_checkWallet = -1;
|
||||
player removeAction s_player_clothes;
|
||||
s_player_clothes = -1;
|
||||
player removeAction s_player_bury_human;
|
||||
s_player_bury_human = -1;
|
||||
player removeAction s_player_butcher_human;
|
||||
s_player_butcher_human = -1;
|
||||
};
|
||||
|
||||
//Dog actions on player self
|
||||
|
||||
@@ -11,7 +11,7 @@ local _cantSee = false;
|
||||
|
||||
{
|
||||
local _isZombie = _x isKindOf "zZombie_base";
|
||||
local _isMutant = typeOf _x == "z_bloodsucker";
|
||||
local _isMutant = (DZE_Bloodsuckers && {typeOf _x == "z_bloodsucker"});
|
||||
local _forcedSpeed = if ((_speedMin != _speedMax) && {(_speedMin > 0) && (_speedMax > 0)}) then {((random (DZE_ZombieSpeed select 1)) max (DZE_ZombieSpeed select 0));} else {getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "forcedSpeed");};
|
||||
local _dist = _x distance _refObj;
|
||||
local _chance = 1; //0 / dayz_monitorPeriod; // Z verbosity
|
||||
@@ -131,7 +131,7 @@ local _cantSee = false;
|
||||
};
|
||||
};
|
||||
|
||||
if (_isMutant && DZE_BloodsuckerDeleteNearTrader && isInTraderCity) then {deleteVehicle _x}; // Delete bloodsucker if the player is in a trader city
|
||||
if (_isMutant && {DZE_BloodsuckerDeleteNearTrader && isInTraderCity}) then {deleteVehicle _x}; // Delete bloodsucker if the player is in a trader city
|
||||
} forEach ((getPosATL _refObj) nearEntities ["Zed_Base",100]);
|
||||
|
||||
if (_attacked) then {
|
||||
|
||||
@@ -3,6 +3,80 @@
|
||||
// To change a variable copy paste it in the mission init.sqf below the #include line.
|
||||
// Standard DayZ variables are found in dayz_code\init\variables.sqf.
|
||||
|
||||
// Both
|
||||
dayz_infectiouswaterholes = true; //Enable infected waterholes
|
||||
dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. Also enables comfrey plant spawner which negatively impacts performance.
|
||||
dayz_townGeneratorBlackList = []; // If townGenerator is enabled it will not spawn junk within 150m of these positions. Example for Chernarus traders: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]
|
||||
DZE_HeliLift = true; // Enable Epoch heli lift system
|
||||
DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature
|
||||
DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage to objects by ramming. Doesn't work with amphibious pook which should not be used due to FPS issues.
|
||||
DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray?
|
||||
dayz_ForcefullmoonNights = false; // Forces night time to be full moon.
|
||||
infectedWaterHoles = []; //Needed for non-cherno maps.
|
||||
DZE_GodModeBase = false; // Disables damage handler from base objects so they can't be destroyed.
|
||||
dayz_spawnselection = 0; //(Chernarus only) Turn on spawn selection 0 = random only spawns, 1 = spawn choice based on limits
|
||||
dayz_classicBloodBagSystem = false; // disable blood types system and use the single classic ItemBloodbag
|
||||
dayz_enableFlies = true; // Enable flies on dead bodies (negatively impacts FPS).
|
||||
|
||||
// Death Messages
|
||||
DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel.
|
||||
DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the top left with weapon icons.
|
||||
DZE_DeathMsgRolling = false; // Display death messages as rolling messages in bottom center of screen.
|
||||
|
||||
// ZSC
|
||||
Z_SingleCurrency = false; // Enable single currency system.
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
Z_globalBanking = false; // Enable global banking system.
|
||||
Z_persistentMoney = false; // Enabling this stores currency to player_data instead of character_data. Currency transfers to a new character after death. For PVE servers only. Formerly called "GlobalMoney".
|
||||
CurrencyName = "Coins"; // If using single currency this is the currency display name.
|
||||
DZE_MoneyStorageClasses = ["VaultStorage","VaultStorage2","VaultStorageLocked","VaultStorage2Locked","LockboxStorageLocked","LockboxStorage2Locked","LockboxStorage","LockboxStorage2","LockboxStorageWinterLocked","LockboxStorageWinter2Locked","LockboxStorageWinter","LockboxStorageWinter2","TallSafe","TallSafeLocked"]; // If using single currency this is an array of object classes players can store coins in. E.g.: ["GunRack_DZ","WoodCrate_DZ"]
|
||||
ZSC_VehicleMoneyStorage = true; // Allow players to store money in vehicles. If vehicles are destroyed the money is also destroyed.
|
||||
};
|
||||
|
||||
Z_VehicleDistance = 40; // Max distance a vehicle can be sold or accessed from at a trader.
|
||||
|
||||
// Plot Management and Plot for Life
|
||||
DZE_permanentPlot = true; // Plot ownership saves after death. Enables Plot for Life by @RimBlock and Plot Management by @DevZupa.
|
||||
DZE_isRemovable = ["Plastic_Pole_EP1_DZ"]; //Items that can be removed with a crowbar with no ownership or access required. To forbid base take overs remove plot pole from this list and add it to DZE_restrictRemoval. It is not necessary to add wrecks or items that inherit from 'BuiltItems' to this list.
|
||||
|
||||
// Door Management
|
||||
DZE_doorManagement = true; // Enable Door Management by @DevZupa.
|
||||
|
||||
// Group System
|
||||
dayz_groupSystem = false; // Enable group system
|
||||
|
||||
// Bury and Butcher Bodies
|
||||
DZE_Bury_Body = false; // Enable Bury Bodies
|
||||
DZE_Butcher_Body = false; // Enable Butcher Bodies
|
||||
|
||||
// Weather
|
||||
DZE_Weather = 2; // Options: 1 - Summer Static, 2 - Summer Dynamic, 3 - Winter Static, 4 - Winter Dynamic. If static is selected, the weather settings will be set at server startup and not change. Weather settings can be adjusted with array DZE_WeatherVariables.
|
||||
|
||||
// The settings in the array below may be adjusted as desired. The default settings are designed to maximize client and server performance.
|
||||
// Having several features enabled at once might have adverse effects on client performance. For instance, you could have snowfall, ground fog, and breath fog threads all running at once.
|
||||
DZE_WeatherVariables = [
|
||||
15, // Minimum time in minutes for the weather to change. (default value: 15).
|
||||
30, // Maximum time in minutes for the weather to change. (default value: 30).
|
||||
0, // Minimum fog intensity (0 = no fog, 1 = maximum fog). (default value: 0).
|
||||
.2, // Maximum fog intensity (0 = no fog, 1 = maximum fog). (default value: 0.8).
|
||||
0, // Minimum overcast intensity (0 = clear sky, 1 = completely overcast). (default value: 0). Note: Rain and snow will not occur when overcast is less than 0.70.
|
||||
.6, // Maximum overcast intensity (0 = clear sky, 1 = completely overcast). (default value: 1).
|
||||
0, // Minimum rain intensity (0 = no rain, 1 = maximum rain). Overcast needs to be at least 70% for it to rain.
|
||||
.6, // Maximum rain intensity (0 = no rain, 1 = maximum rain). Overcast needs to be at least 70% for it to rain.
|
||||
0, // Minimum wind strength (default value: 0).
|
||||
3, // Maximum wind strength (default value: 5).
|
||||
.25, // Probability for wind to change when weather changes. (default value: .25).
|
||||
1, // Minimum snow intensity (0 = no snow, 1 = maximum snow). Overcast needs to be at least 75% for it to snow.
|
||||
1, // Maximum snow intensity (0 = no snow, 1 = maximum snow). Overcast needs to be at least 75% for it to snow.
|
||||
.2,// Probability for a blizzard to occur when it is snowing. (0 = no blizzards, 1 = blizzard all the time). (default value: .2).
|
||||
10, // Blizzard interval in minutes. Set to zero to have the blizzard run for the whole interval, otherwise you can set a custom time interval for the blizzard.
|
||||
0, // Ground Fog Effects. Options: 0 - no ground fog, 1 - only at evening, night, and early morning, 2 - anytime, 3 - near cities and towns, at late evening, night, and early morning, 4 - near cities and towns, anytime.
|
||||
400, // Distance in meters from player to scan for buildings to spawn ground fog. By default, only the 15 nearest buildings will spawn ground fog.
|
||||
false, // Allow ground fog when it's snowing or raining?
|
||||
2 // Winter Breath Fog Effects. Options: 0 - no breath fog, 1 - anytime, 2 - only when snowing or blizzard. Note: breath fog is only available with winter weather enabled.
|
||||
];
|
||||
|
||||
//Server
|
||||
if (isServer) then {
|
||||
DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with
|
||||
@@ -148,15 +222,17 @@ if (!isDedicated) then {
|
||||
DZE_Bandit = -5000; // Defines the value at how much humanity the player is classed as a bandit.
|
||||
|
||||
// ZSC
|
||||
Z_showCurrencyUI = true; // Show the currency icon on the screen when Z_SingleCurrency is enabled.
|
||||
Z_showBankUI = true; // Show the banking icon on the screen when Z_globalBanking is enabled.
|
||||
ZSC_bankTraders = ["Functionary1_EP1"]; // Array of trader classnames that are available for banking (i.e Functionary1_EP1), do not use _DZ classes - they are used as player skins
|
||||
ZSC_limitOnBank = true; // Have a limit on the bank? (i.e true or false) limits the global banking to the number below.
|
||||
ZSC_bankObjects = [""]; // Array of objects that are available for banking i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_maxBankMoney = 500000; // Default limit for bank objects.
|
||||
ZSC_defaultStorageMultiplier = 200; // Default magazine count for bank objects that don't have storage slots i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_MaxMoneyInStorageMultiplier = 5000; // Multiplier for how much money a bank object can hold, example: 200 magazine slots in the object (or the default value above ^^) multiplied by the 5000 multiplier is 1 million coin storage. (200 * 5000 = 1,000,000 coins)
|
||||
ZSC_ZombieCoins = [false,[0,1000]]; // First value activate coins on zombies, second value from 0 - 1000 coins on each zombie. Coin for zombies are handled directly in check wallet.
|
||||
if (Z_SingleCurrency) then {
|
||||
Z_showCurrencyUI = true; // Show the currency icon on the screen when Z_SingleCurrency is enabled.
|
||||
Z_showBankUI = true; // Show the banking icon on the screen when Z_globalBanking is enabled.
|
||||
ZSC_bankTraders = ["Functionary1_EP1"]; // Array of trader classnames that are available for banking (i.e Functionary1_EP1), do not use _DZ classes - they are used as player skins
|
||||
ZSC_limitOnBank = true; // Have a limit on the bank? (i.e true or false) limits the global banking to the number below.
|
||||
ZSC_bankObjects = [""]; // Array of objects that are available for banking i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_maxBankMoney = 500000; // Default limit for bank objects.
|
||||
ZSC_defaultStorageMultiplier = 200; // Default magazine count for bank objects that don't have storage slots i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_MaxMoneyInStorageMultiplier = 5000; // Multiplier for how much money a bank object can hold, example: 200 magazine slots in the object (or the default value above ^^) multiplied by the 5000 multiplier is 1 million coin storage. (200 * 5000 = 1,000,000 coins)
|
||||
ZSC_ZombieCoins = [false,[0,1000]]; // First value activate coins on zombies, second value from 0 - 1000 coins on each zombie. Coin for zombies are handled directly in check wallet.
|
||||
};
|
||||
|
||||
// Loot system
|
||||
dayz_toolBreaking = false; //Sledgehammer, crowbar and pickaxe have a chance to break when used.
|
||||
@@ -164,6 +240,13 @@ if (!isDedicated) then {
|
||||
dayz_matchboxCount = false; // Enable match stick count. After five uses matches run out and must be replaced.
|
||||
dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix
|
||||
|
||||
if (DZE_Bury_Body) then {
|
||||
DZE_Bury_Body_Value = 30;// Amount of humanity to gain for burying a body.
|
||||
};
|
||||
if (DZE_Butcher_Body) then {
|
||||
DZE_Butcher_Body_Value = -30;// Amount of humanity to lose for butchering a body.
|
||||
};
|
||||
|
||||
// Take Clothes
|
||||
DZE_Take_Clothes = false; // Allows to take the clothing from dead players and AIs
|
||||
DZE_Disable_Take_Clothes = []; // Enter the skins you do not want to be allowed to be recovered from dead bodies. E.g.: DZE_Disable_Take_Clothes = ["Doctor_DZ","Assistant_DZ","Worker1_DZ"];
|
||||
@@ -206,6 +289,19 @@ if (!isDedicated) then {
|
||||
["ItemGPS",localize "STR_CL_LV_LOCATE_VEHICLES","[] spawn locateVehicle;","true"]
|
||||
];
|
||||
};
|
||||
|
||||
// Bloodsuckers
|
||||
DZE_Bloodsuckers = false; // Enable bloodsucker spawning.
|
||||
|
||||
if (DZE_Bloodsuckers) then {
|
||||
DZE_BloodsuckerChance = .15; // Chance that a building will spawn a bloodsucker. Default .15 (15%)
|
||||
DZE_BloodsuckerBuildings = ["Land_Hlidac_budka","Land_Mil_Guardhouse","Land_Mil_Barracks","Land_Mil_House","Land_Mil_Barracks_i","CrashSite_RU","CrashSite_US","CrashSite_EU","CrashSite_UN"]; // Bloodsuckers will spawn near these building classes.
|
||||
DZE_BloodsuckersMaxGlobal = 15; // Maximum number of bloodsuckers allowed on the map at one time.
|
||||
DZE_BloodsuckersMaxNear = 3; // Maximum number of bloodsuckers allowed in any 200 meter area.
|
||||
DZE_BloodsuckersMaxLocal = 2; // Maximum number of bloodsuckers that can spawn per client.
|
||||
DZE_BloodsuckerScreenEffect = true; // On screen slash marks when the bloodsuckers attack.
|
||||
DZE_BloodsuckerDeleteNearTrader = true; // Deletes bloodsuckers when near trader cities.
|
||||
};
|
||||
|
||||
// Garage Door Opener
|
||||
DZE_GarageDoor_Opener = false; // Enables the option to open Garage Doors from the inside of a vehicle.
|
||||
@@ -332,84 +428,8 @@ if (!isDedicated) then {
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
// Bloodsuckers
|
||||
DZE_Bloodsuckers = false; // Enable bloodsucker spawning.
|
||||
DZE_BloodsuckerChance = .15; // Chance that a building will spawn a bloodsucker. Default .15 (15%)
|
||||
DZE_BloodsuckerBuildings = ["Land_Hlidac_budka","Land_Mil_Guardhouse","Land_Mil_Barracks","Land_Mil_House","Land_Mil_Barracks_i","CrashSite_RU","CrashSite_US","CrashSite_EU","CrashSite_UN"]; // Bloodsuckers will spawn near these building classes.
|
||||
DZE_BloodsuckersMaxGlobal = 15; // Maximum number of bloodsuckers allowed on the map at one time.
|
||||
DZE_BloodsuckersMaxNear = 3; // Maximum number of bloodsuckers allowed in any 200 meter area.
|
||||
DZE_BloodsuckersMaxLocal = 2; // Maximum number of bloodsuckers that can spawn per client.
|
||||
DZE_BloodsuckerScreenEffect = true; // On screen slash marks when the bloodsuckers attack.
|
||||
DZE_BloodsuckerDeleteNearTrader = true; // Deletes bloodsuckers when near trader cities.
|
||||
};
|
||||
|
||||
// Both
|
||||
dayz_infectiouswaterholes = true; //Enable infected waterholes
|
||||
dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. Also enables comfrey plant spawner which negatively impacts performance.
|
||||
dayz_townGeneratorBlackList = []; // If townGenerator is enabled it will not spawn junk within 150m of these positions. Example for Chernarus traders: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]
|
||||
DZE_HeliLift = true; // Enable Epoch heli lift system
|
||||
DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature
|
||||
DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage to objects by ramming. Doesn't work with amphibious pook which should not be used due to FPS issues.
|
||||
DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray?
|
||||
dayz_ForcefullmoonNights = false; // Forces night time to be full moon.
|
||||
infectedWaterHoles = []; //Needed for non-cherno maps.
|
||||
DZE_GodModeBase = false; // Disables damage handler from base objects so they can't be destroyed.
|
||||
dayz_spawnselection = 0; //(Chernarus only) Turn on spawn selection 0 = random only spawns, 1 = spawn choice based on limits
|
||||
dayz_classicBloodBagSystem = false; // disable blood types system and use the single classic ItemBloodbag
|
||||
dayz_enableFlies = true; // Enable flies on dead bodies (negatively impacts FPS).
|
||||
|
||||
// Death Messages
|
||||
DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel.
|
||||
DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the top left with weapon icons.
|
||||
DZE_DeathMsgRolling = false; // Display death messages as rolling messages in bottom center of screen.
|
||||
|
||||
// ZSC
|
||||
Z_SingleCurrency = false; // Enable single currency system.
|
||||
Z_globalBanking = false; // Enable global banking system.
|
||||
Z_persistentMoney = false; // Enabling this stores currency to player_data instead of character_data. Currency transfers to a new character after death. For PVE servers only. Formerly called "GlobalMoney".
|
||||
Z_VehicleDistance = 40; // Max distance a vehicle can be sold or accessed from at a trader.
|
||||
CurrencyName = "Coins"; // If using single currency this is the currency display name.
|
||||
DZE_MoneyStorageClasses = ["VaultStorage","VaultStorage2","VaultStorageLocked","VaultStorage2Locked","LockboxStorageLocked","LockboxStorage2Locked","LockboxStorage","LockboxStorage2","LockboxStorageWinterLocked","LockboxStorageWinter2Locked","LockboxStorageWinter","LockboxStorageWinter2","TallSafe","TallSafeLocked"]; // If using single currency this is an array of object classes players can store coins in. E.g.: ["GunRack_DZ","WoodCrate_DZ"]
|
||||
ZSC_VehicleMoneyStorage = true; // Allow players to store money in vehicles. If vehicles are destroyed the money is also destroyed.
|
||||
|
||||
// Plot Management and Plot for Life
|
||||
DZE_permanentPlot = true; // Plot ownership saves after death. Enables Plot for Life by @RimBlock and Plot Management by @DevZupa.
|
||||
DZE_isRemovable = ["Plastic_Pole_EP1_DZ"]; //Items that can be removed with a crowbar with no ownership or access required. To forbid base take overs remove plot pole from this list and add it to DZE_restrictRemoval. It is not necessary to add wrecks or items that inherit from 'BuiltItems' to this list.
|
||||
|
||||
// Door Management
|
||||
DZE_doorManagement = true; // Enable Door Management by @DevZupa.
|
||||
|
||||
// Group System
|
||||
dayz_groupSystem = false; // Enable group system
|
||||
|
||||
// Weather
|
||||
DZE_Weather = 2; // Options: 1 - Summer Static, 2 - Summer Dynamic, 3 - Winter Static, 4 - Winter Dynamic. If static is selected, the weather settings will be set at server startup and not change. Weather settings can be adjusted with array DZE_WeatherVariables.
|
||||
|
||||
// The settings in the array below may be adjusted as desired. The default settings are designed to maximize client and server performance.
|
||||
// Having several features enabled at once might have adverse effects on client performance. For instance, you could have snowfall, ground fog, and breath fog threads all running at once.
|
||||
DZE_WeatherVariables = [
|
||||
15, // Minimum time in minutes for the weather to change. (default value: 15).
|
||||
30, // Maximum time in minutes for the weather to change. (default value: 30).
|
||||
0, // Minimum fog intensity (0 = no fog, 1 = maximum fog). (default value: 0).
|
||||
.2, // Maximum fog intensity (0 = no fog, 1 = maximum fog). (default value: 0.8).
|
||||
0, // Minimum overcast intensity (0 = clear sky, 1 = completely overcast). (default value: 0). Note: Rain and snow will not occur when overcast is less than 0.70.
|
||||
.6, // Maximum overcast intensity (0 = clear sky, 1 = completely overcast). (default value: 1).
|
||||
0, // Minimum rain intensity (0 = no rain, 1 = maximum rain). Overcast needs to be at least 70% for it to rain.
|
||||
.6, // Maximum rain intensity (0 = no rain, 1 = maximum rain). Overcast needs to be at least 70% for it to rain.
|
||||
0, // Minimum wind strength (default value: 0).
|
||||
3, // Maximum wind strength (default value: 5).
|
||||
.25, // Probability for wind to change when weather changes. (default value: .25).
|
||||
1, // Minimum snow intensity (0 = no snow, 1 = maximum snow). Overcast needs to be at least 75% for it to snow.
|
||||
1, // Maximum snow intensity (0 = no snow, 1 = maximum snow). Overcast needs to be at least 75% for it to snow.
|
||||
.2,// Probability for a blizzard to occur when it is snowing. (0 = no blizzards, 1 = blizzard all the time). (default value: .2).
|
||||
10, // Blizzard interval in minutes. Set to zero to have the blizzard run for the whole interval, otherwise you can set a custom time interval for the blizzard.
|
||||
0, // Ground Fog Effects. Options: 0 - no ground fog, 1 - only at evening, night, and early morning, 2 - anytime, 3 - near cities and towns, at late evening, night, and early morning, 4 - near cities and towns, anytime.
|
||||
400, // Distance in meters from player to scan for buildings to spawn ground fog. By default, only the 15 nearest buildings will spawn ground fog.
|
||||
false, // Allow ground fog when it's snowing or raining?
|
||||
2 // Winter Breath Fog Effects. Options: 0 - no breath fog, 1 - anytime, 2 - only when snowing or blizzard. Note: breath fog is only available with winter weather enabled.
|
||||
];
|
||||
|
||||
/*
|
||||
Developers:
|
||||
|
||||
|
||||
@@ -209,7 +209,9 @@ if (!isDedicated) then {
|
||||
s_player_checkWallet = -1;
|
||||
s_player_clothes = -1;
|
||||
s_player_gdoor_opener = [];
|
||||
s_player_gdoor_opener_ctrl = -1;
|
||||
s_player_gdoor_opener_ctrl = -1;
|
||||
s_player_bury_human = -1;
|
||||
s_player_butcher_human = -1;
|
||||
};
|
||||
call dayz_resetSelfActions;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ _magazines = getMagazineCargo _object;
|
||||
_backpacks = getBackpackCargo _object;
|
||||
_inv = [_weapons,_magazines,_backpacks];
|
||||
|
||||
if (Z_SingleCurrency && ZSC_VehicleMoneyStorage) then {
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage}) then {
|
||||
_coins = _object getVariable ["cashMoney",0];
|
||||
};
|
||||
|
||||
@@ -107,7 +107,7 @@ if (_outcome != "PASS") then {
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
|
||||
if (Z_SingleCurrency && ZSC_VehicleMoneyStorage && {_coins > 0}) then {
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage && (_coins > 0)}) then {
|
||||
_object setVariable ["cashMoney",_coins,true];
|
||||
};
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ sched_corpses = {
|
||||
if (_onoff == 1) then {
|
||||
_sound = createSoundSource["Sound_Flies",getPosATL _x,[],0];
|
||||
_sound attachTo [_x];
|
||||
_x setVariable ["sched_co_fliesSource", _sound];
|
||||
_x setVariable ["sched_co_fliesSource", _sound,[false,true] select (DZE_Bury_Body || DZE_Butcher_Body)];
|
||||
//diag_log "create sound";
|
||||
};
|
||||
// broadcast flies status for everyone periodically, to update visible swarm
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define PATH "z\addons\dayz_server\system\scheduler\"
|
||||
#define PATH "\z\addons\dayz_server\system\scheduler\"
|
||||
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_corpses.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_lootpiles.sqf");
|
||||
@@ -6,8 +6,11 @@ call compile preprocessFileLineNumbers (PATH+"sched_sync.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_safetyVehicle.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_event.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_traps.sqf");
|
||||
if (DZE_Bury_Body || DZE_Butcher_Body) then {
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_lootCrates.sqf");
|
||||
};
|
||||
|
||||
[
|
||||
local _list = [
|
||||
// period offset code <-> ctx init code ->ctx
|
||||
[ 60, 0, sched_event, sched_event_init ],
|
||||
[ 60, 224, sched_corpses ],
|
||||
@@ -17,17 +20,12 @@ call compile preprocessFileLineNumbers (PATH+"sched_traps.sqf");
|
||||
[ 120, 48, sched_safetyVehicle ],
|
||||
[ 360, 480, sched_fps ],
|
||||
[ 30, 60, sched_traps, sched_traps_init ]
|
||||
] execFSM ("z\addons\dayz_code\system\scheduler\scheduler.fsm");
|
||||
];
|
||||
|
||||
//diag_log [ __FILE__, "Scheduler started"];
|
||||
if (DZE_Bury_Body || DZE_Butcher_Body) then {
|
||||
_list set [count _list, [ 60, 240, sched_lootCrates ]];
|
||||
};
|
||||
|
||||
_list execFSM ("\z\addons\dayz_code\system\scheduler\scheduler.fsm");
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// (see ViralZeds.hpp -> zombie_agent.fsm -> zombie_findOwner.sqf), called when a zombie becomes "local" to the server after the player disconnected
|
||||
zombie_findOwner = {
|
||||
(_this select 0) call fa_deleteVehicle;
|
||||
};
|
||||
*/
|
||||
|
||||
//diag_log [ __FILE__, "Scheduler started"];
|
||||
38
SQF/dayz_server/system/scheduler/sched_lootCrates.sqf
Normal file
38
SQF/dayz_server/system/scheduler/sched_lootCrates.sqf
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
// Delete loot crates, graves and crosses after 25 minutes
|
||||
sched_lootCrates = {
|
||||
private ["_delQtyCrate","_crateTime","_objects","_crates","_graves","_cross"];
|
||||
|
||||
_delQtyCrate = 0;
|
||||
#define CENTER getMarkerPos "center"
|
||||
#define RADIUS ((getMarkerSize "center") select 1)*2
|
||||
|
||||
_crates = CENTER nearObjects ["DZ_AmmoBoxSmallUS",RADIUS];
|
||||
_graves = CENTER nearObjects ["Grave",RADIUS];
|
||||
_cross = CENTER nearObjects ["GraveCross1",RADIUS];
|
||||
|
||||
_objects = _crates + _graves + _cross;
|
||||
|
||||
{
|
||||
if (_x getVariable ["bury",false]) then {
|
||||
_crateTime = _x getVariable ["sched_co_crateTime", -1];
|
||||
if (_crateTime == -1) exitWith {
|
||||
_crateTime = diag_tickTime;
|
||||
_x setVariable ["sched_co_crateTime", _crateTime];
|
||||
};
|
||||
if (diag_tickTime - _crateTime > 25*60) then {
|
||||
_x call sched_co_deleteVehicle;
|
||||
_delQtyCrate = _delQtyCrate + 1;
|
||||
};
|
||||
};
|
||||
} forEach _objects;
|
||||
|
||||
#ifdef SERVER_DEBUG
|
||||
if (_delQtyCrate> 0) then {
|
||||
diag_log format ["%1: Deleted %2 bury/butcher objects.",__FILE__,_delQtyCrate];
|
||||
};
|
||||
#endif
|
||||
|
||||
objNull
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
//new
|
||||
5 !(^DZ_|^z_|^pz_|^WeaponHolder|Box|dog|PZombie_VB|^Smoke|^Chem|^._40mm|_DZ$|^Trap) !=(SeaGull|SmallSecondary|HelicopterExplo(Small|Big)|Stash(Small|Medium)(|[1-4])) !=(CZ_VestPouch_EP1|R_M136_AT|R_MEEWS_HEAT|Wire_cat1) !TentStorage !=(JackDaniels|(Tin|Soda)Can|RoadFlare|WoodenArrowF|zZombie_Base|Parachute(West|C)|Grenade(_|HandTimed)(West|East)) !=(CMflareAmmo|Pipebomb) !=(WildBoar|Rabbit|Sheep|Sheep(01_EP1|02_EP1)|Goat|Goat(01_EP1|02_EP1)|Hen|Cow0[1234]|Cow01_EP1|Cock) !=Blood_Trail_DZ !^(Wooden|Metal)Fence !^WoodenGate_ !=(ShantyHouse(|Stage[2-7])|SurvivorWorkshop(|Stage2|[ABC]Stage[345])|WorkBench) !=explosive_bolt !"Land_" !=Sign_(arrow_down_large|sphere10cm)_EP1 !="MAP_c_fern" !="Grave" !"VaultStorage" !="LaserTargetW" !Fort_ !Nest !CMflare !="GyroGrenade" !="CraterLong" !="pook_camel_HE" !="Fin" !="Pastor" !_DZE[12]$ !"TallSafe"
|
||||
5 !(^DZ_|^z_|^pz_|^WeaponHolder|Box|dog|PZombie_VB|^Smoke|^Chem|^._40mm|_DZ$|^Trap) !=(SeaGull|SmallSecondary|HelicopterExplo(Small|Big)|Stash(Small|Medium)(|[1-4])) !=(CZ_VestPouch_EP1|R_M136_AT|R_MEEWS_HEAT|Wire_cat1) !TentStorage !=(JackDaniels|(Tin|Soda)Can|RoadFlare|WoodenArrowF|zZombie_Base|Parachute(West|C)|Grenade(_|HandTimed)(West|East)) !=(CMflareAmmo|Pipebomb) !=(WildBoar|Rabbit|Sheep|Sheep(01_EP1|02_EP1)|Goat|Goat(01_EP1|02_EP1)|Hen|Cow0[1234]|Cow01_EP1|Cock) !=Blood_Trail_DZ !^(Wooden|Metal)Fence !^WoodenGate_ !=(ShantyHouse(|Stage[2-7])|SurvivorWorkshop(|Stage2|[ABC]Stage[345])|WorkBench) !=explosive_bolt !"Land_" !=Sign_(arrow_down_large|sphere10cm)_EP1 !="MAP_c_fern" !="Grave" !"VaultStorage" !="LaserTargetW" !Fort_ !Nest !CMflare !="GyroGrenade" !="CraterLong" !="pook_camel_HE" !="Fin" !="Pastor" !_DZE[12]$ !"TallSafe" !=GraveCross1
|
||||
5 SeaGull //set to its own line so we know which kick we have here with out looking in the logs
|
||||
1 ^DZ_ !=DZ_(British_ACU|Czech_Vest_Pouch|(TK_Assault_Pack|Patrol_Pack|Assault_Pack|ALICE_Pack|CivilBackpack|Backpack|LargeGunBag|GunBag)_EP1) !=DZ_((AmmoBox|ExplosiveBox)(RU|US)|MedBox|CardboardBox)
|
||||
1 ^DZ_ !=DZ_(British_ACU|Czech_Vest_Pouch|(TK_Assault_Pack|Patrol_Pack|Assault_Pack|ALICE_Pack|CivilBackpack|Backpack|LargeGunBag|GunBag)_EP1) !=DZ_((AmmoBox|ExplosiveBox)(RU|US)|MedBox|CardboardBox) !DZ_AmmoBox
|
||||
1 ^z_ !=z_((|new_)villager[1234]|(|new_)worker[1234]|teacher|hunter|suit[1-6]|soldier(|_pilot|_heavy)|policeman(|2)|doctor|priest) !=z_(citizen[1-4]|profiteer[1-4]|rocker[1-4]|lumberjack[1-4]|hunter[2345]|assistant|pilot|takistani[1-6]) !z_soldier_(usmc|fr|cdf|ru|gue|ins|tk|cz|un|ger|baf|pmc|acr) !=z_(dealer|gardener|mafiaboss|postman[1-4]|prisoner[1-3]|firefighter[1-5]|civilian([1-9]|1[0-5])) !=z_bloodsucker
|
||||
1 ^WeaponHolder !=WeaponHolder !WeaponHolder_part !=WeaponHolder_(Item(DomeTent|CamoNet|Crowbar|Fuelcan|Hatchet|Jerrycan|Tent)|Melee(BaseBallBat(|Nails)|BatBarbed|Machete)) !=WeaponHolder_Part(Engine|Fueltank|Generic|Glass|VRotor|Wheel) !=WeaponHolder_Item(WorkBench|MetalSheet|ConcreteBlock|RSJ|Pickaxe|Generator)
|
||||
1 Box !=(DZ_((AmmoBox|ExplosiveBox)(RU|US)|MedBox|CardboardBox)|Item(Match|Tool)box|equip_pvc_box|DebugBoxPlayer_DZ|WeaponHolder_ItemLockbox) !=LockboxStorage(Locked|WinterLocked|2Locked|Winter2Locked)
|
||||
1 Box !=(DZ_((AmmoBox|ExplosiveBox)(RU|US)|MedBox|CardboardBox)|Item(Match|Tool)box|equip_pvc_box|DebugBoxPlayer_DZ|WeaponHolder_ItemLockbox) !=LockboxStorage(Locked|WinterLocked|2Locked|Winter2Locked) !DZ_AmmoBox
|
||||
1 ^Smoke !=SmokeShell(|Red|Green|Yellow) !=SmokeLauncherAmmo
|
||||
1 ^Chem !=Chem(Green|Red|Blue)
|
||||
1 ^._40mm !=(G_40mm_HE|G_40mm_Smoke|F_40mm_White|F_40mm_Green)
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user