Difference between revisions of "Custom Blacklists"

From ALiVE Wiki
Jump to: navigation, search
Line 119: Line 119:
  
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
ALIVE_autoGeneratedTasks = ["MilDefence","CivAssault","Assassination","TransportInsertion","DestroyVehicles","DestroyInfantry","SabotageBuilding","InsurgencyPatrol","InsurgencyDestroyAssets"];
+
ALIVE_autoGeneratedTasks = ["MilDefence","CivAssault","Assassination","TransportInsertion","DestroyVehicles","DestroyInfantry","SabotageBuilding","InsurgencyPatrol","InsurgencyDestroyAssets","Rescue","CSAR"];
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
See here for forum post with more info:
 
See here for forum post with more info:
 
http://alivemod.com/forum/1226-auto-generated-task-editing/
 
http://alivemod.com/forum/1226-auto-generated-task-editing/

Revision as of 05:17, 4 November 2016

ALiVE already has a blacklist of units, groups and buildings that have no business being in a military environment. Mission editors can choose to blacklist additional items using the variables below. The variables can be entered in any module init field, such as ALiVE (Required).

Note that to completely remove things like AA from your mission, you will need to blacklist all AA units, vehicles and any Groups that have those classes as well.


Syntax:

ALIVE_MODULE_BLACKLIST = ["classname","classname"];


Variables

ALiVE_MIL_CQB_CUSTOM_STRATEGICHOUSES - Define your custom strategic house classes for CQB (rest will be regular houses).

ALiVE_MIL_CQB_CUSTOM_UNITBLACKLIST - Exclude unit classes from CQB

ALiVE_PLACEMENT_CUSTOM_UNITBLACKLIST - Exclude unit classes from Military Placement spawns

ALiVE_PLACEMENT_CUSTOM_VEHICLEBLACKLIST - Exclude vehicle classes from Military Placement spawns

ALiVE_PLACEMENT_CUSTOM_GROUPBLACKLIST - Exclude group classes from Military Placement spawns


Example (Note that classnames here are subject to change)


To blacklist all AA units in vanilla (NATO CSAT)

ALiVE_PLACEMENT_CUSTOM_GROUPBLACKLIST = ["OIA_InfTeam_AA","OIA_MotInf_AA","OIA_MechInf_AA","OIA_TankPlatoon_AA","ORG_InfTeam_AA"];
 
ALiVE_PLACEMENT_CUSTOM_VEHICLEBLACKLIST = ["I_Plane_Fighter_03_AA_F","B_APC_Tracked_01_AA_F","O_APC_Tracked_02_AA_F","AA_01_base_F","B_static_
AA_F","O_static_AA_F","I_static_AA_F","B_AA_01_weapon_F","O_AA_01_weapon_F","I_AA_01_weapon_F"];
 
ALiVE_PLACEMENT_CUSTOM_UNITBLACKLIST = ["B_soldier_AA_F","B_soldier_AAA_F","I_Soldier_AA_F","I_Soldier_AAA_F","O_Soldier_AA_F","O_Soldier_AAA_F","O_soldierU_AA_F","O_soldierU_AAA_F"];
 
ALiVE_MIL_CQB_CUSTOM_UNITBLACKLIST = ["B_soldier_AA_F","B_soldier_AAA_F","I_Soldier_AA_F","I_Soldier_AAA_F","O_Soldier_AA_F","O_Soldier_AAA_F","O_soldierU_AA_F","O_soldierU_AAA_F"];


To blacklist all AA units from CUP units:

ALiVE_MIL_CQB_CUSTOM_UNITBLACKLIST = ["CUP_O_TK_Soldier_AA","CUP_O_TK_INS_Soldier_AA","CUP_O_TK_InfantrySectionAA","CUP_O_TK_MILITIA_AATeam"]; 
ALiVE_PLACEMENT_CUSTOM_UNITBLACKLIST = ["CUP_O_TK_Soldier_AA","CUP_O_TK_INS_Soldier_AA"]; 
ALiVE_PLACEMENT_CUSTOM_GROUPBLACKLIST = ["CUP_O_TK_InfantrySectionAA","CUP_O_TK_MILITIA_AATeam"];


2 new functions to help you find units/vehicles/groups more easily:

_groupTypes = ["AA_" (string to searchfor), INDEPENDENT (side or faction)] call ALiVE_fnc_groupFinder;
_objectTypes = [configFile >> "cfgVehicles" (config path), "_AA" (string to searchfor)] call ALiVE_fnc_configFindEntries;

those arrays can basically be easily read and copy-pasted to whatever blacklist you like.


It is possible to overwrite parts of the staticdata.sqf directly (see the Discussion page for more info). The following example is for overriding the military logistics vehicles.

Add the following line to Init.sqf
call compile preprocessFile "staticData.sqf";

Create a file called staticData.sqf and add the following contents

if (!isServer) exitWith {};
 
waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};
 
/*
 * Mil logistics convoy transport vehicles per faction
 */
 
[ALIVE_factionDefaultTransport, "OPF_F", ["O_Truck_02_transport_F","O_Truck_02_covered_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultTransport, "OPF_G_F", ["O_G_Van_01_transport_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultTransport, "IND_F", ["I_Truck_02_covered_F","I_Truck_02_transport_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultTransport, "BLU_F", ["B_Truck_01_transport_F","B_Truck_01_covered_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultTransport, "BLU_G_F", ["B_G_Van_01_transport_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultTransport, "CIV_F", ["C_Van_01_transport_F"]] call ALIVE_fnc_hashSet;
 
/*
 * Mil logistics air transport vehicles per faction
 */
 
[ALIVE_factionDefaultAirTransport, "OPF_F", ["O_Heli_Attack_02_F","O_Heli_Light_02_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultAirTransport, "OPF_G_F", ["I_Heli_light_03_unarmed_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultAirTransport, "IND_F", ["I_Heli_light_03_unarmed_F","I_Heli_Transport_02_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultAirTransport, "BLU_F", ["B_Heli_Transport_01_camo_F","B_Heli_Transport_01_camo_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultAirTransport, "BLU_G_F", ["I_Heli_light_03_unarmed_F"]] call ALIVE_fnc_hashSet;
[ALIVE_factionDefaultAirTransport, "CIV_F", []] call ALIVE_fnc_hashSet;


C2ISTAR Task Blacklists

To blacklist certain tasks assigned by the C2ISTAR module:

staticData.sqf should be a file you create in the root of your mission folder

init.sqf

execVM "staticData.sqf"; staticData.sqf

waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};
ALIVE_autoGeneratedTasks = ["MilAssault","MilDefence","CivAssault","Assassination","TransportInsertion","DestroyVehicles","DestroyInfantry","SabotageBuilding","InsurgencyPatrol","InsurgencyDestroyAssets"];

Remove an entry from the array to stop that task from being generated.

For example, removing MilAssault (first entry) would look like

ALIVE_autoGeneratedTasks = ["MilDefence","CivAssault","Assassination","TransportInsertion","DestroyVehicles","DestroyInfantry","SabotageBuilding","InsurgencyPatrol","InsurgencyDestroyAssets","Rescue","CSAR"];

See here for forum post with more info: http://alivemod.com/forum/1226-auto-generated-task-editing/