Arma 3
Not enough ratings
MRT Accessory Functions
   
Award
Favorite
Favorited
Unfavorite
Data Type: Mod
File Size
Posted
54.411 KB
17 Jul, 2017 @ 12:14am
1 Change Note ( view )

Subscribe to download
MRT Accessory Functions

Description
MRT Accessory Functions

by
da12thMonkey, Robalo an
http://www.armaholic.com/page.php?id=26426


Description:
MRT Accessories Functions is a small script addon that switches a player's current weapon accessories between a set of predefined classnames at the press of a button. The aim of this function is to simulate various interactive features in real-life weapon accessories that are otherwise absent in Arma 3.

The system is designed to be easy to implement for community addon makers and avoids hardcoded classnames within the scripts themselves. Making an addon compatible with MRT Accessory Functions does not make the addon dependant on MRT Accessory Functions or CBA, and its installation remains at the discretion of the player.


Installation:
To install the MRT Accessory Functions you should use modfolders to keep it seperate from the official game content to prevent issues.
With Arma 3 you can use different ways to set up your modfolders to use custom content you have downloaded.
Please visit the Arma 3 Mod install instructions page for more information about using custom mods and addons in Arma 3.


Included files:
MRT_R3F_SURBAccFnc.pbo
MRT_FHQ_LLMAccFnc.pbo
MRT_AccFncs.pbo


Usage:
Making a MRT_AccFncs compatible addon:
For detailed usage instructions please refer to the release thread: http://forums.bistudio.com/showthread.php?181338-MRT-Accessory-Functions

Using MRT AccFncs:
The system uses four Keybinds operating in two pairs. One pair controls attachments in the optics slot and the other pair controls attachments in the rail accessory slot. Each slot is assigned a key to switch forward to the next operating mode of the attachment, and a key to switch backward to the previous operating mode.

By default, the control scheme looks like this:
[ctrl + L] Switch rail attachment to the next mode
[shift + L] Switch rail attachment to the previous mode
[ctrl + NumPad /] Switch sight attachment to the next mode
[shift + NumPad /] Switch sight attachment to the previous mode

Keybinds are customisable through the usual CBA keybindings menu, accessible from the ingame menu by clicking:
Configuration → Controls → Configure Addon
MRT Accessory Functions should be available from the drop-down menu there, allowing you to change the keybinds to your liking.

When performing these key-presses with a compatible attachment assigned to your weapon, a small 'click' sound will be heard as your accessory changes mode, and a small hint box will appear, telling you which mode your weapon accessory has changed to.

In order for you to see the effects of the script, an addon with compatible attachments must be running in conjunction with MRT_AccFncs.pbo. We have provided config addons to add compatibility for:

FHQ Accessories pack
R3F French Weapons Pack

Where appropriate attachments (FHQ's LLM-01 and R3F's mini laser/lamp) will be able to switch between laser and light modes, when running in conjunction with MRT AccFncs and CBA. These two config addons are available in the 'optional' subfolder inside the @MRT_AccFncs modfolder.


Examples:
To provide some idea of the capabilities of this system, I have provided a small set of additional attachments that are set up to utilise the above control schemes.

We have:
MRT_LLMTest.pbo - A simple Laser/light module using the BIS IR laser and Flashlight models to visualise the binary switch
MRT_COMPM4.pbo - An Aimpoint CompM4 with a 3x magnifier that flips up and down (also binary, but applied to the optics slot for a change)
MRT_FlashlightAdj.pbo - An adjustable flashlight that allows you to scale the intensity of the light source using the linear control scheme
MRT_Holosight.pbo - An EOTech holographic sight with selectable reticle patterns that can be cycled through
MRT_COMPM4.pbo, MRT_FlashlightAdj.pbo, MRT_Holosight.pbo and MRT_LLMTest.pbo are all unbinarised to provide examples that other addon makers may wish to copy. Hovever because they are unbinarised and unoptimised, the game may hang slightly when loading the unbinarised models for the first time ingame (i.e. when switching the aimpoint magnifier up and down).

Bear in mind that these are just some quick testbed attachments to show off ideas for the sort of functions that can be simulated with the MRT Accessory Functions system, and some of the limitations (There appears to be an engine limitation where you have to turn the light on and off again to refresh the light source with the adjustable flashlight!). The models are just quick 'placeholders' using available assets; not nice, polished addons.

Download:
MRT AccFnc Examples (6mb)

ASDG Joint Rails is needed for the example attachments to actually clip on to the weapons ingame.
MRT Accessory Functions system itself does not require attachments to be ASDG JR compatible. However, we strongly recommend utilising ASDG JR in your projects as a means of improving compatibility with other community-made weapons and attachments


Compatible Community Addons:
ASDG Attachments - via a MRT compatibility config
ASDG ACO - Allows the game's standard ACO sights to switch between the red Ring and green Chevron reticles
JR config for RHS - An ASDG JR config for the RHS: Escalation mod that also enables MRT functionality on the AN/PEQ-15+M952 attachment when MRT AccFncs is installed


Notes:
The concept for this addon came about after I completed work on RKSL Attachments Pack 1. I began assessing options for new attachments that I should make for the next pack, and the UK's latest LLM Mk.3 seemed a likely candidate, but I figured why make something like that when it wouldn't be able to switch between laser and light modes? I know I and several other community addon makers had long held hope that BIS might make attachments a bit more dynamic, but so far nothing seemed to be materialising on this front within the community or from BIS.

Eventually I got around to trying to write a basic script to switch between the standard Arma 3 flashlight and IR laser attachments and investigating how to pair the two classes together via the config. Right from the beginning it was my desire to avoid using hardcoded classnames in the script to ensure that if I wished to make more attachments using this system in future, I wouldn't have to manually add classnames to the script every time I wished to update my addon, or introduce hard dependencies between addons. I had also hoped that the system would be able to be used by other addon makers in the community who did not possess the time or inclination to generate their own switching scripts.

Unfortunately, in twelve years of playing these games I'd never even attempted to code sqf before, so I very soon got stuck and asked Tupolov to help me out, knowing that he was developing some interesting functions for Arma 3 small arms himself. Tup, marvel that he is, understood my concept and put together a fully functioning script, for which I will forever be in his debt for; allowing me to abuse the coding work further and create the first version of this addon, that was received with some enthusiasm by the community members I got to test the system.

Recently Robalo released ASDG LightSwitch which functions in a very similar manner to what me and Tup wanted to achieve. I sent him the work that had been done so far, knowing from past collaboration with him that we could exchange some ideas about implementation that would mutually benefit overall development of this concept within the community. Rob identified that the way I'd set up Tup's script was pretty inefficient and being the great bloke that he is, streamlined the whole system into one very impressive function.

We hope that this system provides some utility to people who wish to experience a little more interaction with their weapon's attachments... at least until the day BIS provide some native way of creating such multi-mode attachments that doesn'
3 Comments
Fercho 30 Jan, 2023 @ 12:40pm 
@TF_Ghost_1_4_1, Can I repack in a clan pack??? Regards
[NZF]JD Wang 10 Sep, 2017 @ 3:35pm 
Why would you upload something that is A) Not your work to upload and B) already in CBA which you list as a requirement.
Rad 17 Jul, 2017 @ 1:54pm 
This has been included inside CBA_A3 so i dont think its needed at all