Stringtable corrections, Civil Informant preparation, removed deprecated functions

This commit is contained in:
Christian 2017-09-28 18:21:03 +02:00
parent 9acc878b78
commit d56e549c8d
33 changed files with 4463 additions and 4341 deletions

View File

@ -52,8 +52,6 @@ KP_liberation_fuel_max = 45;
Name of the savegame namespace inside of the [ServerProfileName].vars.Arma3Profile file. */
GRLIB_save_key = "KP_LIBERATION_" + (toUpper worldName) + "_SAVEGAME";
KP_liberation_savegame_debug = false; // Enables displaying of the whole save array in the server log on each save
GRLIB_side_friendly = WEST; // Friendly side.
GRLIB_side_enemy = EAST; // Enemy side.
GRLIB_side_resistance = RESISTANCE; // Resistance side.
@ -92,6 +90,11 @@ KP_liberation_cr_building_penalty = 3; // Civil Reputation pen
KP_liberation_cr_vehicle_penalty = 1; // Civil Reputation penalty for stealing a civilian vehicle
KP_liberation_cr_sector_gain = 5; // Civil Reputation gain for liberate a sector
KP_liberation_civinfo_min = 5400; // Civil Informant minimum spawn time
KP_liberation_civinfo_max = 10800; // Civil Informant maximum spawn time
KP_liberation_civinfo_chance = 75; // Civil Informant spawn chance (0-100)
KP_liberation_civinfo_intel = 5; // Civil Informant intel amount
/* - Default arsenal blacklist method.
Useless if you're using anything other than "kp_liberation_arsenal = 0;" above. A whitelisted arsenal is always more performance friendly then a blacklisted arsenal.
REMEMBER: All static turret and UAV bags should be defined here, to stop players from exploiting free resources via the virtual arsenal. */

View File

@ -1,14 +1,18 @@
params ["_vehicle"];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] checkVehicle called on: %1 - Vehicle: %2", debug_source, _vehicle];_text remoteExec ["diag_log",2];};
if (isNil "KP_liberation_cr_vehicles") then {
KP_liberation_cr_vehicles = [];
};
if (((typeOf _vehicle) in civilian_vehicles) && !(_vehicle in KP_liberation_cr_vehicles)) then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [CIVREP] Civil vehicle stolen by: %1", debug_source];_text remoteExec ["diag_log",2];};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] Vehicle was stolen by: %1", debug_source];_text remoteExec ["diag_log",2];};
[0] remoteExec ["F_cr_penaltyMsg"];
[KP_liberation_cr_vehicle_penalty, true] remoteExec ["F_cr_changeCR", 2];
KP_liberation_cr_vehicles pushBack _vehicle;
publicVariable "KP_liberation_cr_vehicles";
};
};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] checkVehicle finished on: %1 - Stolen vehicle list: %2", debug_source, KP_liberation_cr_vehicles];_text remoteExec ["diag_log",2];};

View File

@ -30,17 +30,17 @@ while { cinematic_camera_started } do {
if ( count GRLIB_all_fobs > 0 ) then {
for [ {_idx=0},{_idx < 2},{_idx=_idx+1} ] do {
_positions pushback (GRLIB_all_fobs call bis_fnc_selectRandom);
_positions pushback (selectRandom GRLIB_all_fobs);
};
};
if ( count active_sectors > 0 ) then {
for [ {_idx=0},{_idx < 5},{_idx=_idx+1} ] do {
_positions pushback (getmarkerpos (active_sectors call bis_fnc_selectRandom));
_positions pushback (getmarkerpos (selectRandom active_sectors));
};
} else {
for [ {_idx=0},{_idx < 5},{_idx=_idx+1} ] do {
_positions pushback (getmarkerpos (sectors_allSectors call bis_fnc_selectRandom ));
_positions pushback (getmarkerpos (selectRandom sectors_allSectors));
};
};
@ -48,13 +48,13 @@ while { cinematic_camera_started } do {
_activeplayers = ( [ allPlayers , { alive _x && ( _x distance ( getmarkerpos GRLIB_respawn_marker ) ) > 100 } ] call BIS_fnc_conditionalSelect );
if ( count _activeplayers > 0 ) then {
for [ {_idx=0},{_idx < 3},{_idx=_idx+1} ] do {
_positions pushback (getpos ( _activeplayers call bis_fnc_selectRandom ));
_positions pushback (getpos (selectRandom _activeplayers));
};
};
};
};
_position = ( _positions - [ _last_position ] ) call bis_fnc_selectRandom;
_position = selectRandom (_positions - [_last_position]);
_last_position = _position;
_cinematic_pointer setpos [ _position select 0, _position select 1, (_position select 2) + 7 ];
_nearentities = _position nearEntities [ "Man", 100 ];
@ -63,10 +63,10 @@ while { cinematic_camera_started } do {
_camtarget = startbase;
} else {
if ( count ( [ _nearentities , { alive _x && isPlayer _x } ] call BIS_fnc_conditionalSelect ) != 0 ) then {
_camtarget = ( [ _nearentities , { alive _x && isPlayer _x } ] call BIS_fnc_conditionalSelect ) call bis_fnc_selectRandom;
_camtarget = selectRandom ([_nearentities, {alive _x && isPlayer _x}] call BIS_fnc_conditionalSelect);
} else {
if ( count ( [ _nearentities , { alive _x } ] call BIS_fnc_conditionalSelect ) != 0 ) then {
_camtarget = ( [ _nearentities , { alive _x } ] call BIS_fnc_conditionalSelect ) call bis_fnc_selectRandom;
_camtarget = selectRandom ([_nearentities, {alive _x}] call BIS_fnc_conditionalSelect);
};
};
};
@ -81,7 +81,7 @@ while { cinematic_camera_started } do {
_startfov = 0.8;
_endfov = 0.8;
_next_transition = ( [ 0, 1, 2, 3, 4, 5, 6, 7 ,8 ,9 ,10, 11 ,12 ,13 ,14, 15 ] - [ _last_transition ] ) call bis_fnc_selectRandom;
_next_transition = selectRandom ([0, 1, 2, 3, 4, 5, 6, 7 ,8 ,9 ,10, 11 ,12 ,13 ,14, 15] - [_last_transition]);
_last_transition = _next_transition;
switch ( _next_transition ) do {

View File

@ -22,7 +22,7 @@ if ( count GRLIB_all_fobs == 0 ) then {
};
} foreach sectors_opfor;
_spawnplace = _potentialplaces call BIS_fnc_selectRandom;
_spawnplace = selectRandom _potentialplaces;
[markerPos _spawnplace, true] remoteExec ["build_fob_remote_call",2];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Preplaced FOB placed by: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -2,7 +2,7 @@ _planes_number = 0;
_first_objective = _this select 0;
if ( combat_readiness >= 75 ) then { _planes_number = (floor (random 2)) };
_plane_type = opfor_air call BIS_fnc_selectRandom;
_plane_type = selectRandom opfor_air;
_air_spawnpoint = ( [ sectors_airspawn , [ _first_objective ] , { (markerpos _x) distance _input0 }, "ASCEND"] call BIS_fnc_sortBy ) select 0;
_air_grp = createGroup GRLIB_side_enemy;

View File

@ -26,7 +26,7 @@ if ( _spawn_marker != "" ) then {
if ( _target_size >= 16 ) then { _target_size = 16; };
if ( combat_readiness < 60 ) then { _target_size = round (_target_size * 0.65) };
while { count _selected_opfor_battlegroup < _target_size } do {
_selected_opfor_battlegroup pushback (_vehicle_pool call BIS_fnc_selectRandom);
_selected_opfor_battlegroup pushback (selectRandom _vehicle_pool);
};
[_spawn_marker] remoteExec ["remote_call_battlegroup"];

View File

@ -0,0 +1,23 @@
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] Loop spawned on: %1", debug_source];_text remoteExec ["diag_log",2];};
while {true} do {
uiSleep (KP_liberation_civinfo_min + round (random (KP_liberation_civinfo_max - KP_liberation_civinfo_min)));
if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] Informant sleep passed";_text remoteExec ["diag_log",2];};
waitUntil {
sleep 10;
KP_liberation_civ_rep >= 25
};
if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] Informant waitUntil passed";_text remoteExec ["diag_log",2];};
if (KP_liberation_civinfo_chance >= (random 100)) then {
if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] Informant spawn chance fits";_text remoteExec ["diag_log",2];};
private _sector = selectRandom ([sectors_capture, {_x in blufor_sectors}] call BIS_fnc_conditionalSelect);
} else {
if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] Informant spawn chance missed";_text remoteExec ["diag_log",2];};
};
};

View File

@ -0,0 +1,7 @@
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] Module initialising on: %1", debug_source];_text remoteExec ["diag_log",2];};
// Scripts
// Start spawn loop
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\civinformant\civinfo_loop.sqf";
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] Module initialised on: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -1,5 +1,7 @@
params ["_amount", "_negative"];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] changeCR called on: %1 - Parameters [%2, %3]", debug_source, _amount, _negative];_text remoteExec ["diag_log",2];};
if (_negative) then {
KP_liberation_civ_rep = KP_liberation_civ_rep - _amount;
} else {
@ -8,3 +10,5 @@ if (_negative) then {
if (KP_liberation_civ_rep < -100) then {KP_liberation_civ_rep = -100;};
if (KP_liberation_civ_rep > 100) then {KP_liberation_civ_rep = 100;};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] changeCR finished on: %1 - New value: %2", debug_source, KP_liberation_civ_rep];_text remoteExec ["diag_log",2];};

View File

@ -1,5 +1,7 @@
params ["_sector"];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] getBuildings called on: %1 - Sector: %2", debug_source, _sector];_text remoteExec ["diag_log",2];};
private _return = 0;
if (KP_liberation_cr_param_buildings) then {
@ -8,4 +10,6 @@ if (KP_liberation_cr_param_buildings) then {
_return = {alive _x} count nearestObjects [getMarkerPos _sector, ["House"], 1.5 * GRLIB_capture_size];
};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] getBuildings finished on: %1 - Return: %2", debug_source, _return];_text remoteExec ["diag_log",2];};
_return

View File

@ -1,5 +1,7 @@
params ["_sector"];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] liberatedSector called on: %1 - Sector: %2", debug_source, _sector];_text remoteExec ["diag_log",2];};
private _penalty = 0;
if (_sector in sectors_bigtown || _sector in sectors_capture) then {
@ -19,3 +21,5 @@ if (_sector in sectors_bigtown) then {
} else {
[(KP_liberation_cr_sector_gain - _penalty), false] spawn F_cr_changeCR;
};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] liberatedSector finished on: %1 - Penalty: %2", debug_source, _penalty];_text remoteExec ["diag_log",2];};

View File

@ -1,3 +1,5 @@
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] init_buildings.sqf initialising on: %1", debug_source];_text remoteExec ["diag_log",2];};
KP_liberation_cr_sectorbuildings = [];
{
@ -7,3 +9,5 @@ KP_liberation_cr_sectorbuildings = [];
{
KP_liberation_cr_sectorbuildings pushBack [_x, [_x] call F_cr_getBuildings];
} forEach sectors_bigtown;
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] init_buildings.sqf finished on: %1 - List of sector buildings: %2", debug_source, KP_liberation_cr_sectorbuildings];_text remoteExec ["diag_log",2];};

View File

@ -1,5 +1,4 @@
// Count initial buildings on each city and bigtown
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\civrep\init_buildings.sqf";
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] Module initialising on: %1", debug_source];_text remoteExec ["diag_log",2];};
// Functions
// Get buildings count for sector
@ -8,3 +7,9 @@ F_cr_getBuildings = compileFinal preprocessFileLineNumbers "scripts\server\civre
F_cr_changeCR = compileFinal preprocessFileLineNumbers "scripts\server\civrep\fnc\f_kp_cr_changeCR.sqf";
// Reputation gain for liberating a sector
F_cr_liberatedSector = compileFinal preprocessFileLineNumbers "scripts\server\civrep\fnc\f_kp_cr_liberatedSector.sqf";
// Scripts
// Count initial buildings on each city and bigtown
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\civrep\init_buildings.sqf";
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] Module initialised on: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -11,7 +11,7 @@ if ( GRLIB_weather_param == 3 ) then {
_weathertime = 1800;
while { GRLIB_endgame == 0 } do {
chosen_weather = _weathers call BIS_fnc_selectRandom;;
chosen_weather = selectRandom _weathers;
publicVariable "chosen_weather";
sleep _weathertime;
};

View File

@ -446,8 +446,8 @@ if ( count GRLIB_vehicle_to_military_base_links == 0 ) then {
_assigned_vehicles = [];
while { count _assigned_bases < count sectors_military && count _assigned_vehicles < count elite_vehicles } do {
_nextbase = ( [ sectors_military, { !(_x in _assigned_bases) } ] call BIS_fnc_conditionalSelect ) call BIS_fnc_selectRandom;
_nextvehicle = ( [ elite_vehicles, { !(_x in _assigned_vehicles) } ] call BIS_fnc_conditionalSelect ) call BIS_fnc_selectRandom;
_nextbase = selectRandom ([sectors_military, {!(_x in _assigned_bases)}] call BIS_fnc_conditionalSelect);
_nextvehicle = selectRandom ([elite_vehicles, {!(_x in _assigned_vehicles)}] call BIS_fnc_conditionalSelect);
_assigned_bases pushback _nextbase;
_assigned_vehicles pushback _nextvehicle;
GRLIB_vehicle_to_military_base_links pushback [_nextvehicle, _nextbase];

View File

@ -81,6 +81,9 @@ if (KP_liberation_ailogistics) then {[] spawn compileFinal preprocessFileLineNum
// Civil Reputation
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\civrep\init_module.sqf";
// Civil Informant
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\civinformant\init_module.sqf";
{
if ( (_x != player) && (_x distance (getmarkerpos GRLIB_respawn_marker) < 200 ) ) then {
deleteVehicle _x;

View File

@ -20,27 +20,27 @@ while { GRLIB_endgame == 0 } do {
} foreach ((sectors_bigtown + sectors_capture + sectors_factory) - (active_sectors));
if ( count _usable_sectors > 0 ) then {
_spawnsector = _usable_sectors call BIS_fnc_selectRandom;
_spawnsector = selectRandom _usable_sectors;
_grp = createGroup GRLIB_side_civilian;
if ( random 100 < 33) then {
_civnumber = 1 + (floor (random 2));
while { count units _grp < _civnumber } do {
( civilians call BIS_fnc_selectRandom ) createUnit [ markerpos _spawnsector, _grp, "this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
(selectRandom civilians) createUnit [ markerpos _spawnsector, _grp, "this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
};
_grpspeed = "LIMITED";
} else {
_nearestroad = objNull;
while { isNull _nearestroad } do {
_nearestroad = [ [ getmarkerpos (_spawnsector), random(100), random(360) ] call BIS_fnc_relPos, 200, [] ] call BIS_fnc_nearestRoad;
_nearestroad = [[getmarkerpos (_spawnsector), random (100), random (360)] call BIS_fnc_relPos, 200, []] call BIS_fnc_nearestRoad;
sleep 1;
};
_spawnpos = getpos _nearestroad;
( civilians call BIS_fnc_selectRandom ) createUnit [ _spawnpos, _grp, "this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
_civveh = ( civilian_vehicles call BIS_fnc_selectRandom ) createVehicle _spawnpos;
(selectRandom civilians) createUnit [_spawnpos, _grp, "this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
_civveh = (selectRandom civilian_vehicles) createVehicle _spawnpos;
_civveh setpos _spawnpos;
_civveh addMPEventHandler ['MPKilled', {_this spawn kill_manager}];
_civveh addEventHandler ["HandleDamage", { private [ "_damage" ]; if (( side (_this select 3) != GRLIB_side_friendly ) && ( side (_this select 3) != GRLIB_side_enemy )) then { _damage = 0 } else { _damage = _this select 2 }; _damage } ];
@ -64,7 +64,7 @@ while { GRLIB_endgame == 0 } do {
_sectors_patrol_random = [];
_sectorcount = count _sectors_patrol;
while { count _sectors_patrol_random < _sectorcount } do {
_nextsector = _sectors_patrol call BIS_fnc_selectRandom;
_nextsector = selectRandom _sectors_patrol;
_sectors_patrol_random pushback _nextsector;
_sectors_patrol = _sectors_patrol - [_nextsector];

View File

@ -36,9 +36,9 @@ while { GRLIB_endgame == 0 } do {
private [ "_vehicle_object" ];
if ( (combat_readiness > 75) && ((random 100) > 85) ) then {
_vehicle_object = [ _sector_spawn_pos, opfor_choppers call BIS_fnc_selectRandom ] call F_libSpawnVehicle;
_vehicle_object = [_sector_spawn_pos, selectRandom opfor_choppers] call F_libSpawnVehicle;
} else {
_vehicle_object = [ _sector_spawn_pos, [] call F_getAdaptiveVehicle ] call F_libSpawnVehicle;
_vehicle_object = [_sector_spawn_pos, [] call F_getAdaptiveVehicle] call F_libSpawnVehicle;
};
sleep 0.5;

View File

@ -14,7 +14,7 @@ private _spawnpos = _convoy_destinations select 0;
[4, _spawnpos] remoteExec ["remote_call_intel"];
private _scout_vehicle = [ [ _spawnpos, 30, 0 ] call BIS_fnc_relPos, opfor_mrap, true, false ] call F_libSpawnVehicle;
private _escort_vehicle = [ [ _spawnpos, 10, 0 ] call BIS_fnc_relPos, opfor_vehicles_low_intensity call BIS_fnc_selectRandom, true, false ] call F_libSpawnVehicle;
private _escort_vehicle = [ [ _spawnpos, 10, 0 ] call BIS_fnc_relPos, selectRandom opfor_vehicles_low_intensity, true, false ] call F_libSpawnVehicle;
private _transport_vehicle = [ [ _spawnpos, 10, 180 ] call BIS_fnc_relPos, opfor_ammobox_transport, true, false ] call F_libSpawnVehicle;
private _boxes_amount = 0;

View File

@ -17,7 +17,7 @@ _base_position = markerpos _spawn_marker;
_base_objects = [];
_base_objectives = [];
_base_defenders = [];
_template = ([] call (compile preprocessFileLineNumbers ( _fob_templates call bis_fnc_selectrandom )));
_template = ([] call (compile preprocessFileLineNumbers (selectRandom _fob_templates)));
_objects_to_build = _template select 0;
_objectives_to_build = _template select 1;

View File

@ -70,7 +70,7 @@ if ( combat_readiness < 50 ) then {
private _vehtospawn = [];
private _spawnchances = [75,50,15];
{ if (random 100 < _x ) then { _vehtospawn pushBack (_vehicle_pool call BIS_fnc_selectRandom); }; } foreach _spawnchances;
{if (random 100 < _x) then {_vehtospawn pushBack (selectRandom _vehicle_pool);};} foreach _spawnchances;
{ ( [ [ getpos _helowreck, 30 + (random 30), random 360 ] call BIS_fnc_relPos , _x, true ] call F_libSpawnVehicle ) addMPEventHandler ['MPKilled', {_this spawn kill_manager}]; } foreach _vehtospawn;
secondary_objective_position = getpos _helowreck;

View File

@ -15,7 +15,7 @@ if (random 100 < 12) then {
_ultra_strong = true;
};
_vehicle_trigger = 1;
_ied_type = ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"] call BIS_fnc_selectRandom;
_ied_type = selectRandom ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
_ied_obj = objNull;
_roadobj = [[getmarkerpos (_sector), random (_radius), random (360)] call BIS_fnc_relPos, _radius, []] call BIS_fnc_nearestRoad;
_goes_boom = false;

View File

@ -45,17 +45,17 @@ if (!(_sector in KP_military_sectors_already_activated)) then {
while {_nbintel > 0} do {
_buildingposition = _building_positions call BIS_fnc_selectRandom;
_buildingposition = selectRandom _building_positions;
while {_buildingposition in _used_positions} do {
_buildingposition = _building_positions call BIS_fnc_selectRandom;
_buildingposition = selectRandom _building_positions;
};
_used_positions pushback _buildingposition;
_inteldir = random 360;
_intelclassname = [GRLIB_intel_file, GRLIB_intel_laptop] call BIS_fnc_selectRandom;
_intelclassname = selectRandom [GRLIB_intel_file, GRLIB_intel_laptop];
_intelobject = _intelclassname createVehicle _buildingposition;
_intelobject setPosATL [_buildingposition select 0, _buildingposition select 1, (_buildingposition select 2) - 0.15];
_intelobject enableSimulationGlobal false;

View File

@ -39,8 +39,8 @@ if ( (!(_sector in blufor_sectors)) && ( ( [ getmarkerpos _sector , [ _opforcou
if ( _sector in sectors_bigtown ) then {
_vehtospawn =
[ ( [] call F_getAdaptiveVehicle ) ,
(militia_vehicles call BIS_fnc_selectRandom),
(militia_vehicles call BIS_fnc_selectRandom)];
(selectRandom militia_vehicles),
(selectRandom militia_vehicles)];
_infsquad = "militia";
_squad1 = ([] call F_getAdaptiveSquadComp);
_squad2 = ([] call F_getAdaptiveSquadComp);
@ -50,8 +50,8 @@ if ( (!(_sector in blufor_sectors)) && ( ( [ getmarkerpos _sector , [ _opforcou
if ( GRLIB_unitcap >= 1.5) then {
_squad4 = ([] call F_getAdaptiveSquadComp);
};
if((random 100) > (66 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (militia_vehicles call BIS_fnc_selectRandom); };
if((random 100) > (50 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (militia_vehicles call BIS_fnc_selectRandom); };
if((random 100) > (66 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (selectRandom militia_vehicles); };
if((random 100) > (50 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (selectRandom militia_vehicles); };
if((random 100) > (33 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback ( [] call F_getAdaptiveVehicle ); };
_spawncivs = true;
@ -68,9 +68,9 @@ if ( (!(_sector in blufor_sectors)) && ( ( [ getmarkerpos _sector , [ _opforcou
if ( _sector in sectors_capture ) then {
_vehtospawn = [];
_infsquad = "militia";
while { count _squad1 < ( 10 * _popfactor) } do { _squad1 pushback ( militia_squad call BIS_fnc_selectRandom ) };
if((random 100) > (66 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (militia_vehicles call BIS_fnc_selectRandom); };
if((random 100) > (33 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (militia_vehicles call BIS_fnc_selectRandom); };
while { count _squad1 < ( 10 * _popfactor) } do { _squad1 pushback (selectRandom militia_squad) };
if((random 100) > (66 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (selectRandom militia_vehicles); };
if((random 100) > (33 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback (selectRandom militia_vehicles); };
_spawncivs = true;
_building_ai_max = round ((floor (18 + (round (combat_readiness / 10 )))) * _popfactor);
_building_range = 120;
@ -92,9 +92,9 @@ if ( (!(_sector in blufor_sectors)) && ( ( [ getmarkerpos _sector , [ _opforcou
if ( GRLIB_unitcap >= 2) then {
_squad4 = ([] call F_getAdaptiveSquadComp);
};
_vehtospawn = [( [] call F_getAdaptiveVehicle ),( [] call F_getAdaptiveVehicle )];
if((random 100) > (33 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback ( [] call F_getAdaptiveVehicle ); };
if((random 100) > (66 / GRLIB_difficulty_modifier)) then { _vehtospawn pushback ( [] call F_getAdaptiveVehicle ); };
_vehtospawn = [([] call F_getAdaptiveVehicle),([] call F_getAdaptiveVehicle)];
if((random 100) > (33 / GRLIB_difficulty_modifier)) then {_vehtospawn pushback ([] call F_getAdaptiveVehicle);};
if((random 100) > (66 / GRLIB_difficulty_modifier)) then {_vehtospawn pushback ([] call F_getAdaptiveVehicle);};
_spawncivs = false;
_building_ai_max = round ((floor (18 + (round (combat_readiness / 4 )))) * _popfactor);
_building_range = 120;
@ -106,8 +106,8 @@ if ( (!(_sector in blufor_sectors)) && ( ( [ getmarkerpos _sector , [ _opforcou
if ( GRLIB_unitcap >= 1.25) then {
_squad2 = ([] call F_getAdaptiveSquadComp);
};
if((random 100) > 66) then { _vehtospawn pushback ( [] call F_getAdaptiveVehicle ); };
if((random 100) > 33) then { _vehtospawn pushback (militia_vehicles call BIS_fnc_selectRandom); };
if((random 100) > 66) then {_vehtospawn pushback ([] call F_getAdaptiveVehicle);};
if((random 100) > 33) then {_vehtospawn pushback (selectRandom militia_vehicles);};
_spawncivs = false;
_building_ai_max = round ((floor (18 + (round (combat_readiness / 10 )))) * _popfactor);
_building_range = 120;

View File

@ -30,10 +30,12 @@ if ( isMultiplayer ) then {
KP_liberation_mobilearsenal = ["MobileArsenal",1] call bis_fnc_getParamValue;
KP_liberation_ailogistics = ["AiLogistics",1] call bis_fnc_getParamValue;
KP_liberation_ace = ["AceEnable",0] call bis_fnc_getParamValue;
KP_liberation_debug = ["DebugEnable",0] call bis_fnc_getParamValue;
// Arty Supp deactivated for now - KP_liberation_suppMod_enb = ["SuppMod",1] call BIS_fnc_getParamValue;
KP_liberation_restart = ["ServerRestart",0] call BIS_fnc_getParamValue;
KP_liberation_cr_param_buildings = ["CR_Building",0] call BIS_fnc_getParamValue;
KP_liberation_civinfo_debug = ["DebugCivInfo",0] call bis_fnc_getParamValue;
KP_liberation_civrep_debug = ["DebugCivRep",0] call bis_fnc_getParamValue;
KP_liberation_savegame_debug = ["DebugSave",0] call bis_fnc_getParamValue;
} else {
GRLIB_difficulty_modifier = 2;
GRLIB_time_factor = 12;
@ -70,8 +72,13 @@ if ( isMultiplayer ) then {
// Arty Supp deactivated for now - KP_liberation_suppMod_enb = 1;
KP_liberation_restart = 0;
KP_liberation_cr_param_buildings = 0;
KP_liberation_civinfo_debug = 0;
KP_liberation_civrep_debug = 0;
KP_liberation_savegame_debug = 0;
};
KP_liberation_debug = false;
if ( GRLIB_fatigue < 0.1 ) then { GRLIB_fatigue = false } else { GRLIB_fatigue = true };
if ( GRLIB_introduction == 1 ) then { GRLIB_introduction = true } else { GRLIB_introduction = false };
if ( GRLIB_deployment_cinematic == 1 ) then { GRLIB_deployment_cinematic = true } else { GRLIB_deployment_cinematic = false };
@ -89,7 +96,6 @@ if (KP_liberation_mobilerespawn == 1) then {KP_liberation_mobilerespawn = true}
if (KP_liberation_mobilearsenal == 1) then {KP_liberation_mobilearsenal = true} else {KP_liberation_mobilearsenal = false};
if (KP_liberation_ailogistics == 1) then {KP_liberation_ailogistics = true} else {KP_liberation_ailogistics = false};
if (KP_liberation_ace == 1) then {KP_liberation_ace = true} else {KP_liberation_ace = false};
if (KP_liberation_debug == 1) then {KP_liberation_debug = true} else {KP_liberation_debug = false};
if (KP_liberation_cr_param_buildings == 1) then {KP_liberation_cr_param_buildings = true} else {KP_liberation_cr_param_buildings = false};
// Fix for not working float values in mission params

View File

@ -1,8 +1,8 @@
private [ "_vehicle_to_spawn" ];
_vehicle_to_spawn = opfor_vehicles call BIS_fnc_selectRandom;
_vehicle_to_spawn = selectRandom opfor_vehicles;
if ( combat_readiness < 35 ) then {
_vehicle_to_spawn = opfor_vehicles_low_intensity call BIS_fnc_selectRandom;
_vehicle_to_spawn = selectRandom opfor_vehicles_low_intensity;
};
_vehicle_to_spawn;

View File

@ -1,8 +1,12 @@
params ["_msgType",["_data",[]]];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] penaltyMsg calles on: %1 - Parameters: [%2, %3]", debug_source, _msgType, _data];_text remoteExec ["diag_log",2];};
switch (_msgType) do {
case 0: {systemChat localize "STR_CR_VEHICLEMSG";};
case 1: {systemChat (format [localize "STR_CR_BUILDINGMSG", (_data select 0)]);};
case 2: {systemChat (format [localize "STR_CR_KILLMSG", (_data select 0)]);};
default {private _text = format ["[KP LIBERATION] [ERROR] [CIVREP] penaltyMsg without valid msgType"];_text remoteExec ["diag_log",2];};
};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] penaltyMsg finished on: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -5,8 +5,8 @@ if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG]
_grp = createGroup GRLIB_side_enemy;
_vehcrew = [];
while { count units _grp < 3 } do {
( militia_squad call BIS_fnc_selectRandom ) createUnit [ getpos _vehicle, _grp,'this addMPEventHandler [''MPKilled'', {_this spawn kill_manager}]', 0.5, 'private'];
while {count units _grp < 3} do {
(selectRandom militia_squad) createUnit [getpos _vehicle, _grp,'this addMPEventHandler [''MPKilled'', {_this spawn kill_manager}]', 0.5, 'private'];
};
((units _grp) select 0) moveInDriver _vehicle;
((units _grp) select 1) moveInGunner _vehicle;

View File

@ -14,7 +14,7 @@ if ( _infsquad == "militia" ) then {
if ( _building_ai_max > floor ((count _buildingpositions) * GRLIB_defended_buildingpos_part)) then { _building_ai_max = floor ((count _buildingpositions) * GRLIB_defended_buildingpos_part)};
_squadtospawnnn = [];
while { (count _squadtospawnnn) < _building_ai_max } do { _squadtospawnnn pushback ( _infsquad_classnames call BIS_fnc_selectRandom ); };
while {(count _squadtospawnnn) < _building_ai_max} do {_squadtospawnnn pushback (selectRandom _infsquad_classnames);};
_position_indexes = [];
_position_count = count _buildingpositions;
@ -36,7 +36,7 @@ _idxposit = 0;
[ _nextunit, _sector ] spawn building_defence_ai;
if ( _infsquad == "militia" ) then {
if ( (typeof _nextunit) in original_resistance ) then {
[ _nextunit ] spawn ( militia_standard_squad call BIS_fnc_selectRandom );
[ _nextunit ] spawn (selectRandom militia_standard_squad);
if ( random 100 < 40 ) then {
_nextunit addPrimaryWeaponItem "acc_flashlight";
};

File diff suppressed because it is too large Load Diff

View File

@ -148,4 +148,13 @@ class CfgNotifications {
color[] = { 1, 1, 0, 1 };
sound = "taskCanceled";
};
class lib_civ_informant_start : lib_intel {
description = $STR_NOTIFICATION_CIV_INFORMANT_START;
};
class lib_civ_informant_success : lib_intel {
description = $STR_NOTIFICATION_CIV_INFORMANT_SUCCESS;
};
class lib_civ_informant_fail : lib_intel {
description = $STR_NOTIFICATION_CIV_INFORMANT_FAIL;
};
};

View File

@ -287,12 +287,6 @@ class Params
texts[] = { $STR_WHITELIST_ENABLED, $STR_PARAMS_DISABLED };
default = 0;
};
class DebugEnable {
title = $STR_PARAMS_DEBUG_ENABLE;
values[] = { 0, 1 };
texts[] = { $STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED };
default = 0;
};
class ServerRestart {
title = $STR_RESTART_PARAM;
values[] = {0,1,2,3,4,5,6};
@ -311,4 +305,34 @@ class Params
texts[] = {$STR_WIPE_NO,$STR_WIPE_YES};
default = 0;
};
class Spacer4 {
title = "";
values[] = {""};
texts[] = {""};
default = "";
};
class DebugOptions {
title = $STR_PARAMS_DEBUGOPTIONS;
values[] = {""};
texts[] = {""};
default = "";
};
class DebugCivInfo {
title = $STR_PARAMS_DEBUG_CIVINFO;
values[] = {0, 1};
texts[] = {$STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED};
default = 0;
};
class DebugCivRep {
title = $STR_PARAMS_DEBUG_CIVREP;
values[] = {0, 1};
texts[] = {$STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED};
default = 0;
};
class DebugSave {
title = $STR_PARAMS_DEBUG_SAVE;
values[] = {0, 1};
texts[] = {$STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED};
default = 0;
};
};

View File

@ -174,6 +174,8 @@ class Missions
* Added: Mission parameter to choose building penalty for damaged or only destroyed buildings.
* Added: Reputation gain for liberated sectors.
* Added: Automatic server restart script for dedicated servers. Thanks to [k4s0](https://github.com/k4s0)
* Added: Settings in the mission parameters for particular debug messages.
* Added: Civil informant can rarely spawn in blufor sectors, when reputation is high enough.
* Removed: Liberation skill handling of AI units, as BI do this good enough now concerning wounds, etc.
* Removed: Vehicle explosion chance script for convoy ambush.
* Tweaked: Terrain aligment will be persistent during repeat building of objects (like walls). Thanks to [veteran29](https://github.com/veteran29)
@ -185,6 +187,7 @@ class Missions
* Tweaked: Captured enemy vehicles are now also listed in the commanders zeus interface.
* Tweaked: Cities won't be able to produce resources anymore.
* Tweaked: IED count in cities, capitals and factories is now dependend on the civil reputation.
* Tweaked: Corrected some strings in the stringtable.
* Fixed: Player got custom recoil and aiming coefficients on respawn.
* Fixed: Rare script error on closing respawn screen directly after joining the mission.
* Fixed: Players could deploy multiple FOBs when they selected deploy fast enough on the same container.