Initial Release 0.93

Initial Release of the KP Liberation mission in version 0.93.
Now it's time for bughunting.
After that we will start to implement some new things that we've in mind
already.
This commit is contained in:
Christian 2017-03-06 18:05:55 +01:00
parent ab7f4b48b7
commit 15cffbea64
313 changed files with 30349 additions and 0 deletions

22
LICENSE Normal file
View File

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,30 @@
respawn = 3;
respawndelay = 5;
respawnButton = 1;
disabledAI = true;
enableDebugConsole = 1;
allowFunctionsLog = 0;
loadScreen="res\liberation.jpg";
onLoadMission = "www.killahpotatoes.de";
author = "[GREUH] Zbug, [GREUH] McKeewa, [KP] Wyqer";
onLoadName = $STR_MISSION_TITLE;
joinUnassigned = 1;
#include "GREUH\UI\GREUH_interface.hpp"
#include "ui\liberation_interface.hpp"
#include "ui\liberation_notifications.hpp"
#include "ui\mission_params.hpp"
class CfgDebriefing
{
class End1
{
title = $STR_SORRY;
subtitle = "";
description = $STR_COMMANDER_NOT_AUTHORIZED;
pictureBackground = "";
};
};

View File

@ -0,0 +1,36 @@
GRLIB_save_key = "KP_LIBERATION_ALTIS_SAVEGAME"; // change this value if you want different savegames on different map
GRLIB_side_friendly = WEST;
GRLIB_side_enemy = EAST;
GRLIB_side_resistance = RESISTANCE;
GRLIB_side_civilian = CIVILIAN;
GRLIB_respawn_marker = "respawn_west";
GRLIB_color_friendly = "ColorBLUFOR";
GRLIB_color_enemy = "ColorOPFOR";
GRLIB_color_enemy_bright = "ColorRED";
GRLIB_sector_size = 1000;
GRLIB_capture_size = 175;
GRLIB_radiotower_size = 2500;
GRLIB_recycling_percentage = 0.65;
GRLIB_endgame = 0;
GRLIB_vulnerability_timer = 1200;
GRLIB_defended_buildingpos_part = 0.4;
GRLIB_sector_military_value = 3;
GRLIB_secondary_objective_impact = 0.6;
GRLIB_blufor_cap = 100 * GRLIB_unitcap;
GRLIB_sector_cap = 180 * GRLIB_unitcap;
GRLIB_battlegroup_cap = 150 * GRLIB_unitcap;
GRLIB_patrol_cap = 150 * GRLIB_unitcap;
GRLIB_battlegroup_size = 6 * (sqrt GRLIB_unitcap) * (sqrt GRLIB_csat_aggressivity);
GRLIB_civilians_amount = 10 * GRLIB_civilian_activity;
GRLIB_fob_range = 125;
GRLIB_cleanup_delay = 1200;
GRLIB_surrender_chance = 80;
GRLIB_secondary_missions_costs = [ 10, 10, 10 ];
GRLIB_halo_altitude = 4000;
GRLIB_civ_killing_penalty = 100;
if ( GRLIB_blufor_cap > 100 ) then { GRLIB_blufor_cap = 100 }; // Don't forget that the human commander manages those, not the server
GRLIB_offload_diag = false;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
// Permettre aux joueurs de modifier leur distance de vue
GREUH_allow_viewdistance = true;
// Permettre aux joueurs de modifier la qualité de l environnement
GREUH_allow_worldquality = true;
// Permettre aux joueurs de modifier leurs escouades
GREUH_allow_customsquads = true;
// Permettre aux joueurs de se voir sur la carte
GREUH_allow_mapmarkers = true;
// Permettre aux joueurs de voir le platoon sur la carte et le hud
GREUH_allow_platoonview = true;

View File

@ -0,0 +1,6 @@
_idact = -1;
while { true } do {
waitUntil{ sleep 0.3; alive player };
_idact = player addAction ["<t color='#FF8000'>-- Extended Options --</t>","GREUH\scripts\GREUH_dialog.sqf","",-999,false,true];
waitUntil{ sleep 0.3; !alive player};
};

View File

@ -0,0 +1,51 @@
if (isDedicated) then { exit };
waitUntil { alive player };
desiredviewdistance_inf = viewDistance;
desiredviewdistance_veh = viewDistance;
desiredviewdistance_obj = 75;
desired_fps = 0;
show_teammates = false;
show_nametags = false;
show_platoon = false;
desired_vehvolume = 100;
greuh_options_profile = profileNamespace getVariable "GREUH_OPTIONS_PROFILE";
if ( !isNil "greuh_options_profile" ) then {
desiredviewdistance_inf = greuh_options_profile select 0;
desiredviewdistance_veh = greuh_options_profile select 1;
desiredviewdistance_obj = greuh_options_profile select 2;
show_teammates = greuh_options_profile select 3;
show_platoon = greuh_options_profile select 4;
if ( count greuh_options_profile > 5 ) then {
desired_vehvolume = greuh_options_profile select 5;
if ( isNil "desired_vehvolume" ) then {
desired_vehvolume = 100;
};
};
if ( count greuh_options_profile > 6 ) then {
show_nametags = greuh_options_profile select 6;
if ( isNil "show_nametags" ) then {
show_nametags = false;
};
};
if ( count greuh_options_profile > 7) then {
desired_fps = greuh_options_profile select 7;
if ( isNil "desired_fps" ) then {
desired_fps = 0;
};
};
};
[] call compile preprocessFileLineNumbers "GREUH\GREUH_config.sqf";
[] call compile preprocessFileLineNumbers "GREUH\scripts\GREUH_version.sqf";
[] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_actionmanager.sqf";
[] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_revive_camera.sqf";
[] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_medic_listener.sqf";
if ( GREUH_allow_mapmarkers ) then { [] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_playermarkers.sqf"; };
if ( GREUH_allow_platoonview ) then { [] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_platoonoverlay.sqf"; };
if ( GREUH_allow_platoonview ) then { [] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_cache_units.sqf"; };
if ( GREUH_allow_customsquads ) then { [] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_squadmanagement.sqf"; };
if ( GREUH_allow_viewdistance ) then { [] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_view_distance_management.sqf"; };
[] spawn compile preprocessFileLineNumbers "GREUH\scripts\GREUH_dynamic_view_distance.sqf";

View File

@ -0,0 +1,17 @@
private [ "_scanned_units", "_scanned_groups" ];
waitUntil { !isNil "nametags_distance" };
while { true } do {
_scanned_units = [ allUnits, { ( alive _x ) && ( side group _x == GRLIB_side_friendly ) } ] call BIS_fnc_conditionalSelect;
_scanned_units = [ _scanned_units, { (_x == leader group player ) || (_x distance player < nametags_distance) } ] call BIS_fnc_conditionalSelect;
_scanned_units = [ _scanned_units, { (_x != player) && (( vehicle player ) != ( vehicle _x )) } ] call BIS_fnc_conditionalSelect;
GRLIB_nametag_units = [] + _scanned_units;
_scanned_groups = [ allGroups, { ( side _x == side player ) && ( isplayer (leader _x) ) } ] call BIS_fnc_conditionalSelect;
_scanned_groups = [ _scanned_groups, { ( count units _x > 1 ) || ( count units _x == 1 && leader _x != player ) } ] call BIS_fnc_conditionalSelect;
GRLIB_overlay_groups = [] + _scanned_groups;
sleep 1;
};

View File

@ -0,0 +1,115 @@
_squadcontrols = [511,512,513,514,515,521,522,523,524,525,526,527];
_platooncontrols = [611,612,613,614];
_viewcontrols = [712,713,714,722,723,724,732,733,734];
_worldcontrols = [812,813,814,815];
_markerscontrols = [911,912,913,914];
_allbuttons = [6677,511,512,513,514,613,614,812,813,814,815,913,914,712,722,732];
_rename_controls = [521,522,523,524,525,526,527];
_leader_controls = [561,562,563,564,565,566,567];
renaming = false;
choosingleader = false;
_dialog = createDialog "GREUH_Menu";
waitUntil { dialog };
if ( GREUH_allow_customsquads ) then {
ctrlShow [501, false];
} else {
ctrlShow [501, true];
{ ctrlShow [_x, false] } foreach _squadcontrols;
};
if ( GREUH_allow_platoonview ) then {
ctrlShow [601, false];
} else {
ctrlShow [601, true];
{ ctrlShow [_x, false] } foreach _platooncontrols;
};
if ( GREUH_allow_viewdistance ) then {
ctrlShow [701, false];
sliderSetRange [712, 1000, 10000];
sliderSetPosition [712, desiredviewdistance_inf];
sliderSetSpeed [712, 500, 500];
sliderSetRange [722, 1000, 10000];
sliderSetPosition [722, desiredviewdistance_veh];
sliderSetSpeed [722, 500, 500];
sliderSetRange [732, 30, 100];
sliderSetPosition [732, desiredviewdistance_obj];
sliderSetSpeed [732, 5, 5];
ctrlSetText [ 960, format ["%1",desired_fps] ];
} else {
ctrlShow [701, true];
{ ctrlShow [_x, false] } foreach _viewcontrols;
};
if ( GREUH_allow_worldquality ) then {
ctrlShow [801, false];
} else {
ctrlShow [801, true];
{ ctrlShow [_x, false] } foreach _worldcontrols;
};
if ( GREUH_allow_mapmarkers ) then {
ctrlShow [901, false];
} else {
ctrlShow [901, true];
{ ctrlShow [_x, false] } foreach _markerscontrols;
};
if ( true ) then {
sliderSetSpeed [ 1102, 5, 5];
sliderSetRange [ 1102, 0, 100];
sliderSetPosition [ 1102, desired_vehvolume ];
};
while { dialog && alive player } do {
if ( renaming ) then {
{ ctrlEnable [_x, false] } foreach (_allbuttons);
{ ctrlShow [_x, true] } foreach _rename_controls;
{ ctrlShow [_x, false] } foreach _leader_controls;
} else {
if ( choosingleader ) then {
{ ctrlEnable [_x, false] } foreach _allbuttons;
{ ctrlShow [_x, false] } foreach _rename_controls;
{ ctrlShow [_x, true] } foreach _leader_controls;
} else {
{ ctrlEnable [_x, true] } foreach _allbuttons;
{ ctrlShow [_x, false] } foreach (_rename_controls + _leader_controls);
ctrlEnable [513,(leader (group player) == player)];
ctrlEnable [514,(leader (group player) == player)];
};
};
if ( GREUH_allow_platoonview ) then { ctrlShow [612, show_platoon]; };
if ( GREUH_allow_mapmarkers ) then { ctrlShow [912, show_teammates]; };
ctrlShow [ 962, show_nametags ];
if ( GREUH_allow_customsquads ) then {
lbClear 515;
{
_brakets = "";
if ( _x == group player ) then { _brakets = ">> "; };
lbAdd [515, format [ "%4%1 - %2 (%3)",groupId _x, name leader _x, count units _x,_brakets ]];
} foreach groups_list;
};
if ( GREUH_allow_viewdistance ) then {
ctrlSetText [713, format [ '%1m' ,round desiredviewdistance_inf]];
ctrlSetText [723, format [ '%1m' ,round desiredviewdistance_veh]];
ctrlSetText [733, format [ '%1m' ,round ((desiredviewdistance_obj / 100.0) * desiredviewdistance_inf) ]];
};
ctrlSetText [ 1103, format [ "%1%2", round (desired_vehvolume), "%" ] ];
desired_fps = parseNumber (ctrlText 960);
uiSleep 0.2;
};
if (!alive player) then { closeDialog 0 };
greuh_options_profile = [ desiredviewdistance_inf, desiredviewdistance_veh, desiredviewdistance_obj, show_teammates, show_platoon, desired_vehvolume, show_nametags, desired_fps ];
profileNamespace setVariable [ "GREUH_OPTIONS_PROFILE",greuh_options_profile ];
saveProfileNamespace;

View File

@ -0,0 +1,44 @@
GREUH_view_distance_factor = 1.0;
GREUH_force_adjust_view_distance = false;
private _min_view_distance_factor = 0.25;
private _base_increment = 0.075;
private _corrected_increment = -1;
private _consecutive_before_adjust = 3;
private _consecutive_fps_too_low = 0;
private _consecutive_fps_too_fast = 0;
private _smoothing_margin = 0.1;
while { true } do {
_corrected_increment = _base_increment * GREUH_view_distance_factor;
if ( (diag_fps * ( 1 - _smoothing_margin )) < desired_fps ) then {
_consecutive_fps_too_low = _consecutive_fps_too_low + 1;
_consecutive_fps_too_fast = 0;
};
if ( (diag_fps * ( 1 + _smoothing_margin )) > desired_fps ) then {
_consecutive_fps_too_fast = _consecutive_fps_too_fast + 1;
_consecutive_fps_too_low = 0;
};
if ( GREUH_view_distance_factor > _min_view_distance_factor && _consecutive_fps_too_low >= _consecutive_before_adjust ) then {
_consecutive_fps_too_low = 0;
GREUH_view_distance_factor = GREUH_view_distance_factor - _corrected_increment;
if ( GREUH_view_distance_factor < _min_view_distance_factor ) then {
GREUH_view_distance_factor = _min_view_distance_factor;
};
GREUH_force_adjust_view_distance = true;
};
if ( GREUH_view_distance_factor < 1.0 && _consecutive_fps_too_fast >= _consecutive_before_adjust ) then {
_consecutive_fps_too_fast = 0;
GREUH_view_distance_factor = GREUH_view_distance_factor + _corrected_increment;
if ( GREUH_view_distance_factor > 1.0 ) then {
GREUH_view_distance_factor = 1.0;
};
GREUH_force_adjust_view_distance = true;
};
sleep 0.75;
};

View File

@ -0,0 +1,14 @@
public_medic_message = [];
while { true } do {
waitUntil {
sleep 0.3;
count public_medic_message != 0;
};
_unit = (public_medic_message select 0);
if (_unit != player) then {
_unit sidechat (public_medic_message select 1);
};
public_medic_message = [];
};

View File

@ -0,0 +1,139 @@
platoon_icon1 = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
platoon_icon2 = "\A3\ui_f\data\igui\cfg\cursors\board_ca.paa";
soldier_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa";
formation_leader_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa";
commander_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa";
group_leader_icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
wounded_icon = "\A3\ui_f\data\map\vehicleicons\pictureHeal_ca.paa";
nametags_distance = 32.0;
private [ "_groups", "_unitstocount", "_totalx", "_totaly", "_totalz", "_alpha", "_textalpha", "_size", "_screenpos", "_grouppos", "_distlabel", "_dist", "_nextunit", "_color", "_drawicon", "_displayname", "_iconpos" ];
waitUntil { !isNil "GRLIB_overlay_groups" };
waitUntil { !isNil "GRLIB_nametag_units" };
["platoon_overlay", "onEachFrame", {
if ( show_platoon ) then {
{
if ( count units _x > 0 ) then {
_totalx = 0;
_totaly = 0;
_totalz = 0;
_grouppos = [];
_unitstocount = [];
{
if ( _x distance (leader group _x) < 300) then {
_unitstocount pushback _x;
_totalx = _totalx + (getpos _x select 0);
_totaly = _totaly + (getpos _x select 1);
_totalz = _totalz + (getpos _x select 2);
};
} foreach units _x;
if ( count _unitstocount > 0 ) then {
_totalx = _totalx / (count _unitstocount);
_totaly = _totaly / (count _unitstocount);
_totalz = _totalz / (count _unitstocount);
};
if ( _totalz > 2.1 ) then {
_grouppos = [_totalx, _totaly, _totalz + 10];
} else {
_grouppos = [_totalx, _totaly, 2.1];
};
_alpha = 0.5;
_textalpha = 0;
_size = 0.8;
_screenpos = worldToScreen _grouppos;
if (count _screenpos != 0) then {
if ( (abs (((worldToScreen _grouppos) select 0) - 0.5) < 0.06) && (abs (((worldToScreen _grouppos) select 1) - 0.5) < 0.08)) then {
_alpha = 1;
_textalpha = 1;
_size = 1;
};
};
_dist = player distance _grouppos;
_distlabel = "";
if ( _dist > 200 ) then {
if ( _dist >= 1000 ) then {
_distlabel = format [" (%1km)", floor (_dist / 1000)];
} else {
_distlabel = format [" (%1m)", (floor (_dist / 100)) * 100];
};
};
_color = [0.8,1,0.2,_alpha];
if ( _x == group player) then { _color = [1,0.9,0.3,_alpha] };
drawIcon3D [platoon_icon1, _color, _grouppos, _size / 2, _size / 2,0, format ["%1 - %2%3",groupID _x, name (leader _x),_distlabel], 2, 0.03 * _textalpha, "puristaMedium"];
drawIcon3D [platoon_icon2, _color, _grouppos, _size, _size,0, "", 2, 0.04, "puristaMedium"];
};
} foreach GRLIB_overlay_groups;
};
if ( show_nametags ) then {
{
_nextunit = _x;
private _local_nametags_distance = nametags_distance;
if( _nextunit == leader group player ) then {
_local_nametags_distance = nametags_distance * 3;
};
_alpha = 1;
if ( _nextunit distance player > (_local_nametags_distance / 2) ) then {
_alpha = 1 - ((((_nextunit distance player) - (_local_nametags_distance / 2)) * 2) / _local_nametags_distance);
};
_color = [];
if ( _nextunit in (units group player)) then {
switch ( _nextunit getVariable [ "GRLIB_squad_color", "MAIN" ] ) do {
case "BLUE" : { _color = [0.15,0.35,1.0,_alpha] };
case "RED" : { _color = [0.8,0,0,_alpha] };
case "YELLOW" : { _color = [0.85,0.85,0,_alpha] };
case "GREEN" : { _color = [0,0.75,0,_alpha] };
default { _color = [0.9,0.9,0.9,_alpha] };
};
} else {
_color = [0.92,0.7,0.25,_alpha];
};
_drawicon = soldier_icon;
if ( _nextunit getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_drawicon = wounded_icon;
} else {
if ( _nextunit == [] call F_getCommander ) then {
_drawicon = commander_icon;
} else {
if ( _nextunit == (leader group _nextunit) && (count (units group _nextunit) > 1 ) ) then {
_drawicon = group_leader_icon;
} else {
if ( ( isFormationLeader _nextunit ) && ( count formationMembers _nextunit > 1 ) ) then {
_drawicon = formation_leader_icon;
};
};
};
};
_displayname = "";
if(count (squadParams _nextunit) != 0) then {
_displayname = "[" + ((squadParams _nextunit select 0) select 0) + "] ";
};
_displayname = _displayname + ( name _nextunit );
_height = 2 + ((player distance _nextunit) / (0.75 * _local_nametags_distance));
_iconpos = [ getPosATL _nextunit select 0, getPosATL _nextunit select 1, (getPosATL _nextunit select 2) + _height ];
drawIcon3D [ _drawicon, _color, _iconpos , 0.75, 0.75,0, format [ "%1", _displayname] , 2, 0.032, "puristaMedium"];
} foreach GRLIB_nametag_units;
};
}] call BIS_fnc_addStackedEventHandler;

View File

@ -0,0 +1,190 @@
private _marked_players = [];
private _marked_vehicles = [];
private _marked_squadmates = [];
private _marker_objs = [];
private _color = "";
private _ticks = 0;
private _cfg = configFile >> "cfgVehicles";
if ( side player == GRLIB_side_friendly ) then {
_color = GRLIB_color_friendly;
} else {
_color = GRLIB_color_enemy;
};
while { true } do {
waitUntil { sleep 0.2; show_teammates };
while { show_teammates } do {
if ( _ticks == 0 ) then {
{
private _nextmarker = _x select 0;
private _nextobj = _x select 1;
if ( (isNull _nextobj) || !(alive _nextobj) ) then {
deleteMarkerLocal _nextmarker;
};
} foreach _marker_objs;
private _playableunits = [];
if ( count playableUnits > 0 ) then {
_playableunits = [ playableUnits, { (side (group _x)) == (side (group player)) } ] call BIS_fnc_conditionalSelect;
} else {
_playableunits = [ player ];
};
{
if ( vehicle _x == _x ) then {
_marked_players pushbackUnique _x;
} else {
_marked_vehicles pushbackUnique (vehicle _x);
};
} foreach _playableunits;
{
if ( alive _x && !(isPlayer _x) ) then {
if ( vehicle _x == _x ) then {
_marked_squadmates pushbackUnique _x;
} else {
_marked_vehicles pushbackUnique (vehicle _x);
};
};
} foreach (units (group player));
private _stuff_to_unmark = [];
{
if ( (vehicle _x != _x) || !(alive _x) ) then {
_stuff_to_unmark pushback _x;
_marked_players = _marked_players - [_x];
};
} foreach _marked_players;
{
if ( (vehicle _x != _x) || !(alive _x) ) then {
_stuff_to_unmark pushback _x;
_marked_squadmates = _marked_squadmates - [_x];
};
} foreach _marked_squadmates;
{
if ( (count (crew _x) == 0) || !(alive _x) ) then {
_stuff_to_unmark pushback _x;
_marked_vehicles = _marked_vehicles - [_x];
};
} foreach _marked_vehicles;
{
private _nextmarker = _x getVariable [ "spotmarker", "" ];
if ( _nextmarker != "" ) then {
deleteMarkerLocal _nextmarker;
_x setVariable [ "spotmarker", "" ];
};
} foreach _stuff_to_unmark;
{
private _nextplayer = _x;
private _marker = _nextplayer getVariable [ "spotmarker", "" ];
if ( _marker == "" ) then {
_marker = ( createMarkerLocal [ format [ "playermarker%1", (allUnits find _x) * (time % 1000) * (floor (random 100)) ], getpos _nextplayer ] );
_marker_objs pushback [ _marker, _nextplayer ];
_nextplayer setVariable [ "spotmarker", _marker ];
private _playername = "";
if( count (squadParams _nextplayer) != 0 ) then {
_playername = "[" + ((squadParams _nextplayer select 0) select 0) + "] ";
};
_playername = _playername + (name _nextplayer);
_marker setMarkerTextLocal _playername;
_marker setMarkerSizeLocal [ 0.75, 0.75 ];
_marker setMarkerColorLocal _color;
};
private _markertype = "mil_start";
if ( _nextplayer getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_markertype = "MinefieldAP";
};
_marker setMarkerTypeLocal _markertype;
} foreach _marked_players;
{
private _nextai = _x;
private _marker = _nextai getVariable [ "spotmarker", "" ];
if ( _marker == "" ) then {
_marker = ( createMarkerLocal [ format [ "squadaimarker%1", (allUnits find _x) * (time % 1000) * (floor (random 10000)) ], getpos _nextai ] );
_marker_objs pushback [ _marker, _nextai ];
_nextai setVariable [ "spotmarker", _marker ];
_marker setMarkerTypeLocal "mil_triangle";
_marker setMarkerSizeLocal [ 0.6, 0.6 ];
_marker setMarkerColorLocal _color;
};
_marker setMarkerTextLocal format [ "%1", ( [ _nextai ] call F_getUnitPositionId )];
} foreach _marked_squadmates;
{
private _nextvehicle = _x;
private _marker = _nextvehicle getVariable [ "spotmarker", "" ];
if ( _marker == "" ) then {
_marker = ( createMarkerLocal [ format [ "vehiclemarker%1", (vehicles find _x) * (time % 1000) * (floor (random 10000)) ], getpos _nextvehicle ] );
_marker_objs pushback [ _marker, _nextvehicle ];
_nextvehicle setVariable [ "spotmarker", _marker ];
_marker setMarkerTypeLocal "mil_arrow2";
_marker setMarkerSizeLocal [0.75,0.75];
_marker setMarkerColorLocal _color;
};
private _datcrew = crew _nextvehicle;
private _vehiclename = "";
{
if (isPlayer _x) then {
_vehiclename = _vehiclename + (name _x);
} else {
_vehiclename = _vehiclename + ( format [ "%1", [ _x ] call F_getUnitPositionId ] );
};
if( (_datcrew find _x) != ((count _datcrew) - 1) ) then {
_vehiclename = _vehiclename + ",";
};
_vehiclename = _vehiclename + " ";
} foreach _datcrew;
_vehiclename = _vehiclename + "(" + getText (_cfg >> typeOf _nextvehicle >> "displayName") + ")";
_marker setMarkerTextLocal _vehiclename;
} foreach _marked_vehicles;
};
private _markerunits = [] + _marked_players + _marked_squadmates + _marked_vehicles;
{
private _nextunit = _x;
private _marker = _nextunit getVariable [ "spotmarker", "" ];
if ( _marker != "" ) then {
_marker setMarkerPosLocal (getPos _nextunit);
private _mrkdir = getDir _nextunit;
if ( isPlayer _nextunit ) then {
if ( _nextunit getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_mrkdir = 0;
};
};
_marker setMarkerDirLocal _mrkdir;
};
} foreach _markerunits;
_ticks = _ticks + 1;
if ( _ticks > 10 ) then {
_ticks = 0;
};
sleep 0.1;
};
{
private _nextunit = _x;
private _marker = _nextunit getVariable [ "spotmarker", "" ];
if ( _marker != "" ) then {
deleteMarkerLocal _marker;
_nextunit setVariable [ "spotmarker", "" ];
};
} forEach (allUnits + vehicles);
};

View File

@ -0,0 +1,66 @@
revive_ui = compile preprocessFileLineNumbers "GREUH\scripts\GREUH_revive_ui.sqf";
closeDialog 0;
closeDialog 0;
closeDialog 0;
sleep 1;
while { true } do {
waitUntil { ( player getVariable "GREUH_isUnconscious") == 1 };
_camobj = player;
_pos = positionCameraToWorld [0,0,-0.2];
_destpos = [getpos player select 0, getpos player select 1, (getpos player select 2) + 150];
_cam = "camera" camCreate _pos;
_cam cameraEffect ["internal", "BACK"];
_cam camSetFOV 1.0;
showCinemaBorder false;
if ( (date select 3) < 4 || (date select 3) >= 20 ) then { camUseNVG true; } else { camUseNVG false; };
_cam camSetTarget _camobj;
_dialog = createDialog "blackscreen";
0 fadesound 0;
[] spawn {
sleep 3.5;
3 fadesound 1;
titleText [ "" ,"BLACK IN",3];
};
"filmGrain" ppEffectAdjust [0.3, 2, 4, 0.5, 0.5, true];
"filmGrain" ppEffectCommit 0;
"filmGrain" ppEffectEnable TRUE;
"colorCorrections" ppEffectAdjust [1, 1.6, -0.35, [1, 1, 1, 0], [1, 1, 1, 0], [0.75, 0.25, 0, 1.0]];
"colorCorrections" ppEffectCommit 0;
"colorCorrections" ppEffectEnable TRUE;
_randomsound1 = ceil (random 6);
_randomsound2 = ceil (random 3);
_deathsound = format ["A3\sounds_f\characters\human-sfx\P0%1\Hit_Max_%2.wss",_randomsound1,_randomsound2];
playSound3D [_deathsound, player, false, getPos player, 1, 1, 0];
_cam camCommit 0;
_cam camSetPos _destpos;
_cam camCommit 900;
waitUntil { ((player getVariable "GREUH_isUnconscious") == 0) || ((player getVariable "FAR_isUnconscious") == 1) };
closeDialog 0;
waitUntil {!dialog};
if ((player getVariable "GREUH_isUnconscious") != 0) then {
[] spawn revive_ui;
waitUntil {dialog};
};
waitUntil { ( player getVariable "FAR_isUnconscious" ) == 0 || !alive player || !dialog };
player setVariable ["GREUH_isUnconscious", 0, true];
closeDialog 5566;
"colorCorrections" ppEffectEnable FALSE;
"filmGrain" ppEffectEnable FALSE;
_cam cameraEffect ["Terminate", "BACK"];
camDestroy _cam;
camUseNVG false;
};

View File

@ -0,0 +1,63 @@
_dialog = createDialog "GREUH_respawn";
waitUntil { dialog };
_labelwidth = -1;
_labelpos = [];
_tick = 0;
replace_ai = 0;
while { dialog && alive player } do {
if ( !isNil "public_bleedout_message" && !isNil "public_bleedout_timer") then {
if (_labelwidth == -1) then { _labelwidth = (ctrlPosition ((findDisplay 5566) displayCtrl 6699)) select 2 };
_labelpos = [ctrlPosition ((findDisplay 5566) displayCtrl 6699) select 0, ctrlPosition ((findDisplay 5566) displayCtrl 6699) select 1,_labelwidth * (public_bleedout_timer / FAR_BleedOut), ctrlPosition ((findDisplay 5566) displayCtrl 6699) select 3];
((findDisplay 5566) displayCtrl 6699) ctrlSetPosition _labelpos;
ctrlSetText [5567,public_bleedout_message];
if (public_bleedout_timer <= 30) then {
((findDisplay 5566) displayCtrl 5567) ctrlSetTextColor [1, 0, 0, 1];
if ( public_bleedout_timer % 2 == 0 ) then {
((findDisplay 5566) displayCtrl 6698) ctrlSetTextColor [1, 0, 0, 1];
} else {
((findDisplay 5566) displayCtrl 6698) ctrlSetTextColor [1, 1, 1, 1];
}
} else {
((findDisplay 5566) displayCtrl 5567) ctrlSetTextColor [1, 1, 1, 1];
};
((findDisplay 5566) displayCtrl 6699) ctrlCommit 0.5;
((findDisplay 5566) displayCtrl 6698) ctrlCommit 0.5;
};
if ( _tick % 10 == 0 ) then {
[ 10000 ] call BIS_fnc_bloodEffect;
};
_tick = _tick + 1;
_nearby_ais = [ units group player, { !(isPlayer _x) && (_x distance player < 100) } ] call BIS_fnc_conditionalSelect;
if ( count _nearby_ais > 0 ) then {
_nearby_ai = ( [ _nearby_ais , [] , { _x distance player } , 'ASCEND' ] call BIS_fnc_sortBy ) select 0;
((findDisplay 5566) displayCtrl 678) ctrlEnable true;
((findDisplay 5566) displayCtrl 678) ctrlShow true;
if ( replace_ai > 0 && (alive _nearby_ai) ) then {
cutText [ "","BLACK IN", 3 ];
GRLIB_replace_ai = true;
player setVariable ["FAR_isUnconscious", 0, true];
_ai_pos = getposATL _nearby_ai;
_ai_dir = getDir _nearby_ai;
_ai_damage = damage _nearby_ai;
deleteVehicle _nearby_ai;
player setPosATL _ai_pos;
player setDir _ai_dir;
player setDamage _ai_damage;
};
} else {
replace_ai = 0;
((findDisplay 5566) displayCtrl 678) ctrlEnable false;
((findDisplay 5566) displayCtrl 678) ctrlShow false;
};
sleep 0.25;
};

View File

@ -0,0 +1,105 @@
groups_list = [];
squadaction = "";
squadname = "";
if (isNil "global_group_ids") then { global_group_ids = [] };
if (isNil "global_groups_renamed") then { global_groups_renamed = [] };
global_new_leader = [];
while { true } do {
if ( squadaction != "" ) then {
_grp = grpNull;
switch (squadaction) do {
case "create" : {
_grp = createGroup (side player);
[player] join _grp;
hint "New squad created";
};
case "join" : {
if(lbCurSel 515 != -1) then { _grp = groups_list select (lbCurSel 515); };
if (!(isNull _grp) && (_grp != group player)) then {
[player] join _grp;
hint "Squad joined";
};
};
case "rename" : {
if ( leader group player == player ) then {
renaming = true;
ctrlSetText [527, (groupid (group player))];
waitUntil { ((squadaction == "") || (squadname != "") || !(dialog) || !(alive player)) };
if ( alive player && dialog && ( squadname != "" )) then {
if ( (group player) in global_groups_renamed ) then {
global_group_ids set [global_groups_renamed find (group player),squadname];
} else {
global_group_ids = global_group_ids + [squadname];
global_groups_renamed = global_groups_renamed + [group player];
};
publicVariable "global_group_ids";
publicVariable "global_groups_renamed";
};
squadname = "";
renaming = false;
} else {
hint "Sorry, only the squad leader can rename their squad.";
};
};
case "leader" : {
if ( leader group player == player ) then {
choosingleader = true;
choose_squadleader = -10;
_player_group_filtered = [];
{
if ( isPlayer _x ) then {
_player_group_filtered = _player_group_filtered + [_x];
};
} foreach (units group player);
lbClear 567;
{
lbAdd [567, name _x ];
} foreach _player_group_filtered;
_count_units_grp_player = count (units group player);
waitUntil { ((squadaction == "") || (choose_squadleader >= 0) || !(dialog) || !(alive player) || (_count_units_grp_player != count (units group player))) };
if ( alive player && dialog && ( choose_squadleader >= 0 )) then {
global_new_leader = [group player, _player_group_filtered select choose_squadleader];
publicVariable "global_new_leader";
};
choose_squadleader = -10;
choosingleader = false;
} else {
hint "Sorry, only the squad leader can choose a new leader.";
};
};
};
squadaction = "";
};
{ if ( (isplayer leader _x) && (side _x == side player) && !(_x in groups_list)) then { groups_list = groups_list + [_x] }; } foreach allGroups;
{ if (!(_x in allGroups) || (!isplayer leader _x)) then { groups_list = groups_list - [_x] }; } foreach groups_list;
{
if (count global_groups_renamed != 0) then {
if (_x in global_groups_renamed) then {
if (groupid _x != global_group_ids select (global_groups_renamed find _x)) then {
_x setgroupid [(global_group_ids select (global_groups_renamed find _x))];
};
};
};
} foreach groups_list;
if ( count global_new_leader != 0 ) then {
if ( group player == global_new_leader select 0 ) then {
(global_new_leader select 0) selectLeader (global_new_leader select 1);
hint format ["%1 is your new squad leader.",name (global_new_leader select 1)];
global_new_leader = [];
};
};
sleep 0.5;
};

View File

@ -0,0 +1,4 @@
GREUH_version = 1.2;
player createDiarySubject ["GREUH Options","GREUH Options"];
player createDiaryRecord ["GREUH Options", ["GREUH Options", format ["<font color='#ff8000'>GREUH Extended Options</font><br/>arma.greuh.org<br/><br/><font color='#ff8000'>Scripted by [GREUH] Zbug</font><br/>Version %1",GREUH_version]]];

View File

@ -0,0 +1,58 @@
private _olddistance_inf = -1;
private _olddistance_veh = -1;
private _olddistance_obj = -1;
private _olddesiredvolume = -1;
private _was_vehicle = false;
private _min_view_distance = 300;
private _desired_inf = -1;
private _desired_veh = -1;
private _desired_obj = -1;
waitUntil { !isNil "GREUH_view_distance_factor" };
waitUntil { !isNil "GREUH_force_adjust_view_distance" };
while { true } do {
waitUntil { sleep 0.3;
(round _olddistance_inf != round desiredviewdistance_inf)
|| (round _olddistance_veh != round desiredviewdistance_veh)
|| (round _olddistance_obj != round desiredviewdistance_obj)
|| ( (( vehicle player == player ) && _was_vehicle)
|| (( vehicle player != player ) && !_was_vehicle) )
|| !(alive player)
|| ( round _olddesiredvolume != round desired_vehvolume)
|| GREUH_force_adjust_view_distance };
waitUntil { alive player };
GREUH_force_adjust_view_distance = false;
_olddistance_inf = round desiredviewdistance_inf;
_olddistance_veh = round desiredviewdistance_veh;
_olddistance_obj = round desiredviewdistance_obj;
_olddesiredvolume = desired_vehvolume;
_was_vehicle = ( vehicle player != player );
if ( _was_vehicle ) then {
_desired_veh = (round desiredviewdistance_veh) * GREUH_view_distance_factor;
if ( _desired_veh < _min_view_distance ) then {
_desired_veh = _min_view_distance;
};
setViewDistance _desired_veh;
1 fadeSound ( desired_vehvolume / 100.0 );
} else {
_desired_inf = (round desiredviewdistance_inf) * GREUH_view_distance_factor;
if ( _desired_inf < _min_view_distance ) then {
_desired_inf = _min_view_distance;
};
setViewDistance _desired_inf;
1 fadeSound 1;
};
_desired_obj = (((desiredviewdistance_obj / 100.0) * desiredviewdistance_inf) * GREUH_view_distance_factor);
if ( _desired_obj < _min_view_distance) then {
_desired_obj = _min_view_distance;
};
setObjectViewDistance _desired_obj;
};

View File

@ -0,0 +1,909 @@
// Control types
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_List_N_Box 102 // Arma 2 - N columns list box
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define CT_MAP_MAIN 101
#define ST_PICTURE 48
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
#define FontM "puristaMedium"
#define COLOR_BROWN { 0.18, 0.14, 0.11, 0.75 }
#define COLOR_GREEN { 0.2, 0.23, 0.18, 0.75 }
#define COLOR_LIGHTGREEN { 0.4, 0.55, 0.36, 0.4 }
#define COLOR_LIGHTGRAY { 0.6, 0.6, 0.6, 0.8 }
#define COLOR_WHITE { 1, 1, 1, 1 }
#define COLOR_NOALPHA { 0, 0, 0, 0 }
#define COLOR_BLUFOR { 0, 0.3, 1, 1 }
#define COLOR_OPFOR { 1, 0, 0, 1 }
#define COLOR_GUER { 0.5, 0.5, 0.5, 0.5 }
#define COLOR_WHITE_TRANSP { 1, 1, 1, 0.5 }
#define COLOR_BLACK { 0, 0, 0, 1 }
#define COLOR_BLACK_ALPHA { 0, 0, 0, 0.85 }
#define COLOR_BLUFOR_NOALPHA { 0, 0, 1, 1 }
#define COLOR_OPFOR_NOALPHA { 1, 0, 0, 1 }
#define COLOR_RED_DISABLED { 1,0,0,0.4 }
#define COLOR_BLEEDOUT { 0.66,0,0,0.8 }
#define COLOR_BRIGHTGREEN { 0.2,1,0.2,1 }
#define BORDERSIZE 0.01
#define BASE_Y 0.075
class RscListBox {
idc = -1;
type = 5;
style = 0 + 0x10;
font = FontM;
sizeEx = 0.018 * safezoneH;
rowHeight = 0.02 * safezoneH;
color[] = COLOR_LIGHTGRAY;
colorText[] = COLOR_WHITE;
colorScrollbar[] = COLOR_BRIGHTGREEN;
colorSelect[] = COLOR_BRIGHTGREEN;
colorSelect2[] = COLOR_BRIGHTGREEN;
colorSelectBackground[] = COLOR_LIGHTGRAY;
colorSelectBackground2[] = COLOR_LIGHTGRAY;
colorActive[] = COLOR_BRIGHTGREEN;
colorDisabled[] = COLOR_GREEN;
columns[] = {0.1, 0.7, 0.1, 0.1};
period = 0;
colorBackground[] = COLOR_GREEN;
maxHistoryDelay = 1.0;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
soundSelect[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
shadow = 2;
class ListScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
};
};
class RscCombo {
idc = -1;
type = 4;
style = 1;
x = 0;
y = 0;
w = 0.3;
h = 0.035;
colorSelect[] = COLOR_BRIGHTGREEN;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_GREEN;
colorSelectBackground[] = COLOR_LIGHTGRAY;
colorScrollbar[] = COLOR_BRIGHTGREEN;
arrowEmpty ="\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
wholeHeight = 0.45;
color[] = COLOR_LIGHTGRAY;
colorActive[] = COLOR_BRIGHTGREEN;
colorDisabled[] = COLOR_GREEN;
font = FontM;
sizeEx = 0.031;
soundSelect[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
soundExpand[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
soundCollapse[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.09, 1};
maxHistoryDelay = 1.0;
class ComboScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
};
};
class GREUH_Menu {
idd = 5565;
movingEnable = false;
controlsBackground[] = {};
controls[] = {"GREUH_OuterBG", "BgPicture", "GREUH_OuterBG_F","GREUH_InnerBG", "GREUH_InnerBG_F","GREUH_Header","GREUH_SquadLabel",
"GREUH_SquadZone","GREUH_PlatoonLabel","GREUH_ViewDistance","GREUH_WorldQuality",
"GREUH_Close","GREUH_ButtonWorldVeryLow","GREUH_ButtonWorldLow","GREUH_ButtonWorldNormal","GREUH_ButtonWorldHigh",
"GREUH_Slider","GREUH_SliderVD","GREUH_LabelMarkers","GREUH_TeammatesYes","GREUH_TeammatesNo","GREUH_LabelPlatoon",
"GREUH_PlatoonYes","GREUH_PlatoonNo","GREUH_LabelPlatoonActive","GREUH_LabelMarkersActive","GREUH_SquadList",
"GREUH_ButtonJoin","GREUH_ButtonNew","GREUH_ButtonRename","GREUH_PlatoonZone","GREUH_ViewZone","GREUH_WorldZone",
"GREUH_MarkersZone","GREUH_Squad_OuterBG","GREUH_Squad_InnerBG","GREUH_Squad_OuterBG_F","GREUH_Squad_InnerBG_F",
"GREUH_ButtonName_Rename","GREUH_ButtonName_Abort","GREUH_Squad_TextField","GREUH_LabelVD","GREUH_ButtonLeader",
"GREUH_SliderVeh","GREUH_LabelVDVeh","GREUH_SliderVDVeh","GREUH_SliderObj","GREUH_LabelVDObj","GREUH_SliderVDObj",
"GREUH_Leader_OuterBG", "GREUH_Leader_InnerBG", "GREUH_Leader_OuterBG_F", "GREUH_Leader_InnerBG_F",
"GREUH_ButtonLeader_Choose", "GREUH_ButtonLeader_Abort", "GREUH_Squad_Combo", "GREUH_VehSound", "GREUH_SliderVehSound",
"GREUH_LabelVehSound","GREUH_LabelNametags","GREUH_NametagsActive","GREUH_NametagsYes","GREUH_NametagsNo",
"GREUH_FPSLabel","GREUH_FPSEdit"};
objects[] = {};
class BgPicture {
idc = -1;
type = CT_STATIC;
style = ST_PICTURE;
colorText[] = {0.5, 0.4, 0.25, 0.6};
colorBackground[] = {0, 0, 0, 1};
font = FontM;
sizeEx = 0.023;
moving = false;
text = "res\camo03.jpg";
x = (0.15 * safezoneW + safezoneX) - ( 2 * BORDERSIZE);
y = ((BASE_Y + 0.02) * safezoneH) + safezoneY - (3 * BORDERSIZE);
w = (0.2 * safezoneW) + (4 * BORDERSIZE);
h = (0.79 * safezoneH) + (6 * BORDERSIZE);
};
class GREUH_OuterBG {
idc = -1;
type = CT_STATIC;
style = ST_SINGLE;
colorText[] = COLOR_BLACK;
colorBackground[] = COLOR_BROWN;
font = FontM;
sizeEx = 0.023;
x = (0.15 * safezoneW + safezoneX) - ( 2 * BORDERSIZE);
y = ((BASE_Y + 0.02) * safezoneH) + safezoneY - (3 * BORDERSIZE);
w = (0.2 * safezoneW) + (4 * BORDERSIZE);
h = (0.79 * safezoneH) + (6 * BORDERSIZE);
text = "";
};
class GREUH_OuterBG_F : GREUH_OuterBG {
style = ST_FRAME;
};
class GREUH_InnerBG : GREUH_OuterBG {
colorBackground[] = COLOR_GREEN;
x = (0.15 * safezoneW + safezoneX) - ( BORDERSIZE);
y = ((BASE_Y + 0.07) * safezoneH) + safezoneY - (1.5 * BORDERSIZE);
w = 0.2 * safezoneW + (2 * BORDERSIZE);
h = 0.74 * safezoneH + (3 * BORDERSIZE);
};
class GREUH_InnerBG_F : GREUH_InnerBG {
style = ST_FRAME;
};
class GREUH_StdText {
idc = -1;
type = CT_STATIC;
style = ST_LEFT;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_NOALPHA;
font = FontM;
sizeEx = 0.02 * safezoneH;
shadow = 2;
};
class GREUH_StdHeader : GREUH_StdText {
style = ST_CENTER;
sizeEx = 0.03 * safezoneH;
};
class GREUH_Header : GREUH_StdHeader {
x = 0.15 * safezoneW + safezoneX - (BORDERSIZE);
y = ((BASE_Y + 0.01) * safezoneH) + safezoneY;
w = 0.2 * safezoneW + ( 2 * BORDERSIZE);
h = 0.05 * safezoneH - (BORDERSIZE);
text = "Extended Options";
colorBackground[] = COLOR_LIGHTGRAY;
};
class GREUH_ButtonGeneric {
idc = -1;
type = CT_BUTTON;
style = ST_CENTER;
default = false;
font = FontM;
sizeEx = 0.018 * safezoneH;
colorText[] = { 0, 0, 0, 1 };
colorFocused[] = { 1, 1, 1, 1 };
colorDisabled[] = { 0.2, 0.2, 0.2, 0.7 };
colorBackground[] = { 0.8, 0.8, 0.8, 0.8 };
colorBackgroundDisabled[] = { 0.5, 0.5, 0.5, 0.5 };
colorBackgroundActive[] = { 1, 1, 1, 1 };
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = { 0, 0, 0, 0.5 };
colorBorder[] = { 0, 0, 0, 1 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.891251, 1};
soundClick[] = { "", 0, 1 }; // no sound
soundEscape[] = { "", 0, 1 }; // no sound
x = 0.15 * safezoneW + safezoneX;
w = 0.2 * safezoneW; h = 0.03 * safezoneH;
text = "";
action = "";
shadow = 1;
};
class GREUH_Label : GREUH_StdHeader {
x = 0.15 * safezoneW + safezoneX;
w = 0.2 * safezoneW;
h = 0.03 * safezoneH;
sizeEx = 0.02 * safezoneH;
colorBackground[] = COLOR_LIGHTGREEN;
};
class GREUH_DefaultZone : GREUH_StdText {
style = ST_CENTER;
x = 0.15 * safezoneW + safezoneX;
w = 0.2 * safezoneW;
colorText[] = COLOR_LIGHTGRAY;
colorBackground[] = COLOR_RED_DISABLED;
text = "- disabled -";
};
class GREUH_RegularLabel : GREUH_Label {
colorBackground[] = COLOR_NOALPHA;
style = ST_LEFT;
};
class GREUH_Close : GREUH_ButtonGeneric {
idc = 6677;
x = 0.335 * safezoneW + safezoneX;
w = 0.015 * safezoneW; h = 0.02 * safezoneH;
y = ((BASE_Y + 0.015) * safezoneH) + safezoneY;
text = "X";
action = "closeDialog 0";
};
class GREUH_SquadZone : GREUH_DefaultZone {
idc = 501;
y = ((BASE_Y + 0.11) * safezoneH) + safezoneY;
h = (0.2 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_SquadLabel : GREUH_Label {
idc = 510;
y = ((BASE_Y + 0.07) * safezoneH) + safezoneY;
text = "Squad Management";
};
class GREUH_SquadList : RscListBox {
idc = 515;
x = 0.15 * safezoneW + safezoneX;
w = 0.15 * safezoneW;
y = ((BASE_Y + 0.11) * safezoneH) + safezoneY;
h = (0.2 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_ButtonSquad : GREUH_ButtonGeneric {
x = 0.3 * safezoneW + safezoneX + BORDERSIZE;
w = ((0.2 * safezoneW) / 4) - BORDERSIZE;
};
class GREUH_ButtonJoin : GREUH_ButtonSquad {
idc = 511;
text = "Join";
action = "squadaction = 'join';";
y = ((BASE_Y + 0.11) * safezoneH) + safezoneY;
};
class GREUH_ButtonNew : GREUH_ButtonSquad {
idc = 512;
text = "Create";
action = "squadaction = 'create';";
y = ((BASE_Y + 0.15) * safezoneH) + safezoneY;
};
class GREUH_ButtonRename : GREUH_ButtonSquad {
idc = 513;
text = "Rename";
action = "squadaction = 'rename';";
y = ((BASE_Y + 0.19) * safezoneH) + safezoneY;
};
class GREUH_ButtonLeader : GREUH_ButtonSquad {
idc = 514;
text = "Leader";
action = "squadaction = 'leader';";
y = ((BASE_Y + 0.23) * safezoneH) + safezoneY;
};
class GREUH_Squad_OuterBG : GREUH_OuterBG {
idc = 521;
style = ST_SINGLE;
x = (0.37 * safezoneW + safezoneX) - (BORDERSIZE);
y = ((BASE_Y + 0.18) * safezoneH) + safezoneY - (1.5 * BORDERSIZE);
w = 0.2 * safezoneW + (2 * BORDERSIZE);
h = 0.05 * safezoneH + (3 * BORDERSIZE);
};
class GREUH_Squad_InnerBG : GREUH_OuterBG {
idc = 522;
colorBackground[] = COLOR_GREEN;
x = (0.37 * safezoneW + safezoneX);
y = ((BASE_Y + 0.18) * safezoneH) + safezoneY;
w = 0.2 * safezoneW;
h = 0.05 * safezoneH;
};
class GREUH_Squad_OuterBG_F : GREUH_Squad_OuterBG {
idc = 523;
style = ST_FRAME;
};
class GREUH_Squad_InnerBG_F : GREUH_Squad_InnerBG {
idc = 524;
style = ST_FRAME;
};
class GREUH_ButtonName : GREUH_ButtonGeneric {
w = ((0.2 * safezoneW) / 5) - BORDERSIZE;
y = ((BASE_Y + 0.19) * safezoneH) + safezoneY;
};
class GREUH_ButtonName_Rename : GREUH_ButtonName {
idc = 525;
x = 0.4875 * safezoneW + safezoneX;
text = "Rename";
action = "squadname = ctrlText 527;";
};
class GREUH_ButtonName_Abort : GREUH_ButtonName {
idc = 526;
x = (0.4875 * safezoneW + safezoneX) + ((0.2 * safezoneW) / 5);
text = "Cancel";
action = "squadaction = '';";
};
class GREUH_Squad_TextField : GREUH_ButtonName {
idc = 527;
type = CT_EDIT;
style = ST_LEFT;
x = (0.37 * safezoneW + safezoneX) + BORDERSIZE;
w = 0.11 * safezoneW;
text = "";
action = "";
colorText[] = COLOR_WHITE;
colorSelection[] = COLOR_BRIGHTGREEN;
autocomplete = "";
};
class GREUH_Leader_OuterBG : GREUH_OuterBG {
idc = 561;
style = ST_SINGLE;
x = (0.37 * safezoneW + safezoneX) - (BORDERSIZE);
y = ((BASE_Y + 0.22) * safezoneH) + safezoneY - (1.5 * BORDERSIZE);
w = 0.2 * safezoneW + (2 * BORDERSIZE);
h = 0.05 * safezoneH + (3 * BORDERSIZE);
};
class GREUH_Leader_InnerBG : GREUH_OuterBG {
idc = 562;
colorBackground[] = COLOR_GREEN;
x = (0.37 * safezoneW + safezoneX);
y = ((BASE_Y + 0.22) * safezoneH) + safezoneY;
w = 0.2 * safezoneW;
h = 0.05 * safezoneH;
};
class GREUH_Leader_OuterBG_F : GREUH_Leader_OuterBG {
idc = 563;
style = ST_FRAME;
};
class GREUH_Leader_InnerBG_F : GREUH_Leader_InnerBG {
idc = 564;
style = ST_FRAME;
};
class GREUH_ButtonLeaderGen : GREUH_ButtonGeneric {
w = ((0.2 * safezoneW) / 5) - BORDERSIZE;
y = ((BASE_Y + 0.23) * safezoneH) + safezoneY;
};
class GREUH_ButtonLeader_Choose : GREUH_ButtonLeaderGen {
idc = 565;
x = 0.4875 * safezoneW + safezoneX;
text = "Choose";
action = "choose_squadleader = lbCurSel 567;";
};
class GREUH_ButtonLeader_Abort : GREUH_ButtonLeaderGen {
idc = 566;
x = (0.4875 * safezoneW + safezoneX) + ((0.2 * safezoneW) / 5);
text = "Cancel";
action = "squadaction = ''";
};
class GREUH_Squad_Combo : RscCombo {
idc = 567;
x = (0.37 * safezoneW + safezoneX) + BORDERSIZE;
w = 0.11 * safezoneW;
y = ((BASE_Y + 0.23) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
};
class GREUH_PlatoonZone : GREUH_DefaultZone {
idc = 601;
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_PlatoonLabel : GREUH_Label {
idc = 610;
y = ((BASE_Y + 0.31) * safezoneH) + safezoneY;
text = "Platoon & Squad Awareness";
};
class GREUH_LabelPlatoon : GREUH_RegularLabel {
idc = 611;
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
text = "Show platoon overlay : ";
};
class GREUH_LabelPlatoonActive : GREUH_RegularLabel {
idc = 612;
style = ST_RIGHT;
colorText[] = COLOR_BRIGHTGREEN;
text = "active";
x = 0.2 * safezoneW + safezoneX;
w = 0.1 * safezoneW;
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
};
class GREUH_PlatoonYes : GREUH_ButtonGeneric {
idc = 613;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
x = 0.305 * safezoneW + safezoneX;
text = "Yes";
action = "show_platoon = true";
};
class GREUH_PlatoonNo : GREUH_ButtonGeneric {
idc = 614;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.35) * safezoneH) + safezoneY;
x = (0.32 + BORDERSIZE) * safezoneW + safezoneX;
text = "No";
action = "show_platoon = false";
};
class GREUH_ViewZone : GREUH_DefaultZone {
idc = 701;
y = ((BASE_Y + 0.51) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_ViewDistance : GREUH_Label {
idc = 711;
y = ((BASE_Y + 0.47) * safezoneH) + safezoneY;
text = "Adjust View Distance";
};
class GREUH_Slider {
idc = 712;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.19 * safezoneW + safezoneX;
w = 0.12 * safezoneW;
y = ((BASE_Y + 0.515) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = "View Distance";
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desiredviewdistance_inf = (sliderPosition 712)";
};
class GREUH_SliderVD : GREUH_Label {
idc = 713;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.505) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "";
};
class GREUH_LabelVD : GREUH_Label {
idc = 714;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.505) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "Infantry";
};
class GREUH_SliderVeh {
idc = 722;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.19 * safezoneW + safezoneX;
w = 0.12 * safezoneW;
y = ((BASE_Y + 0.545) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = "View Distance";
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desiredviewdistance_veh = (sliderPosition 722)";
};
class GREUH_SliderVDVeh : GREUH_Label {
idc = 723;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.535) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "";
};
class GREUH_LabelVDVeh : GREUH_Label {
idc = 724;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.535) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "Vehicles";
};
class GREUH_SliderObj {
idc = 732;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.19 * safezoneW + safezoneX;
w = 0.12 * safezoneW;
y = ((BASE_Y + 0.575) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = "View Distance";
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desiredviewdistance_obj = (sliderPosition 732)";
};
class GREUH_SliderVDObj : GREUH_Label {
idc = 733;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.565) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "";
};
class GREUH_LabelVDObj : GREUH_Label {
idc = 734;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.565) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "Objects";
};
class GREUH_FPSLabel : GREUH_Label {
idc = 724;
style = ST_LEFT;
x = 0.15 * safezoneW + safezoneX;
w = 0.3 * safezoneW;
y = ((BASE_Y + 0.61) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
sizeEx = 0.018 * safezoneH;
text = "Adjust view distance to keep FPS above";
};
class GREUH_FPSEdit {
idc = 960;
access = 0;
type = CT_EDIT;
style = ST_LEFT + ST_FRAME;
x = 0.317 * safezoneW + safezoneX;
w = 0.03 * safezoneW;
y = ((BASE_Y + 0.61) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorSelection[] = {1,1,1,0.25};
colorDisabled[] = { 0.2, 0.2, 0.2, 0.7 };
colorBackgroundDisabled[] = { 0.5, 0.5, 0.5, 0.5 };
font = FontM;
sizeEx = 0.02 * safezoneH;
autocomplete = "";
text = "";
shadow = 0;
};
class GREUH_WorldZone : GREUH_DefaultZone {
idc = 801;
y = ((BASE_Y + 0.7) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_WorldQuality : GREUH_Label {
idc = 810;
y = ((BASE_Y + 0.66) * safezoneH) + safezoneY;
text = "Adjust Terrain Details";
};
class GREUH_ButtonWorld : GREUH_ButtonGeneric {
w = ((0.2 * safezoneW) / 4) - BORDERSIZE;
y = ((BASE_Y + 0.7) * safezoneH) + safezoneY;
};
class GREUH_ButtonWorldVeryLow : GREUH_ButtonWorld {
idc = 812;
x = 0.15 * safezoneW + safezoneX;
text = "Very Low";
action = "setTerrainGrid 50; hint 'Terrain details set to Very Low'";
};
class GREUH_ButtonWorldLow : GREUH_ButtonWorld {
idc = 813;
x = (0.15 * safezoneW + safezoneX) + (((0.2 * safezoneW) / 4) * 1);
text = "Low";
action = "setTerrainGrid 25; hint 'Terrain details set to Low'";
};
class GREUH_ButtonWorldNormal : GREUH_ButtonWorld {
idc = 814;
x = (0.15 * safezoneW + safezoneX) + (((0.2 * safezoneW) / 4) * 2);
text = "Normal";
action = "setTerrainGrid 12.5; hint 'Terrain details set to Normal'";
};
class GREUH_ButtonWorldHigh : GREUH_ButtonWorld {
idc = 815;
x = (0.15 * safezoneW + safezoneX) + (((0.2 * safezoneW) / 4) * 3);
text = "High";
action = "setTerrainGrid 3.125; hint 'Terrain details set to High'";
};
class GREUH_MarkersZone : GREUH_DefaultZone {
idc = 901;
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
h = (0.04 * safezoneH) - (2 * BORDERSIZE);
};
class GREUH_LabelNametags : GREUH_RegularLabel {
idc = 961;
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
text = "Show player nametags : ";
};
class GREUH_NametagsActive : GREUH_RegularLabel {
idc = 962;
style = ST_RIGHT;
colorText[] = COLOR_BRIGHTGREEN;
text = "active";
x = 0.2 * safezoneW + safezoneX;
w = 0.1 * safezoneW;
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
};
class GREUH_NametagsYes : GREUH_ButtonGeneric {
idc = 963;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
x = 0.305 * safezoneW + safezoneX;
text = "Yes";
action = "show_nametags = true";
};
class GREUH_NametagsNo : GREUH_ButtonGeneric {
idc = 964;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.39) * safezoneH) + safezoneY;
x = (0.32 + BORDERSIZE) * safezoneW + safezoneX;
text = "No";
action = "show_nametags = false";
};
class GREUH_LabelMarkers : GREUH_RegularLabel {
idc = 911;
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
text = "Show teammates on map : ";
};
class GREUH_LabelMarkersActive : GREUH_RegularLabel {
idc = 912;
style = ST_RIGHT;
colorText[] = COLOR_BRIGHTGREEN;
text = "active";
x = 0.2 * safezoneW + safezoneX;
w = 0.1 * safezoneW;
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
};
class GREUH_TeammatesYes : GREUH_ButtonGeneric {
idc = 913;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
x = 0.305 * safezoneW + safezoneX;
text = "Yes";
action = "show_teammates = true";
};
class GREUH_TeammatesNo : GREUH_ButtonGeneric {
idc = 914;
w = ((0.08 * safezoneW) / 4);
y = ((BASE_Y + 0.43) * safezoneH) + safezoneY;
x = (0.32 + BORDERSIZE) * safezoneW + safezoneX;
text = "No";
action = "show_teammates = false";
};
class GREUH_VehSound : GREUH_Label {
idc = 1101;
y = ((BASE_Y + 0.74) * safezoneH) + safezoneY;
text = "In-Vehicle Sound Volume";
};
class GREUH_SliderVehSound {
idc = 1102;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.15 * safezoneW + safezoneX;
w = 0.16 * safezoneW;
y = ((BASE_Y + 0.785) * safezoneH) + safezoneY;
h = 0.025 * safezoneH;
text = "View Distance";
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "desired_vehvolume = (sliderPosition 1102)";
};
class GREUH_LabelVehSound : GREUH_Label {
idc = 1103;
style = ST_LEFT;
x = 0.31 * safezoneW + safezoneX;
w = 0.05 * safezoneW;
y = ((BASE_Y + 0.775) * safezoneH) + safezoneY;
h = 0.03 * safezoneH;
colorBackground[] = COLOR_NOALPHA;
text = "Test";
};
};
class GreuhButton {
idc = -1;
type = CT_BUTTON;
style = ST_CENTER;
default = false;
font = FontM;
sizeEx = 0.018 * safezoneH;
colorText[] = { 0, 0, 0, 1 };
colorFocused[] = { 1, 1, 1, 1 };
colorDisabled[] = { 0.2, 0.2, 0.2, 0.7 };
colorBackground[] = { 0.8, 0.8, 0.8, 0.8 };
colorBackgroundDisabled[] = { 0.5, 0.5, 0.5, 0.5 };
colorBackgroundActive[] = { 1, 1, 1, 1 };
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = { 0, 0, 0, 0.5 };
colorBorder[] = { 0, 0, 0, 1 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = {"\a3\Ui_f\data\Sound\CfgIngameUI\hintExpand", 0.891251, 1};
soundClick[] = { "", 0, 1 }; // no sound
soundEscape[] = { "", 0, 1 }; // no sound
x = 0.45 * safezoneW + safezoneX;
y = ((BASE_Y + 0.7) * safezoneH) + safezoneY;
w = 0.1 * safezoneW;
h = 0.04 * safezoneH;
text = "";
action = "";
shadow = 1;
};
class GREUH_respawn {
idd = 5566;
movingEnable = false;
controlsBackground[] = {"GREUH_BleedoutBar_BG"};
controls[] = {"GREUH_BleedoutBar","GREUH_BleedoutBar_F","GREUH_Useless","GREUH_Respawn","GREUH_ReviveLabel","GREUH_WoundedLabel", "GREUH_ReplaceAI"};
objects[] = {};
class GREUH_Respawn : GreuhButton {
idc = -1;
x = 0.45 * safezoneW + safezoneX;
y = 0.75 * safezoneH + safezoneY;
w = 0.1 * safezoneW;
h = 0.04 * safezoneH;
text = "Respawn";
action = "player setDamage 1";
};
class GREUH_ReplaceAI : GreuhButton {
idc = 678;
x = 0.45 * safezoneW + safezoneX;
y = 0.8 * safezoneH + safezoneY;
w = 0.1 * safezoneW;
h = 0.04 * safezoneH;
text = "Replace nearest AI";
action = "replace_ai = 1";
}
class GREUH_Useless : GREUH_Respawn {
idc = -1;
x = -5;
y = -5;
w = 0.1;
h = 0.1;
text = "";
action = "";
};
class GREUH_ReviveLabel {
idc = 5567;
type = CT_STATIC;
style = ST_CENTER;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_NOALPHA;
font = FontM;
sizeEx = 0.02 * safezoneH;
shadow = 1;
x = 0.4 * safezoneW + safezoneX;
y = 0.7 * safezoneH + safezoneY;
w = 0.2 * safezoneW;
h = 0.025 * safezoneH;
text = "";
};
class GREUH_WoundedLabel {
idc = 4567;
type = CT_STATIC;
style = ST_CENTER;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_NOALPHA;
font = FontM;
sizeEx = 0.07 * safezoneH;
shadow = 1;
x = 0.3 * safezoneW + safezoneX;
y = 0.25 * safezoneH + safezoneY;
w = 0.4 * safezoneW;
h = 0.07 * safezoneH;
text = $STR_REVIVE_LABEL;
};
class GREUH_BleedoutBar {
idc = 6699;
type = CT_STATIC;
style = ST_SINGLE;
colorText[] = COLOR_WHITE;
colorBackground[] = COLOR_BLEEDOUT;
font = FontM;
sizeEx = 0.023;
x = 0.4 * safezoneW + safezoneX;
y = 0.7 * safezoneH + safezoneY;
w = 0.2 * safezoneW;
h = 0.03 * safezoneH;
text = "";
};
class GREUH_BleedoutBar_BG : GREUH_BleedoutBar {
idc = -1;
colorBackground[] = COLOR_BLACK_ALPHA;
x = 0.4 * safezoneW + safezoneX - 0.005;
y = 0.7 * safezoneH + safezoneY - 0.005;
w = 0.2 * safezoneW + 0.01;
h = 0.03 * safezoneH + 0.01;
};
class GREUH_BleedoutBar_F : GREUH_BleedoutBar {
idc = 6698;
colorText[] = COLOR_WHITE;
style = ST_FRAME;
x = 0.4 * safezoneW + safezoneX - 0.005;
y = 0.7 * safezoneH + safezoneY - 0.005;
w = 0.2 * safezoneW + 0.01;
h = 0.03 * safezoneH + 0.01;
};
};

View File

@ -0,0 +1,16 @@
// If left empty, everything is allowed, otherwise only whitelisted items will be available
GRLIB_arsenal_weapons = [
];
GRLIB_arsenal_magazines = [
];
GRLIB_arsenal_items = [
];
GRLIB_arsenal_backpacks = [
];

35
Missionframework/init.sqf Normal file
View File

@ -0,0 +1,35 @@
enableSaving [ false, false ];
[] call compileFinal preprocessFileLineNumbers "scripts\shared\atlas_manager.sqf";
[] call compileFinal preprocessFileLineNumbers "scripts\shared\liberation_functions.sqf";
[] call compileFinal preprocessFileLineNumbers "scripts\shared\init_sectors.sqf";
[] call compileFinal preprocessFileLineNumbers "scripts\shared\fetch_params.sqf";
[] call compileFinal preprocessFileLineNumbers "gameplay_constants.sqf";
[] call compileFinal preprocessFileLineNumbers "kp_liberation_config.sqf";
switch (KP_liberation_preset) do {
case 1: {[] call compileFinal preprocessFileLineNumbers "presets\custom.sqf";};
case 2: {[] call compileFinal preprocessFileLineNumbers "presets\rhs_bw_takistan.sqf";};
default {[] call compileFinal preprocessFileLineNumbers "presets\vanilla.sqf";};
};
[] call compileFinal preprocessFileLineNumbers "scripts\shared\classnames.sqf";
[] execVM "GREUH\scripts\GREUH_activate.sqf";
[] call compileFinal preprocessFileLineNumbers "scripts\shared\init_shared.sqf";
if (isServer) then {
[] call compileFinal preprocessFileLineNumbers "scripts\server\init_server.sqf";
};
if (!isDedicated && !hasInterface && isMultiplayer) then {
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\offloading\hc_manager.sqf";
};
if (!isDedicated && hasInterface) then {
waitUntil { alive player };
[] call compileFinal preprocessFileLineNumbers "scripts\client\init_client.sqf";
} else {
setViewDistance 1600;
};

View File

@ -0,0 +1,9 @@
{
if (!isnil("commandant")) then {
if (isnull(getAssignedCuratorLogic commandant)) then {
unassignCurator zm1;
sleep 2;
commandant assignCurator zm1;
};
};
} forEach allPlayers

View File

@ -0,0 +1,29 @@
/*
CONFIG FILE FOR KP LIBERATION
TO ADJUST THE ARSENAL WHITELIST OPEN: arsenal.sqf
*/
// Use ACE?
// true or false
KP_liberation_ace = false;
// Vehicle classnames which should be a medical vehicle (for ACE only)
KP_liberation_medical_vehicles = [
"B_Truck_01_medical_F",
"rhsusf_m113d_usarmy_medical",
"RHS_UH60M_MEV2"
];
// Which units preset should be used?
// 0 = Vanilla
// 1 = custom (edit the custom.sqf in the presets folder to your likings)
// 2 = RHS, BW Mod and Project OPFOR Takistan Setting
KP_liberation_preset = 0;
// Fuel Consumption
// Time in Minutes till a full tank depletes when the vehicle is standing with running engine
KP_liberation_fuel_neutral = 180;
// Time in Minutes till a full tank depletes when the vehicle is driving
KP_liberation_fuel_normal = 90;
// Time in Minutes till a full tank depletes when the vehicle is driving at max speed
KP_liberation_fuel_max = 45;

View File

@ -0,0 +1,7 @@
if ( isNil "GRLIB_respawn_loadout" ) then {
removeAllWeapons player;
player linkItem "NVGoggles";
} else {
sleep 4;
[ player, GRLIB_respawn_loadout ] call F_setLoadout;
};

View File

@ -0,0 +1,449 @@
// This file allows you to add content to the mission without conflict issues after each update of the original classnames.sqf
// If you want more modifications to be supported by this file, let's discuss it on the forums.
// *** SUPPORT STUFF ***
// Setting a value here will overwrite the original value found from the mission. Do that if you're doing a total conversion.
// Each of these should be unique, the same classnames for different purposes may cause various unpredictable issues with player actions. Or not. Just don't try.
FOB_typename = "Land_Cargo_HQ_V1_F"; // Default "Land_Cargo_HQ_V1_F";
FOB_box_typename = "B_Slingload_01_Cargo_F"; // Default "B_Slingload_01_Cargo_F";
FOB_truck_typename = "B_Truck_01_box_F"; // Default "B_Truck_01_box_F";
Arsenal_typename = "B_supplyCrate_F"; // Default "B_supplyCrate_F";
Respawn_truck_typename = "B_Truck_01_medical_F"; // Default "B_Truck_01_medical_F";
huron_typename = "B_Heli_Transport_03_unarmed_F"; // Default "B_Heli_Transport_03_unarmed_F";
ammobox_b_typename = "Box_NATO_AmmoVeh_F"; // Default "Box_NATO_AmmoVeh_F";
ammobox_o_typename = "Box_East_AmmoVeh_F"; // Default "Box_East_AmmoVeh_F";
opfor_ammobox_transport = "O_Truck_03_transport_F"; // Default "O_Truck_03_transport_F"; // Make sure this thing can transport ammo boxes (see box_transport_config down below) otherwise things will break
commander_classname = "B_officer_F"; // Default "B_officer_F"
crewman_classname = "B_crew_F"; // Default "B_crew_F";
pilot_classname = "B_Helipilot_F"; // Default "B_Helipilot_F";
// *** FRIENDLIES ***
// Each array below represents one page of the build menu
// Format : [ "classname", manpower, ammo, fuel ]
// Example : [ "B_APC_Tracked_01_AA_F", 0, 40, 15 ],
// If overwrite is set to true, then the extension list will entirely replace the original list defined in classnames.sqf. Otherwise it will be appended to it.
// Useful for total conversions to RHS and such, without having to alter the original file.
infantry_units_overwrite = true;
infantry_units_extension = [
["B_soldier_F",2,0,0],
["B_soldier_GL_F",3,0,0],
["B_soldier_AR_F",3,0,0],
["B_medic_F",3,0,0],
["B_soldier_M_F",3,0,0],
["B_engineer_F",3,0,0],
["B_soldier_LAT_F",4,0,0],
["B_Sharpshooter_F",5,0,0],
["B_HeavyGunner_F",5,0,0],
["B_recon_F",4,0,0],
["B_recon_medic_F",4,0,0],
["B_recon_M_F",5,0,0],
["B_Recon_Sharpshooter_F",8,0,0],
["B_soldier_AA_F",5,10,0],
["B_soldier_AT_F",5,10,0],
["B_sniper_F",10,0,0],
["B_soldier_PG_F",2,0,0],
["B_crew_F",1,0,0],
["B_helipilot_F",1,0,0]
];
light_vehicles_overwrite = true;
light_vehicles_extension = [
["B_Quadbike_01_F",0,0,1],
["B_MRAP_01_F",0,0,2],
["B_MRAP_01_hmg_F",0,10,2],
["B_MRAP_01_gmg_F",0,20,2],
["B_Truck_01_transport_F",0,0,5],
["B_Truck_01_covered_F",0,0,5],
["B_UGV_01_F",0,0,5],
["B_UGV_01_rcws_F",0,50,5],
["B_Boat_Transport_01_F",0,0,2],
["B_Boat_Armed_01_minigun_F",0,30,10]
];
heavy_vehicles_overwrite = true;
heavy_vehicles_extension = [
["B_APC_Wheeled_01_cannon_F",0,30,8],
["B_APC_Tracked_01_rcws_F",0,30,15],
["B_APC_Tracked_01_AA_F",0,40,15],
["B_MBT_01_cannon_F",0,75,20],
["B_MBT_01_TUSK_F",0,100,25],
["B_MBT_01_arty_F",0,750,30],
["B_MBT_01_mlrs_F",0,2500,100]
];
air_vehicles_overwrite = true;
air_vehicles_extension = [
["B_Heli_Light_01_F",0,0,10],
["B_Heli_Light_01_armed_F",0,30,10],
["B_Heli_Transport_01_F",0,20,12],
["B_Heli_Transport_03_F",0,20,15],
["B_Heli_Attack_01_F",0,150,30],
["B_Plane_CAS_01_F",0,500,50],
["B_UAV_01_F",0,0,5],
["B_UAV_02_F",0,250,20],
["B_UAV_02_CAS_F",0,250,20]
];
static_vehicles_overwrite = true;
static_vehicles_extension = [
["B_HMG_01_F",0,10,0],
["B_HMG_01_high_F",0,10,0],
["B_GMG_01_F",0,20,0],
["B_GMG_01_high_F",0,20,0],
["B_static_AA_F",0,25,0],
["B_static_AT_F",0,30,0],
["B_Mortar_01_F",0,50,0]
];
buildings_overwrite = true;
buildings_extension = [
["Land_Medevac_house_V1_F",0,0,0],
["Land_Medevac_HQ_V1_F",0,0,0],
["Land_CncBarrierMedium4_F",0,0,0],
["Land_CncWall4_F",0,0,0],
["Land_CncShelter_F",0,0,0],
["Land_HBarrier_5_F",0,0,0],
["Land_HBarrierBig_F",0,0,0],
["Land_HBarrierWall6_F",0,0,0],
["Land_HBarrierWall_corner_F",0,0,0],
["Land_HBarrierTower_F",0,0,0],
["Land_BagBunker_Large_F",0,0,0],
["Land_BagBunker_Small_F",0,0,0],
["Land_BagBunker_Tower_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["CamoNet_BLUFOR_open_F",0,0,0],
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_Cargo_House_V1_F",0,0,0],
["Land_Cargo_Patrol_V1_F",0,0,0],
["Flag_NATO_F",0,0,0],
["Land_HelipadSquare_F",0,0,0],
["Land_Razorwire_F",0,0,0],
["Land_BagFence_Round_F",0,0,0],
["Land_ToolTrolley_02_F",0,0,0],
["Land_WeldingTrolley_01_F",0,0,0],
["Land_GasTank_02_F",0,0,0],
["Land_Workbench_01_F",0,0,0],
["Land_WaterTank_F",0,0,0],
["Land_WaterBarrel_F",0,0,0],
["Land_MetalCase_01_large_F",0,0,0],
["CargoNet_01_box_F",0,0,0],
["Land_CampingChair_V1_F",0,0,0],
["Land_CampingChair_V2_F",0,0,0],
["Land_CampingTable_F",0,0,0],
["MapBoard_altis_F",0,0,0],
["Land_Metal_rack_Tall_F",0,0,0],
["PortableHelipadLight_01_blue_F",0,0,0],
["Land_DieselGroundPowerUnit_01_F",0,0,0],
["Land_Pallet_MilBoxes_F",0,0,0],
["Land_PaperBox_open_full_F",0,0,0],
["Land_ClutterCutter_large_F",0,0,0]
];
support_vehicles_overwrite = true; // If you're going to overwrite this, make sure you have at least Arsenal_typename, Respawn_truck_typename, FOB_box_typename and FOB_truck_typename in there
support_vehicles_extension = [
[Arsenal_typename,10,0,0],
[Respawn_truck_typename,20,0,5],
[FOB_box_typename,30,50,0],
[FOB_truck_typename,30,50,5],
["B_APC_Tracked_01_CRV_F",0,30,10],
["C_Offroad_01_repair_F",5,0,2],
["B_Truck_01_Repair_F",10,0,5],
["B_Truck_01_fuel_F",10,0,5],
["B_Truck_01_ammo_F",10,0,5],
["B_Slingload_01_Repair_F",5,0,0],
["B_Slingload_01_Fuel_F",5,0,0],
["B_Slingload_01_Ammo_F",5,0,0],
["Box_NATO_AmmoVeh_F",0,154,0],
["Box_East_AmmoVeh_F",0,115,0]
];
// All the UAVs must be declared here, otherwise there shall be UAV controlling issues. Namely: you won't be able to control them.
uavs = [
"B_UAV_01_F",
"B_UAV_02_CAS_F"
];
// Pre-made squads for the commander build menu. These shouldn't exceed 10 members.
// Light infantry squad
blufor_squad_inf_light = [
];
// Heavy infantry squad
blufor_squad_inf = [
];
// AT specialists squad
blufor_squad_at = [
];
// AA specialists squad
blufor_squad_aa = [
];
// Force recon squad
blufor_squad_recon = [
];
// Paratroopers squad
blufor_squad_para = [
];
// *** BADDIES ***
// All OPFOR infantry. Defining a value here will replace the default value from the original mission.
opfor_sentry = nil;
opfor_rifleman = nil;
opfor_grenadier = nil;
opfor_squad_leader = nil;
opfor_team_leader = nil;
opfor_marksman = nil;
opfor_machinegunner = nil;
opfor_heavygunner = nil;
opfor_medic = nil;
opfor_rpg = nil;
opfor_at = nil;
opfor_aa = nil;
opfor_officer = nil;
opfor_sharpshooter = nil;
opfor_sniper = nil;
opfor_engineer = nil;
opfor_paratrooper = nil;
// OPFOR Vehicles to be used in secondary objectives
opfor_mrap = nil;
opfor_mrap_armed = nil;
opfor_transport_helo = nil;
opfor_transport_truck = nil;
opfor_fuel_truck = nil;
opfor_ammo_truck = nil;
opfor_fuel_container = nil;
opfor_ammo_container = nil;
opfor_flag = nil;
// Militia infantry. Soldier classnames the game will pick from randomly
militia_squad_overwrite = true;
militia_squad_extension = [
"O_G_Soldier_SL_F",
"O_G_Soldier_A_F",
"O_G_Soldier_AR_F",
"O_G_medic_F",
"O_G_engineer_F",
"O_G_Soldier_exp_F",
"O_G_Soldier_GL_F",
"O_G_Soldier_M_F",
"O_G_Soldier_F",
"O_G_Soldier_LAT_F",
"O_G_Soldier_lite_F",
"O_G_Sharpshooter_F",
"O_G_Soldier_TL_F"
];
// Militia vehicles to choose from
militia_vehicles_overwrite = true;
militia_vehicles_extension = [
"O_G_Offroad_01_armed_F"
];
// All the vehicles that can spawn as sector defenders and patrols
opfor_vehicles_overwrite = true;
opfor_vehicles_extension = [
"O_APC_Tracked_02_cannon_F",
"O_APC_Wheeled_02_rcws_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Wheeled_02_rcws_F",
"O_MBT_02_cannon_F",
"O_MBT_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_MRAP_02_gmg_F",
"O_MRAP_02_hmg_F",
"O_MRAP_02_hmg_F"
];
// Same with lighter choices to be used when the alert level is low
opfor_vehicles_low_intensity_overwrite = true;
opfor_vehicles_low_intensity_extension = [
"O_APC_Tracked_02_cannon_F",
"O_APC_Wheeled_02_rcws_F",
"O_MRAP_02_hmg_F",
"O_MRAP_02_hmg_F",
"O_MRAP_02_gmg_F"
];
// All the vehicles that can spawn as battlegroup members
opfor_battlegroup_vehicles_overwrite = true;
opfor_battlegroup_vehicles_extension = [
"O_MRAP_02_hmg_F",
"O_MRAP_02_gmg_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Wheeled_02_rcws_F",
"O_Truck_03_covered_F",
"O_MBT_02_cannon_F",
"O_MBT_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_Heli_Attack_02_F",
"O_Heli_Light_02_F",
"O_Heli_Transport_04_bench_F",
"O_Truck_03_transport_F"
];
// Same with lighter choices to be used when the alert level is low
opfor_battlegroup_vehicles_low_intensity_overwrite = true;
opfor_battlegroup_vehicles_low_intensity_extension = [
"O_APC_Tracked_02_cannon_F",
"O_APC_Wheeled_02_rcws_F",
"O_MRAP_02_hmg_F",
"O_MRAP_02_hmg_F",
"O_MRAP_02_gmg_F",
"O_Truck_03_covered_F",
"O_Heli_Transport_04_bench_F",
"O_Truck_03_transport_F"
];
// All the vehicles that can spawn as battlegroup members (see above) and also hold 8 soldiers as passengers.
// If something in here can't hold all 8 soldiers then buggy behaviours may occur
opfor_troup_transports_overwrite = true;
opfor_troup_transports_extension = [
"O_APC_Wheeled_02_rcws_F",
"O_Truck_03_covered_F",
"O_Heli_Transport_04_bench_F",
"O_Truck_03_transport_F",
"O_Heli_Light_02_F"
];
// Battlegroup members that will need to spawn in flight. Should be only helos but, who knows
opfor_choppers_overwrite = true;
opfor_choppers_extension = [
"O_Heli_Attack_02_F",
"O_Heli_Light_02_F",
"O_Heli_Transport_04_bench_F"
];
// Opfor military aircrafts
opfor_air_overwrite = true;
opfor_air_extension = [
"O_Plane_CAS_02_F"
];
// Other stuff
// civilians
civilians_overwrite = true;
civilians_extension = [
"C_man_1",
"C_man_polo_6_F",
"C_man_polo_3_F",
"C_man_polo_2_F",
"C_man_polo_4_F",
"C_man_polo_5_F",
"C_man_polo_1_F",
"C_man_p_beggar_F",
"C_man_1_2_F",
"C_man_p_fugitive_F",
"C_man_hunter_1_F",
"C_journalist_F",
"C_man_shorts_2_F",
"C_man_w_worker_F"
];
// Civilian vehicles
civilian_vehicles_overwrite = true;
civilian_vehicles_extension = [
"C_Hatchback_01_F",
"C_Hatchback_01_sport_F",
"C_Offroad_01_F",
"C_SUV_01_F",
"C_Van_01_transport_F",
"C_Van_01_box_F",
"C_Van_01_fuel_F",
"C_Quadbike_01_F"
];
// Everything the AI troups should be able to resupply from
ai_resupply_sources_extension = [
];
// Everything that can resupply other vehicles
vehicle_repair_sources_extension = [
];
vehicle_rearm_sources_extension = [
];
vehicle_refuel_sources_extension = [
];
// Elite vehicles that should be unlocked through military base capture.
elite_vehicles_extension = [
"B_UGV_01_rcws_F",
"B_MBT_01_TUSK_F",
"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
"B_Heli_Attack_01_F",
"B_Plane_CAS_01_F",
"B_UAV_02_F",
"B_UAV_02_CAS_F"
];
// Blacklisted arsenal items such as deployable weapons that should be bought instead
// Useless if you're using a predefined arsenal in arsenal.sqf
// REMEMBER: Using of the Blacklist will decrease performance while entering the arsenal. Usage of Whitelist is highly recommended.
// Classnames of weapons which should not be available in the arsenal
blacklisted_from_arsenal_weapons = [
];
// Classnames of items (optics, uniforms, vests, etc.) which should not be available in the arsenal
blacklisted_from_arsenal_items = [
"optic_Nightstalker",
"optic_tws",
"optic_tws_mg"
];
// Classnames of magazines or explosives which should not be available in the arsenal
blacklisted_from_arsenal_magazines = [
];
// Classnames of backpacks which should not be available in the arsenal
blacklisted_from_arsenal_extension = [
];
// Configuration for ammo boxes transport
// First entry: classname
// Second entry: how far behind the vehicle the boxes should be unloaded
// Following entries: attachTo position for each box, the number of boxes that can be loaded is derived from the number of entries
box_transport_config_extension = [
[ "greuh_eh101_gr", -6.5, [0, 4.2, -1.45], [0, 2.5, -1.45], [0, 0.8, -1.45], [0, -0.9, -1.45] ]
];

View File

@ -0,0 +1,483 @@
// This file allows you to add content to the mission without conflict issues after each update of the original classnames.sqf
// If you want more modifications to be supported by this file, let's discuss it on the forums.
// REQUIRED MODS FOR THIS PRESET:
// BWMod
// FA-18 Super Hornet
// Project OPFOR
// RHS: Armed Forces of the Russian Federation
// RHS: United States Forces
// *** SUPPORT STUFF ***
// Setting a value here will overwrite the original value found from the mission. Do that if you're doing a total conversion.
// Each of these should be unique, the same classnames for different purposes may cause various unpredictable issues with player actions. Or not. Just don't try.
FOB_typename = "Land_Cargo_HQ_V3_F"; // Default "Land_Cargo_HQ_V1_F";
FOB_box_typename = "B_Slingload_01_Cargo_F"; // Default "B_Slingload_01_Cargo_F";
FOB_truck_typename = "rhsusf_M1083A1P2_B_M2_d_MHQ_fmtv_usarmy"; // Default "B_Truck_01_box_F";
Arsenal_typename = "B_supplyCrate_F"; // Default "B_supplyCrate_F";
Respawn_truck_typename = "rhsusf_m113d_usarmy_medical"; // Default "B_Truck_01_medical_F";
huron_typename = "RHS_CH_47F_10"; // Default "B_Heli_Transport_03_unarmed_F";
ammobox_b_typename = "Box_NATO_AmmoVeh_F"; // Default "Box_NATO_AmmoVeh_F";
ammobox_o_typename = "Box_East_AmmoVeh_F"; // Default "Box_East_AmmoVeh_F";
opfor_ammobox_transport = "O_Truck_03_transport_F"; // Default "O_Truck_03_transport_F"; // Make sure this thing can transport ammo boxes (see box_transport_config down below) otherwise things will break
commander_classname = "BWA3_Officer_Tropen"; // Default "B_officer_F"
crewman_classname = "BWA3_Crew_Tropen"; // Default "B_crew_F";
pilot_classname = "BWA3_Helipilot"; // Default "B_Helipilot_F";
// *** FRIENDLIES ***
// Each array below represents one page of the build menu
// Format : [ "classname", manpower, ammo, fuel ]
// Example : [ "B_APC_Tracked_01_AA_F", 0, 40, 15 ],
// If overwrite is set to true, then the extension list will entirely replace the original list defined in classnames.sqf. Otherwise it will be appended to it.
// Useful for total conversions to RHS and such, without having to alter the original file.
infantry_units_overwrite = true;
infantry_units_extension = [
["BWA3_Rifleman_Tropen",2,0,0],
["BWA3_Grenadier_Tropen",3,0,0],
["BWA3_Autorifleman_Tropen",3,0,0],
["BWA3_CombatLifeSaver_Tropen",3,0,0],
["BWA3_Marksman_Tropen",3,0,0],
["BWA3_Engineer_Tropen",3,0,0],
["BWA3_RiflemanAT_RGW90_Tropen",4,0,0],
["BWA3_AutoriflemanMG5_Tropen",5,0,0],
["BWA3_recon_Tropen",4,0,0],
["BWA3_recon_Medic_Tropen",4,0,0],
["BWA3_recon_Marksman_Tropen",5,0,0],
["BWA3_RiflemanAA_Fliegerfaust_Tropen",5,10,0],
["BWA3_RiflemanAT_Pzf3_Tropen",5,10,0],
["BWA3_SniperG82_Tropen",10,0,0],
["BWA3_Crew_Tropen",1,0,0],
["BWA3_Helipilot",1,0,0]
];
light_vehicles_overwrite = true;
light_vehicles_extension = [
["B_Quadbike_01_F",0,0,1],
["rhsusf_m1025_d",0,0,2],
["rhsusf_m1025_d_m2",0,40,2],
["rhsusf_m1025_d_Mk19",0,60,2],
["B_Truck_01_transport_F",0,0,5],
["B_Truck_01_covered_F",0,0,5],
["B_Truck_01_medical_F",5,0,5]
];
heavy_vehicles_overwrite = true;
heavy_vehicles_extension = [
["rhsusf_m113d_usarmy",0,120,8],
["rhsusf_m113d_usarmy_MK19",0,160,8],
["rhsusf_m113d_usarmy_medical",10,0,5],
["RHS_M6",0,200,15],
["RHS_M2A2",0,220,15],
["RHS_M2A3_BUSKIII",0,240,15],
["BWA3_Puma_Tropen",0,240,15],
["rhsusf_m1a2sep1d_usarmy",0,400,20],
["rhsusf_m1a2sep1tuskiid_usarmy",0,450,25],
["BWA3_Leopard2A6M_Tropen",0,500,25],
["rhsusf_m109d_usarmy",0,2500,30]
];
air_vehicles_overwrite = true;
air_vehicles_extension = [
["RHS_MELB_MH6M",0,0,10],
["RHS_MELB_AH6M_L",0,160,10],
["RHS_UH60M_MEV2",15,0,15],
["RHS_UH60M",0,360,12],
["RHS_AH64D",0,1000,30],
["BWA3_Tiger_RMK_Universal",0,1200,40],
["RHS_A10",0,2000,50],
["JS_JC_FA18E",0,3000,50],
["JS_JC_FA18F",0,3200,50],
["B_UAV_02_CAS_F",0,250,20]
];
static_vehicles_overwrite = true;
static_vehicles_extension = [
];
buildings_overwrite = true;
buildings_extension = [
["Land_Medevac_house_V1_F",0,0,0],
["Land_Medevac_HQ_V1_F",0,0,0],
["Land_CncBarrierMedium4_F",0,0,0],
["Land_CncWall4_F",0,0,0],
["Land_CncShelter_F",0,0,0],
["Land_HBarrier_5_F",0,0,0],
["Land_HBarrierBig_F",0,0,0],
["Land_HBarrierWall6_F",0,0,0],
["Land_HBarrierWall_corner_F",0,0,0],
["Land_HBarrierTower_F",0,0,0],
["Land_BagBunker_Large_F",0,0,0],
["Land_BagBunker_Small_F",0,0,0],
["Land_BagBunker_Tower_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["CamoNet_BLUFOR_open_F",0,0,0],
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_Cargo_House_V1_F",0,0,0],
["Land_Cargo_Patrol_V1_F",0,0,0],
["Flag_NATO_F",0,0,0],
["Land_HelipadSquare_F",0,0,0],
["Land_Razorwire_F",0,0,0],
["Land_BagFence_Round_F",0,0,0],
["Land_ToolTrolley_02_F",0,0,0],
["Land_WeldingTrolley_01_F",0,0,0],
["Land_GasTank_02_F",0,0,0],
["Land_Workbench_01_F",0,0,0],
["Land_WaterTank_F",0,0,0],
["Land_WaterBarrel_F",0,0,0],
["Land_MetalCase_01_large_F",0,0,0],
["CargoNet_01_box_F",0,0,0],
["Land_CampingChair_V1_F",0,0,0],
["Land_CampingChair_V2_F",0,0,0],
["Land_CampingTable_F",0,0,0],
["MapBoard_altis_F",0,0,0],
["Land_Metal_rack_Tall_F",0,0,0],
["PortableHelipadLight_01_blue_F",0,0,0],
["Land_DieselGroundPowerUnit_01_F",0,0,0],
["Land_Pallet_MilBoxes_F",0,0,0],
["Land_PaperBox_open_full_F",0,0,0],
["Land_ClutterCutter_large_F",0,0,0]
];
support_vehicles_overwrite = true; // If you're going to overwrite this, make sure you have at least Arsenal_typename, Respawn_truck_typename, FOB_box_typename and FOB_truck_typename in there
support_vehicles_extension = [
[FOB_box_typename,30,400,0],
[FOB_truck_typename,30,400,5],
["B_supplyCrate_F",5,0,0],
["ACE_medicalSupplyCrate_advanced",5,0,0],
["ACE_Box_82mm_Mo_HE",5,40,0],
["ACE_Box_82mm_Mo_Smoke",5,10,0],
["ACE_Box_82mm_Mo_Illum",5,10,0],
["B_APC_Tracked_01_CRV_F",0,30,10],
["B_Truck_01_Repair_F",10,0,5],
["B_Truck_01_fuel_F",10,0,5],
["B_Truck_01_ammo_F",10,0,5],
["B_Slingload_01_Repair_F",5,0,0],
["B_Slingload_01_Fuel_F",5,0,0],
["B_Slingload_01_Ammo_F",5,0,0],
["Box_NATO_AmmoVeh_F",0,154,0],
["Box_East_AmmoVeh_F",0,115,0]
];
// All the UAVs must be declared here, otherwise there shall be UAV controlling issues. Namely: you won't be able to control them.
uavs = [
"B_UAV_01_F",
"B_UAV_02_CAS_F"
];
// Pre-made squads for the commander build menu. These shouldn't exceed 10 members.
// Light infantry squad
blufor_squad_inf_light = [
"BWA3_SL_Tropen",
"BWA3_TL_Tropen",
"BWA3_Grenadier_Tropen",
"BWA3_Autorifleman_Tropen",
"BWA3_Grenadier_Tropen",
"BWA3_CombatLifeSaver_Tropen",
"BWA3_RiflemanAT_RGW90_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen"
];
// Heavy infantry squad
blufor_squad_inf = [
"BWA3_SL_Tropen",
"BWA3_TL_Tropen",
"BWA3_Autorifleman_Tropen",
"BWA3_AutoriflemanMG5_Tropen",
"BWA3_CombatLifeSaver_Tropen",
"BWA3_Grenadier_Tropen",
"BWA3_RiflemanAT_RGW90_Tropen",
"BWA3_RiflemanAT_RGW90_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_SniperG82_Tropen"
];
// AT specialists squad
blufor_squad_at = [
"BWA3_SL_Tropen",
"BWA3_RiflemanAT_Pzf3_Tropen",
"BWA3_RiflemanAT_Pzf3_Tropen",
"BWA3_RiflemanAT_Pzf3_Tropen",
"BWA3_CombatLifeSaver_Tropen",
"BWA3_Rifleman_Tropen"
];
// AA specialists squad
blufor_squad_aa = [
"BWA3_SL_Tropen",
"BWA3_RiflemanAA_Fliegerfaust_Tropen",
"BWA3_RiflemanAA_Fliegerfaust_Tropen",
"BWA3_RiflemanAA_Fliegerfaust_Tropen",
"BWA3_CombatLifeSaver_Tropen",
"BWA3_Rifleman_Tropen"
];
// Force recon squad
blufor_squad_recon = [
"BWA3_recon_TL_Tropen",
"BWA3_recon_Tropen",
"BWA3_recon_Pioneer_Tropen",
"BWA3_recon_Medic_Tropen",
"BWA3_recon_LAT_Tropen",
"BWA3_recon_LAT_Tropen",
"BWA3_recon_Marksman_Tropen",
"BWA3_SniperG82_Tropen",
"BWA3_recon_Tropen"
];
// Paratroopers squad
blufor_squad_para = [
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen",
"BWA3_Rifleman_Tropen"
];
// *** BADDIES ***
// All OPFOR infantry. Defining a value here will replace the default value from the original mission.
opfor_sentry = "LOP_TKA_Infantry_Rifleman";
opfor_rifleman = "LOP_TKA_Infantry_Rifleman_2";
opfor_grenadier = "LOP_TKA_Infantry_GL";
opfor_squad_leader = "LOP_TKA_Infantry_SL";
opfor_team_leader = "LOP_TKA_Infantry_TL";
opfor_marksman = "LOP_TKA_Infantry_Marksman";
opfor_machinegunner = "LOP_TKA_Infantry_MG";
opfor_heavygunner = "LOP_TKA_Infantry_MG";
opfor_medic = "LOP_TKA_Infantry_Corpsman";
opfor_rpg = "LOP_TKA_Infantry_Rifleman_3";
opfor_at = "LOP_TKA_Infantry_AT";
opfor_aa = "LOP_TKA_Infantry_AA";
opfor_officer = "LOP_TKA_Infantry_Officer";
opfor_sharpshooter = "LOP_TKA_Infantry_Marksman";
opfor_sniper = "LOP_TKA_Infantry_Marksman";
opfor_engineer = "LOP_TKA_Infantry_Engineer";
opfor_paratrooper = "LOP_TKA_Infantry_Rifleman";
// OPFOR Vehicles to be used in secondary objectives
opfor_mrap = "LOP_TKA_UAZ";
opfor_mrap_armed = "LOP_TKA_UAZ_DshKM";
opfor_transport_helo = "LOP_TKA_Mi8MT_Cargo";
opfor_transport_truck = "LOP_TKA_Ural";
opfor_fuel_truck = "RHS_Ural_Fuel_MSV_01";
opfor_ammo_truck = "rhs_gaz66_ammo_msv";
opfor_fuel_container = nil;
opfor_ammo_container = nil;
opfor_flag = "FlagCarrierTakistan_EP1";
// Militia infantry. Soldier classnames the game will pick from randomly
militia_squad_overwrite = true;
militia_squad_extension = [
"LOP_AM_OPF_Infantry_SL",
"LOP_AM_OPF_Infantry_AR",
"LOP_AM_OPF_Infantry_AR_Asst",
"LOP_AM_OPF_Infantry_AT",
"LOP_AM_OPF_Infantry_Marksman",
"LOP_AM_OPF_Infantry_Engineer",
"LOP_AM_OPF_Infantry_Corpsman",
"LOP_AM_OPF_Infantry_Rifleman",
"LOP_AM_OPF_Infantry_Rifleman_2",
"LOP_AM_OPF_Infantry_Rifleman_3",
"LOP_AM_OPF_Infantry_Rifleman_4",
"LOP_AM_OPF_Infantry_Rifleman_5",
"LOP_AM_OPF_Infantry_GL"
];
// Militia vehicles to choose from
militia_vehicles_overwrite = true;
militia_vehicles_extension = [
"LOP_AM_OPF_UAZ_DshKM",
"LOP_AM_OPF_UAZ_DshKM",
"LOP_AM_OPF_UAZ_AGS"
];
// All the vehicles that can spawn as sector defenders and patrols
opfor_vehicles_overwrite = true;
opfor_vehicles_extension = [
"LOP_TKA_BMP2",
"LOP_TKA_BTR70",
"LOP_TKA_BMP2",
"LOP_TKA_BTR70",
"LOP_TKA_T72BA",
"LOP_TKA_T72BA",
"LOP_TKA_ZSU234",
"LOP_TKA_UAZ_AGS",
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_SPG"
];
// Same with lighter choices to be used when the alert level is low
opfor_vehicles_low_intensity_overwrite = true;
opfor_vehicles_low_intensity_extension = [
"LOP_TKA_BMP2",
"LOP_TKA_BTR70",
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_AGS",
"LOP_TKA_UAZ_SPG"
];
// All the vehicles that can spawn as battlegroup members
opfor_battlegroup_vehicles_overwrite = true;
opfor_battlegroup_vehicles_extension = [
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_AGS",
"LOP_TKA_UAZ_SPG",
"LOP_TKA_BMP2",
"LOP_TKA_BTR70",
"LOP_TKA_Ural",
"LOP_TKA_T72BA",
"LOP_TKA_T72BA",
"LOP_TKA_ZSU234",
"LOP_TKA_Mi24V_AT",
"LOP_TKA_Mi8MT_Cargo",
"LOP_TKA_Ural"
];
// Same with lighter choices to be used when the alert level is low
opfor_battlegroup_vehicles_low_intensity_overwrite = true;
opfor_battlegroup_vehicles_low_intensity_extension = [
"LOP_TKA_BMP2",
"LOP_TKA_BTR70",
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_DshKM",
"LOP_TKA_UAZ_AGS",
"LOP_TKA_UAZ_SPG",
"LOP_TKA_Ural",
"LOP_TKA_Mi8MT_Cargo",
"LOP_TKA_Ural"
];
// All the vehicles that can spawn as battlegroup members (see above) and also hold 8 soldiers as passengers.
// If something in here can't hold all 8 soldiers then buggy behaviours may occur
opfor_troup_transports_overwrite = true;
opfor_troup_transports_extension = [
"LOP_TKA_BMP2",
"LOP_TKA_BTR70",
"LOP_TKA_Ural",
"LOP_TKA_Mi8MT_Cargo"
];
// Battlegroup members that will need to spawn in flight. Should be only helos but, who knows
opfor_choppers_overwrite = true;
opfor_choppers_extension = [
"LOP_TKA_Mi8MT_Cargo",
"LOP_TKA_Mi24V_AT"
];
// Opfor military aircrafts
opfor_air_overwrite = true;
opfor_air_extension = [
"RHS_Su25SM_vvsc"
];
// Other stuff
// civilians
civilians_overwrite = true;
civilians_extension = [
"LOP_Tak_Civ_Man_01",
"LOP_Tak_Civ_Man_02",
"LOP_Tak_Civ_Man_04"
];
// Civilian vehicles
civilian_vehicles_overwrite = true;
civilian_vehicles_extension = [
"LOP_TAK_Civ_Landrover",
"LOP_TAK_Civ_UAZ",
"LOP_TAK_Civ_UAZ_Open",
"LOP_TAK_Civ_Ural",
"LOP_TAK_Civ_Ural_open"
];
// Everything the AI troups should be able to resupply from
ai_resupply_sources_extension = [
];
// Everything that can resupply other vehicles
vehicle_repair_sources_extension = [
];
vehicle_rearm_sources_extension = [
];
vehicle_refuel_sources_extension = [
];
// Elite vehicles that should be unlocked through military base capture.
elite_vehicles_extension = [
"RHS_M2A3_BUSKIII",
"BWA3_Puma_Tropen",
"rhsusf_m1a2sep1tuskiid_usarmy",
"BWA3_Leopard2A6M_Tropen",
"rhsusf_m109d_usarmy",
"RHS_AH64D",
"BWA3_Tiger_RMK_Universal",
"RHS_A10",
"JS_JC_FA18E",
"JS_JC_FA18F"
];
// Blacklisted arsenal items such as deployable weapons that should be bought instead
// Useless if you're using a predefined arsenal in arsenal.sqf
// Classnames of weapons which should not be available in the arsenal
blacklisted_from_arsenal_weapons = [
];
// Classnames of items (optics, uniforms, vests, etc.) which should not be available in the arsenal
blacklisted_from_arsenal_items = [
"optic_Nightstalker",
"optic_tws",
"optic_tws_mg"
];
// Classnames of magazines or explosives which should not be available in the arsenal
blacklisted_from_arsenal_magazines = [
];
// Classnames of backpacks which should not be available in the arsenal
blacklisted_from_arsenal_extension = [
];
// Configuration for ammo boxes transport
// First entry: classname
// Second entry: how far behind the vehicle the boxes should be unloaded
// Following entries: attachTo position for each box, the number of boxes that can be loaded is derived from the number of entries
box_transport_config_extension = [
[ "greuh_eh101_gr", -6.5, [0, 4.2, -1.45], [0, 2.5, -1.45], [0, 0.8, -1.45], [0, -0.9, -1.45] ]
];

View File

@ -0,0 +1,356 @@
// This file allows you to add content to the mission without conflict issues after each update of the original classnames.sqf
// If you want more modifications to be supported by this file, let's discuss it on the forums.
// *** SUPPORT STUFF ***
// Setting a value here will overwrite the original value found from the mission. Do that if you're doing a total conversion.
// Each of these should be unique, the same classnames for different purposes may cause various unpredictable issues with player actions. Or not. Just don't try.
FOB_typename = nil; // Default "Land_Cargo_HQ_V1_F";
FOB_box_typename = nil; // Default "B_Slingload_01_Cargo_F";
FOB_truck_typename = nil; // Default "B_Truck_01_box_F";
Arsenal_typename = nil; // Default "B_supplyCrate_F";
Respawn_truck_typename = nil; // Default "B_Truck_01_medical_F";
huron_typename = nil; // Default "B_Heli_Transport_03_unarmed_F";
ammobox_b_typename = nil; // Default "Box_NATO_AmmoVeh_F";
ammobox_o_typename = nil; // Default "Box_East_AmmoVeh_F";
opfor_ammobox_transport = nil; // Default "O_Truck_03_transport_F"; // Make sure this thing can transport ammo boxes (see box_transport_config down below) otherwise things will break
commander_classname = nil; // Default "B_officer_F"
crewman_classname = nil; // Default "B_crew_F";
pilot_classname = nil; // Default "B_Helipilot_F";
// *** FRIENDLIES ***
// Each array below represents one page of the build menu
// Format : [ "classname", manpower, ammo, fuel ]
// Example : [ "B_APC_Tracked_01_AA_F", 0, 40, 15 ],
// If overwrite is set to true, then the extension list will entirely replace the original list defined in classnames.sqf. Otherwise it will be appended to it.
// Useful for total conversions to RHS and such, without having to alter the original file.
infantry_units_overwrite = false;
infantry_units_extension = [
];
light_vehicles_overwrite = false;
light_vehicles_extension = [
["rhsusf_m998_w_4dr",0,0,2],
["rhsusf_rg33_m2_d",0,10,3],
["fsf_fnk_norm_ce",0,0,3],
["greuh_fnk_norm_ce",0,0,3],
["I_MRAP_03_F",0,0,3],
["I_MRAP_03_hmg_F",0,10,3],
["I_MRAP_03_gmg_F",0,20,3],
["fsf_fnk_hmg_ce",0,10,3],
["greuh_fnk_hmg_ce",0,10,3],
["greuh_fnk_hmg_dsrt",0,10,3]
];
heavy_vehicles_overwrite = false;
heavy_vehicles_extension = [
["I_APC_Wheeled_03_cannon_F",0,50,10],
["greuh_pandur_wdld",0,50,10],
["I_APC_tracked_03_cannon_F",0,40,15],
["greuh_fv510_wdld",0,40,15],
["greuh_fv510_dsrt",0,40,15],
["RHS_M2A3_BUSKIII_wd",0,55,15],
["Steve_MBT_Kuma",0,100,25],
["I_MBT_03_cannon_F",0,100,25],
["rhsusf_m1a2sep1tuskiid_usarmy",0,100,25],
["Burnes_FV4034_01",0,250,40]
];
air_vehicles_overwrite = false;
air_vehicles_extension = [
["greuh_aw159_t",0,0,12],
["greuh_aw159_a",0,50,12],
["I_Heli_light_03_unarmed_F",0,0,12],
["I_Heli_light_03_F",0,50,12],
["JNS_Skycrane_BLU_Black",0,0,18],
["RHS_CH_47F",0,20,20],
["greuh_eh101_gr",0,0,25],
["I_Heli_Transport_02_F",0,0,25],
["MV22",0,0,25],
["RHS_AH1Z_wd_GS",0,175,30],
["H_RAH66",0,200,30],
["RHS_AH64D_wd",0,400,50],
["FIR_F16C",0,100,30],
["FIR_F15E",0,200,50],
["JS_JC_FA18E",0,350,40],
["JS_JC_FA18F",0,350,40],
["sab_C130_CSP",0,0,30],
["sab_C130_J",0,0,30],
["usaf_f22",0,500,75],
["USAF_F35A",0,600,75],
["I_Plane_Fighter_03_AA_F",0,50,30],
["I_Plane_Fighter_03_CAS_F",0,100,30]
];
static_vehicles_overwrite = false;
static_vehicles_extension = [
];
buildings_overwrite = false;
buildings_extension = [
];
support_vehicles_overwrite = false; // If you're going to overwrite this, make sure you have at least Arsenal_typename, Respawn_truck_typename, FOB_box_typename and FOB_truck_typename in there
support_vehicles_extension = [
["JNS_Skycrane_Pod_Bench_BLU_Black",5,0,0],
["JNS_Skycrane_Pod_Ammo_BLU_Black",5,0,0],
["JNS_Skycrane_Pod_Medical_BLU_Black",5,0,0],
["JNS_Skycrane_Pod_Repair_BLU_Black",5,0,0],
["JNS_Skycrane_Pod_Transport_BLU_Black",5,0,0]
];
// All the UAVs must be declared here, otherwise there shall be UAV controlling issues. Namely: you won't be able to control them.
uavs = [
"B_UAV_01_F",
"B_UAV_02_F",
"B_UAV_02_CAS_F",
"B_UGV_01_F",
"B_UGV_01_rcws_F"
];
// Pre-made squads for the commander build menu. These shouldn't exceed 10 members.
// Light infantry squad
blufor_squad_inf_light = [
];
// Heavy infantry squad
blufor_squad_inf = [
];
// AT specialists squad
blufor_squad_at = [
];
// AA specialists squad
blufor_squad_aa = [
];
// Force recon squad
blufor_squad_recon = [
];
// Paratroopers squad
blufor_squad_para = [
];
// *** BADDIES ***
// All OPFOR infantry. Defining a value here will replace the default value from the original mission.
opfor_sentry = nil;
opfor_rifleman = nil;
opfor_grenadier = nil;
opfor_squad_leader = nil;
opfor_team_leader = nil;
opfor_marksman = nil;
opfor_machinegunner = nil;
opfor_heavygunner = nil;
opfor_medic = nil;
opfor_rpg = nil;
opfor_at = nil;
opfor_aa = nil;
opfor_officer = nil;
opfor_sharpshooter = nil;
opfor_sniper = nil;
opfor_engineer = nil;
opfor_paratrooper = nil;
// OPFOR Vehicles to be used in secondary objectives
opfor_mrap = nil;
opfor_mrap_armed = nil;
opfor_transport_helo = nil;
opfor_transport_truck = nil;
opfor_fuel_truck = nil;
opfor_ammo_truck = nil;
opfor_fuel_container = nil;
opfor_ammo_container = nil;
opfor_flag = nil;
// Militia infantry. Soldier classnames the game will pick from randomly
militia_squad_overwrite = false;
militia_squad_extension = [
];
// Militia vehicles to choose from
militia_vehicles_overwrite = false;
militia_vehicles_extension = [
"rhs_btr70_chdkz",
"rhs_zsu234_chdkz",
"I_MU_mercs_Offroad_01_armed_F",
"I_MU_mercs_Offroad_01_armed_F",
"LOP_AFR_BTR60",
"LOP_AFR_M113_W",
"LOP_AFR_T72BA",
"I_MU_mercs_Offroad_01_armed_F"
];
// All the vehicles that can spawn as sector defenders and patrols
opfor_vehicles_overwrite = false;
opfor_vehicles_extension = [
];
// Same with lighter choices to be used when the alert level is low
opfor_vehicles_low_intensity_overwrite = false;
opfor_vehicles_low_intensity_extension = [
];
// All the vehicles that can spawn as battlegroup members
opfor_battlegroup_vehicles_overwrite = false;
opfor_battlegroup_vehicles_extension = [
];
// Same with lighter choices to be used when the alert level is low
opfor_battlegroup_vehicles_low_intensity_overwrite = false;
opfor_battlegroup_vehicles_low_intensity_extension = [
];
// All the vehicles that can spawn as battlegroup members (see above) and also hold 8 soldiers as passengers.
// If something in here can't hold all 8 soldiers then buggy behaviours may occur
opfor_troup_transports_overwrite = false;
opfor_troup_transports_extension = [
];
// Battlegroup members that will need to spawn in flight. Should be only helos but, who knows
opfor_choppers_overwrite = false;
opfor_choppers_extension = [
];
// Opfor military aircrafts
opfor_air_overwrite = false;
opfor_air_extension = [
];
// Other stuff
// civilians
civilians_overwrite = false;
civilians_extension = [
];
// civilian vehicles
civilian_vehicles_overwrite = false;
civilian_vehicles_extension = [
];
// Everything the AI troups should be able to resupply from
ai_resupply_sources_extension = [
];
// Everything that can resupply other vehicles
vehicle_repair_sources_extension = [
];
vehicle_rearm_sources_extension = [
];
vehicle_refuel_sources_extension = [
];
// Elite vehicles that should be unlocked through military base capture.
elite_vehicles_extension = [
"B_UGV_01_rcws_F",
"B_MBT_01_TUSK_F",
"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
"B_Heli_Attack_01_F",
"B_Plane_CAS_01_F",
"B_UAV_02_F",
"B_UAV_02_CAS_F"
];
// Blacklisted arsenal items such as deployable weapons that should be bought instead
// Useless if you're using a predefined arsenal in arsenal.sqf
// REMEMBER: Using of the Blacklist will decrease performance while entering the arsenal. Usage of Whitelist is highly recommended.
// Classnames of weapons which should not be available in the arsenal
blacklisted_from_arsenal_weapons = [
];
// Classnames of items (optics, uniforms, vests, etc.) which should not be available in the arsenal
blacklisted_from_arsenal_items = [
"optic_Nightstalker",
"optic_tws",
"optic_tws_mg"
];
// Classnames of magazines or explosives which should not be available in the arsenal
blacklisted_from_arsenal_magazines = [
];
// Classnames of backpacks which should not be available in the arsenal
blacklisted_from_arsenal_extension = [
"RHS_Podnos_Bipod_Bag",
"RHS_Podnos_Gun_Bag",
"RHS_Metis_Gun_Bag",
"RHS_Metis_Tripod_Bag",
"RHS_AGS30_Tripod_Bag",
"RHS_AGS30_Gun_Bag",
"RHS_DShkM_Gun_Bag",
"RHS_DShkM_TripodHigh_Bag",
"RHS_DShkM_TripodLow_Bag",
"RHS_Kord_Tripod_Bag",
"RHS_Kord_Gun_Bag",
"RHS_M2_Gun_Bag",
"RHS_M2_Tripod_Bag",
"rhs_M252_Gun_Bag",
"rhs_M252_Bipod_Bag",
"RHS_M2_MiniTripod_Bag",
"RHS_Mk19_Gun_Bag",
"RHS_Mk19_Tripod_Bag",
"RHS_NSV_Tripod_Bag",
"RHS_NSV_Gun_Bag",
"RHS_SPG9_Gun_Bag",
"RHS_SPG9_Tripod_Bag",
"rhs_Tow_Gun_Bag",
"rhs_TOW_Tripod_Bag"
];
// Configuration for ammo boxes transport
// First entry: classname
// Second entry: how far behind the vehicle the boxes should be unloaded
// Following entries: attachTo position for each box, the number of boxes that can be loaded is derived from the number of entries
box_transport_config_extension = [
[ "greuh_eh101_gr", -6.5, [0, 4.2, -1.45], [0, 2.5, -1.45], [0, 0.8, -1.45], [0, -0.9, -1.45] ]
];

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,156 @@
private [ "_idact_build", "_idact_arsenal", "_idact_buildfob", "_idact_redeploy", "_idact_tutorial", "_distfob", "_distarsenal", "_distbuildfob", "_distspawn", "_distredeploy", "_idact_commander" ];
_idact_build = -1;
_idact_arsenal = -1;
_idact_buildfob = -1;
_idact_redeploy = -1;
_idact_tutorial = -1;
_idact_squad = -1;
_idact_commander = -1;
_idact_repackage = -1;
_idact_halo = -1;
_idact_secondary = -1;
_distfob = 100;
_distarsenal = 5;
_distbuildfob = 10;
_distspawn = 10;
_distredeploy = 20;
GRLIB_removefobboxes = false;
waitUntil { !isNil "build_confirmed" };
waitUntil { !isNil "one_synchro_done" };
waitUntil { one_synchro_done };
while { true } do {
_nearfob = [] call F_getNearestFob;
_fobdistance = 9999;
if ( count _nearfob == 3 ) then {
_fobdistance = player distance _nearfob;
};
if (KP_liberation_mobilearsenal) then {KP_liberation_neararsenal = [ ( (getpos player) nearobjects [ Arsenal_typename, _distarsenal ]), { getObjectType _x >= 8 } ] call BIS_fnc_conditionalSelect;} else {KP_liberation_neararsenal = [];};
_nearfobbox = ( (getpos player) nearEntities [ [ FOB_box_typename, FOB_truck_typename ] , _distbuildfob ] );
if (KP_liberation_mobilerespawn) then {KP_liberation_nearspawn = ( (getpos player) nearEntities [ [ Respawn_truck_typename, huron_typename ] , _distspawn ] );} else {KP_liberation_nearspawn = [];};
if ( GRLIB_removefobboxes ) then {
GRLIB_removefobboxes = false;
if ( count _nearfobbox > 0 ) then {
deletevehicle (_nearfobbox select 0);
};
};
if ( (player distance lhd) < 200 && alive player && vehicle player == player ) then {
if ( _idact_tutorial == -1 ) then {
_idact_tutorial = player addAction ["<t color='#80FF80'>" + localize "STR_TUTO_ACTION" + "</t>","howtoplay = 1","",-740,false,true,"",""];
};
} else {
if ( _idact_tutorial != -1 ) then {
player removeAction _idact_tutorial;
_idact_tutorial = -1;
};
};
if ( (_fobdistance < _distredeploy || (player distance lhd) < 200) && alive player && vehicle player == player && GRLIB_halo_param > 0 ) then {
if ( _idact_halo == -1 ) then {
_idact_halo = player addAction ["<t color='#80FF80'>" + localize "STR_HALO_ACTION" + "</t> <img size='2' image='res\ui_redeploy.paa'/>","scripts\client\spawn\do_halo.sqf","",-749,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_halo != -1 ) then {
player removeAction _idact_halo;
_idact_halo = -1;
};
};
if ( (_fobdistance < _distredeploy || count KP_liberation_nearspawn != 0 || (player distance lhd) < 200) && alive player && vehicle player == player ) then {
if ( _idact_redeploy == -1 ) then {
_idact_redeploy = player addAction ["<t color='#80FF80'>" + localize "STR_DEPLOY_ACTION" + "</t> <img size='2' image='res\ui_redeploy.paa'/>","scripts\client\actions\redeploy.sqf","",-750,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_redeploy != -1 ) then {
player removeAction _idact_redeploy;
_idact_redeploy = -1;
};
};
if ( (_fobdistance < _distredeploy || count KP_liberation_neararsenal != 0 || ((count KP_liberation_nearspawn != 0) && !KP_liberation_ace) || (player distance lhd) < 200) && alive player && vehicle player == player ) then {
if (_idact_arsenal == -1) then {
_idact_arsenal = player addAction ["<t color='#FFFF00'>" + localize "STR_ARSENAL_ACTION" + "</t> <img size='2' image='res\ui_arsenal.paa'/>","scripts\client\actions\open_arsenal.sqf","",-980,true,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_arsenal != -1 ) then {
player removeAction _idact_arsenal;
_idact_arsenal = -1;
};
};
if ( _fobdistance < _distfob && alive player && vehicle player == player && ( ( [ player, 3 ] call F_fetchPermission ) || ( player == ( [] call F_getCommander ) || [] call F_isAdmin ) ) ) then {
if ( _idact_build == -1 ) then {
_idact_build = player addAction ["<t color='#FFFF00'>" + localize "STR_BUILD_ACTION" + "</t> <img size='2' image='res\ui_build.paa'/>","scripts\client\build\open_build_menu.sqf","",-985,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_build != -1 ) then {
player removeAction _idact_build;
_idact_build = -1;
};
};
if ( count _nearfobbox != 0 && alive player && vehicle player == player && !(surfaceIsWater getpos player) && ((player distance lhd) > 1000) && ( ( [ player, 3 ] call F_fetchPermission ) || ( player == ( [] call F_getCommander ) || [] call F_isAdmin ) ) ) then {
if ( _idact_buildfob == -1 ) then {
_idact_buildfob = player addAction ["<t color='#FFFF00'>" + localize "STR_FOB_ACTION" + "</t> <img size='2' image='res\ui_deployfob.paa'/>","scripts\client\build\do_build_fob.sqf","",-990,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_buildfob != -1 ) then {
player removeAction _idact_buildfob;
_idact_buildfob = -1;
};
};
if ( (leader group player == player) && (count units group player > 1) && alive player && vehicle player == player) then {
if ( _idact_squad == -1 ) then {
_idact_squad = player addAction ["<t color='#80FF80'>" + localize "STR_SQUAD_MANAGEMENT_ACTION" + "</t> <img size='2' image='\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa'/>","scripts\client\ui\squad_management.sqf","",-760,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_squad != -1 ) then {
player removeAction _idact_squad;
_idact_squad = -1;
};
};
if ( ( player == ( [] call F_getCommander ) || [] call F_isAdmin ) && alive player && vehicle player == player && GRLIB_permissions_param ) then {
if ( _idact_commander == -1 ) then {
_idact_commander = player addAction ["<t color='#FF8000'>" + localize "STR_COMMANDER_ACTION" + "</t> <img size='2' image='\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa'/>","scripts\client\commander\open_permissions.sqf","",-995,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_commander != -1 ) then {
player removeAction _idact_commander;
_idact_commander = -1;
};
};
if ( _fobdistance < _distredeploy && alive player && vehicle player == player && ( player == ( [] call F_getCommander ) || [] call F_isAdmin ) ) then {
if ( _idact_repackage == -1 ) then {
_idact_repackage = player addAction ["<t color='#FFFF00'>" + localize "STR_FOB_REPACKAGE" + "</t> <img size='2' image='res\ui_deployfob.paa'/>","scripts\client\actions\do_repackage_fob.sqf","",-991,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_repackage != -1 ) then {
player removeAction _idact_repackage;
_idact_repackage = -1;
};
};
if ( ( count GRLIB_all_fobs > 0 ) && ( GRLIB_endgame == 0 ) && (_fobdistance < _distredeploy || (player distance lhd) < 200) && alive player && vehicle player == player && ( ( [ player, 5 ] call F_fetchPermission ) || ( player == ( [] call F_getCommander ) || [] call F_isAdmin ) ) ) then {
if ( _idact_secondary == -1 ) then {
_idact_secondary = player addAction ["<t color='#FFFF00'>" + localize "STR_SECONDARY_OBJECTIVES" + "</t>","scripts\client\ui\secondary_ui.sqf","",-993,false,true,"","build_confirmed == 0"];
};
} else {
if ( _idact_secondary != -1 ) then {
player removeAction _idact_secondary;
_idact_secondary = -1;
};
};
uiSleep 1;
};

View File

@ -0,0 +1,3 @@
params [ "_prisonner" ];
[ _prisonner ] join group player;

View File

@ -0,0 +1,24 @@
params [ "_vehtorecycle" ];
private [ "_objectinfo", "_cfg", "_dialog" ];
_objectinfo = ( [ (light_vehicles + heavy_vehicles + air_vehicles + static_vehicles + support_vehicles + buildings ), { typeof _vehtorecycle == _x select 0 } ] call BIS_fnc_conditionalSelect ) select 0;
dorecycle = 0;
_cfg = configFile >> "cfgVehicles";
_dialog = createDialog "liberation_recycle";
waitUntil { dialog };
ctrlSetText [ 134, format [ localize "STR_RECYCLING_YIELD", getText (_cfg >> (_objectinfo select 0) >> "displayName" ) ] ];
ctrlSetText [ 131, format [ "%1", round (_objectinfo select 1) ] ];
ctrlSetText [ 132, format [ "%1", round ((_objectinfo select 2) * GRLIB_recycling_percentage) ] ];
ctrlSetText [ 133, format [ "%1", round ( _objectinfo select 3) ] ];
while { dialog && (alive player) && dorecycle == 0 } do {
sleep 0.1;
};
if ( dialog ) then { closeDialog 0 };
if ( dorecycle == 1 && !(isnull _vehtorecycle) && alive _vehtorecycle) then {
[ [ _vehtorecycle, round ((_objectinfo select 2) * GRLIB_recycling_percentage) ] , "recycle_remote_call" ] call BIS_fnc_MP;
};

View File

@ -0,0 +1,44 @@
private [ "_dialog", "_fob", "_fobbox" ];
dorepackage = 0;
_dialog = createDialog "liberation_repackage_fob";
waitUntil { dialog };
while { dialog && alive player && dorepackage == 0 } do {
sleep 0.1;
};
if ( dorepackage > 0 ) then {
closeDialog 0;
waitUntil { !dialog };
_fob = [] call F_getNearestFob;
if ( count _fob > 0 ) then {
GRLIB_all_fobs = GRLIB_all_fobs - [ _fob ];
publicVariable "GRLIB_all_fobs";
};
{ deleteVehicle _x } foreach ( [ ( (getpos player) nearobjects [ FOB_typename, 250 ] ) , { getObjectType _x >= 8 } ] call BIS_fnc_conditionalSelect );
sleep 0.5;
_spawnpos = zeropos;
while { _spawnpos distance zeropos < 1000 } do {
_spawnpos = ( getpos player ) findEmptyPosition [10, 250, 'B_Heli_Transport_01_F'];
if ( count _spawnpos == 0 ) then { _spawnpos = zeropos; };
};
if ( dorepackage == 1 ) then {
_fobbox = FOB_box_typename createVehicle _spawnpos;
[ [_fobbox, 3000 ] , "F_setMass" ] call BIS_fnc_MP;
};
if ( dorepackage == 2 ) then {
FOB_truck_typename createVehicle _spawnpos;
};
hint localize "STR_FOB_REPACKAGE_HINT";
};

View File

@ -0,0 +1,3 @@
params [ "_intel_obj" ];
[ [ _intel_obj ] , "intel_remote_call" ] call BIS_fnc_MP;

View File

@ -0,0 +1,6 @@
params [ "_veh" ];
if ( !isNull _veh ) then {
_veh setpos [(getpos _veh) select 0,(getpos _veh) select 1, 0.5];
_veh setVectorUp surfaceNormal position _veh;
};

View File

@ -0,0 +1,52 @@
private [ "_actionned_captive_units", "_near_people", "_near_intel", "_actionned_intel_items" ];
_actionned_captive_units = [];
_actionned_intel_items = [];
while { true } do {
if ( [ player, 5 ] call F_fetchPermission ) then {
_near_people = (getPosATL player) nearEntities [["Man"], 5];
_near_intel = (getPosATL player) nearEntities [[GRLIB_intel_laptop, GRLIB_intel_file], 5];
{
if ( (captive _x) && !(_x in _actionned_captive_units) && !((side group _x) == GRLIB_side_friendly) ) then {
_x addAction ["<t color='#FFFF00'>" + localize "STR_SECONDARY_CAPTURE" + "</t>","scripts\client\actions\do_capture.sqf","",-850,true,true,"","(vehicle player == player) && (side group _target != GRLIB_side_friendly) && (captive _target)"];
_actionned_captive_units pushback _x;
};
} foreach _near_people;
{
if ( !(alive _x) || ((player distance _x) > 5) || ((side group _x) == GRLIB_side_friendly) ) then {
removeAllActions _x;
_actionned_captive_units = _actionned_captive_units - [_x];
};
} foreach _actionned_captive_units;
{
if ( !(_x in _actionned_intel_items) ) then {
_x addAction ["<t color='#FFFF00'>" + localize "STR_INTEL" + "</t>","scripts\client\actions\do_take_intel.sqf","",-849,true,true,"","(vehicle player == player)"];
_actionned_intel_items pushback _x;
};
} foreach _near_intel;
{
if ((player distance _x) > 5) then {
removeAllActions _x;
_actionned_intel_items = _actionned_intel_items - [_x];
};
} foreach _actionned_intel_items;
} else {
{
removeAllActions _x;
_actionned_captive_units = _actionned_captive_units - [_x];
} foreach _actionned_captive_units;
{
removeAllActions _x;
_actionned_intel_items = _actionned_intel_items - [_x];
} foreach _actionned_intel_items;
};
sleep 3;
};

View File

@ -0,0 +1,107 @@
private [ "_loadouts_data", "_saved_loadouts", "_counter", "_loadplayers", "_playerselected", "_namestr", "_nextplayer" ];
load_loadout = 0;
edit_loadout = 0;
respawn_loadout = 0;
load_from_player = -1;
exit_on_load = 0;
createDialog "liberation_arsenal";
_saved_loadouts = profileNamespace getVariable "bis_fnc_saveInventory_data";
_loadouts_data = [];
_counter = 0;
if ( !isNil "_saved_loadouts" ) then {
{
if ( _counter % 2 == 0 ) then {
_loadouts_data pushback _x;
};
_counter = _counter + 1;
} foreach _saved_loadouts;
};
waitUntil { dialog };
if ( count _loadouts_data > 0 ) then {
{ lbAdd [201, _x]; } foreach _loadouts_data ;
if ( lbSize 201 > 0 ) then {
ctrlEnable [ 202, true ];
lbSetCurSel [ 201, 0 ];
} else {
ctrlEnable [ 202, false ];
};
} else {
ctrlEnable [ 202, false ];
};
_loadplayers = [];
{
if ( !(name _x in [ "HC1", "HC2", "HC3" ]) ) then {
_loadplayers pushback [ name _x, _x ];
};
} foreach ( allPlayers - [ player ] );
if ( count _loadplayers > 0 ) then {
{
_nextplayer = _x select 1;
_namestr = "";
if(count (squadParams _nextplayer) != 0) then {
_namestr = "[" + ((squadParams _nextplayer select 0) select 0) + "] ";
};
_namestr = _namestr + name _nextplayer;
lbAdd [ 203, _namestr ];
lbSetCurSel [ 203, 0 ];
} foreach _loadplayers;
} else {
ctrlEnable [ 203, false ];
ctrlEnable [ 204, false ];
};
((findDisplay 5251) displayCtrl 201) ctrlAddEventHandler [ "mouseButtonDblClick" , { exit_on_load = 1; load_loadout = 1; } ];
while { dialog && (alive player) && edit_loadout == 0 } do {
if ( load_loadout > 0 ) then {
private _loaded_loadout = _loadouts_data select (lbCurSel 201);
[player, [profileNamespace, _loaded_loadout]] call bis_fnc_loadInventory;
[ player ] call F_correctLaserBatteries;
hint format [ localize "STR_HINT_LOADOUT_LOADED", _loaded_loadout];
if ( exit_on_load == 1 ) then {
closeDialog 0;
};
load_loadout = 0;
};
if ( respawn_loadout > 0 ) then {
GRLIB_respawn_loadout = [ player, ["repetitive"] ] call F_getLoadout;
hint localize "STR_MAKE_RESPAWN_LOADOUT_HINT";
respawn_loadout = 0;
};
if ( load_from_player >= 0 ) then {
_playerselected = ( _loadplayers select load_from_player ) select 1;
if ( alive _playerselected ) then {
[ player, [ _playerselected, ["repetitive"] ] call F_getLoadout ] call F_setLoadout;
hint format [ localize "STR_LOAD_PLAYER_LOADOUT_HINT", name _playerselected ];
};
load_from_player = -1;
};
sleep 0.1;
};
if ( edit_loadout > 0 ) then {
closeDialog 0;
waitUntil { !dialog };
[ "Open", false ] spawn BIS_fnc_arsenal;
};

View File

@ -0,0 +1,76 @@
private [ "_recycleable_vehicles", "_recycleable_classnames", "_building_classnames", "_detected_vehicles", "_next_vehicle", "_next_vehicle_already_in_list", "_idact_next" ];
_recycleable_vehicles = [];
_recycleable_classnames = [];
veh_action_distance = 10;
{
_recycleable_classnames pushBack ( _x select 0 );
} foreach (light_vehicles + heavy_vehicles + air_vehicles + static_vehicles + support_vehicles );
_building_classnames = [];
{
_building_classnames pushBack ( _x select 0 );
} foreach (buildings);
_building_classnames = _building_classnames + [ "B_supplyCrate_F", "B_Slingload_01_Cargo_F", "B_Slingload_01_Repair_F", "B_Slingload_01_Fuel_F", "B_Slingload_01_Ammo_F", ammobox_b_typename, ammobox_o_typename ];
waitUntil { sleep 1; !isNil "GRLIB_all_fobs" };
while { true } do {
waitUntil { sleep 1; count GRLIB_all_fobs > 0 };
waitUntil { sleep 1; ( player distance ( [] call F_getNearestFob)) < (2 * GRLIB_fob_range) };
if ( [ player, 4 ] call F_fetchPermission ) then {
_detected_vehicles = [ (getpos player) nearObjects veh_action_distance ,
{
(((typeof _x in _recycleable_classnames ) &&
((count crew _x) == 0 || (typeof _x) in uavs) &&
((locked _x == 0 || locked _x == 1))) || ( typeof _x in _building_classnames )) &&
(alive _x) &&
(_x distance lhd > 1000) &&
(_x distance ( [] call F_getNearestFob) < GRLIB_fob_range ) &&
( getObjectType _x >= 8 ) } ]
call BIS_fnc_conditionalSelect;
{
_next_vehicle = _x;
_next_vehicle_already_in_list = false;
{
if ( (_x select 0) == _next_vehicle ) then {
_next_vehicle_already_in_list = true;
};
} foreach _recycleable_vehicles;
if ( !_next_vehicle_already_in_list ) then {
_idact_next = _next_vehicle addAction [ "<t color='#FFFF00'>" + localize "STR_RECYCLE" + "</t> <img size='2' image='res\ui_recycle.paa'/>", "scripts\client\actions\do_recycle.sqf", "", -900, true, true, "", "build_confirmed == 0 && ( _this distance _target < veh_action_distance ) && (vehicle player == player)"];
_recycleable_vehicles pushback [ _next_vehicle, _idact_next ] ;
};
} foreach _detected_vehicles;
{
_next_vehicle = _x;
_next_vehicle_already_in_list = false;
{
if ( _x == (_next_vehicle select 0) ) then {
_next_vehicle_already_in_list = true;
};
} foreach _detected_vehicles;
if ( !_next_vehicle_already_in_list ) then {
(_next_vehicle select 0) removeAction (_next_vehicle select 1);
_recycleable_vehicles = _recycleable_vehicles - [ _next_vehicle ];
};
} foreach _recycleable_vehicles;
} else {
{
(_x select 0) removeAction (_x select 1);
_recycleable_vehicles = _recycleable_vehicles - [ _x ];
} foreach _recycleable_vehicles;
};
sleep 3;
};

View File

@ -0,0 +1 @@
GRLIB_force_redeploy = true;

View File

@ -0,0 +1,51 @@
private [ "_unflippable_vehicles", "_detected_vehicles", "_next_vehicle", "_next_vehicle_already_in_list", "_idact_next" ];
_unflippable_vehicles = [];
veh_action_distance = 10;
while { true } do {
if ( [ player, 5 ] call F_fetchPermission ) then {
_detected_vehicles = [ (getpos player) nearEntities [["Tank","APC","IFV","Car"], veh_action_distance] , { (count crew _x) == 0 && ((locked _x == 0 || locked _x == 1)) && (_x distance lhd > 1000) } ] call BIS_fnc_conditionalSelect;
{
_next_vehicle = _x;
_next_vehicle_already_in_list = false;
{
if ( (_x select 0) == _next_vehicle ) then {
_next_vehicle_already_in_list = true;
};
} foreach _unflippable_vehicles;
if ( !_next_vehicle_already_in_list ) then {
_idact_next = _next_vehicle addAction [ "<t color='#FFFF00'>" + localize "STR_UNFLIP" + "</t> <img size='2' image='res\ui_flipveh.paa'/>", "scripts\client\actions\do_unflip.sqf", "", -950, true, true, "", "build_confirmed == 0 && (_this distance _target < veh_action_distance) && (vehicle player == player)"];
_unflippable_vehicles pushback [ _next_vehicle, _idact_next ] ;
};
} foreach _detected_vehicles;
{
_next_vehicle = _x;
_next_vehicle_already_in_list = false;
{
if ( _x == (_next_vehicle select 0) ) then {
_next_vehicle_already_in_list = true;
};
} foreach _detected_vehicles;
if ( !_next_vehicle_already_in_list ) then {
(_next_vehicle select 0) removeAction (_next_vehicle select 1);
_unflippable_vehicles = _unflippable_vehicles - [ _next_vehicle ];
};
} foreach _unflippable_vehicles;
sleep 3;
} else {
{
(_x select 0) removeAction (_x select 1);
_unflippable_vehicles = _unflippable_vehicles - [ _x ];
} foreach _unflippable_vehicles;
};
};

View File

@ -0,0 +1,72 @@
waitUntil { !isNil "build_confirmed" };
waitUntil { !isNil "one_synchro_done" };
waitUntil { one_synchro_done };
private [ "_managed_trucks", "_managed_boxes", "_next_truck", "_next_box", "_truck_load", "_checked_trucks", "_checked_boxes", "_action_id" ];
_managed_trucks = [];
_managed_boxes = [];
while { true } do {
if ( [ player, 5 ] call F_fetchPermission ) then {
_nearammoboxes = ((getpos player) nearEntities [ [ ammobox_b_typename, ammobox_o_typename ] ,10]);
_neartransporttrucks = ((getpos player) nearEntities [ ammobox_transports_typenames ,10]);
_checked_trucks = [];
{
_next_truck = _x;
_truck_load = _next_truck getVariable ["GRLIB_ammo_truck_load", 0];
if ( !(_next_truck in _managed_trucks) && (_truck_load > 0)) then {
_action_id = _next_truck addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNLOAD_BOX" + "</t>","scripts\client\ammoboxes\do_unload_truck.sqf","",-500,true,true,"","build_confirmed == 0 && (_this distance _target < 7) && (vehicle player == player)"];
_next_truck setVariable [ "GRLIB_ammo_truck_action", _action_id, false ];
_managed_trucks pushback _next_truck;
};
if ( (_next_truck in _managed_trucks) && _truck_load == 0 ) then {
_next_truck removeAction ( _next_truck getVariable ["GRLIB_ammo_truck_action", -1] );
_managed_trucks = _managed_trucks - [_next_truck];
};
_checked_trucks pushback _next_truck;
} foreach _neartransporttrucks;
{
_next_truck = _x;
if ( !(_next_truck in _checked_trucks)) then {
_managed_trucks = _managed_trucks - [_next_truck];
_next_truck removeAction ( _next_truck getVariable ["GRLIB_ammo_truck_action", -1] );
}
} foreach _managed_trucks;
_checked_boxes = [];
{
_next_box = _x;
if ( !(_next_box in _managed_boxes) && ( isNull attachedTo _next_box )) then {
_action_id = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_LOAD_BOX" + "</t>","scripts\client\ammoboxes\do_load_box_action.sqf","",-501,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_next_box setVariable [ "GRLIB_ammo_box_action", _action_id, false ];
_managed_boxes pushback _next_box;
};
_checked_boxes pushback _next_box;
} foreach _nearammoboxes;
{
_next_box = _x;
if ( !(_next_box in _managed_boxes) || !( isNull attachedTo _next_box )) then {
_managed_boxes = _managed_boxes - [_next_box];
_next_box removeAction ( _next_box getVariable ["GRLIB_ammo_box_action", -1] );
}
} foreach _managed_boxes;
};
sleep 3;
};

View File

@ -0,0 +1,35 @@
params [ "_ammobox", ["_max_transport_distance", 15] ];
private [ "_neartransporttrucks", "_truck_to_load", "_truck_load", "_next_truck", "_maxload", "_i" ];
_maxload = 3;
_neartransporttrucks = [ ((getpos _ammobox) nearEntities [ ammobox_transports_typenames, _max_transport_distance]), { alive _x && speed _x < 5 && ((getpos _x) select 2) < 5 } ] call BIS_fnc_conditionalSelect;
_truck_to_load = objNull;
{
_next_truck = _x;
_maxload = 0;
_offsets = [];
{
if ( _x select 0 == typeof _next_truck ) then {
_maxload = (count _x) - 2;
for [ {_i=2}, {_i < (count _x) }, {_i=_i+1} ] do { _offsets pushback (_x select _i); };
};
} foreach box_transport_config;
if ( isNull _truck_to_load ) then {
_truck_load = _next_truck getVariable ["GRLIB_ammo_truck_load", 0];
if ( _truck_load < _maxload ) then {
_truck_to_load = _next_truck;
_ammobox attachTo [ _truck_to_load, _offsets select _truck_load ];
_truck_to_load setVariable ["GRLIB_ammo_truck_load", _truck_load + 1, true];
if ( !isServer ) then {
hint localize "STR_BOX_LOADED";
};
}
};
} foreach _neartransporttrucks;
if ( isNull _truck_to_load && !isServer ) then {
hint localize "STR_BOX_CANTLOAD";
};

View File

@ -0,0 +1,2 @@
params [ "_ammobox" ];
[ _ammobox ] call do_load_box;

View File

@ -0,0 +1,33 @@
params [ "_truck_to_unload"];
private [ "_next_box", "_next_pos", "_offset" ];
_offset = 0;
{
if ( _x select 0 == typeof _truck_to_unload ) then { _offset = _x select 1; };
} foreach box_transport_config;
if ( _truck_to_unload getVariable ["GRLIB_ammo_truck_load", 0] > 0 ) then {
_truck_to_unload setVariable ["GRLIB_ammo_truck_load", 0, true];
[ [ _truck_to_unload, false ], "F_objectProtection" ] call bis_fnc_mp;
{
_next_box = _x;
[ [ _next_box, false ], "F_objectProtection" ] call bis_fnc_mp;
sleep 0.5;
detach _next_box;
_next_box setpos ( [ getpos _truck_to_unload, _offset, getdir _truck_to_unload] call BIS_fnc_relPos );
_next_box setdir (getdir _truck_to_unload);
_next_box setVelocity [ 0,0,0 ];
_next_box setDamage 0;
_offset = _offset - 2.2;
sleep 0.5;
[ [ _next_box, true ], "F_objectProtection" ] call bis_fnc_mp;
} foreach ( attachedObjects _truck_to_unload);
sleep 0.5;
[ [ _truck_to_unload, true ], "F_objectProtection" ] call bis_fnc_mp;
hint localize "STR_BOX_UNLOADED";
};

View File

@ -0,0 +1,3 @@
build_confirmed = 3;
GRLIB_ui_notif = "";
hint localize "STR_CANCEL_HINT";

View File

@ -0,0 +1,18 @@
GRLIB_conflicting_objects = [];
GRLIB_buildoverlay_icon = "\A3\ui_f\data\map\markers\handdrawn\objective_CA.paa";
GRLIB_buildoverlay_color = [ 1, 0, 0, 1 ];
GRLIB_buildoverlay_cfg = configFile >> "cfgVehicles";
["build_overlay", "onEachFrame", {
if ( build_confirmed == 1 ) then {
if ( count GRLIB_conflicting_objects > 0 ) then {
{
if ( alive _x ) then {
drawIcon3D [ GRLIB_buildoverlay_icon, GRLIB_buildoverlay_color, [ (getpos _x) select 0, (getpos _x) select 1, 1.5],
1, 1, 0, format [ "%1", getText (GRLIB_buildoverlay_cfg >> typeof _x >> "displayName") ], 2, 0.04, "puristaMedium"];
};
} foreach GRLIB_conflicting_objects;
};
};
}] call BIS_fnc_addStackedEventHandler;

View File

@ -0,0 +1,2 @@
build_confirmed = 2;
hint localize "STR_CONFIRM_HINT";

View File

@ -0,0 +1,3 @@
build_confirmed = 2;
repeatbuild = true;
hint localize "STR_CONFIRM_HINT";

View File

@ -0,0 +1 @@
build_rotation = build_rotation + 90;

View File

@ -0,0 +1,308 @@
private [ "_maxdist", "_truepos", "_built_object_remote", "_pos", "_grp", "_classname", "_idx", "_unitrank", "_posfob", "_ghost_spot", "_vehicle", "_dist", "_actualdir", "_near_objects", "_near_objects_25", "_debug_colisions" ];
build_confirmed = 0;
_maxdist = GRLIB_fob_range;
_truepos = [];
_debug_colisions = false;
GRLIB_preview_spheres = [];
while { count GRLIB_preview_spheres < 36 } do {
GRLIB_preview_spheres pushback ( "Sign_Sphere100cm_F" createVehicleLocal [ 0, 0, 0 ] );
};
{ _x setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"]; } foreach GRLIB_preview_spheres;
if (isNil "manned") then { manned = false };
if (isNil "gridmode" ) then { gridmode = 0 };
if (isNil "repeatbuild" ) then { repeatbuild = false };
if (isNil "build_rotation" ) then { build_rotation = 0 };
waitUntil { sleep 0.2; !isNil "dobuild" };
while { true } do {
waitUntil { sleep 0.2; dobuild != 0 };
build_confirmed = 1;
build_invalid = 0;
_classname = "";
if ( buildtype == 99 ) then {
GRLIB_removefobboxes = true;
_classname = FOB_typename;
} else {
_classname = ((build_lists select buildtype) select buildindex) select 0;
_price = ((build_lists select buildtype) select buildindex) select 2;
[ [ _price, _classname, buildtype ] , "build_remote_call" ] call BIS_fnc_MP;
};
if(buildtype == 1) then {
_pos = [(getpos player select 0) + 1,(getpos player select 1) + 1, 0];
_grp = group player;
if ( manned ) then {
_grp = createGroup GRLIB_side_friendly;
};
_classname createUnit [_pos, _grp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
build_confirmed = 0;
} else {
if ( buildtype == 8 ) then {
_pos = [(getpos player select 0) + 1,(getpos player select 1) + 1, 0];
_grp = createGroup GRLIB_side_friendly;
_grp setGroupId [format ["%1 %2",squads_names select buildindex, groupId _grp]];
_idx = 0;
{
_unitrank = "private";
if(_idx == 0) then { _unitrank = "sergeant"; };
if(_idx == 1) then { _unitrank = "corporal"; };
_x createUnit [_pos, _grp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, _unitrank];
_idx = _idx + 1;
} foreach _classname;
_grp setCombatMode "GREEN";
_grp setBehaviour "AWARE";
build_confirmed = 0;
} else {
_posfob = getpos player;
if (buildtype != 99) then {
_posfob = [] call F_getNearestFob;
};
_idactcancel = -1;
_idactsnap = -1;
_idactplacebis = -1;
if (buildtype != 99 ) then {
_idactcancel = player addAction ["<t color='#B0FF00'>" + localize "STR_CANCEL" + "</t> <img size='2' image='res\ui_cancel.paa'/>","scripts\client\build\build_cancel.sqf","",-725,false,true,"","build_confirmed == 1"];
};
if (buildtype == 6 ) then {
_idactplacebis = player addAction ["<t color='#B0FF00'>" + localize "STR_PLACEMENT_BIS" + "</t> <img size='2' image='res\ui_confirm.paa'/>","scripts\client\build\build_place_bis.sqf","",-785,false,false,"","build_invalid == 0 && build_confirmed == 1"];
};
if (buildtype == 6 || buildtype == 99) then {
_idactsnap = player addAction ["<t color='#B0FF00'>" + localize "STR_GRID" + "</t>","scripts\client\build\do_grid.sqf","",-735,false,false,"","build_confirmed == 1"];
};
_idactrotate = player addAction ["<t color='#B0FF00'>" + localize "STR_ROTATION" + "</t> <img size='2' image='res\ui_rotation.paa'/>","scripts\client\build\build_rotate.sqf","",-750,false,false,"","build_confirmed == 1"];
_idactplace = player addAction ["<t color='#B0FF00'>" + localize "STR_PLACEMENT" + "</t> <img size='2' image='res\ui_confirm.paa'/>","scripts\client\build\build_place.sqf","",-775,false,true,"","build_invalid == 0 && build_confirmed == 1"];
_ghost_spot = (getmarkerpos "ghost_spot") findEmptyPosition [0,100];
_vehicle = _classname createVehicleLocal _ghost_spot;
_vehicle allowdamage false;
_vehicle setVehicleLock "LOCKED";
_vehicle enableSimulationGlobal false;
_dist = 0.6 * (sizeOf _classname);
if (_dist < 3.5) then { _dist = 3.5 };
_dist = _dist + 0.5;
for [{_i=0}, {_i<5}, {_i=_i+1}] do {
_vehicle setObjectTextureGlobal [_i, '#(rgb,8,8,3)color(0,1,0,0.8)'];
};
{ _x setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"]; } foreach GRLIB_preview_spheres;
while { build_confirmed == 1 && alive player } do {
_truedir = 90 - (getdir player);
_truepos = [((getpos player) select 0) + (_dist * (cos _truedir)), ((getpos player) select 1) + (_dist * (sin _truedir)),0];
_actualdir = ((getdir player) + build_rotation);
if ( _classname == "Land_Cargo_Patrol_V1_F" || _classname == "Land_PortableLight_single_F" ) then { _actualdir = _actualdir + 180 };
if ( _classname == FOB_typename ) then { _actualdir = _actualdir + 270 };
while { _actualdir > 360 } do { _actualdir = _actualdir - 360 };
while { _actualdir < 0 } do { _actualdir = _actualdir + 360 };
if ( ((buildtype == 6) || (buildtype == 99)) && ((gridmode % 2) == 1) ) then {
if ( _actualdir >= 22.5 && _actualdir <= 67.5 ) then { _actualdir = 45 };
if ( _actualdir >= 67.5 && _actualdir <= 112.5 ) then { _actualdir = 90 };
if ( _actualdir >= 112.5 && _actualdir <= 157.5 ) then { _actualdir = 135 };
if ( _actualdir >= 157.5 && _actualdir <= 202.5 ) then { _actualdir = 180 };
if ( _actualdir >= 202.5 && _actualdir <= 247.5 ) then { _actualdir = 225 };
if ( _actualdir >= 247.5 && _actualdir <= 292.5 ) then { _actualdir = 270 };
if ( _actualdir >= 292.5 && _actualdir <= 337.5 ) then { _actualdir = 315 };
if ( _actualdir <= 22.5 || _actualdir >= 337.5 ) then { _actualdir = 0 };
};
_sphere_idx = 0;
{
_x setpos ( [ _truepos, _dist, _sphere_idx * 10 ] call BIS_fnc_relPos );
_sphere_idx = _sphere_idx + 1;
} foreach GRLIB_preview_spheres;
_vehicle setdir _actualdir;
_near_objects = (_truepos nearobjects ["AllVehicles", _dist]) ;
_near_objects = _near_objects + (_truepos nearobjects [FOB_box_typename, _dist]);
_near_objects = _near_objects + (_truepos nearobjects [Arsenal_typename, _dist]);
_near_objects_25 = (_truepos nearobjects ["AllVehicles", 50]) ;
_near_objects_25 = _near_objects_25 + (_truepos nearobjects [FOB_box_typename, 50]);
_near_objects_25 = _near_objects_25 + (_truepos nearobjects [Arsenal_typename, 50]);
if( buildtype != 6 ) then {
_near_objects = _near_objects + (_truepos nearobjects ["Static", _dist]);
_near_objects_25 = _near_objects_25 + (_truepos nearobjects ["Static", 50]);
};
private _remove_objects = [];
{
if ((_x isKindOf "Animal") || ((typeof _x) in GRLIB_ignore_colisions_when_building) || (_x == player) || (_x == _vehicle )) then {
_remove_objects pushback _x;
};
} foreach _near_objects;
private _remove_objects_25 = [];
{
if ((_x isKindOf "Animal") || ((typeof _x) in GRLIB_ignore_colisions_when_building) || (_x == player) || (_x == _vehicle )) then {
_remove_objects_25 pushback _x;
};
} foreach _near_objects_25;
_near_objects = _near_objects - _remove_objects;
_near_objects_25 = _near_objects_25 - _remove_objects_25;
if ( count _near_objects == 0 ) then {
{
_dist22 = 0.6 * (sizeOf (typeof _x));
if ( _dist22 < 1 ) then { _dist22 = 1 };
if (_truepos distance _x < _dist22) then {
_near_objects pushback _x;
};
} foreach _near_objects_25;
};
if ( count _near_objects != 0 ) then {
GRLIB_conflicting_objects = _near_objects;
} else {
GRLIB_conflicting_objects = [];
};
if (count _near_objects == 0 && ((_truepos distance _posfob) < _maxdist) && ( ((!surfaceIsWater _truepos) && (!surfaceIsWater getpos player)) || (_classname in boats_names) ) ) then {
if ( ((buildtype == 6) || (buildtype == 99)) && ((gridmode % 2) == 1) ) then {
_vehicle setpos [round (_truepos select 0),round (_truepos select 1), _truepos select 2];
} else {
_vehicle setpos _truepos;
};
if ( buildtype == 6 || buildtype == 99 ) then {
_vehicle setVectorUp [0,0,1];
} else {
_vehicle setVectorUp surfaceNormal position _vehicle;
};
if(build_invalid == 1) then {
GRLIB_ui_notif = "";
{ _x setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"]; } foreach GRLIB_preview_spheres;
};
build_invalid = 0;
} else {
if ( build_invalid == 0 ) then {
{ _x setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"]; } foreach GRLIB_preview_spheres;
};
_vehicle setpos _ghost_spot;
build_invalid = 1;
if(count _near_objects > 0) then {
GRLIB_ui_notif = format [localize "STR_PLACEMENT_IMPOSSIBLE",count _near_objects, round _dist];
if (_debug_colisions) then {
private [ "_objs_classnames" ];
_objs_classnames = [];
{ _objs_classnames pushback (typeof _x) } foreach _near_objects;
hint format [ "Colisions : %1", _objs_classnames ];
};
};
if( ((surfaceIsWater _truepos) || (surfaceIsWater getpos player)) && !(_classname in boats_names)) then {
GRLIB_ui_notif = localize "STR_BUILD_ERROR_WATER";
};
if((_truepos distance _posfob) > _maxdist) then {
GRLIB_ui_notif = format [localize "STR_BUILD_ERROR_DISTANCE",_maxdist];
};
};
sleep 0.05;
};
GRLIB_ui_notif = "";
{ _x setpos [ 0,0,0 ] } foreach GRLIB_preview_spheres;
if ( !alive player || build_confirmed == 3 ) then {
deleteVehicle _vehicle;
[ [ ((build_lists select buildtype) select buildindex) select 2 ] , "cancel_build_remote_call" ] call BIS_fnc_MP;
};
if ( build_confirmed == 2 ) then {
_vehpos = getpos _vehicle;
_vehdir = getdir _vehicle;
deleteVehicle _vehicle;
sleep 0.1;
_vehicle = _classname createVehicle _truepos;
_vehicle allowDamage false;
_vehicle setdir _vehdir;
_vehicle setpos _truepos;
if ( !(_classname == "ACE_Box_82mm_Mo_HE" || _classname == "ACE_Box_82mm_Mo_Smoke" || _classname == "ACE_Box_82mm_Mo_Illum") ) then {
clearWeaponCargoGlobal _vehicle;
clearMagazineCargoGlobal _vehicle;
clearItemCargoGlobal _vehicle;
clearBackpackCargoGlobal _vehicle;
};
if ( buildtype == 6 || buildtype == 99 ) then {
_vehicle setVectorUp [0,0,1];
} else {
_vehicle setVectorUp surfaceNormal position _vehicle;
};
if ( (_classname in uavs) || manned ) then {
[ _vehicle ] call F_forceBluforCrew;
};
if ( _classname == FOB_box_typename ) then {
[ [_vehicle, 3000 ] , "F_setMass" ] call BIS_fnc_MP;
};
if (_classname in KP_liberation_medical_vehicles) then {
_vehicle setVariable ["ace_medical_medicClass", 1, true];
};
if (_classname == "Land_Medevac_house_V1_F" || _classname == "Land_Medevac_HQ_V1_F") then {
_vehicle setVariable ["ace_medical_isMedicalFacility", true, true];
};
sleep 0.3;
_vehicle allowDamage true;
_vehicle setDamage 0;
if(buildtype == 99) then {
_vehicle addEventHandler ["HandleDamage", { 0 }];
};
if(buildtype != 6) then {
_vehicle addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
{ _x addMPEventHandler ["MPKilled", {_this spawn kill_manager}]; } foreach (crew _vehicle);
};
};
if ( _idactcancel != -1 ) then {
player removeAction _idactcancel;
};
if ( _idactsnap != -1 ) then {
player removeAction _idactsnap;
};
if ( _idactplacebis != -1 ) then {
player removeAction _idactplacebis;
};
player removeAction _idactrotate;
player removeAction _idactplace;
if(buildtype == 99) then {
_new_fob = getpos player;
[ [ _new_fob, false ] , "build_fob_remote_call" ] call BIS_fnc_MP;
buildtype = 1;
};
build_confirmed = 0;
};
};
if ( repeatbuild ) then {
dobuild = 1;
repeatbuild = false;
} else {
dobuild = 0;
};
manned = false;
};

View File

@ -0,0 +1,43 @@
private [ "_minfobdist", "_minsectordist", "_distfob", "_clearedtobuildfob", "_distsector", "_clearedtobuildsector", "_idx" ];
if ( count GRLIB_all_fobs >= GRLIB_maximum_fobs ) exitWith {
hint format [ localize "STR_HINT_FOBS_EXCEEDED", GRLIB_maximum_fobs ];
};
_minfobdist = 1000;
_minsectordist = GRLIB_capture_size + GRLIB_fob_range;
_distfob = 1;
_clearedtobuildfob = true;
_distsector = 1;
_clearedtobuildsector = true;
_idx = 0;
while { (_idx < (count GRLIB_all_fobs)) && _clearedtobuildfob } do {
if ( player distance (GRLIB_all_fobs select _idx) < _minfobdist ) then {
_clearedtobuildfob = false;
_distfob = player distance (GRLIB_all_fobs select _idx);
};
_idx = _idx + 1;
};
_idx = 0;
if(_clearedtobuildfob) then {
while { (_idx < (count sectors_allSectors)) && _clearedtobuildsector } do {
if ( player distance (getmarkerpos (sectors_allSectors select _idx)) < _minsectordist ) then {
_clearedtobuildsector = false;
_distsector = player distance (getmarkerpos (sectors_allSectors select _idx));
};
_idx = _idx + 1;
};
};
if (!_clearedtobuildfob) then {
hint format [localize "STR_FOB_BUILDING_IMPOSSIBLE",floor _minfobdist,floor _distfob];
} else {
if ( !_clearedtobuildsector ) then {
hint format [localize "STR_FOB_BUILDING_IMPOSSIBLE_SECTOR",floor _minsectordist,floor _distsector];
} else {
buildtype = 99;
dobuild = 1;
};
};

View File

@ -0,0 +1 @@
gridmode = gridmode + 1;

View File

@ -0,0 +1,178 @@
private [ "_oldbuildtype", "_cfg", "_initindex", "_dialog", "_iscommandant", "_squadname", "_buildpages", "_build_list", "_classnamevar", "_entrytext", "_icon", "_affordable", "_affordable_crew", "_selected_item", "_linked", "_linked_unlocked", "_base_link", "_link_color", "_link_str" ];
if ( ( [ getpos player , 500 , GRLIB_side_enemy ] call F_getUnitsCount ) > 4 ) exitWith { hint localize "STR_BUILD_ENEMIES_NEARBY"; };
if ( isNil "buildtype" ) then { buildtype = 1 };
if ( isNil "buildindex" ) then { buildindex = -1 };
dobuild = 0;
_oldbuildtype = -1;
_cfg = configFile >> "cfgVehicles";
_initindex = buildindex;
_dialog = createDialog "liberation_build";
waitUntil { dialog };
_iscommandant = false;
if ( player == [] call F_getCommander ) then {
_iscommandant = true;
};
ctrlShow [ 108, _iscommandant ];
ctrlShow [ 1085, _iscommandant ];
ctrlShow [ 121, _iscommandant ];
_squadname = "";
_buildpages = [
localize "STR_BUILD1",
localize "STR_BUILD2",
localize "STR_BUILD3",
localize "STR_BUILD4",
localize "STR_BUILD5",
localize "STR_BUILD6",
localize "STR_BUILD7",
localize "STR_BUILD8"
];
while { dialog && alive player && (dobuild == 0 || buildtype == 1)} do {
_build_list = build_lists select buildtype;
if ( buildtype == 7 ) then {
_build_list = [];
while { count _build_list < (count (build_lists select buildtype)) - 2 } do {
_build_list pushback ((build_lists select buildtype) select (count _build_list));
};
};
if (_oldbuildtype != buildtype || synchro_done ) then {
synchro_done = false;
_oldbuildtype = buildtype;
lbClear 110;
{
ctrlSetText [ 151, _buildpages select ( buildtype - 1) ];
if ( buildtype != 8 ) then {
_classnamevar = (_x select 0);
_entrytext = getText (_cfg >> _classnamevar >> "displayName");
if ( _classnamevar == FOB_box_typename ) then {
_entrytext = localize "STR_FOBBOX";
};
if ((_classnamevar == Arsenal_typename) && (KP_liberation_mobilearsenal)) then {
_entrytext = localize "STR_ARSENAL_BOX";
};
if ((_classnamevar == Respawn_truck_typename) && (KP_liberation_mobilerespawn)) then {
_entrytext = localize "STR_RESPAWN_TRUCK";
};
if ( _classnamevar == FOB_truck_typename ) then {
_entrytext = localize "STR_FOBTRUCK";
};
((findDisplay 5501) displayCtrl (110)) lnbAddRow [ _entrytext, format [ "%1" ,_x select 1], format [ "%1" ,_x select 2], format [ "%1" ,_x select 3]];
_icon = getText ( _cfg >> (_x select 0) >> "icon");
if(isText (configFile >> "CfgVehicleIcons" >> _icon)) then {
_icon = (getText (configFile >> "CfgVehicleIcons" >> _icon));
};
lnbSetPicture [110, [((lnbSize 110) select 0) - 1, 0],_icon];
} else {
if ( ((lnbSize 110) select 0) <= count squads_names ) then {
_squadname = squads_names select ((lnbSize 110) select 0);
} else {
_squadname = "";
};
((findDisplay 5501) displayCtrl (110)) lnbAddRow [_squadname, format [ "%1" ,_x select 1], format [ "%1" ,_x select 2], format [ "%1" ,_x select 3]];
};
_affordable = true;
if(
((_x select 1 > 0) && ((_x select 1) > (infantry_cap - resources_infantry))) ||
((_x select 2 > 0) && ((_x select 2) > resources_ammo)) ||
((_x select 3 > 0) && ((_x select 3) > (fuel_cap - resources_fuel)))
) then {
_affordable = false;
};
if ( _affordable ) then {
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 0], [1,1,1,1]];
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 1], [1,1,1,1]];
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 2], [1,1,1,1]];
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 3], [1,1,1,1]];
} else {
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 0], [0.4,0.4,0.4,1]];
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 1], [0.4,0.4,0.4,1]];
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 2], [0.4,0.4,0.4,1]];
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 3], [0.4,0.4,0.4,1]];
};
} foreach _build_list;
};
if(_initindex != -1) then {
lbSetCurSel [110, _initindex];
_initindex = -1;
};
_selected_item = lbCurSel 110;
_affordable = false;
_squad_full = false;
if ((buildtype == 1) && (count (units group player) >= GRLIB_max_squad_size)) then {
_squad_full = true;
};
_linked = false;
_linked_unlocked = true;
_base_link = "";
if (dobuild == 0 && _selected_item != -1 && (_selected_item < (count _build_list))) then {
_build_item = _build_list select _selected_item;
if (
((_build_item select 1 == 0 ) || ((_build_item select 1) <= (infantry_cap - resources_infantry))) &&
((_build_item select 2 == 0 ) || ((_build_item select 2) <= resources_ammo)) &&
((_build_item select 3 == 0 ) || ((_build_item select 3) <= (fuel_cap - resources_fuel)))
) then {
_affordable = true;
};
if ( buildtype != 8 ) then {
{ if ( ( _build_item select 0 ) == ( _x select 0 ) ) exitWith { _base_link = _x select 1; _linked = true; } } foreach GRLIB_vehicle_to_military_base_links;
if ( _linked ) then {
if ( !(_base_link in blufor_sectors) ) then { _linked_unlocked = false };
};
};
};
_affordable_crew = _affordable;
if ( unitcap >= ([] call F_localCap)) then {
_affordable_crew = false;
if (buildtype == 1 || buildtype == 8) then {
_affordable = false;
};
};
ctrlEnable [ 120, _affordable && _linked_unlocked && !(_squad_full) ];
ctrlEnable [ 121, _affordable_crew && _linked_unlocked ];
ctrlSetText [131, format [ "%1 : %2/%3" , localize "STR_MANPOWER" , (floor resources_infantry), infantry_cap]] ;
ctrlSetText [132, format [ "%1 : %2" , localize "STR_AMMO" , (floor resources_ammo)] ];
ctrlSetText [133, format [ "%1 : %2/%3" , localize "STR_FUEL" , (floor resources_fuel), fuel_cap] ];
ctrlSetText [134, format [ "%1 : %2/%3" , localize "STR_UNITCAP" , unitcap, ([] call F_localCap)] ];
_link_color = "#0040e0";
_link_str = localize "STR_VEHICLE_UNLOCKED";
if (!_linked_unlocked) then { _link_color = "#e00000"; _link_str = localize "STR_VEHICLE_LOCKED"; };
if ( _linked ) then {
((findDisplay 5501) displayCtrl (161)) ctrlSetStructuredText parseText ( "<t color='" + _link_color + "' align='center'>" + _link_str + "<br/>" + ( markerText _base_link ) + "</t>" );
} else {
((findDisplay 5501) displayCtrl (161)) ctrlSetStructuredText parseText "";
};
buildindex = _selected_item;
if(buildtype == 1 && dobuild != 0) then {
ctrlEnable [120, false];
ctrlEnable [121, false];
sleep 1;
dobuild = 0;
};
sleep 0.1;
};
if (!alive player || dobuild != 0) then { closeDialog 0 };

View File

@ -0,0 +1,46 @@
if ( !GRLIB_use_whitelist ) exitWith {};
private [ "_commanderobj", "_tagmatch", "_idmatch", "_namematch" ];
waitUntil { alive player };
sleep 1;
_commanderobj = [] call F_getCommander;
if ( !isNull _commanderobj ) then {
if ( player == _commanderobj && !([] call F_isAdmin)) then {
[] call compileFinal preprocessFileLineNumbers "whitelist.sqf";
_tagmatch = false;
_idmatch = false;
_namematch = false;
if ( !isNil "GRLIB_whitelisted_tags" ) then {
if ( count (squadParams _commanderobj) != 0 ) then {
if ( ((squadParams _commanderobj select 0) select 0) in GRLIB_whitelisted_tags ) then {
_tagmatch = true;
};
};
};
if ( !isNil "GRLIB_whitelisted_steamids" ) then {
if ( ( getPlayerUID _commanderobj ) in GRLIB_whitelisted_steamids ) then {
_idmatch = true;
};
};
if ( !isNil "GRLIB_whitelisted_names" ) then {
if ( ( name _commanderobj ) in GRLIB_whitelisted_names ) then {
_namematch = true;
};
};
if ( !( _tagmatch || _idmatch || _namematch ) ) then {
sleep 1;
if ( alive _commanderobj ) then {
endMission "END1";
};
};
};
};

View File

@ -0,0 +1,198 @@
waitUntil { !isNil "GRLIB_permissions" };
private [ "_dialog", "_nextplayer", "_players_array", "_displayname", "_idx", "_control", "_player_uid", "_player_idx", "_player_uids", "_player_permissions", "_modify_permissions" ];
_players_array = [];
_dialog = createDialog "liberation_permissions";
permission_playerid = -1;
permission_toset = -1;
save_changes = 0;
color_authorized = [0,0.9,0,1];
color_denied = [0.9,0,0,1];
fontsize = 0.017 * safezoneH;
_modify_permissions = [];
{
_player_uid = _x select 0;
_player_permissions = [] + ( _x select 1 );
_modify_permissions pushback [ _player_uid, _player_permissions ];
} foreach GRLIB_permissions;
disableSerialization;
waitUntil { dialog };
permission_create_activetext = compileFinal '
params [ "_idx", "_column", "_permission", "_text", "_tooltip" ];
_control = (findDisplay 5118) ctrlCreate [ "RscActiveText", ((10 * _idx) + 111) + _column, (findDisplay 5118) displayCtrl 9969 ];
_control ctrlSetPosition [ 0.072 * _column * safeZoneW, (_idx * 0.025) * safezoneH, 0.072 * safeZoneW, 0.025 * safezoneH];
_control ctrlSetText _text;
_control ctrlSetFontHeight fontsize;
_control ctrlSetTooltip _tooltip;
buttonSetAction [ ((10 * _idx) + 111) + _column, format [ "permission_playerid = %1; permission_toset = %2;", _idx, _permission ] ];
_control ctrlSetTextColor color_denied;
_control ctrlSetActiveColor color_denied;
_control ctrlCommit 0;
';
_players_array pushback [ "Default", localize "STR_DEFAULT", 0];
_idx = 2;
{
if ( !( (name _x) in [ "HC1", "HC2", "HC3" ] ) ) then {
_nextplayer = _x;
_displayname = "";
if(count (squadParams _nextplayer) != 0) then {
_displayname = "[" + ((squadParams _nextplayer select 0) select 0) + "] ";
};
_displayname = _displayname + name _nextplayer;
_players_array pushback [ getPlayerUID _nextplayer, _displayname, _idx ];
_idx = _idx + 1;
};
} foreach allPlayers;
{
_nextplayer = _x;
_idx = _nextplayer select 2;
if ( _idx % 2 == 0 ) then {
_control = (findDisplay 5118) ctrlCreate [ "RscBackground", -1, (findDisplay 5118) displayCtrl 9969 ];
_control ctrlSetPosition [ 0, (_idx * 0.025) * safezoneH, 0.595 * safeZoneW, 0.025 * safezoneH];
_control ctrlSetBackgroundColor [0.75,1,0.75,0.12];
_control ctrlCommit 0;
};
_control = (findDisplay 5118) ctrlCreate [ "RscText", (10 * _idx), (findDisplay 5118) displayCtrl 9969 ];
_control ctrlSetPosition [ 0, (_idx * 0.025) * safezoneH, 0.072 * safeZoneW, 0.025 * safezoneH];
_control ctrlSetText (_nextplayer select 1);
_control ctrlSetFontHeight fontsize;
_control ctrlCommit 0;
[ _idx, 1, 0, localize "STR_PERMISSIONS_LIGHT", localize "STR_PERMISSIONS_TOOLTIP_LIGHT" ] call permission_create_activetext;
[ _idx, 2, 1, localize "STR_PERMISSIONS_ARMORED", localize "STR_PERMISSIONS_TOOLTIP_ARMORED" ] call permission_create_activetext;
[ _idx, 3, 2, localize "STR_PERMISSIONS_AIR", localize "STR_PERMISSIONS_TOOLTIP_AIR" ] call permission_create_activetext;
[ _idx, 4, 3, localize "STR_PERMISSIONS_CONSTRUCTION", localize "STR_PERMISSIONS_TOOLTIP_CONSTRUCTION" ] call permission_create_activetext;
[ _idx, 5, 4, localize "STR_PERMISSIONS_RECYCLING", localize "STR_PERMISSIONS_TOOLTIP_RECYCLING" ] call permission_create_activetext;
[ _idx, 6, 5, localize "STR_PERMISSIONS_MISC", localize "STR_PERMISSIONS_TOOLTIP_MISC" ] call permission_create_activetext;
_control = (findDisplay 5118) ctrlCreate [ "RscButton", ((10 * _idx) + 111) + 7, (findDisplay 5118) displayCtrl 9969 ];
_control ctrlSetPosition [ ((0.075 * 7) - 0.02) * safeZoneW, ((_idx * 0.025) * safezoneH) + 0.0025, (0.035 * safeZoneW), 0.022 * safezoneH];
_control ctrlSetText (localize "STR_PERMISSIONS_ALL");
_control ctrlSetFontHeight fontsize;
_control ctrlSetTooltip (localize "STR_PERMISSIONS_TOOLTIP_ALL");
buttonSetAction [ ((10 * _idx) + 111) + 7, format [ "permission_playerid = %1; permission_toset = 666;", _idx ] ];
_control ctrlCommit 0;
_control = (findDisplay 5118) ctrlCreate [ "RscButton", ((10 * _idx) + 111) + 8, (findDisplay 5118) displayCtrl 9969 ];
_control ctrlSetPosition [ ((0.075 * 7) + 0.02) * safeZoneW, (_idx * 0.025) * safezoneH + 0.0025, 0.035 * safeZoneW, 0.022 * safezoneH];
_control ctrlSetText (localize "STR_PERMISSIONS_NONE");
_control ctrlSetFontHeight fontsize;
_control ctrlSetTooltip (localize "STR_PERMISSIONS_TOOLTIP_NONE");
buttonSetAction [ ((10 * _idx) + 111) + 8, format [ "permission_playerid = %1; permission_toset = 999;", _idx ] ];
_control ctrlCommit 0;
} foreach _players_array;
while { dialog && alive player } do {
if ( permission_playerid != -1 || permission_toset != -1 ) then {
_player_uid = "";
{
if ( _x select 2 == permission_playerid ) exitWith { _player_uid = _x select 0 };
} foreach _players_array;
if ( _player_uid != "" ) then {
_player_idx = -1;
_player_uids = [];
{
_player_uids pushback (_x select 0);
} foreach _modify_permissions;
_player_idx = _player_uids find _player_uid;
if ( permission_toset == 666 ) then {
_player_permissions = [ true, true, true, true, true, true ];
};
if ( permission_toset == 999 ) then {
_player_permissions = [ false, false, false, false, false, false ];
};
if ( _player_idx == -1 ) then {
if ( permission_toset != 666 && permission_toset != 999 ) then {
_player_permissions = [ false, false, false, false, false, false ];
_player_permissions set [ permission_toset, true ];
};
_modify_permissions pushback [ _player_uid, _player_permissions ];
} else {
if ( permission_toset != 666 && permission_toset != 999 ) then {
_player_permissions = (_modify_permissions select _player_idx) select 1;
_idx = 0;
{
if ( permission_toset == _idx ) exitWith {
if ( _player_permissions select _idx ) then {
_player_permissions set [ _idx, false ];
} else {
_player_permissions set [ _idx, true ];
};
};
_idx = _idx + 1;
} foreach _player_permissions;
};
_modify_permissions set [ _player_idx, [ _player_uid, _player_permissions ] ];
};
};
permission_playerid = -1;
permission_toset = -1;
};
{
_nextplayer = _x;
{
if ( _nextplayer select 0 == _x select 0 ) exitWith {
_idx = _nextplayer select 2;
_player_permissions = (_x select 1);
{
_control = ((findDisplay 5118) displayCtrl ((10 * _idx) + _x + 111));
if ( _player_permissions select (_x - 1)) then {
_control ctrlSetTextColor color_authorized;
_control ctrlSetActiveColor color_authorized;
} else {
_control ctrlSetTextColor color_denied;
_control ctrlSetActiveColor color_denied;
};
} foreach [ 1, 2, 3, 4, 5, 6 ];
};
} foreach _modify_permissions;
} foreach _players_array;
if ( save_changes == 1 ) then {
GRLIB_permissions = _modify_permissions;
publicVariable "GRLIB_permissions";
closeDialog 0;
};
waitUntil { !dialog || !(alive player) || permission_playerid != -1 || permission_toset != -1 || save_changes != 0 };
};

View File

@ -0,0 +1,61 @@
[] call compileFinal preprocessFileLineNumbers "scripts\client\misc\init_markers.sqf";
[] call compileFinal preprocessFileLineNumbers "arsenal.sqf";
if ( typeOf player == "VirtualSpectator_F" ) exitWith {
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\empty_vehicles_marker.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\fob_markers.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\group_icons.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\hostile_groups.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\sector_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\spot_timer.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\synchronise_vars.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\ui\ui_manager.sqf";
};
["Preload"] call BIS_fnc_arsenal;
respawn_lhd = compileFinal preprocessFileLineNumbers "scripts\client\spawn\respawn_lhd.sqf";
spawn_camera = compileFinal preprocessFileLineNumbers "scripts\client\spawn\spawn_camera.sqf";
cinematic_camera = compileFinal preprocessFileLineNumbers "scripts\client\ui\cinematic_camera.sqf";
write_credit_line = compileFinal preprocessFileLineNumbers "scripts\client\ui\write_credit_line.sqf";
do_load_box = compileFinal preprocessFileLineNumbers "scripts\client\ammoboxes\do_load_box.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\actions\action_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\actions\intel_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\actions\recycle_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\actions\unflip_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\ammoboxes\ammobox_action_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\build\build_overlay.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\build\do_build.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\commander\enforce_whitelist.sqf";
if (KP_liberation_mapmarkers == 1) then {[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\empty_vehicles_marker.sqf";};
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\fob_markers.sqf";
if (KP_liberation_mapmarkers == 1) then {[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\group_icons.sqf";};
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\hostile_groups.sqf";
if (KP_liberation_mapmarkers == 1) then {[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\huron_marker.sqf";} else {deleteMarker "huronmarker"};
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\sector_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\markers\spot_timer.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\broadcast_squad_colors.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\disable_remote_sensors.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\init_arsenal.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\offload_diag.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\permissions_warning.sqf";
if (!KP_liberation_ace) then {[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\resupply_manager.sqf";};
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\secondary_jip.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\stay_leader.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\stop_renegade.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\synchronise_vars.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\vehicle_permissions.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\spawn\redeploy_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\ui\ui_manager.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\ui\tutorial_manager.sqf";
player addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
player addEventHandler ["GetInMan", {[_this select 2] execVM "scripts\client\misc\kp_fuel_consumption.sqf";}];
{
[_x] call BIS_fnc_drawCuratorLocations;
} foreach allCurators;
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\ui\intro.sqf";
[] execVM "onPlayerRespawn.sqf";

View File

@ -0,0 +1,51 @@
private [ "_vehmarkers", "_markedveh", "_cfg", "_vehtomark", "_supporttomark", "_marker" ];
_vehmarkers = [];
_markedveh = [];
_cfg = configFile >> "cfgVehicles";
_vehtomark = [];
_support_to_skip = [
ammobox_o_typename,
"B_Slingload_01_Repair_F",
"B_Slingload_01_Fuel_F",
"B_Slingload_01_Ammo_F"
];
{
_vehtomark pushback (_x select 0);
} foreach light_vehicles + heavy_vehicles + air_vehicles + support_vehicles;
_vehtomark = _vehtomark - _support_to_skip;
while { true } do {
_markedveh = [];
{
if ( (alive _x) && ((typeof _x) in _vehtomark) && (count (crew _x) == 0) && (_x distance lhd > 500) ) then {
_markedveh pushback _x;
};
} foreach vehicles;
if ( count _markedveh != count _vehmarkers ) then {
{ deleteMarkerLocal _x; } foreach _vehmarkers;
_vehmarkers = [];
{
_marker = createMarkerLocal [ format [ "markedveh%1" ,_x], markers_reset ];
_marker setMarkerColorLocal "ColorKhaki";
_marker setMarkerTypeLocal "mil_dot";
_marker setMarkerSizeLocal [ 0.75, 0.75 ];
_vehmarkers pushback _marker;
} foreach _markedveh;
};
{
_marker = _vehmarkers select (_markedveh find _x);
_marker setMarkerPosLocal getpos _x;
_marker setMarkerTextLocal (getText (_cfg >> typeOf _x >> "displayName"));
} foreach _markedveh;
sleep 5;
};

View File

@ -0,0 +1,47 @@
private [ "_markers", "_markers_mobilespawns", "_marker", "_idx", "_respawn_trucks", "_markers_mobilespawns" ];
_markers = [];
_markers_mobilespawns = [];
waitUntil { !isNil "GRLIB_all_fobs" };
uiSleep 3;
while { true } do {
if ( count _markers != count GRLIB_all_fobs ) then {
{ deleteMarkerLocal _x } foreach _markers;
_markers = [];
for [ {_idx=0},{_idx < count GRLIB_all_fobs},{_idx=_idx+1}] do {
_marker = createMarkerLocal [format ["fobmarker%1",_idx], markers_reset];
_marker setMarkerTypeLocal "b_hq";
_marker setMarkerSizeLocal [ 1.5, 1.5 ];
_marker setMarkerPosLocal (GRLIB_all_fobs select _idx);
_marker setMarkerTextLocal format ["FOB %1",military_alphabet select _idx];
_marker setMarkerColorLocal "ColorYellow";
_markers pushback _marker;
};
};
if (KP_liberation_mobilerespawn) then {
_respawn_trucks = call F_getMobileRespawns;
if ( count _markers_mobilespawns != count _respawn_trucks ) then {
{ deleteMarkerLocal _x; } foreach _markers_mobilespawns;
_markers_mobilespawns = [];
for [ {_idx=0} , {_idx < (count _respawn_trucks)} , {_idx=_idx+1} ] do {
_marker = createMarkerLocal [format ["mobilespawn%1",_idx], markers_reset];
_marker setMarkerTypeLocal "mil_end";
_marker setMarkerColorLocal "ColorYellow";
_markers_mobilespawns pushback _marker;
};
};
if ( count _respawn_trucks == count _markers_mobilespawns ) then {
for [ {_idx=0},{_idx < (count _markers_mobilespawns)},{_idx=_idx+1} ] do {
(_markers_mobilespawns select _idx) setMarkerPosLocal getpos (_respawn_trucks select _idx);
(_markers_mobilespawns select _idx) setMarkerTextLocal format ["%1 %2",localize "STR_RESPAWN_TRUCK",mapGridPosition (_respawn_trucks select _idx)];
};
};
};
sleep 5.12;
};

View File

@ -0,0 +1,68 @@
private [ "_iconed_groups", "_ticks", "_localgroup", "_grouptype", "_groupicon" ];
_iconed_groups = [];
_ticks = 0;
setGroupIconsVisible [true,false];
while { true } do {
{
if ((_x != group player) && ((side _x == GRLIB_side_friendly))) then {
if ( (_x in _iconed_groups) && (
(count units _x == 0) || (side _x == GRLIB_side_friendly && (((leader _x) distance (getmarkerpos GRLIB_respawn_marker) < 100) || ((leader _x) distance lhd < 500))))) then {
clearGroupIcons _x;
_iconed_groups = _iconed_groups - [_x];
};
if ( !(_x in _iconed_groups) && (
(count units _x > 0) && (side _x == GRLIB_side_friendly && (((leader _x) distance (getmarkerpos GRLIB_respawn_marker) > 100) && ((leader _x) distance lhd > 500))))) then {
clearGroupIcons _x;
_localgroup = _x;
_grouptype = [_localgroup] call F_getGroupType;
_groupicon = "";
switch (_grouptype) do {
case "infantry": { _groupicon = "b_inf" };
case "light": { _groupicon = "b_motor_inf" };
case "heavy": { _groupicon = "b_armor" };
case "air": { _groupicon = "b_air" };
case "support": { _groupicon = "b_maint" };
case "static": { _groupicon = "b_mortar" };
case "uav": { _groupicon = "b_uav" };
default { };
};
_localgroup addGroupIcon [ _groupicon, [ 0,0 ] ];
if ( side _localgroup == GRLIB_side_friendly ) then {
_groupiconsize = "group_0";
_groupsize = (count (units _localgroup));
if ( _groupsize >= 2 ) then { _groupiconsize = "group_1" };
if ( _groupsize >= 6 ) then { _groupiconsize = "group_2" };
if ( _groupsize >= 10 ) then { _groupiconsize = "group_3" };
_localgroup addGroupIcon [ _groupiconsize, [ 0,0 ] ];
};
_iconed_groups pushback _x;
};
};
} foreach allGroups;
{
_color = [];
if ( isplayer leader _x ) then {
_color = [0.8,0.8,0,1];
} else {
_color = [0,0.3,0.8,1];
};
_x setGroupIconParams [_color,"",1,true];
} foreach _iconed_groups;
_ticks = _ticks + 1;
if ( _ticks >= 15 ) then {
_ticks = 0;
_iconed_groups = [];
};
sleep 4.7;
};

View File

@ -0,0 +1,37 @@
private [ "_hostile_markers", "_hostile_groups", "_nextgroup", "_marker" ];
_hostile_markers = [];
waitUntil {
sleep 1;
!isNil "blufor_sectors"
};
while { true } do {
{ deleteMarkerLocal _x } foreach _hostile_markers;
_hostile_markers = [];
_hostile_groups = [];
{
private [ "_nextgroup" ];
_nextgroup = _x;
if ( (side _nextgroup == GRLIB_side_enemy) && (({ !captive _x } count ( units _nextgroup ) ) > 0)) then {
if ( [(getpos leader _nextgroup), GRLIB_side_friendly, GRLIB_radiotower_size] call F_getNearestTower != "" ) then {
_hostile_groups pushback _nextgroup;
};
};
} foreach allGroups;
{
_marker = createMarkerLocal [format ["hostilegroup%1",_x], markers_reset];
_marker setMarkerColorLocal GRLIB_color_enemy_bright;
_marker setMarkerTypeLocal "mil_warning";
_marker setMarkerSizeLocal [ 0.65, 0.65 ];
_marker setMarkerPosLocal ( [ getpos (leader _x), random 50, random 360 ] call BIS_fnc_relPos );
_hostile_markers pushback _marker;
} foreach _hostile_groups;
sleep (60 + (random 60));
};

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