fetch_params.sqf 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. if ( isMultiplayer ) then {
  2. GRLIB_difficulty_modifier = ["Difficulty",2] call bis_fnc_getParamValue;
  3. GRLIB_time_factor = ["DayDuration",12] call bis_fnc_getParamValue;
  4. GRLIB_resources_multiplier = ["ResourcesMultiplier",3] call bis_fnc_getParamValue;
  5. GRLIB_fatigue = ["Fatigue",1] call bis_fnc_getParamValue;
  6. GRLIB_introduction = ["Introduction",1] call bis_fnc_getParamValue;
  7. GRLIB_deployment_cinematic = ["DeploymentCinematic",1] call bis_fnc_getParamValue;
  8. GRLIB_unitcap = ["Unitcap",2] call bis_fnc_getParamValue;
  9. GRLIB_adaptive_opfor = ["AdaptToPlayercount",1] call bis_fnc_getParamValue;
  10. GRLIB_civilian_activity = ["civilians",1] call bis_fnc_getParamValue;
  11. GRLIB_teamkill_penalty = ["TeamkillPenalty",0] call bis_fnc_getParamValue;
  12. GRLIB_build_first_fob = ["FirstFob",0] call bis_fnc_getParamValue;
  13. GRLIB_param_wipe_savegame_1 = ["WipeSave1",0] call bis_fnc_getParamValue;
  14. GRLIB_param_wipe_savegame_2 = ["WipeSave2",0] call bis_fnc_getParamValue;
  15. GRLIB_permissions_param = ["Permissions",1] call bis_fnc_getParamValue;
  16. GRLIB_halo_param = ["HaloJump",1] call bis_fnc_getParamValue;
  17. GRLIB_use_whitelist = ["Whitelist",0] call bis_fnc_getParamValue;
  18. GRLIB_cleanup_vehicles = ["CleanupVehicles",2] call bis_fnc_getParamValue;
  19. GRLIB_csat_aggressivity = ["Aggressivity",2] call bis_fnc_getParamValue;
  20. GRLIB_weather_param = ["Weather",3] call bis_fnc_getParamValue;
  21. GRLIB_shorter_nights = ["ShorterNights",0] call bis_fnc_getParamValue;
  22. GRLIB_remote_sensors = 0;//[ "DisableRemoteSensors",0] call bis_fnc_getParamValue;
  23. GRLIB_blufor_defenders = [ "BluforDefenders",1] call bis_fnc_getParamValue;
  24. GRLIB_autodanger = [ "Autodanger",0] call bis_fnc_getParamValue;
  25. GRLIB_maximum_fobs = [ "MaximumFobs",26] call bis_fnc_getParamValue;
  26. GRLIB_max_squad_size = ["MaxSquadSize",10] call bis_fnc_getParamValue;
  27. IA_liberation_arsenalUsePreset = ["ArsenalUsePreset",1] call BIS_fnc_getParamValue;
  28. IA_liberation_mapmarkers = ["MapMarkers",1] call bis_fnc_getParamValue;
  29. IA_liberation_mobilerespawn = ["MobileRespawn",1] call bis_fnc_getParamValue;
  30. IA_liberation_mobilearsenal = ["MobileArsenal",1] call bis_fnc_getParamValue;
  31. IA_liberation_ailogistics = ["AiLogistics",1] call bis_fnc_getParamValue;
  32. } else {
  33. GRLIB_difficulty_modifier = 2;
  34. GRLIB_time_factor = 12;
  35. GRLIB_resources_multiplier = 3;
  36. GRLIB_fatigue = 1;
  37. GRLIB_introduction = 1;
  38. GRLIB_deployment_cinematic = 1;
  39. GRLIB_adaptive_opfor = 1;
  40. GRLIB_unitcap = 2;
  41. GRLIB_civilian_activity = 1;
  42. GRLIB_teamkill_penalty = 0;
  43. GRLIB_build_first_fob = 0;
  44. GRLIB_param_wipe_savegame_1 = 0;
  45. GRLIB_param_wipe_savegame_2 = 0;
  46. GRLIB_permissions_param = 0;
  47. GRLIB_halo_param = 1;
  48. GRLIB_use_whitelist = 0;
  49. GRLIB_cleanup_vehicles = 2;
  50. GRLIB_csat_aggressivity = 2;
  51. GRLIB_weather_param = 3;
  52. GRLIB_shorter_nights = 0;
  53. GRLIB_remote_sensors = 0;
  54. GRLIB_blufor_defenders = 1;
  55. GRLIB_autodanger = 0;
  56. GRLIB_maximum_fobs = 26;
  57. GRLIB_max_squad_size = 10;
  58. IA_liberation_arsenalUsePreset = 1;
  59. IA_liberation_mapmarkers = 1;
  60. IA_liberation_mobilerespawn = 1;
  61. IA_liberation_mobilearsenal = 1;
  62. IA_liberation_ailogistics = 1;
  63. };
  64. if ( GRLIB_fatigue < 0.1 ) then { GRLIB_fatigue = false } else { GRLIB_fatigue = true };
  65. if ( GRLIB_introduction == 1 ) then { GRLIB_introduction = true } else { GRLIB_introduction = false };
  66. if ( GRLIB_deployment_cinematic == 1 ) then { GRLIB_deployment_cinematic = true } else { GRLIB_deployment_cinematic = false };
  67. if ( GRLIB_build_first_fob == 1 ) then { GRLIB_build_first_fob = true } else { GRLIB_build_first_fob = false };
  68. if ( GRLIB_teamkill_penalty == 1 ) then { GRLIB_teamkill_penalty = true } else { GRLIB_teamkill_penalty = false };
  69. if ( GRLIB_adaptive_opfor == 1 ) then { GRLIB_adaptive_opfor = true } else { GRLIB_adaptive_opfor = false };
  70. if ( GRLIB_permissions_param == 1 ) then { GRLIB_permissions_param = true } else { GRLIB_permissions_param = false };
  71. if ( GRLIB_use_whitelist == 1 ) then { GRLIB_use_whitelist = true } else { GRLIB_use_whitelist = false };
  72. if ( GRLIB_shorter_nights == 1 ) then { GRLIB_shorter_nights = true } else { GRLIB_shorter_nights = false };
  73. if ( GRLIB_blufor_defenders == 1 ) then { GRLIB_blufor_defenders = true } else { GRLIB_blufor_defenders = false };
  74. if ( GRLIB_autodanger == 1 ) then { GRLIB_autodanger = true } else { GRLIB_autodanger = false };
  75. if (IA_liberation_arsenalUsePreset == 1) then {IA_liberation_arsenalUsePreset = true} else {IA_liberation_arsenalUsePreset = false};
  76. if (IA_liberation_mapmarkers == 1) then {IA_liberation_mapmarkers = true; GREUH_allow_mapmarkers = true; GREUH_allow_platoonview = true} else {IA_liberation_mapmarkers = false; GREUH_allow_mapmarkers = false; GREUH_allow_platoonview = false; show_platoon = false; show_teammates = false; show_nametags = false};
  77. if (IA_liberation_mobilerespawn == 1) then {IA_liberation_mobilerespawn = true} else {IA_liberation_mobilerespawn = false};
  78. if (IA_liberation_mobilearsenal == 1) then {IA_liberation_mobilearsenal = true} else {IA_liberation_mobilearsenal = false};
  79. if (IA_liberation_ailogistics == 1) then {IA_liberation_ailogistics = true} else {IA_liberation_ailogistics = false};
  80. // Fix for not working float values in mission params
  81. switch (GRLIB_unitcap) do {
  82. case 0: {GRLIB_unitcap = 0.5;};
  83. case 1: {GRLIB_unitcap = 0.75;};
  84. case 2: {GRLIB_unitcap = 1;};
  85. case 3: {GRLIB_unitcap = 1.25;};
  86. case 4: {GRLIB_unitcap = 1.5;};
  87. case 5: {GRLIB_unitcap = 2;};
  88. default {GRLIB_unitcap = 1;};
  89. };
  90. switch (GRLIB_difficulty_modifier) do {
  91. case 0: {GRLIB_difficulty_modifier = 0.5;};
  92. case 1: {GRLIB_difficulty_modifier = 0.75;};
  93. case 2: {GRLIB_difficulty_modifier = 1;};
  94. case 3: {GRLIB_difficulty_modifier = 1.25;};
  95. case 4: {GRLIB_difficulty_modifier = 1.5;};
  96. case 5: {GRLIB_difficulty_modifier = 2;};
  97. case 6: {GRLIB_difficulty_modifier = 4;};
  98. case 7: {GRLIB_difficulty_modifier = 10;};
  99. default {GRLIB_difficulty_modifier = 1;};
  100. };
  101. switch (GRLIB_csat_aggressivity) do {
  102. case 0: {GRLIB_csat_aggressivity = 0.25;};
  103. case 1: {GRLIB_csat_aggressivity = 0.5;};
  104. case 2: {GRLIB_csat_aggressivity = 1;};
  105. case 3: {GRLIB_csat_aggressivity = 2;};
  106. case 4: {GRLIB_csat_aggressivity = 4;};
  107. default {GRLIB_csat_aggressivity = 1;};
  108. };
  109. switch (GRLIB_civilian_activity) do {
  110. case 0: {GRLIB_civilian_activity = 0;};
  111. case 1: {GRLIB_civilian_activity = 0.5;};
  112. case 2: {GRLIB_civilian_activity = 1;};
  113. case 3: {GRLIB_civilian_activity = 2;};
  114. default {GRLIB_csat_aggressivity = 1;};
  115. };
  116. switch (GRLIB_resources_multiplier) do {
  117. case 0: {GRLIB_resources_multiplier = 0.25;};
  118. case 1: {GRLIB_resources_multiplier = 0.5;};
  119. case 2: {GRLIB_resources_multiplier = 0.75;};
  120. case 3: {GRLIB_resources_multiplier = 1;};
  121. case 4: {GRLIB_resources_multiplier = 1.25;};
  122. case 5: {GRLIB_resources_multiplier = 1.5;};
  123. case 6: {GRLIB_resources_multiplier = 2;};
  124. case 7: {GRLIB_resources_multiplier = 3;};
  125. default {GRLIB_resources_multiplier = 1;};
  126. };