Advertisement
Guest User

Variables.sqf

a guest
Jul 8th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.90 KB | None | 0 0
  1. disableSerialization;
  2.  
  3. // Enable
  4. // 0=False/off, 1=True/on
  5. dayz_Trash = 1;
  6.  
  7. //
  8. fps_safty_check = diag_fpsmin;
  9.  
  10. //Model Variables
  11. Bandit1_DZ = "Bandit1_DZ";
  12. BanditW1_DZ = "BanditW1_DZ";
  13. Survivor1_DZ = "Survivor2_DZ";
  14. Survivor2_DZ = "Survivor2_DZ";
  15. SurvivorW2_DZ = "SurvivorW2_DZ";
  16. Sniper1_DZ = "Sniper1_DZ";
  17. Camo1_DZ = "Camo1_DZ";
  18. Soldier1_DZ = "Soldier1_DZ";
  19. Rocket_DZ = "Rocket_DZ";
  20.  
  21. AllPlayers = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","GER_Soldier_EP1"];
  22. AllPlayersVehicles = ["GER_Soldier_EP1","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","AllVehicles"];
  23.  
  24. MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails"];
  25. MeleeMagazines = ["hatchet_swing","crowbar_swing","Machete_swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing"];
  26.  
  27. //New Zeds
  28. DayZ_NewZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"];
  29. //Bags
  30. DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Puch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];
  31.  
  32. SafeObjects = ["Land_Fire_DZ", "TentStorage", "Wire_cat1", "Sandbag1_DZ", "Hedgehog_DZ", "StashSmall", "StashMedium"];
  33.  
  34. //Cooking
  35. meatraw = [
  36. "FoodSteakRaw",
  37. "FoodmeatRaw",
  38. "FoodbeefRaw",
  39. "FoodmuttonRaw",
  40. "FoodchickenRaw",
  41. "FoodrabbitRaw",
  42. "FoodbaconRaw",
  43. "FoodgoatRaw"
  44. ];
  45. meatcooked = [
  46. "FoodSteakCooked",
  47. "FoodmeatCooked",
  48. "FoodbeefCooked",
  49. "FoodmuttonCooked",
  50. "FoodchickenCooked",
  51. "FoodrabbitCooked",
  52. "FoodbaconCooked",
  53. "FoodgoatCooked"
  54. ];
  55. //Eating
  56. no_output_food = [
  57. "FoodMRE",
  58. "FoodPistachio",
  59. "FoodNutmix",
  60. "FoodCandyAnders",
  61. "FoodCandyLegacys",
  62. "FoodCandyMintception"
  63. ]+meatcooked+meatraw;
  64.  
  65. food_with_output=[
  66. "FoodCanBakedBeans",
  67. "FoodCanSardines",
  68. "FoodCanFrankBeans",
  69. "FoodCanPasta",
  70. "FoodCanGriff",
  71. "FoodCanBadguy",
  72. "FoodCanBoneboy",
  73. "FoodCanCorn",
  74. "FoodCanCurgon",
  75. "FoodCanDemon",
  76. "FoodCanFraggleos",
  77. "FoodCanHerpy",
  78. "FoodCanDerpy",
  79. "FoodCanOrlok",
  80. "FoodCanPowell",
  81. "FoodCanTylers",
  82. "FoodCanUnlabeled",
  83. "FoodCanRusUnlabeled",
  84. "FoodCanRusPork",
  85. "FoodCanRusPeas",
  86. "FoodCanRusMilk",
  87. "FoodCanRusCorn",
  88. "FoodCanRusStew",
  89. "FoodChipsSulahoops",
  90. "FoodChipsMysticales"
  91. ];
  92.  
  93. food_output = [
  94. "TrashTinCan",
  95. "TrashTinCan",
  96. "TrashTinCan",
  97. "TrashTinCan",
  98. "FoodCanGriffEmpty",
  99. "FoodCanBadguyEmpty",
  100. "FoodCanBoneboyEmpty",
  101. "FoodCanCornEmpty",
  102. "FoodCanCurgonEmpty",
  103. "FoodCanDemonEmpty",
  104. "FoodCanFraggleosEmpty",
  105. "FoodCanHerpyEmpty",
  106. "FoodCanDerpyEmpty",
  107. "FoodCanOrlokEmpty",
  108. "FoodCanPowellEmpty",
  109. "FoodCanTylersEmpty",
  110. "FoodCanUnlabeledEmpty",
  111. "FoodCanRusUnlabeledEmpty",
  112. "FoodCanRusPorkEmpty",
  113. "FoodCanRusPeasEmpty",
  114. "FoodCanRusMilkEmpty",
  115. "FoodCanRusCornEmpty",
  116. "FoodCanRusStewEmpty",
  117. "FoodChipsSulahoopsEmpty",
  118. "FoodChipsMysticalesEmpty"
  119. ];
  120. //Drinking
  121. no_output_drink = ["ItemWaterbottle", "ItemWaterbottleBoiled"];
  122.  
  123. drink_with_output = [
  124. "ItemSoda", //just to define item for ItemSodaEmpty
  125. "ItemSodaCoke",
  126. "ItemSodaPepsi",
  127. "ItemSodaMdew",
  128. "ItemSodaMtngreen",
  129. "ItemSodaR4z0r",
  130. "ItemSodaClays",
  131. "ItemSodaSmasht",
  132. "ItemSodaDrwaste",
  133. "ItemSodaLemonade",
  134. "ItemSodaLvg",
  135. "ItemSodaMzly",
  136. "ItemSodaRabbit"
  137. ];
  138. drink_output = [
  139. "ItemSodaEmpty",
  140. "ItemSodaCokeEmpty",
  141. "ItemSodaPepsiEmpty",
  142. "ItemSodaMdewEmpty",
  143. "ItemSodaMtngreenEmpty",
  144. "ItemSodaR4z0rEmpty",
  145. "ItemSodaClaysEmpty",
  146. "ItemSodaSmashtEmpty",
  147. "ItemSodaDrwasteEmpty",
  148. "ItemSodaLemonadeEmpty",
  149. "ItemSodaLvgEmpty",
  150. "ItemSodaMzlyEmpty",
  151. "ItemSodaRabbitEmpty"
  152. ];
  153. boil_tin_cans = [
  154. "TrashTinCan",
  155. "FoodCanGriffEmpty",
  156. "FoodCanBadguyEmpty",
  157. "FoodCanBoneboyEmpty",
  158. "FoodCanCornEmpty",
  159. "FoodCanCurgonEmpty",
  160. "FoodCanDemonEmpty",
  161. "FoodCanFraggleosEmpty",
  162. "FoodCanHerpyEmpty",
  163. "FoodCanDerpyEmpty",
  164. "FoodCanOrlokEmpty",
  165. "FoodCanPowellEmpty",
  166. "FoodCanTylersEmpty",
  167. "FoodCanUnlabeledEmpty",
  168. "FoodCanRusUnlabeledEmpty",
  169. "FoodCanRusStewEmpty",
  170. "FoodCanRusPorkEmpty",
  171. "FoodCanRusPeasEmpty",
  172. "FoodCanRusMilkEmpty",
  173. "FoodCanRusCornEmpty",
  174. "ItemSodaEmpty",
  175. "ItemSodaCokeEmpty",
  176. "ItemSodaPepsiEmpty",
  177. "ItemSodaMdewEmpty",
  178. "ItemSodaMtngreenEmpty",
  179. "ItemSodaR4z0rEmpty",
  180. "ItemSodaClaysEmpty",
  181. "ItemSodaSmashtEmpty",
  182. "ItemSodaDrwasteEmpty",
  183. "ItemSodaLemonadeEmpty",
  184. "ItemSodaLvgEmpty",
  185. "ItemSodaMzlyEmpty",
  186. "ItemSodaRabbitEmpty"
  187. ];
  188.  
  189. dayz_combatLog = "";
  190. canRoll = true;
  191. canPickup = false;
  192. pickupInit = false;
  193.  
  194. //Hunting Variables
  195. dayZ_partClasses = [
  196. "PartFueltank",
  197. "PartWheel",
  198. //"PartGeneric", //No need to add, it is default for everything
  199. "PartEngine"
  200. ];
  201. dayZ_explosiveParts = [
  202. "palivo",
  203. "motor"
  204. ];
  205. //Survival Variables
  206. SleepFood = 2160; //minutes (48 hours)
  207. SleepWater = 1440; //minutes (24 hours)
  208. SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the coldest Point at night (without other effects! night factor expected to be -1) //TeeChange
  209.  
  210. //Server Variables
  211. allowConnection = false;
  212. isSinglePlayer = false;
  213. dayz_serverObjectMonitor = [];
  214.  
  215. //Streaming Variables (player only)
  216. dayz_Locations = [];
  217. dayz_locationsActive = [];
  218.  
  219. //GUI
  220. Dayz_GUI_R = 0.38; // 0.7
  221. Dayz_GUI_G = 0.63; // -0.63
  222. Dayz_GUI_B = 0.26; // -0.26
  223.  
  224. //actions blockers
  225. a_player_cooking = false;
  226. a_player_boil = false;
  227. a_player_jerryfilling = false;
  228. a_player_repairing = false;
  229.  
  230. //Player self-action handles
  231. dayz_resetSelfActions = {
  232. s_player_dragbody = -1;
  233. s_player_fire = -1;
  234. s_player_cook = -1;
  235. s_player_boil = -1;
  236. s_player_fireout = -1;
  237. s_player_butcher = -1;
  238. s_player_packtent = -1;
  239. s_player_fillwater = -1;
  240. s_player_fillwater2 = -1;
  241. s_player_fillfuel = -1;
  242. s_player_grabflare = -1;
  243. s_player_removeflare = -1;
  244. s_player_painkiller = -1;
  245. s_player_studybody = -1;
  246. s_build_Sandbag1_DZ = -1;
  247. s_build_Hedgehog_DZ = -1;
  248. s_build_Wire_cat1 = -1;
  249. s_player_deleteBuild = -1;
  250. s_player_forceSave = -1;
  251. s_player_flipveh = -1;
  252. s_player_stats = -1;
  253. s_player_sleep = -1;
  254. s_player_movedog = -1;
  255. s_player_speeddog = -1;
  256. s_player_calldog = -1;
  257. s_player_feeddog = -1;
  258. s_player_waterdog = -1;
  259. s_player_staydog = -1;
  260. s_player_trackdog = -1;
  261. s_player_barkdog = -1;
  262. s_player_warndog = -1;
  263. s_player_followdog = -1;
  264. s_player_fillfuel20 = -1;
  265. s_player_fillfuel5 = -1;
  266. };
  267. call dayz_resetSelfActions;
  268.  
  269. //Engineering variables
  270. s_player_lastTarget = objNull;
  271. s_player_repairActions = [];
  272.  
  273. //Initialize Medical Variables
  274. force_dropBody = false;
  275. r_interrupt = false;
  276. r_doLoop = false;
  277. r_self = false;
  278. r_self_actions = [];
  279. r_drag_sqf = false;
  280. r_action = false;
  281. r_action_unload = false;
  282. r_player_handler = false;
  283. r_player_handler1 = false;
  284. r_player_dead = false;
  285. r_player_unconscious = false;
  286. r_player_infected = false;
  287. r_player_injured = false;
  288. r_player_inpain = false;
  289. r_player_loaded = false;
  290. r_player_cardiac = false;
  291. r_fracture_legs = false;
  292. r_fracture_arms = false;
  293. r_player_vehicle = player;
  294. r_player_blood = 12000;
  295. //Blood Regen
  296. r_player_bloodregen = 0;
  297. //Blood Gain Per Sec
  298. r_player_bloodgainpersec = 0;
  299. //Blood Loss Per Sec
  300. r_player_bloodlosspersec = 0;
  301. //Blood Per Sec (gain - loss)
  302. r_player_bloodpersec = 0;
  303. //Food Stack
  304. r_player_foodstack = 1;
  305. //player skill
  306. r_player_lowblood = false;
  307. r_player_timeout = 0;
  308. r_player_bloodTotal = r_player_blood;
  309. r_public_blood = r_player_blood;
  310. r_player_bloodDanger = r_player_bloodTotal * 0.2;
  311. r_player_actions = [];
  312. r_handlerCount = 0;
  313. r_action_repair = false;
  314. r_action_targets = [];
  315. r_pitchWhine = false;
  316. r_isBandit = false;
  317.  
  318. //count actions
  319. r_action_count = 0;
  320.  
  321. //ammo routine
  322. r_player_actions2 = [];
  323. r_action2 = false;
  324. r_player_lastVehicle = objNull;
  325. r_player_lastSeat = [];
  326. r_player_removeActions2 = {
  327. if (!isNull r_player_lastVehicle) then {
  328. {
  329. r_player_lastVehicle removeAction _x;
  330. } forEach r_player_actions2;
  331. r_player_actions2 = [];
  332. r_action2 = false;
  333. };
  334. };
  335.  
  336. USEC_woundHit = [ // limbs hit given by arma engine when fnc_usec_damageHandler is called
  337. "",
  338. "body",
  339. "hands",
  340. "legs",
  341. "head_hit"
  342. ];
  343. DAYZ_woundHit = [
  344. [
  345. "body",
  346. "hands",
  347. "legs",
  348. "head_hit"
  349. ],
  350. [ 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]
  351. ];
  352. DAYZ_woundHit_ok = [
  353. [
  354. "body",
  355. "hands",
  356. "legs"
  357. ],
  358. [0,0,0,0,0,1,1,1,2,2]
  359. ];
  360. DAYZ_woundHit_dog = [
  361. [
  362. "body",
  363. "hands",
  364. "legs"
  365. ],
  366. [0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2]
  367. ];
  368. USEC_MinorWounds = [
  369. "hands",
  370. "legs"
  371. ];
  372. USEC_woundPoint = [ // translation table USEC_woundHit -> SV suffixes
  373. ["Pelvis","aimpoint"],
  374. ["aimpoint"], //,"RightShoulder","LeftShoulder"
  375. ["lelbow","relbow"],
  376. ["RightFoot","LeftFoot"],
  377. ["neck","pilot"]
  378. ];
  379. USEC_typeOfWounds = [ // used by player_sumMedical, should contains all limbs described in USEC_woundPoint. These limbs statuses are saved by server_playerSync in HIVE if they are bleeding (medical select 8)
  380. "Pelvis",
  381. "aimpoint",
  382. "lelbow","relbow",
  383. "RightFoot","LeftFoot",
  384. "neck","pilot"
  385. ];
  386.  
  387. //Initialize Zombie Variables
  388. dayz_zombieTargetList = [
  389. ["SoldierWB",50],
  390. ["Air",500],
  391. ["LandVehicle",200]
  392. ];
  393. dayzHit = [];
  394. PVDZ_obj_Publish = []; //used for eventhandler to spawn a mirror of players tent
  395. PVDZ_obj_HideBody = objNull;
  396.  
  397. //DayZ settings
  398. dayz_dawn = 4; //6
  399. dayz_dusk = 22; //18
  400. dayz_maxAnimals = 5;
  401. DAYZ_agentnumber = 0;
  402. dayz_animalDistance = 800;
  403. dayz_zSpawnDistance = 1000;
  404.  
  405. dayz_maxLocalZombies = 5; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  406. dayz_maxGlobalZombies = 6;
  407. dayz_maxZeds = 100;
  408. dayz_maxMaxModels = 80; // max quantity of Man models (player or Z, dead or alive) around players. Below this limit we can spawn Z
  409. dayz_maxMaxWeaponHolders = 80; // max quantity of loot piles around players. Below this limit we can spawn some loot
  410. dayz_tagDelayWeaponHolders = 20; // prevent any new loot spawn on this building during this delay (minutes)
  411. dayz_tagDelayZombies = 30; // prevent any new zombie spawn into or near this building during this delay (minutes)
  412. dayz_spawnArea = 400; // radius around player where we can spawn loot & Z
  413. dayz_safeDistPlr = 50; // Any loot & Z won't be spawned closer than this distance from any player
  414. dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
  415. dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
  416. dayz_canDelete = 500; // Z, further than this distance from its "owner", will be deleted
  417. dayz_lootSpawnBias = 80; // between 50 and 100. The lower it is, the lower chance some of the lootpiles will spawn
  418. dayz_localswarmSpawned = 10; // how many zeds will spawn around you during a combat scenario.
  419. dayz_infectionTreshold = 1.25; // used to trigger infection, see fn_damageHandler.sqf
  420.  
  421. //init global arrays for Loot Chances
  422. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\loot_init.sqf";
  423.  
  424. if(isServer) then {
  425. dayz_players = [];
  426. dead_bodyCleanup = [];
  427. needUpdate_objects = [];
  428. Server_InfectedCamps = [];
  429. dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
  430. };
  431.  
  432. if(!isDedicated) then {
  433. //Establish Location Streaming
  434. _funcGetLocation =
  435. {
  436. dayz_Locations = [];
  437. for "_i" from 0 to ((count _this) - 1) do
  438. {
  439. private ["_location","_config","_locHdr","_position","_size","_type"];
  440. //Get Location Data from config
  441. _config = (_this select _i);
  442. _position = getArray (_config >> "position");
  443. _locHdr = configName _config;
  444. _size = getNumber (_config >> "size");
  445. dayz_Locations set [count dayz_Locations, [_position,_locHdr,_size]];
  446. };
  447. };
  448. _cfgLocation = configFile >> "CfgTownGeneratorChernarus";
  449. _cfgLocation call _funcGetLocation;
  450.  
  451. dayz_buildingMonitor = []; //Buildings to check
  452. dayz_bodyMonitor = [];
  453. dayz_flyMonitor = []; //used for monitor flies
  454.  
  455. dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
  456.  
  457. //temperature variables
  458. dayz_temperatur = 36; //TeeChange
  459. dayz_temperaturnormal = 36; //TeeChange
  460. dayz_temperaturmax = 42; //TeeChange
  461. dayz_temperaturmin = 27; //TeeChange
  462.  
  463. //player special variables
  464. dayZ_lastPlayerUpdate = 0;
  465. dayZ_everyonesTents = [];
  466. dayz_hunger = 0;
  467. dayz_thirst = 0;
  468. dayz_combat = 0;
  469. dayz_preloadFinished = false;
  470. dayz_statusArray = [1,1];
  471. dayz_disAudial = 0;
  472. dayz_disVisual = 0;
  473. dayz_firedCooldown = 0;
  474. dayz_DeathActioned = false;
  475. dayz_canDisconnect = true;
  476. dayz_damageCounter = time;
  477. dayz_lastSave = time;
  478. dayz_isSwimming = true;
  479. dayz_currentDay = 0;
  480. dayz_hasLight = false;
  481. dayz_surfaceNoise = 0;
  482. dayz_surfaceType = "None";
  483. dayz_noPenalty = [];
  484. dayz_heavenCooldown = 0;
  485. deathHandled = false;
  486. dayz_lastHumanity = 0;
  487. dayz_guiHumanity = -90000;
  488. dayz_firstGroup = group player;
  489. dayz_originalPlayer = player;
  490. dayz_playerName = "Unknown";
  491. dayz_sourceBleeding = objNull;
  492. dayz_clientPreload = false;
  493. dayz_authed = false;
  494. dayz_panicCooldown = 0;
  495. dayz_areaAffect = 3.5;
  496. dayz_monitorPeriod = 0.6; // number of seconds between each player_zombieCheck calls
  497. dayz_heartBeat = false;
  498. dayzClickTime = 0;
  499. dayz_spawnDelay = 300;
  500. dayz_spawnWait = -300;
  501. dayz_lootDelay = 3;
  502. dayz_lootWait = -300;
  503. dayz_spawnZombies = 0;
  504. dayz_swarmSpawnZombies = 0;
  505. //used to count global zeds around players
  506. dayz_CurrentZombies = 0;
  507. //Used to limit overall zed counts
  508. dayz_maxCurrentZeds = 10;
  509. dayz_inVehicle = false;
  510. dayz_Magazines = [];
  511. dayzGearSave = false;
  512. dayz_unsaved = false;
  513. dayz_scaleLight = 0;
  514. dayzDebug = false;
  515. dayzState = -1;
  516. //uiNamespace setVariable ['DAYZ_GUI_display',displayNull];
  517. //if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
  518. // dayzDebug = true;
  519. //};
  520. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement