Skip to content
Nicolás Badano edited this page Feb 13, 2015 · 61 revisions

AGM has a lot to offer for mission makers.

Table of contents

  1. Modules
  2. BlueForceTracking
  3. Check PBOs
  4. Explosive System
  5. Fatigue System (deprecated)
  6. Friendly Fire Messages
  7. Interaction
  8. Medical System
  9. Rallypoint System
  10. Repair System
  11. Respawn System
  12. SwitchUnits System
  13. LSD Vehicles
  14. Scripting functions
  15. Defining a unit as a medic
  16. Defining a unit as an EOD
  17. Defining a unit as a pilot
  18. Allowing objects to be draggable
  19. Adding custom options to interaction menus
  20. Replacing the setCaptive command
  21. Allowing AI units to fall unconcious
  22. Adding Logistic items to vehicles
  23. Handcuffing units
  24. ForceWalk
  25. Make a unit unconscious via script
  26. Mission Tools
  27. AGM Rally Points
  28. AGM SwitchUnits

1. Modules

1.1 BlueForceTracking

Part of: AGM_Map

When adding the "BlueForceTracking" module to your mission it adds map markers to every group on the players side and refreshes them in certain configurable interval (in seconds). The module takes the group type into account and uses the proper NATO icon for each marker.

Settings:

  1. Interval (Number)
    How often the markers should be refreshed (in seconds).
    Default value: 5
  2. Hide AI Groups (Boolean)
    Hide markers for "AI only" groups.
    Default value: No

1.2 Check PBOs

Part of: AGM_Core

If you are worried that players haven't updated AGM or other mods to the version you're using on the server, you can place the "Check PBOs" module on your map. You can choose one of three posible actions that are being executed when a player joins that has a wrong version of AGM or an other mod:

  • Warn once
  • Warn permanent
  • Kick

Settings:

  1. Action (Option)
    What to do with people who do not have the right PBOs.
    Default value: "Warn once"

  2. Check all addons (Boolean)
    Check all addons instead of only those of AGM?
    Default value: "No"

  3. Whitelist
    You can make a whitelist of addons that don't have to be on the server. If you want to use the "Check all addons" option of this module and allow the usage of client side modifications like Blastcore or JSRS, you have to list them here.
    The list must be in the following format: ["ADDON1","ADDON2",...] where the addons are CfgPatches references to all PBOs of the optional mod. To figure these out, you can use the scripting command activatedAddons in the editor while those mods are enabled.

Example 1: @Blastcore-A3:

["warfxpe","blastcore_vep"]

Example 2: @JSRS:

[TBD]

Example 3: @JSRS + @Blastcore-A3:

[TBD, "warfxpe","blastcore_vep"]

1.3 Explosive System

Part of: AGM_Explosive

The "Explosive System" module lets you tweak the settings for the new explosive system that AGM introduces.

Settings:

  1. Require explosive specialists? (Boolean)
    Require explosive specialists to disable explosives.
    Default value: No
  2. Punish non-specialists? (Boolean)
    Increase the time it takes to complete actions for non-specialists.
    Default value: Yes

1.4 Fatigue System (deprecated)

Warning: This module is deprecated and only in there not to break older missions that have used this module. It will be removed in a future update. It serves no purpose.

1.5 Friendly Fire Messages

Part of: AGM_Respawn

The "Friendly Fire Messages" module triggers a message when a player kills a friendly or civilian unit. This module isn't needed on servers with a low difficulty setting.

1.6 Interaction

Part of: AGM_Interaction

This module allows you to tweak the settings for player names tags.

Settings:

  1. Player Names View Distance (Number)
    Sets the distance (in meters) at which player name tags become visible.
    Default value: 5

1.7 Medical System

Part of: AGM_Medical

When using the medical system AGM offers you probably want to fine tune some aspects of the wounding, healing or gameplay mechanics and fit them to your needs. The "Medical System" module offers a lot of settings to do just that.

Settings:

  1. Bleeding Speed Coefficient (Number)
    Multiplier for the rate of bleeding.
    Default value: 1
  2. Pain Effect Coefficient (Number)
    Multiplier for the intensity of the pain effect (chromatic abberation).
    Default value: 1
  3. Max Unconscious Time (Number)
    Maximum time (in seconds) for a unit to be unconscious before dying. -1 disables this.
    Default value: -1
  4. Allow non-medics? (Boolean)
    This setting is used to allow non-medics to use epipens and bloodbags.
    Default value: No
  5. Punish non-medics? (Boolean)
    Increase the time it takes to complete actions for non-medics.
    Default value: Yes
  6. Require diagnosis? (Boolean)
    Require an unconscious patient to be diagnosed before allowing treatment.
    Default value: No
  7. Prevent instant death? (Boolean)
    Prevent instant death and always put players in unconscious state instead.
    Default value: No
  8. Prevent death while unconscious? (Boolean)
    Make unconscious units invulnerable.
    Default value: No
  9. Single Bandage (Boolean)
    Use one bandage to heal the entire body.
    Default value: No
  10. Unconscious can chat? (Boolean)
    Allow all players to use chat while unconcious? Admin can always use the chat regardless.
    Default value: No

1.8 Rallypoint System

Part of: AGM_Respawn

This module was introduced with 0.94 and enables Mission Makers to specificly enable units to move a rallypoint. Every unit that is synced with that module is able to move a rallypoint.

Note: It's important to mention that this doesn't work for player who join during a mission (JIP = Join in progress). That's something we can't change because that's the way Bohemia has implemented their module framework. To enable JIP players to move rally points have a look at 3.1 AGM Rallypoints.

1.9 Repair System

Part of: AGM_Logistics

Placing the "Repair System" module makes it possible to define the time it takes for certain repair actions.

Settings:

  1. Heavy Repair Time (Number)
    Time to repair engine/turret/body/fuel components (in seconds).
    Default value: 10
  2. Wheel Replace Time (Number)
    Time to replace a wheel (in seconds).
    Default value: 10
  3. Track Replace Time (Number)
    Time to replace a track (in seconds).
    Default value: 10
  4. Maximum Repaired Damage (Number)
    Limits the amount of damage that can be repaired. 0 = Repair all damage, 1 = Cannot repair any damage.
    Default value: 0

1.10 Respawn System

Part of: AGM_Respawn

The "Respawn System" module enables players to respawn with the gear they had before dying and to remove bodies of players after a configurable interval (in seconds).

Settings:

  1. Save Gear? (Boolean)
    Respawn with the gear a player had just before his death.
    Default value: No

1.11 SwitchUnits System

Part of: AGM_SwitchUnits

The SwitchUnits System enables players to control certain AI units on the map.

Settings:

  1. Switch To West? (Boolean)
    Allow switching to west units?
    Default value: No
  2. Switch To East? (Boolean)
    Allow switching to east units?
    Default value: No
  3. Switch To Independent? (Boolean)
    Allow switching to independent units?
    Default value: No
  4. Switch To Civilian? (Boolean)
    Allow switching to civilian units?
    Default value: No
  5. Enable Safe Zone? (Boolean)
    Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone.
    Default value: Yes
  6. Safe Zone Radius (Number)
    The safe zone around players from a different team (in meters)
    Default value: 200

1.12 LSD Vehicles

Part of: AGM_Core

And then there's the "LSD Vehicles" module … it does 'something' to all vehicles synced to that module. http://youtu.be/X3e0LTexEok


2. Scripting Functions

2.1 Defining a unit as a medic

You can also set individual units as medics by using the following init line:

this setVariable ["AGM_IsMedic", true];

You can also use this on vehicles, to turn them into medical vehicles.

2.2 Defining a unit as an EOD

You can set individual units as EOD by using the following init line:

this setVariable ["AGM_IsEOD", true];

2.3 Defining a unit as a pilot

You can define set the g-loc resistance setting for any given unit by using the following init line:

this setVariable ["AGM_GForceCoef", 0.75];

were 0.75 is the default value used for Arma3 pilot classes.

2.4 Allowing objects to be draggable

Put

[this, false] call AGM_Drag_fnc_makeDraggable;

on the init field of the object.

2.5 Adding custom options to interaction menus

It is possible to add your own actions to the Interaction and Self Interaction Menu.

Note: To decrease traffic in MP the conditions and statements used with AGM_Interaction_fnc_addInteraction should be compiled on every machine on mission start:

My_Condition = {...};
My_Script = {...};
...
if (isServer) then {
  [tank_A, "My action name", 10, "My_Condition", "My_Script", 0] call AGM_Interaction_fnc_addInteraction;
};

2.6 Replacing the setCaptive command

Q: I am told setCaptive is not working because of AGM. Is this true and what pbo do I need to remove to fix this?

A: Set captive is used in arma to prevent a unit from being shot at by the opposing faction. AGM, as other medical addons, needs it to ensure unconcious units are no longer attacked. To maintain compatibility between the different uses of the command, we have a special function to replace it on custom missions, which supports multiple simultaneous reasons for unit to be not shot at.

Instead of using the vanilla setCaptive command, use the AGM variant. Syntax: (e.g. Handcuffing)

// to handcuff
[this, "MyTag_Handcuffed", true] call AGM_Interaction_fnc_setCaptivityStatus;

// to uncuff
[this, "MyTag_Handcuffed", false] call AGM_Interaction_fnc_setCaptivityStatus;

// is this unit handcuffed?
_isHandcuffed = "MyTag_Handcuffed" in ([_unit] call AGM_Interaction_fnc_getCaptivityStatus);

Check this for more information: https://github.com/KoffeinFlummi/AGM/issues/542 (requires AGM v0.93)

2.7 Allowing AI units to fall unconcious

Unconciousness is usually always simulated on AGM for players; AI has a default 50/50% chance of falling unconscious/dying when knocked out. However, it is possible to enable 100% unconciousness chance for certain AI units setting the following variable on init field:

this setVariable ["AGM_AllowUnconscious", true];

This is useful for AI teammates in SP and VIPs in Coop MP missions. You can also force them to always die by setting:

this setVariable ["AGM_AllowUnconscious", false];

These task can be automated by using CBA InitPost EH. E.g., on description.ext:

class Extended_InitPost_EventHandlers {
  class CAManBase {
    class NoUnconsciousOnEast {
      init = "if (((side group (_this select 0)) == east) then {(_this select 0) setVariable ['AGM_AllowUnconscious', false]};";
    };
  };
};

which would prevent any soldier from the east side from going unconscious

2.8 Adding Logistic items to vehicles

It is possible to add more Logistic items (like jerry cans and spare parts) to a vehicle. To do so you need to use something like the following:

// _myVehicle is a reference to the vehicle object
_myVehicle spawn {
  private ["_item", "_i"];

  waitUntil {!isNil "AGM_Logistics_loadedItemsDummy"};

  // adds 4 spare wheels
  for "_i" from 0 to 3 do {
    _item = ['AGM_SpareWheel', [-1000, -1000, 100]] call AGM_Logistics_fnc_spawnObject;
    [_this, _item] call AGM_Logistics_fnc_initLoadedObject;
  };
  
  // adds 6 jerry cans
  for "_i" from 0 to 5 do {
    _item = ['AGM_JerryCan', [-1000, -1000, 100]] call AGM_Logistics_fnc_spawnObject;
    [_this, _item] call AGM_Logistics_fnc_initLoadedObject;
  };
};

2.9 Handcuffing units

If you want to handcuff units use the following script in the units init field.

if (isServer) then {
  [this, true, true] call AGM_Interaction_fnc_setCaptive;
};

2.10 ForceWalk

There are many sources that may want to make a unit to forceWalk. In order to avoid conflict, mission scripts should use AGM_Core_fnc_setForceWalkStatus. (requires AGM v0.95) e.g. from a unit's init field:

if (isServer) then {
  [this, "BrokenLeg", true] call AGM_Core_fnc_setForceWalkStatus;
};

2.11 Make a unit unconscious via script

_unit setVariable ["AGM_AllowUnconscious", true]; 
[_unit, 999999] call AGM_Medical_fnc_knockOut; 
_unit setDamage 0.5;

3. Mission Tools

3.1 AGM Rallypoints

Part of: AGM_Respawn

AGM Rallypoints is a two way teleport system between to positions. Usually this is used to transport units that have died during a mission back to the front line. The rallypoints are portrayed by flagpoles (West, East and Independant flagpoles are available) that have a "Base" and an "Exit" version.

They can be found in the editor under: "Empty" >> "AGM Respawn"

Classnames:

  • AGM_Rallypoint_West, AGM_RallypointExit_West
  • AGM_Rallypoint_East, AGM_RallypointExit_East
  • AGM_Rallypoint_Independent, AGM_RallypointExit_Independent

Using the Interaction Menu on a rallypoint offers the ability to teleport from one flagpole to the other flagpole and vice versa.

If you want to change the texture of the flag use this line:

this setFlagTexture 'path\to\my\texture\my_awesome_clan_logo.paa';

Note: You can't place more than one rallypoint of the same type.

All units synced to the "Rallypoint System" module are able to move the rallypoint.

To enable other units to move them add this to the unit's initialization code:

_unit setVariable ["AGM_canMoveRallypoint", true, true];

3.2 AGM SwitchUnits

Part of: AGM_SwitchUnits

AGM SwitchUnits is a tool for misson makers to quickly add PvP (Player vs. Player) elements to a mission. In short it enables a player to control AI units. Allowing players to perform as enemies even during a COOP mission increases the authenticity of the enemy and thus the immersion for everyone.

The most prominent feature of AGM SwitchUnits is that you can add it to nearly every existing mission and get AI control out of the box. Dynamic mission like "Enemy Assault", "Patrol Ops", "Invade & Annex", etc. don't need to be touched to make all random spawned AI's controllable.

With release 0.95 you're able to switch to infantry (vehicles, etc... are planned) from all four sides (west, east, independent, civilian).

To enable a player to control AI add the following to its init line:

this setVariable ["AGM_CanSwitchUnits", true];

Once this player spawns, all controllable AI will be marked on his map and he'll be able to click on the map to switch to this unit. The initial unit will be prone to damage, but has no equipment and can't run. So it would be wise to hide or move this unit far from other players.

The module settings define which side a player can control or how big the radius of the safe zone is. The safe zone is a circular zone around AI units that must be clear from players of an opposing side to be able to switch to.