Debug Console Commands for Devs - official-antistasi-community/A3-Antistasi GitHub Wiki
Following is an unsorted collection of debug console commands that usually are not or should not be used by admins and players on live servers.
Nearest Marker
Run as local. Prints nearest marker in a hint on screen.
["Nearest Marker", format ["%1",([markersX, player] call BIS_fnc_nearestPosition)]] call A3A_fnc_customHint;
Display Markername
Run as Local. Changes all markernames to their variable names.
{
_mrk = format ["Dum%1", _x];
_mrk setMarkerTextLocal _x;
} forEach (outposts + seaports + airportsX + resourcesX + factories);
Start an attack
Run as server. Will start the process of selecting a target for an attack and attacking it for the given side (side can be Invaders or Occupants). This might result in the other side counterattack and take something or four smaller attacks instead of one big attack mission.
[side] spawn A3A_fnc_rebelAttack;
Start an attack (3.0.0)
Run as server. Will start the process of selecting a target for an attack and attacking it for the given side (side can be Invaders or Occupants). Possible attacks include major (waved) attacks, HQ attacks (if the rebel HQ has been detected), punishments and supply convoys.
[side] spawn A3A_fnc_chooseAttack;
Create a support (3.0.0)
Run as server. Create support (or change target of idle support) of a specified type.
[type, side, caller, maxSpend, target, targPos, reveal, delay] spawn A3A_fnc_createSupport;
type: The type of support to send (eg. "QRFLAND", "MORTAR", "CAS", see initSupports).
side: The side of the support (Occupants, Invaders).
caller: Resource pool to use ("attack", "defence").
maxSpend: Maximum resources to spend, mostly used for sizing QRFs. For a full size QRF use 1000.
target: The target object of the support. objNull is valid for AREA. false creates with no target (for TARGET).
targPos: Target position of the support (eg. getPosATL player).
reveal: Amount of info to reveal to rebels, 0 low, 1 high.
delay: Optional, setup delay time in seconds, otherwise will calculate based on war tier.
Spawn loot box
Run as local. Spawns a loaded, loading enabled, loot box the same way they spawn in outposts.
// Select these factions: A3A_faction_occ, A3A_faction_inv, A3A_faction_reb, A3A_faction_civ
private _faction = A3A_faction_occ;
private _boxX = (_faction get "ammobox")createVehicle getPos Player;
[_boxX] spawn A3A_fnc_fillLootCrate;
[_boxX] call A3A_fnc_logistics_addLoadAction;
JNL Position Grabber
Run as client. Finds the location on the model you are looking at, we use it for JNL hardpoint positions.
_ins = lineIntersectsSurfaces [
AGLToASL positionCameraToWorld [0,0,0],
AGLToASL positionCameraToWorld [0,0,1000],
player,objNull,true,1,"VIEW","NONE"
]; modelAttachPos = cursorObject worldToModel (ASLtoAGL ((_ins select 0) select 0)); glueModel = cursorObject; modelAttachPos;
[gettext (configfile >> "CfgVehicles" >> (typeOf glueModel) >> "model"), [0, modelAttachPos, [](/official-antistasi-community/A3-Antistasi/wiki/0,-modelAttachPos,-[)]];
Force spawn Missions
Run local. Spawns a Mission if allowed by current conditions. Marker/Locations is a String, its case-sensitive, use Markertext command or CitiesX to find Names.
Missions:
A3A_fnc_LOG_Ammo Ammotruck Outposts,
A3A_fnc_LOG_Salvage Seaports,
A3A_fnc_LOG_Supplies CitiesX,
A3A_fnc_AS_Official Airports,
A3A_fnc_AS_Traitor Towns,
A3A_fnc_CON_Outpost Outpost/Control Markers,
A3A_fnc_DES_Vehicle Airports,
A3A_fnc_RES_Prisoners Outposts,
A3A_fnc_RES_Refugees CitiesX,
[["Marker/Locations"],"Mission"] remoteExec ["A3A_fnc_scheduler",2]
Group Cleaner
Run as server. Changes the interval of the group cleaner function.
debug_cleanGroupDelay = 60;
City Data Extraction
A script that will return the Name, Civilian Count, type, position, and Size (x,y) in that order.
Usage: Copy & paste into A3 Debug console, run as local exec.
_outputData = [];
"(getText (_x >> ""type"") in [""NameCityCapital"", ""NameCity"", ""NameVillage"", ""CityCenter""]) &&
!(getText (_x >> ""Name"") isEqualTo """") &&
!((configName _x) in [""Lakatoro01"", ""Galili01"",""Sosovu01"", ""Ipota01"", ""Malden_C_Airport"", ""FobNauzad"", ""FobObeh"", ""22"", ""23"", ""toipela"", ""hirvela"", ""Kuusela"", ""Niemela""])"
configClasses (configfile >> "CfgWorlds" >> worldName >> "Names") apply {
_nameX = configName _x;
_sizeX = getNumber (_x >> "radiusA");
_sizeY = getNumber (_x >> "radiusB");
_size = [_sizeY, _sizeX] select (_sizeX > _sizeY);
_pos = getArray (_x >> "position");
_size = [_size, 400] select (_size < 400);
_type = getText (_x >> "type");
_numCiv = if (!isNull server) then {server getVariable _namex};
if (isNil "_numCiv" || {!(_numCiv isEqualType 0)}) then
{
_numCiv = (count (nearestObjects [_pos, ["house"], _size]));
};
_outputData pushBack [_namex, _numCiv, _type, _pos, _sizeX, _sizeY];
};
_outputData
Get antenna location
private _antennatypes = ["Land_TTowerBig_1_F", "Land_TTowerBig_2_F", "Land_Communication_F",
"Land_Vysilac_FM","Land_A_TVTower_base","Land_Telek1", "Land_vn_tower_signal_01"];
(nearestObjects [[worldSize /2, worldSize/2], _antennatypes, worldsize]) apply {getPos _x};
Show antenna connections
Visualizes which city/village is influenced by which antenna on the map like visible below.
private _fnc_drawLineMarker = {
params ["_pos1", "_pos2", "_name"];
private _mid = _pos1 vectorAdd _pos2 vectorMultiply 0.5;
deleteMarkerLocal _name;
private _lineMarker = createMarkerLocal [_name, _mid];
_lineMarker setMarkerShapeLocal "RECTANGLE";
_lineMarker setMarkerBrushLocal "SOLID";
_lineMarker setMarkerColorLocal "ColorBlack";
_lineMarker setMarkerDirLocal (_pos1 getDir _pos2);
_lineMarker setMarkerSizeLocal [25, _mid distance2d _pos1];
};
{
private _nearTower = [antennas+antennasDead, markerPos _x] call BIS_fnc_nearestPosition;
[markerPos _x, getPosATL _nearTower, "CtoR_"+_x] call _fnc_drawLineMarker;
} forEach citiesX;
Make an object a lootbox
Run as Global. Adds an object to the utilityHashMap to make it a lootcrate. Format is: Object classname, Price for buy menu, icon, icon, [flags]
A3A_utilityItemHM set [typeOf cursorObject, [typeOf cursorObject, 0, "lootbox", "gear", ["move", "loot"]]]
Init objects
Run as local. Runs the init code for the object.
[cursorObject] call A3A_fnc_initObject;
Create an object as a lootcrate
Run as local
[cursorObject, 99999] remoteExec ["setMaxLoad", 2];
[cursorObject] remoteExec ["A3A_fnc_initLootToCrate", 0, cursorObject]