Arma 3
Not enough ratings
Just Like The Simulations - EMP system
By Clock
This guide goes through the new EMP ammo feature of v1.4.0+ of JLTS - TGW both gameplay wise and configuration wise to help modders who wish to make their equipment compatible with this system.
   
Award
Favorite
Favorited
Unfavorite
Introduction
From v1.4.0 on, Just Like The Simulations - The Great War has a scripted EMP system.
This guide is going to go through on how the system works in the gameplay, and how you can make your own weapons and gear compatible with it if you are familiar with modding.
It is important to note that this system is still work-in-progress, so things may change over time in which case, this guide will be updated as well.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1940589429
In-game
If a unit is hit by an EMP, basically two things can happen based on their loadout and the addon settings
  1. The first visible sign of EMP hit is the change in the inventory. Depending on the Effect scope setting, weapons will be fried, magazines and other electronic equipment will be removed. Some weapons and items are configured to be protected from EMP, these weapons will remain unaffected.


  2. The second effect appeares if a unit has a droid uniform (for configuration, see the Config section below). The hit AI units will stop, their AI disabled and after a short delay, they will be killed (players will only experience the kill switch, they won't be freezed)

Weapons that have EMP effect currently:
  • EPL-2
  • EMP grenade

So what to do if your weapons are fried?

Well the answer is kind of straight forward. When the EMP hits you, a hint will show up on the screen telling that you were struck by EMP and several weapons in your inventory may have suffered damage due to it, and that you can repair them if you have a Weapons repair toolkit or a Weapon repair kit (one-use).
These repair kits are inventory items that can be found in the misc items section of the arsenals. If they are present in the inventory, weapon repair options will be available to the player. Depending on if ACE3 is loaded it comes as a scroll wheel option (vanilla) or ACE interaction (with ACE3).
Unlike the non-ACE3 scroll wheel options, the ACE interaction options are also dinamically created and show the actual names and pictures of the damaged weapons.
Players can repair the weapons of other players as well but be aware, only those weapons can be repaired that are in weapons slots and not put away in the inventory!
If the player has one-use repair kits only, one kit will be deleted for every repaired weapon.
Settings
To customize the effects, there are a handful of options in the Addon Options menu



Options:
  • EMP system main switch
    Determines if the EMP scripts should run Can be -Enabled -Disabled (EMP ordnance will still be present in the arsenals but will be useless)
  • Effect scope
    Determines how much the inventory is affected by the EMP Can be -No effect -Weapons only -Weapons and magazines -Weapons, magazines and other electronic devices (with this option, GPS, terminal and radio items will be removed as well)
  • Notificaton
    If set to true, an advanced hint is going to appear when the player is hit by EMP
  • Primary weapon repair time
    Determines how much time (in seconds) it takes to repair a unit's primary weapon. Default is 30.
  • Secondary weapon repair time
    Determines how much time (in seconds) it takes to repair a unit's secondary weapon. Default is 40.
  • Handgun repair time
    Determines how much time (in seconds) it takes to repair a unit's handgun. Default is 20.

The notifications:
EMP hit

EMP hit on droids
Config - for modders
The EMP hit handler code checks certain config properties to determine whether or not an ammo has EMP effect and which items should be affected in the inventories. This section will go through all the values used and their meaning.

CfgAmmo
The ordnance type (grenade, explosive, mine, blaster ammo) is irrelevant as long as the ammo class has the necessary properties
class CfgAmmo { class YourEMPAmmo { JLTS_isEMPAmmo = 1; //indicates that the ammo is EMP hit = 0.1; //recommended to set these values to very low but it must not be 0 indirectHit = 0.1; indirectHitRange = 15; //use this property to set the effect radius of explosive type EMPs ... }; };

CfgMagazines
class CfgMagazines { class YourRegularMagazine { JLTS_hasElectronics = 1; //indicates that this magazine is a blaster magazine JLTS_hasEMPProtection = 0; //0 => mag will be affected, 1 => mag will not be affected ... }; };

CfgJLTSDeathSounds
It is possible to give your droids custom death sounds for when their circuits get destroyed by the EMP. The original idea was to make an array config property that defines the possible file paths, however since that may give you headache if you are using the Mikero's tools, this class was created. It will also see more use in the future.
class CfgJLTSDeathSounds { class YourSoundsClass { //this is the class name referenced in the uniform config later emp[] = { //array name must be "emp" "YourPBO\sounds\droid_emp_1.wss", //list all your files !EXTENSION INCLUDED! "YourPBO\sounds\droid_emp_2.wss", ... }; }; };

CfgWeapons
class CfgWeapons { //droid uniforms class YourDroidUniform { JLTS_isDroid = 1; /indicates that this is a droid uniform JLTS_hasEMPProtection = 0; //indicates that this droid is not protected from EMP at all JLTS_deathSounds = "YourSoundsClass"; //Use "DeathDroid" if you want to get the ones in the mod ... }; //weapons class YourWeapon { baseWeapon = "YourWeapon"; JLTS_hasElectronics = 1; JLTS_hasEMPProtection = 0; JLTS_friedItem = "YourWeapon_fried"; //class name of fried weapon variant ... }; class YourWeapon_fried { baseWeapon = "YourWeapon_fried"; displayName = "Your weapon (fried)"; //not obligatory but recommended for the convenience descriptionShort = "$STR_JLTS_descs_BlasterFried"; //not obligatory but recommended picture = YourAddon\data\ui\YourWeapon_fried_ca.paa"; //recommended to have a separate picture showing it is fried scope = 1; //so it's not in the arsenal by default magazines[] = {}; //needed so the weapon can't be fired magazineWell[] = {}; muzzles[] = {"this"}; //to make sure the secondary modes are removed (eg. UGL) JLTS_isFried = 1; //indicates that this is a fried variant ... }; //generic inventory items class YourItem { JLTS_hasElectronics = 1; JLTS_hasEMPProtection = 0; ... }; };

To make the inventory images of the fried weapon variants, this picture can be overlayed on the normal weapon's icon
Download link[drive.google.com]