Arma 3
RAIEM - Illuminate the Night (ITN)
GhostJB  [developer] 2 Feb, 2022 @ 2:23am
The Thought and Method of ITN
. For accessibility reasons, I have left discussion about the features of and ideas behind this mod out of the mod page. I tend to go on about subjects at painstaking length, and I suspect most potential users will rather have a brief description of what this mod does than a detailed explanation of why and how this mod was created. For posterity’s sake, as well as that of general discussion and transparency within the modding community, I will here lay out my intent for making this mod, including why I chose to include or exclude various possible features, and my method for making this mod, including the specific values I’ve settled upon and a reference list of classes which I have added. Finally, I will leave a collection of links, for anyone interested, to manufacturer and dealer websites for the covered devices, as well as several end-user reviews which show and compare these devices’ performances.

# History and Intent

. Regarding why I decided to make this mod, the answer is pretty straight forward: I’m a gear guy who also likes a silly level of interactive detail in my video games. When I decided to start this project, I had been playing Arma in a milsim-lite way on a weekly basis for about 3 years. My community uses RHS and NIArms, and I had taken a fancy specifically to several RHS weapons and attachments. The Perst-3/2DP laser/light combo was one of them. Along the way, I had also taken a fancy to using the ACE3 visible lasers—I use GGE’s Weapon Canting mod, and have it set to automatically trip the attachment whenever I go to cant to weapon—but the ACE3 visible lasers were not the Perst-3. So, I decided to make a mod what would add visible lasers to all of the RHS laser attachments.

. So, I began looking into config files and doing research into Arma 3 modding. I peeked in on the RHS scripts for switching attachment modes and, while they are elegant, they were not modular enough that I could add in more modes. (This is not 100% true. The model selector script, used by the G33 flip-to-side optics for example, is coded such that the script itself would need editing to add in new variants, but it wasn’t what I originally thought it was. It was not until after I had discovered the CBA Accessory Functions that I figured out that it could have worked for my needs, though it would still have been restricted to a one-way cyclical selection system.) After some searching, I came across the CBA Accessory Functions and its two-way linear selection scheme. While it created a technical dependency on CBA (this is a soft dependency in the mod, in that it won’t cause an error if CBA is not loaded, but without CBA there is no way of selecting any mode other than the IR laser) the linear selection system represented almost exactly how the knobs on the devices work: turn counterclockwise for visible modes and clockwise for IR modes, with no possibility of selecting a visible mode by continually turning the knob towards IR. Once I had found and settled on the CBA functions, I set to work making a little config file and pbo.

. During this process, however, I had an experience during a weekly game which had me, alongside a slurry of other control options, wishing that the lasers could be turned off so that, no matter what, they wouldn’t emit if keyed accidentally. This is a similar idea to the Safe Mode functions of both RHS and ACE3. At this point, the list of modes I had wanted to add included visible laser, in red and green where appropriate; an “off” position; and, for the laser/light combo units, visible laser and flashlight together. Then I chanced to read the announcement from Bohemia about what was coming up in Arma 2.0.6…

. Arma 2.0.6. allowed the game’s engine to handle infrared light sources that would only be visible to players and AI who had night vision devices equipped and activated. Oh, the possibilities! I had long lamented the lack of an IR flashlight. I was happy when BettIR came out and have no idea how they managed to make IR lights without engine-level support. Night vision is nice, but it’s not perfect, and sometimes you just need more light. The NOD-mounted IR flood and the rifle-mounted IR Illuminator features were great, but the controls for latter were clunky and completely unlike the real-world items—Persts and PEQs only have a single button and a selector knob (or two). The list of modes gained IR illuminator and IR laser/illuminator dual modes.

. Unfortunately, not every mode on a PEQ-15 or a Perst-3 can be represented in Arma, even with the advent of IR light sources. The PEQ-15 ATPIAL, PEQ-15A DBAL, and PEQ-16 MIPIM have low- and high-power laser and illuminator modes, and the Perst-3 has a variable intensity for all of its modes. These multiple power levels are useful in the real world for several reasons. Night vision devices will bloom or dim (autogate) very easily when exposed to bright light sources, such as a laser beam reflecting off a light-colored wall, and power levels capable of illuminating a target at distance are also capable of causing permanent vision damage. This latter isn’t too important in Arma, but the first actually can be. However, Arma only has one type of IR laser [...]. (Since the initial writing, I have discovered that 2.0.6 also added the value irDotSize to pointer classes, which can be used to create a light “blooming” effect at the IR laser’s impact point. It’s far from perfect, but it does the job. Low power IR lasers now have a small bloom, lasers combined with a high-power mode have a larger bloom, and the visible lasers now have really big blooms when observed under nightvision.) Also, I’m not yet sure how I can dynamically edit config variables in-game. Almost all of these devices also have a variable focus on their illuminators which lets the user widen or narrow the beam at will. While highly useful, this would also require some form of dynamic config editing scheme which is beyond my abilities. The only other way to achieve this function would be to create dozens more classes, each identical except in minute variation of flashlight properties, which would be both highly inefficient and impractical.

# Methods

. At this point, I would like to discuss how I made this mod, for those who are curious to know but not yet inclined to open the hood and read the config file for themselves. The devices represented in these mods have a wide variety of functions, and many of them are fully achievable within the Arma environment. Visible lasers, visible lasers paired with flashlights, IR lasers, IR lasers paired with IR flashlights; all doable. IR illuminators are a bit odd, being in all of these cases just really thick lasers, but they are doable, even though Arma has only one kind of laser.

--# Lasers, VIS and IR
. The lasers were very simple to make, as ACE3 has specifically structured its visible laser scripts to be, essentially, drop-in. All it took was creating a new class under CfgWeapons, inheriting the information from the original RHS classes. All that was needed to enable ACE’s visible laser functionality was to add the line “ACE_laserpointer=x”, where x is either 1 for a red laser or 2 for a green laser, to the class and as well as a specific data block to the subclass itemInfo (which can be found on the ace3mod.org site) telling the game that this attachment is both a laser and a flashlight with zero output. That is, the color, ambient, intensity, innerAngle, outerAngle, useFlare, and Attenuation values are all zero. I left the base RHS laser classes untouched, with the exception of the entries required for switching which I will cover later.

--# IR Illuminators
. As said above, illuminators are just thick lasers, so they project a lot of light within a very narrow cone. Most lasers, such as laser pointers, have very low divergence values, meaning the dot stays small even over long distances. Illuminators, however, want to effect a moderately sized area, and so have an intentionally increased divergence of a few degrees. To achieve the effect of an IR illuminator, I just used the IR flashlight feature with specific values. As before, I created a new class under CfgWeapons and inherited from another the base RHS class. Then I added to the subclass itemInfo a class flashlight. I began with a copy-paste of the class flashlight out of the RHS flashlight classes, but added “irLight=1” and changed the following key values:

. innerAngle=8; //these angles are total value edge-to-edge
. outerAngle=9; //with both values close to each other, beam is sharp
. coneFadeCoef=6;
. intensity=2100; //this is super bright, but allows 1km+ illumination
. useFlare=0; //stops lens flare possibly bugging outside nvgs
. position=”laser pos”; //the pos and dir values are taken from the laser mode
. direction=”laser dir”;
. class Attenuation {
. start=0; //these values were changed to maintain beam strength
. constant=1; //at long ranges where the illuminator was designed to
. linear=0.00001; //reach
. quadratic=0.00000005;};
. hardLimitStart=700;
. hardLimitEnd=1200;

These figures were first estimated with a graphing calculator, such as the online Desmos calculator. The formula for actual intensity ( f(x) ) at the center of the beam at a certain distance ( x ) is:

. f(x) = (Intensity) / (Constant) + (Linear)x + (quadratic)x^2

I don't know, numerically, the real-wortld attenuation patterns for wide-beam lasers, so I just went for a very slow reduction in strength, with the hardLimits being used to make the majority of the final fade-to-nothing at distance.

--# Mode Selection
. Mode selection took up most of my work here, and that was largely just keeping the classes straight in my head as they changed either “forward” towards the IR settings or “backwards” towards the visible settings. This switching function is enabled by adding three lines to every class—including the base RHS classes that I was inheriting from:

. MRT_SwitchItemPrevClass=”(the ‘previous’ mode class in the line)”;
. MRT_SwitchItemNextClass=”(the ‘next’ mode class in the line)”;
. MRT_SwitchItemHintText=”(name of the mode belonging to this class)”;

. I did not just want to enable the CBA function, however. I also wanted to maintain RHS’s model selection script that allowed for the “same” device to be mounted without clipping on such variably shaped weapon systems as M4s, SCARs, and AKs. To do this I simply left in the line “rhs_anpeq15_base=’x’“, allowing RHS’s rail height script to act on my classes, and then made sure that for each class mode I made, there was also a matching version that ended in “_h” and, for USAF devices, “_sc”. In the case of the PEQ-15 and Perst-3 combo units, I replaced the “rhs_acc_combo” and “rhs_acc_combo_text” lines with this, because I felt that RHS’s mode switching script would interfere with the CBA one. I believe that this was the source of some early issues, but I am now not so certain. I may reenable the RHS script for these items in the future, though they will likely only function between the original RHS modes of IR laser and visible flashlight.

--# Class Tagging Stance
. The final thing I would like to address in this initial space is my possibly controversial decision in tagging the classes which make all of these new modes possible. Initially, I maintained the original naming structure developed by RHS, and used their rhs_ and rhsusf_ tags for all of my new classes. This was in order to maintain the functionality of RHS's rail-height script, but also to maintain inheritances. At the time, I had not idea how to pack a PBO that included files that were not in my file system. After I had figured out how to do references to files in other mods, I reworked the entire structure, and gave all of the new device classes the GJB_ tag. I figure this is potentially controversial because they all point to RHS models in RHS PBOs, but they are still wholly dependent upon the RHS files to function, so I hope this fact will exonerate me from any charges of plagiarism. The only work here which is my own is the config file, the design of this mod, and the particular values used to characterize different devices. All I’ve done is cobble together the work of many others greater than myself, and the limit of my input is in synthesis. As the old saying goes, “If I pee far, it’s because I stand on the shoulders of giants.”

# References

--# Class Flashlight properties
. Included below are the specific values I have used for the flashlights (vis and IR) and illuminators. As a treat for those of you who have read this far (or just taken the time to jump down here on your way to the citations) I’ll also briefly cover the characterization which I’ve tried to give each attachment. I recognize that RHS’s main drive, and likely the goal for most of the groups which use it, is to provide a form of military LARPing, generally focused on a specific unit with its own specific MTOE, etc. This means that what laser device a player uses is more likely strictly dictated to them, they have no choice. The unit I play with is a “PMC”, and thus we have more choice. What I noticed, however, was that it didn’t matter what device you used, they all acted the same. This felt somewhat redundant, and leaving things in this state was also contrary to the intent of this mod: the more accurate representation (dare I say, simulation) of these devices. So, I did research, and tried to make each device distinct from the others.

. I would love for other folks to check my research and either corroborate or challenge my findings, but the brief on what I determined is that the PEQ-15 and PEQ-16 are broadly similar in function, being from the same manufacturer and broadly the same generation of device, but the PEQ-16’s white-light LED fails to outperform the standalone flashlights of the Insight WMX-200 and the Surefire M952V. The Zenitco Perst-3 outperforms the PEQ-15—though it seems comparable to the LA-5B—almost certainly because it’s from a newer generation of laser technology, even though it’s of foreign origin. [...]

. Upon further investigation, it appears that most of the sources I used for my initial device characterization regarding the AN/PEQ-15A DBAL-A2 from Steiner Optics were either using a “civilian” class I model (class IIIR for the illuminators) which Steiner does not list in their catalog, a DBAL-I2 that is also class I, or a DBAL-A3 that is, again, reduced to class I/IIIR. The manufacturer specified outputs for these “civilian” lasers illuminators are roughly 1/10th of the full-power version’s outputs. To this end, the DBAL-A2 has been recharacterized to be slightly more powerful than the PEQ-15, with a slightly narrower cone. Proper AN/PEQ-15A’s appear to be incredibly difficult to find footage of these days.

. To save space, I will use an array format for each variation of flashlight that I have used. This includes illuminators. These numbers will periodically change as I find better values for them. The array is in form {innerAngle, outerAngle, coneFadeCoef, intensity, Attentuation (start, constant, linear, quadratic, hardLimitStart, hardLimitEnd)}

Klesh-2DP Vis Flashlight {0.5,190,45,4000,(0,1,0.00002,0.00001,40,60)}
Perst-3 Illum High {8,9,6,2100,(0,10,0.00001,0.00000005,700,1200)}
Perst-3 Illum Diffuse {15,50,2,100,(0,1,0.00001,0.00004,60,100)}
PEQ-15 Illum High {7,9,3,1900,(0,1,0.00001,0.00000005,700,1200)}
PEQ-15 Illum Diffuse {20,60,3,70,(0,1,0.00001,0.00004,60,100)}
PEQ-15A Illum High {7,8,6,2000,(0,1,0.00001,0.00000005,700,1200)}
PEQ-15A Illum Diffuse {20,40,3,90,(0,1,0.00001,0.00004,60,100)}
PEQ-16B Illum High {8,9,5,2000,(0,1,0.00001,0.00000005,700,1200)}
PEQ-16B Illum Diffuse {20,60,3,90,(0,1,0.00001,0.00004,60,100)}
PEQ-16B Vis Flashlight {2,160,50,4000,(0,1,0.00002,0.00001,80,120)}
M952V Vis Flashlight {0.05,180,.50,3500,(0,1,0.00002,0.00001,60,100)}
M952V IR Flashlight {0.05,180,50,75,(0,1,0.00002,0.00001,60,100)}
WMX-200 Vis Flashlight {2,170,50,4000,(0,1,0.00002,0.00001,80,120)}
WMX-200 IR Flashlight {2,170,50,90,(0,1,0.00002,0.00001,80,120)}

# Research Sources

--# Manufacturer or Retailer sources
• PEQ-15 / L3-Harris ATPIAL https://tnvc.com/shop/atpial-anpeq-15-advanced-target-pointerilluminator-aiming-laser/
• PEQ-15A / Steiner D-BAL https://www.steiner-defense.com/laser-devices/dbal-series/dbal-a2
• PEQ-16B / L3-Harris MIPIM https://tnvc.com/shop/l3-insight-mipim-anpeq-16b/
• Perst-3 / Zenitco Perst-3 (Red) https://en.zenitco.ru/catalog/lasers/perst-3-combined-device-red/

--# End-User Reviews
• YouTube, compares DBAL-A3, MAWL-C1, PEQ-15, and PERST-2. The Perst-2 is the same generation and technology as the Perst-3. The DBAL-A3 is likely the same generation and tech as the A2, but there is unknown model variation, and it is possible that this is a class I model. https://youtu.be/mlmp5K3A7nk
• YouTube, compares DBAL-A3, MAWL-C1, Perst-3, and others. It is possible that this DBAL-A3 is also a class I model, and thus not good for our use. There is speculation in the comments of poor QC at Steiner. https://youtu.be/wFkpJcsngqQ
• YouTube, L3 PEQ-15 demonstration, full-power model. https://youtu.be/1DtgZDCdIqc
• YouTube, compares DBAL-A3, full power DBAL-A2, and others. This DBAL-A2 is clearly a full-power variant, and outperforms the A3, which is itself comparable to the class I I2; for this reason, I suspect model confusion in the other two DBAL videos, but do not have enough data to adjust figures at this time. https://youtu.be/Z_oGJa49Cnc
• YouTube, DBAL-A3, clearly not a class I, although the specific model number is unknown. https://youtu.be/zMKnHa-H6Nw
Last edited by GhostJB; 13 Mar, 2022 @ 10:14pm