gerard-sog / arma3-macvsog-columbia-scripts

Arma3 MACV-SOG Columbia - Scripts & Settings
https://discord.gg/dyeUNXHFqS
MIT License
4 stars 3 forks source link
arma-3 arma3 arma3-mission arma3-mods arma3-scripts arma3-server prairie-fire-dlc sqf sqf-language

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.

If you want to contribute to this project, see CONTRIBUTING.md.

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\\Documents\Arma 3 - Other Profiles\\missions\KheSanhMission01.vn_khe_sanh).

Default values

Zeus modules

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:

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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/functions/artillery/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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/initServer.sqf) and it is used as the condition in [artillery.hpp](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/functions/artillery/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: - [init.sqf](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/init.sqf) - [onPlayerRespawn.sqf](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/onPlayerRespawn.sqf) 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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/functions/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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/functions/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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/functions/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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/functions/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 [ "Drop the STABO rig", "functions\stabo\colsog_fn_dropStabo.sqf", nil, 0, true, true, "", "(_this in _target) AND !(_target getVariable 'COLSOG_staboRopeDeployed')", 50, false, "", "" ]; this addAction [ "Detach ropes", "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 [ "Request crew", "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 [ "Remove crew", "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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/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.".

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](https://paa.gruppe-adler.de/) - 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](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/initPlayerlocal.sqf) and [onPlayerRespawn.sqf](https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/blob/main/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](https://github.com/Savage-Game-Design/A3-Modding-Example/tree/master/missions/map_borders.cam_lao_nam). 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](https://steamcommunity.com/sharedfiles/filedetails/?id=3334463724) which contains the necessary markers.

RT Columbia mods

Procedure to create a new Arma 3 inventory object from scratch: https://github.com/gerard-sog/arma3-macvsog-columbia-items.