Skip to content

gerard-sog/arma3-macvsog-columbia-scripts

Repository files navigation

Arma 3 S.O.G. RT Columbia

Compilation of scripts used during multiplayer PVE/PVP mission on Arma 3. Also featuring defaults loadouts and missions as well as providing CBA settings in order to easily update the scripts to your convenience.

Table of contents

Requirements

Installation

Installation of all the scripts/zeus modules is done by copying the below files and folder directly into your mission folder where your "mission.sqm" file is located (ex: C:\Users<user_name>\Documents\Arma 3 - Other Profiles<profile_name>\missions\KheSanhMission01.vn_khe_sanh).

Default values

Zeus modules

  • A - COLSOG AI
    • Set AI Skills: define sub-skills of AI.
    • Toggle Trackers: manage Tracker module (behaviour, speed, presence).
    • Un-Garrison (enable PATH): make a unit/group move out of building.
  • A - COLSOG Env
    • Day/Night Cycle: allows to have day of X hours, dusk of Y hours and night of Z hours.
    • Fog Low
    • Fog Ring
    • Transition Time: transition with optional text to whenever in time.
    • Vanilla Fog: manage fog.
  • A - COLSOG Radio
    • Init PF77s: add 3 new racks to vehicle (requires player to get in/exit vehicle before executing module on vehicle).
    • NVA radio chatter: enables to make tape-recorder object produce vietnamese radio like voice (used to simulate wire taping).
    • Toggle CAS: manage CAS asset available in the Radio Support module.
  • A - COLSOG Vehicle
    • Add STABO: add the ability to deploy a rope from a helicopter to allow player on the ground to get into the helicopter.
    • Add Crew management: add the ability for the pilot of a helicopter to request AI crew members (door gunners).
    • Conceal AA: conceal static gun with a shelter.
    • Create supply box: create a supply box with customizable content.
  • A - COLSOG Punji Traps
    • Fall Trap: create mace with punji sticks falling from a tree above trap wire.
    • Swing Trap: create mace with punji sticks swinging from a tree towards the trap wire.
  • A - COLSOG Intel
    • Update Intel: Update array of intel during a mission.

see init_colsog_zeus.sqf

CBA Settings

In the Addons configuration menu, you will have the ability to update the following values on the fly:

  • Vanilla medical items conversion to ace medical items

    • Medikit
      • field dressing: Integer
      • saline IV 500: Integer
      • epinephrine: Integer
      • morphine: Integer
      • tourniquet: Integer
      • split: Integer
    • First Aid:
      • field dression: Integer
      • morphine: Integer
  • AI skills

    • enable: Boolean
    • general: Float
    • aiming accuracy: Float
    • aiming speed: Float
    • aiming shake: Float
    • commanding: Float
    • courage: Float
    • spot distance: Float
    • sport time: Float
    • reload speed: Float
    • seek cover: Boolean
    • auto combat: Boolean
    • suppression: Boolean
  • Tracker module

    • enable: Boolean
    • Tracker module name: String
    • Default behaviour: ["Careless", "Safe", "Aware", "Combat"]
    • Default combat: ["Never fire", "Hold fire", "Hold fire, engage at will", "Fire at will", "Fire at will, loose formation"]
    • Default speed: ["Limited", "Normal", "Full"]
  • Support module

    • enable artillery: Boolean
    • enable helicopter: Boolean
    • enable jets: Boolean
    • enable arc light (B52): Boolean
    • enable daisy cutter: Boolean
  • STABO

    • Action duration in seconds: Integer
    • Rope length (m): Integer
  • AI Throwable

    • Throwable to Remove from AI: List<String> separated with , and no " required
  • Triangulation

    • Required ACRE radio: String
    • Items to detect: List<String> separated with , and no " required
    • Cool down in seconds: Integer
    • Requires ACRE spike 'vhf30108spike' nearby (10m away max): Boolean
    • Threshold distance for signal strength 1/5: Integer
    • Threshold distance for signal strength 2/5: Integer
    • Threshold distance for signal strength 3/5: Integer
    • Threshold distance for signal strength 4/5: Integer
    • Threshold distance for signal strength 5/5: Integer
  • Punji Mace Traps

    • Mace kill radius (m): Integer
    • Enable screams: Boolean
    • Side activating trap: ["BLUFOR", "OPFOR", "Independent", "Civilian", "Any player", "Any AI or player"]
  • Battery

    • PRC77 Battery capacity in seconds: Integer
    • Amount of radio calls before enemy detection: Integer
    • Item used as spare battery: List<String> separated with , and no " required
    • Groups impacted by enemy radio call detection: List<String> separated with , and no " required
  • Sensors - Gunshot

    • Inventory item to use: String
    • Thing item used as sensor: String
    • Transmit data over radio: Boolean
      • Player received diary record + audio bip by radio waves requires:
        this setvariable ["COLSOG_isListeningToSensor", true];
        
    • Radio transmission range (m): Integer
    • Sensor logging frequency (sec): Integer
  • Sensors - Engine

    • Inventory item to use: String
    • Thing item used as sensor: String
    • Transmit data over radio: Boolean
      • Player received diary record + audio bip by radio waves requires:
        this setvariable ["COLSOG_isListeningToSensor", true];
        
    • Radio transmission range (m): Integer
    • Sensor logging frequency (sec): Integer
  • Sensors - Gravity

    • Inventory item to use: String
    • Thing item used as sensor: String
    • Transmit data over radio: Boolean
      • Player received diary record + audio bip by radio waves requires:
        this setvariable ["COLSOG_isListeningToSensor", true];
        
    • Radio transmission range (m): Integer
    • Sensor logging frequency (sec): Integer
  • Intel

    • Intel object (inventory item): String
    • Chance of unit carrying intel (%): Integer
    • Chance of intel falling on ground (%): Integer
    • Requires trait 'COLSOG_intelExpert' to decrypt intel : Boolean
  • Climbing

    • Units allowed to climb trees: String
    • Required item to climb: String
    • Time to climb up (sec): Integer
    • Time to climb down (sec): Integer
  • Day & Night

    • Time before day considered as dawn (minutes): Integer
    • Dawn time acceleration: Integer
    • Day time acceleration: Integer
    • Time before night considered as dusk (minutes): Integer
    • Dusk time acceleration: Integer
    • Night time acceleration: Integer

Features

Gameplay

1. Radio Support

Allow Radio Support based on trait

Radio support from the Prairie Fire CDLC is available in a mission if all of the below points are true for a player: - Radio Support module is present in the mission - The player has the following radio (should only be the case for RTO if no Covey in a mission):
"vn_b_pack_lw_06"
  • Or if the player is flying one of the aircraft in the list:

    "JK_B_Cessna_T41_Armed_F", 
    "vnx_b_air_ac119_01_01", 
    "vn_b_air_ch34_03_01", 
    "vn_b_air_ch34_03_01", 
    "vn_b_air_ch34_04_01", 
    "vn_b_air_ch34_04_02", 
    "vn_b_air_oh6a_04"
    
  • (IF unit_trait_required = 1 in description.ext) Player has the below code in its 'init' section

    this setUnitTrait["vn_artillery", true, true];
    
  • All this can be modified in the vn_artillery_settings class in artillery.hpp

Enable/Disable Radio Support

We created a custom Zeus module to manage the availability of various supports (by default, none are available): - artillery availability - CAS (helicopter) availability - CAS (jet) availability - B-52 Arc Light strike availability - Daisy Cutter availability

Here is how we emulate FOB with artillery support capabilities. By this we mean that the FOB can provide artillery support within a perimeter (it will be 3.5km in our example).

  • To do so, we use a public variable called 'SUPPORT_ENABLED' defined in initServer.sqf and it is used as the condition in artillery.hpp.

    SUPPORT_ENABLED = true; // Used with the artillery support from Prairie Fire. By default condition on artillery strike will be true thanks to this public variable.
    publicVariable "SUPPORT_ENABLED";
    
  • then add a trigger that updates that variable (see example below).

    • Condition:
      this
      
    • On Activation:
      SUPPORT_ENABLED = true; 
      publicVariable "SUPPORT_ENABLED";
      
    • On Deactivation:
      SUPPORT_ENABLED = false; 
      publicVariable "SUPPORT_ENABLED";
      
2. Punji mace traps

Credits

- **Johnnyboy** for original implementation of mace trap that my scripts are based on. - **Savage Game Design** for the objects and sound files used by this script.

HOW TO ADD THESE TRAPS TO YOUR MISSION

1. Place a Whip Trap object in the editor. The direction you set the trap will be the direction the mace will swinging. 2. In the Whip Trap object's init field, put the following code:
[[this, 'WEST'], "functions\traps\swinging\colsog_fn_createSwingingMaceTrap.sqf"] remoteExec ["execVM", 0, true];

or

[[this, _trapHeight, _treeType], "functions\traps\falling\colsog_fn_createFallingMaceTrap.sqf"] remoteExec ["execVM", 0, true];
  • _trapHeight: Integer (default 0, will allow the height to be automatically managed depending on _treeType)
  • _treeType: Integer
    • 0: no tree.
    • 1: "\vn\vn_vegetation_f_exp\tree\vn_t_ficus_big_f.p3d"
    • 2: "\vn\vn_vegetation_f_exp\tree\vn_t_inocarpus_f.p3d"
    • 3: "vn\vn_vegetation_f_exp\tree\vn_t_palaquium_f.p3d"
3. ACRE2

Babel

Babel configuration present in:

Key to change languages: 'Right Alt'

We are using Babel to provide the following behaviour during our MACVSOG missions:

  • Have the MACVSOG team able to talk and understand each other (using English)

  • Have some members of the MACVSOG team that could speak and understand Vietnamese (be used as translator) by adding the below line in the 'init' section of the playable unit

    this setVariable ["f_languages",["en", "vn"]];
    
  • Have the Zeus player speak Vietnamese when controlling an OPFOR unit. This makes the dialog between OPFOR and MACVSOG team possible only via the members speaking English and Vietnamese.

Adding PRC77 Racks to vehicle

Here are the steps to follow if you want to add 3 news acre radio racks to a vehicle:

  • Place a vehicle in the editor or during a mission
  • During the mission a player/zeus must enter the plane once in order to initialize ACRE radios in the plane
  • Use the zeus module implemented in colsog_zeus_initPf77Rack.sqf and click on the vehicle
  • The vehicle will now have 3 more racks of PRC77 radios:
    • A2A
    • A2G
    • HQ
4. Tracker module We created a custom Zeus module to manage the AI trackers spawned by the tracker module. To use that module, the tracker module placed in the Eden editor needs to have the below name:
TrackermoduleNAME

and the below code in its 'Run condition' section.

COLSOG_TrackersEnabled

By default:

  • tracker module is disabled
  • tracker behaviour is set as "CARELESS", "BLUE", "LIMITED".
5. Disable mine detector panel For immersion purposes, we removed the HUD for mine detector.

see: minedetector_disable_panel.sqf

6. Remove throwables from OPFOR AI We removed the below items for OPFOR AIs:
"vn_rdg2_mag", 
"vn_molotov_grenade_mag"]

see init_colsog_removeThrowables.sqf

7. Convert AI medikit/First aid kit to ace medical At the death of a unit (AI/Player):
  • Medikit are converted to:

    20x "ACE_fieldDressing"
    2x "ACE_salineIV_500"
    2x "ACE_epinephrine"
    2x "ACE_morphine"
    4x "ACE_tourniquet"
    2x "ACE_splint"
    
  • FirstAidKit are converted to:

    5x "ACE_fieldDressing"
    1x "ACE_morphine"
    

see colsog_fn_firstAidConvertAce.sqf

8. Add 'STABO' action on chopper in Eden Editor

Adds the ability to any player in the vehicle to drop/detach the STABO rig.

Place the below lines of code into the 'init' section of the vehicle.

this setVariable ["COLSOG_staboRopeDeployed", false, true]; 
this addAction 
[ 
    "<t color='#FF0000'>Drop the STABO rig</t>", 
    "functions\stabo\colsog_fn_dropStabo.sqf", 
    nil, 
    0, 
    true, 
    true, 
    "", 
    "(_this in _target) AND !(_target getVariable 'COLSOG_staboRopeDeployed')", 
    50, 
    false, 
    "", 
    "" 
]; 
this addAction 
[ 
    "<t color='#FF0000'>Detach ropes</t>", 
    "functions\stabo\colsog_fn_detatchRopes.sqf", 
    nil, 
    0, 
    true, 
    true, 
    "", 
    "(_this in _target) AND (_target getVariable 'COLSOG_staboRopeDeployed')", 
    50, 
    false, 
    "", 
    "" 
];
9. Add 'request crew' action on chopper in Eden Editor

Adds the ability to the pilot in the vehicle to request AI door gunners (crew) if:

  • helicopter is touching the ground AND
  • engine is off

(Crew can only be added once).

Place the below lines of code into the 'init' section of the vehicle.

this setVariable ["COLSOG_HasCrew", false, true]; 
this addAction 
[ 
    "<t color='#FFFF00'>Request crew</t>", 
    "functions\crew\colsog_fn_addCrew.sqf", 
    nil, 
    0, 
    true, 
    true, 
    "", 
    "(_this in _target) AND (driver _target isEqualTo _this) AND (isTouchingGround _target) AND !(isEngineOn _target) AND !(_target getVariable 'COLSOG_HasCrew')", 
    50, 
    false, 
    "", 
    "" 
];
this addAction 
[ 
    "<t color='#FFFF00'>Remove crew</t>", 
    "functions\crew\colsog_fn_deleteCrew.sqf", 
    nil, 
    0, 
    true, 
    true, 
    "", 
    "(_this in _target) AND (driver _target isEqualTo _this) AND (isTouchingGround _target) AND !(isEngineOn _target) AND (_target getVariable 'COLSOG_HasCrew')", 
    50, 
    false, 
    "", 
    "" 
];
10. Radio battery/power management

Now the RTO will need to carry batteries for his radio. Currently managed ACRE radio:

  • PRC77

You will have two new action under 'ace equipment' interaction:

  • "Show battery level": If you have one of the above radio types in your inventory.
  • "Add new battery": If you have one of the above radio types and a battery item in your inventory.

If your battery is EMPTY, the radio will be turned OFF and once a new battery has been added it will be turned ON again automatically.

11. Triangulation

In order to triangulate enemy radios, you will need:

  • To set the frequency on the in the object (see 'Items to detect' in CBA setting to use other objects) the players will have to triangulate with the below code in the 'init' section of the object (ex: frequency set to 52.50).
this setVariable ["COLSOG_radioFrequency", 52.50, true]; 
  • The players will have to set the frequency of the PRC77 radio to the desired frequency (in this example 52.50) and then use the triangulate action in 'ace self-interact equipment' menu.

There is a timeout on the triangulation process (see 'Cool down in seconds' in CBA setting) after each execution.

12. Sensors
12.1. 'Gunshot' Sensor

See Addons settings to configure this sensor.

  • Detects:

    • When a gunshot is fired in its vicinity (maximum 70 meters).
    • When an OPFOR enters its 25 meters detection radius.
  • Stores Data:

    • Locally on the object and can be collect using the 'collect' action on the item. Will be save as diary entry.

    • Sends data over radio wave and player with bellow line of code will receive the diary record from distance (useful for pilots).

      this setvariable ["COLSOG_isListeningToSensor", true]; 
      
  • To place it in the Eden Editor, place the below line in the 'init' section fo the object:

    • 1st parameter: Object used as sensor, needs to be 'this'.
    • 2nd parameter: the ID given to the sensor (it will not update the sensor ID counter so ideally this value should be greater than 25 to avoid duplicate ID during your mission if players are expected to place sensors as well).
      [this, 25] execVM "functions\sensors\gunshot\fn_createGunshotSensor.sqf";
      
12.2. 'Engine' Sensor

See Addons settings to configure this sensor.

  • Detects:

    • When an OPFOR Vehicles enters its 50 meters detection radius.
  • Stores Data:

    • Locally on the object and can be collect using the 'collect' action on the item. Will be save as diary entry.

    • Sends data over radio wave and player with bellow line of code will receive the diary record from distance (useful for pilots).

      this setvariable ["COLSOG_isListeningToSensor", true]; 
      
  • To place it in the Eden Editor, place the below line in the 'init' section fo the object:

    • 1st parameter: Object used as sensor, needs to be 'this'.
    • 2nd parameter: the ID given to the sensor (it will not update the sensor ID counter so ideally this value should be greater than 25 to avoid duplicate ID during your mission if players are expected to place sensors as well).
      [this, 26] execVM "functions\sensors\engine\fn_createEngineSensor.sqf";
      
12.3. 'Gravity' Sensor

Same as 'Gunshot' Sensor but can only be thrown from a helicopter/plane. The sensor will activate after 30 seconds in order to give it time to land on the ground.

13. Intel on body

Now, when a unit is killed, there is a chance that the unit will be carrying intel. And there is also a chance that the intel falls from his pocket onto the ground.

To exploit the intel:

  • Pick it up.
  • Ace self-interact and under 'ACE equipment' select 'Decrypt intel'.
  • This will consume the intel and retrieve one intel from an array of intel that the mission maker can place in initServer.sqf and write a diary entry.

Zeus can update the array of available intel using zeus module 'COLSOG - Intel'.

COLSOG_intelPool = [
    "intel 1",
    "intel 2",
    "intel 3",
    "intel 4",
    "intel 5"
    ]; 

It is also possible to only allow decryption of intel if player has the following attribute set in his 'init' section:

this setvariable ["COLSOG_intelExpert", true];

Else the player will see "You cannot read the document...".

If intel pool is empty and a player tries to decrypt an intel, the player will receive a hint displaying "Contains no valuable information.".

14. Climbing up/down trees

Allows player to climb up trees to see further away, orient himself/herself.

To climb up a tree follow this steps:

  • Have required role (unit's name), item and make sure tree is in the config of authorized tree to climb (see fn_climbTree.sqf.
private _hashMapOfAuthorizedTreesAndHeightCorrection = [
    ["t_cyathea_f.p3d", 2],
    ["t_cocos_tall_f.p3d", 9],
    ["t_cocosnucifera3s_tall_f.p3d", 0],
    ["t_inocarpus_f.p3d", 8],
    ["t_palaquium_f.p3d", 3],
    ["t_ficus_big_f.p3d", 15],
    ["t_cocosnucifera2s_small_f.p3d", 8]
];
  • Go close enough to a tree and go in 'ace equipment' --> "Climb up".
  • To go down, go in 'ace equipment' --> "Climb down".

It is also configurable through CBA Settings (see 'CBA Settings' section of the readme).

Tips

1. Respawn with saved loadout

To save your loadout, add the below code in the arsenal 'init' section.

this addAction [
  "Save loadout",
  {player setVariable["saved_loadout",getUnitLoadout player];
  hint "Loadout saved";},
  nil,
  1.5,
  true,
  true,
  "",
  "_this distance _target < 2",
  50,
  false,
  "",
  ""
];

Then, by looking at the arsenal (from 2 meters maximum) and using the scroll wheel, you will have the option to 'save loadout'. This will allow you to respawn with the saved loadout instead of default loadout at connection.

2. Add image on map stand

To display any image on a map stand, follow the below steps:

  • convert your .png into one of these resolution: 256x256, 512x512, 1024x1024 or 2048x2048

  • 2 ways to convert .png to .paa:

    • Manual: use the TexView 2 (Arma 3 Tool) to convert the .png into a .paa (Use 'RGBA' and in the other section use 'DXT5')
    • Web: ARMA 3 PAA CONVERTER
  • add .paa file into the 'images' folder

  • add the below code in the 'init' section of the map stand:

    this setObjectTexture [0, "images\YOUR_IMAGE.paa"]
    
3. Add teleport flag

To add a teleport flag (or any other object that player can use to teleport themselves at a predetermined point) follow the below steps:

  • Add a invisible marker (point) on the map in editor and give it a name (ex: "airfield")

  • add the below code in the 'init' section of the teleport flag (or object you choose)

    this addAction [
        "Travel to airfield", // This text will be displayed in the action menu (using the scroll wheel).
    {
        (_this select 1) setPos (getMarkerPos "airfield");} // This section will teleport the player to the position of the "airfield" marker.
    ];
    
4. Force vietnamese face on players

N.B: Roles 1-0, 1-1 and 1-2 will not be impacted by the face change since they were US soldiers.

Playing as early MACV-SOG team, we are playing as south vietnamese thus we force vietnamese faces on all playable character. At player initilization or at player respawn, one random asian face is selected from the below list and set for the current player.

[
    "vn_b_AsianHead_A3_06_02",
    "vn_b_AsianHead_A3_07_02",
    "vn_b_AsianHead_A3_07_03",
    "vn_b_AsianHead_A3_07_04",
    "vn_b_AsianHead_A3_07_05",
    "vn_b_AsianHead_A3_07_06",
    "vn_b_AsianHead_A3_07_07",
    "vn_b_AsianHead_A3_07_08",
    "vn_b_AsianHead_A3_07_09"
]

To disable this feature, you can comment or remove the below line from initPlayerlocal.sqf and onPlayerRespawn.sqf:

call COLSOG_fnc_faces;

You can also directly execute the below command on the server to directly reset all players faces to a random asian face:

call COLSOG_fnc_faces;
5. Add drinkable beer

To create a drinkable beer (or any other object that player can use) follow the below steps:

  • Add the beer object 'Savage Bia'

  • add the below code in the 'init' section of the beer (or object you choose)

    this addAction ["Drink Beer", { 
        "dynamicBlur" ppEffectEnable true; 
        "dynamicBlur" ppEffectCommit 1; 
        "dynamicBlur" ppEffectAdjust [6]; 
        addCamShake [5, 60, 1];
        sleep 4; 
        "dynamicBlur" ppEffectEnable false;
    }];
    
6. Fuel consumption

Here is the code to place in the 'init' section of the vehicle you to change the fuel consumption of:

_this setFuelConsumptionCoef 3; // Fuel consumption will be 3x default consumption.
7. Cam Lao Nam borders

Original credit. This script converts a series of vectors to create nice borders. Currently only for Cam Lao Nam. To enable, uncomment the line:

[] spawn compileScript ["vet_border\init.sqf"];

in the main init.sqf and place down the Cam Lao Nam borders composition which contains the necessary markers.

RT Columbia mods