ALiVE Commands And Settings (A Continual WIP) - 7Cav/7Cav-Alive GitHub Wiki
ALiVE Scripted Functionalities
Functionalities taken from the corresponding wiki pages. Using the Extended Debug Console, input these scripts and modify them as necessary to have the listed affects.
http://alivemod.com/wiki/index.php/Script_Snippets
Pausing ALiVE
Use the following code on the server to pause and un pause modules completely. Pausing "ALIVE_SYS_PROFILE"
will stop all simulation of profiles, and prevent spawning / despawning. Pausing OPCOM will stop OPCOM from issuing orders and running battlefield analysis. Pausing civ_population will stop all civilian AI commands and prevent spawning / despawning.
- opf_comm_sp_air
- gren_comm_sp_air
- opf_comm_sp_specop
["opf_comm_sp_air","gren_comm_sp_air"] call ALiVE_fnc_pauseModule;
["opf_comm_sp_air","gren_comm_sp_air"] call ALiVE_fnc_unPauseModule;
Adjust Logistics Force Pool (Currently Disabled)
Military Logistics and the Player Resupply module both work from the Global Force Pool to establish the allowed reinforcement levels for a faction. You can adjust this value on the fly in your own missions to add or remove from the global force pool. If running on a dedicated server, this must be performed on the server side only.
[ALIVE_globalForcePool,"BLU_F",20] call ALIVE_fnc_hashSet;
Adjust Force Size After ALiVE is Initialized
Specify side and number of each group/profile type. Fire the code via script, trigger etc and the OPCOM will now have force cap set to those values and bring in "replacements" to get up to strength.
{
private _side = [_x, "side", ""] call ALIVE_fnc_hashGet;
if (_side == "WEST") then {
[
_x,
"startForceStrength",
[
0, // Infantry
0, // Motorized
0, // Mechanized
0, // Armored
0, // Artillery
0, // AAA
0, // Air
0 // Sea
]
] call ALIVE_fnc_hashSet;
};
} forEach OPCOM_INSTANCES;
Adding CAS units post-init
_type : The type of combat support, can be "CAS","TRANSPORT","ARTILLERY"
_settings: Array of settings
0: Position of vehicle
1: Direction of vehicle
2: Classname of vehicle
3: Callsign of vehicle (string)
4: Code to be ran on vehicle spawn
5: Height of vehicle
[_type,_settings] call ALiVE_fnc_CombatSupportAdd;
["CAS OR TRANSPORT",[SPAWN POS],Direction, "CLASS","CALLSIGN","CODE","HEIGHT"]] Call ALiVE_fnc_combatSupportAdd;
["TRANSPORT",[1849.21,5805.27,0],60,"B_Heli_Transport_01_camo_F","VICTOR 1","",""](/7Cav/7Cav-Alive/wiki/1849.21,5805.27,0],60,"B_Heli_Transport_01_camo_F","VICTOR-1","","") Call ALiVE_fnc_combatSupportAdd;
Removing CAS units post-init
[_side,_type,_callsign] call ALiVE_fnc_combatSupportRemove;
["WEST","CAS","EAGLE ONE"] call ALiVE_fnc_combatSupportRemove;
["WEST","TRANSPORT","VICTOR 1"] Call ALiVE_fnc_combatSupportRemove;
Add a Custom OPCOM Objective
This will register a position as an objective to all OPCOMs in the current mission.
- _id (String);
- _position (Array);
- _size (Integer);
- _type (String of "MIL" or "CIV");
- _priority (Integer);
if (isServer) then {
{
[_x, "addObjective", ["OPCOM_custom_1", [25657.2, 22175.8, 0.00129318], 100, "MIL", 200]] call ALiVE_fnc_OPCOM;
}
foreach OPCOM_INSTANCES
};
Jump To The Action!
ALiVE_fnc_JoinNearestGroup
will select the most important objective that is currently being attacked/defended by your forces and join you to an AI group that is on an assault or defend mission. This will send you directly into the action! Execute the function locally on any player client. Possible params are "attacking" or "defending".
[player,"attacking"] call ALiVE_fnc_OPCOMjoinNearestGroup
ALiVE_fnc_OPCOMJoinObjective
will display all objectives that are currently being attacked/defended, lets you select the objective of choice and HALO drops your group to an AI group that is currently ordered to assault/defend this objective! Execute the function locally on any player client. Possible params are "attacking" or "defending".
[player,"attacking"] call ALiVE_fnc_OPCOMjoinObjective
Example: put in the Init field of a unit or object in editor
this addAction ["Select Assault Mission",{[_this select 1,"attacking"] call ALiVE_fnc_OPCOMJoinObjective},[],1,false,true,"","true"];
Add Custom Roadblock to Civ placement
Define your custom roadblocks at init on the server:
ALIVE_compositions_roadblocks = ["YOUR_ROADBLOCK_CLASS1","YOUR_ROADBLOCK_CLASS2",etc];
Disable VCOM_AI
Globally disable VCOM_AI for units including Combat Support and Logistics
(group this) setVariable ["Vcm_Disable",true];