Kempco 10 Posted January 29, 2013 Changelog: version 1.4 New: No Addons required! New: Pistols are now supported New: Sound effects (Idea courtesy of st-alpha) New: Script version now requires sound config be defined in Description. New: Demo mission included for both the addon and script versions. New: Addon version now requires a (JTK) Suppressors Module be placed on the map. New: JTK SF Weapons Crate/Script: Includes unsuppressed versions of all suppressable weapons according to your addons. Added: RH Pistol pack Remake (by Robbert Hammer) Added: RH SMG pack (by Robbert Hammer) Added: "ace_akms_sd","ace_ak74m_sd","ace_ak74m_sd_kobra_f","ace_aks74_un" Share this post Link to post Share on other sites
Guest Posted January 29, 2013 (edited) New version frontpaged on the Armaholic homepage. JTK Weapon Suppressor Script v1.4 Edited January 29, 2013 by Guest Share this post Link to post Share on other sites
Kempco 10 Posted January 29, 2013 @Foxhound The name change is much appreciated. Thanks again. Share this post Link to post Share on other sites
Tonci87 163 Posted January 30, 2013 Changelog:version 1.4 New: No Addons required! New: Pistols are now supported New: Sound effects (Idea courtesy of st-alpha) New: Script version now requires sound config be defined in Description. New: Demo mission included for both the addon and script versions. New: Addon version now requires a (JTK) Suppressors Module be placed on the map. New: JTK SF Weapons Crate/Script: Includes unsuppressed versions of all suppressable weapons according to your addons. Added: RH Pistol pack Remake (by Robbert Hammer) Added: RH SMG pack (by Robbert Hammer) Added: "ace_akms_sd","ace_ak74m_sd","ace_ak74m_sd_kobra_f","ace_aks74_un" I see why you did that but I would prefer a different approach. Player has SD Weapon-> player is able to remove and reattach Supressor Player has standard Weapon -> Player needs item (supressor) (or module) to be able to attach it to the Weapon. This approach would have the benefit that most missions where you need that addon would be ready without editing. Share this post Link to post Share on other sites
Firefox88 10 Posted January 30, 2013 Nicely done. Just wondering if it HAD to be a module or if there was a way to keep everything without having the module? I don't know anything about scripting so I have no idea of it's possible. Share this post Link to post Share on other sites
the chief 15 Posted January 30, 2013 Very nice. Thanks for sharing. Are there any plans to expand the list of SD weapons, that this applies to include the ACR, BAF and PMC DLCs in the near future. Cheers Share this post Link to post Share on other sites
seyv 10 Posted January 30, 2013 Hello Kempco, With the first version of your script, I managed to integrate the weapons pack that my team uses. I wanted to repeat the experience with the update, because we can not do without your addon but it no longer works. idea how I can do. our weapons and guns? Thank you. Share this post Link to post Share on other sites
seba1976 98 Posted January 30, 2013 One question: IIRC there are no SD Mk17 in vanilla OA, except for the sniper version and the thermal sight version, so which one did you use? Share this post Link to post Share on other sites
Firefox88 10 Posted January 30, 2013 (edited) Seyv, I messed with the new update and I read lower in the readme, there has to be a special module placed on the map to use any of the addon (its the only way to get it to work with v1.4). Using the 1.2 still works and what I'm going to do. Edited January 30, 2013 by Firefox88 Share this post Link to post Share on other sites
Kempco 10 Posted January 30, 2013 (edited) @tonic AND Firefox I intended to do the addon version where the module would disable as opposed to enable the suppressors. The issue is I wanted this addon/script to have no dependencies and that includes CBA. Unfortunately, without CBA, specifically XEH, I have no idea how to initialize the code without it going through the init of an editor placed object. If you have any suggestions I'm all ears. @sevy The function to return weapons is case sensitive, When I first made the script a couple years back I was unaware of the toLower and ToUpper commands and it took for ever to get the right caps for each weapon. Its much easier to lowercase the weapon names then only search for the lowercase name. In short, the weapon names placed in the functions must now be entirely in lowercase. @seba1976 The weapons for the vanilla OA HK17s I used are: "scar_h_cqc_cco" and "scar_h_cqc_cco_sd" (for assault rifles fnc) "scar_h_lng_sniper" and "scar_h_lng_sniper_sd" (for sniper rifles fnc) @the chief Provide me with the the standard version and silenced version of each weapon as well an the config reference for its respected DLC and I will implement them within the week. How to find the config reference: 1. Place a functions module on map 2. Create Trigger: Activation "Radio ALPHA"; On Act: [] call bis_fnc_help 3. Preview mission. Once in game press the number key 0 (twice) and 1 (once) "001" 4. A Dialog will open: Select the following: Bis > misc > BIS_fnc_version (All the way at the bottom). 5. Once selected press copy to clipboard 6. Send me your version of this function. this is what mine looks like: scriptName "Functions\misc\fn_version.sqf"; /* File: fn_version.sqf Author: Karel Moricky Description: Detects are available expansions and addons. Returns: Array - list ov expansions 0 - ARMA 2 1 - Operation Arrowhead 2 - BAF 3 - ... 4 - PMC */ private ["_result","_isA2","_isEP1","_isBAF","_isPMC"]; _result = []; _isA2 = isclass (configfile >> "CfgPatches" >> "Chernarus"); _isEP1 = isclass (configfile >> "CfgPatches" >> "ca_E"); _isBAF = isclass (configfile >> "CfgMods" >> "BAF") && getnumber (configfile >> "CfgMods" >> "BAF" >> "isLite") == 0; _isPMC = isclass (configfile >> "CfgMods" >> "BIS_PMC") && getnumber (configfile >> "CfgMods" >> "BIS_PMC" >> "isLite") == 0; if (_isA2) then {_result = _result + [0]}; if (_isEP1) then {_result = _result + [1]}; if (_isBAF) then {_result = _result + [2]}; if (_isPMC) then {_result = _result + [4]}; _result Edited January 30, 2013 by Kempco Share this post Link to post Share on other sites
Tonci87 163 Posted January 31, 2013 @tonic AND Firefox I intended to do the addon version where the module would disable as opposed to enable the suppressors. The issue is I wanted this addon/script to have no dependencies and that includes CBA. Unfortunately, without CBA, specifically XEH, I have no idea how to initialize the code without it going through the init of an editor placed object. If you have any suggestions I'm all ears. @sevy The function to return weapons is case sensitive, When I first made the script a couple years back I was unaware of the toLower and ToUpper commands and it took for ever to get the right caps for each weapon. Its much easier to lowercase the weapon names then only search for the lowercase name. In short, the weapon names placed in the functions must now be entirely in lowercase. @seba1976 The weapons for the vanilla OA HK17s I used are: "scar_h_cqc_cco" and "scar_h_cqc_cco_sd" (for assault rifles fnc) "scar_h_lng_sniper" and "scar_h_lng_sniper_sd" (for sniper rifles fnc) @the chief Provide me with the the standard version and silenced version of each weapon as well an the config reference for its respected DLC and I will implement them within the week. How to find the config reference: 1. Place a functions module on map 2. Create Trigger: Activation "Radio ALPHA"; On Act: [] call bis_fnc_help 3. Preview mission. Once in game press the number key 0 (twice) and 1 (once) "001" 4. A Dialog will open: Select the following: Bis > misc > BIS_fnc_version (All the way at the bottom). 5. Once selected press copy to clipboard 6. Send me your version of this function. this is what mine looks like: scriptName "Functions\misc\fn_version.sqf"; /* File: fn_version.sqf Author: Karel Moricky Description: Detects are available expansions and addons. Returns: Array - list ov expansions 0 - ARMA 2 1 - Operation Arrowhead 2 - BAF 3 - ... 4 - PMC */ private ["_result","_isA2","_isEP1","_isBAF","_isPMC"]; _result = []; _isA2 = isclass (configfile >> "CfgPatches" >> "Chernarus"); _isEP1 = isclass (configfile >> "CfgPatches" >> "ca_E"); _isBAF = isclass (configfile >> "CfgMods" >> "BAF") && getnumber (configfile >> "CfgMods" >> "BAF" >> "isLite") == 0; _isPMC = isclass (configfile >> "CfgMods" >> "BIS_PMC") && getnumber (configfile >> "CfgMods" >> "BIS_PMC" >> "isLite") == 0; if (_isA2) then {_result = _result + [0]}; if (_isEP1) then {_result = _result + [1]}; if (_isBAF) then {_result = _result + [2]}; if (_isPMC) then {_result = _result + [4]}; _result Well why don´t you want to use CBA? Most mods and most players use it. Share this post Link to post Share on other sites
seyv 10 Posted January 31, 2013 Kempco thank you, the problem is solved, I did not notice that he had to write the class name in lowercase. Share this post Link to post Share on other sites
Kempco 10 Posted February 2, 2013 version 1.5 Changed: (Addon version only) CBA is required Changed: (Addon version only) Module disables the use of suppressors instead of enabling them. Added: Script will terminate if it detects player has addon version running. Added: Bis weapons in ammo crate are added according to DLCs detected. Share this post Link to post Share on other sites
Guest Posted February 2, 2013 Release frontpaged on the Armaholic homepage. JTK Weapon Suppressor Script v1.5Community Base Addons (addon version only) Share this post Link to post Share on other sites
Edenbn 1 Posted February 2, 2013 why the "CTAR-21" from the RH HK416 pack is not supported? Share this post Link to post Share on other sites
tholozor 18 Posted February 2, 2013 Probably because it doesn't have a suppressed version IIRC. Share this post Link to post Share on other sites
acknowledge 10 Posted February 2, 2013 Will the magazine restore to full when you equip/detach the Suppressor? Share this post Link to post Share on other sites
the chief 15 Posted February 2, 2013 (edited) @the chief Provide me with the the standard version and silenced version of each weapon as well an the config reference for its respected DLC and I will implement them within the week. How to find the config reference: 1. Place a functions module on map 2. Create Trigger: Activation "Radio ALPHA"; On Act: [] call bis_fnc_help 3. Preview mission. Once in game press the number key 0 (twice) and 1 (once) "001" 4. A Dialog will open: Select the following: Bis > misc > BIS_fnc_version (All the way at the bottom). 5. Once selected press copy to clipboard 6. Send me your version of this function. this is what mine looks like: scriptName "Functions\misc\fn_version.sqf"; /* File: fn_version.sqf Author: Karel Moricky Description: Detects are available expansions and addons. Returns: Array - list ov expansions 0 - ARMA 2 1 - Operation Arrowhead 2 - BAF 3 - ... 4 - PMC */ private ["_result","_isA2","_isEP1","_isBAF","_isPMC"]; _result = []; _isA2 = isclass (configfile >> "CfgPatches" >> "Chernarus"); _isEP1 = isclass (configfile >> "CfgPatches" >> "ca_E"); _isBAF = isclass (configfile >> "CfgMods" >> "BAF") && getnumber (configfile >> "CfgMods" >> "BAF" >> "isLite") == 0; _isPMC = isclass (configfile >> "CfgMods" >> "BIS_PMC") && getnumber (configfile >> "CfgMods" >> "BIS_PMC" >> "isLite") == 0; if (_isA2) then {_result = _result + [0]}; if (_isEP1) then {_result = _result + [1]}; if (_isBAF) then {_result = _result + [2]}; if (_isPMC) then {_result = _result + [4]}; _result Hi Kempco, My BIS_fnc_version is as follows: scriptName "Functions\misc\fn_version.sqf";/* File: fn_version.sqf Author: Karel Moricky Description: Detects are available expansions and addons. Returns: Array - list ov expansions 0 - ARMA 2 1 - Operation Arrowhead 2 - BAF 3 - ... 4 - PMC */ private ["_result","_isA2","_isEP1","_isBAF","_isPMC"]; _result = []; _isA2 = isclass (configfile >> "CfgPatches" >> "Chernarus"); _isEP1 = isclass (configfile >> "CfgPatches" >> "ca_E"); _isBAF = isclass (configfile >> "CfgMods" >> "BAF") && getnumber (configfile >> "CfgMods" >> "BAF" >> "isLite") == 0; _isPMC = isclass (configfile >> "CfgMods" >> "BIS_PMC") && getnumber (configfile >> "CfgMods" >> "BIS_PMC" >> "isLite") == 0; if (_isA2) then {_result = _result + [0]}; if (_isEP1) then {_result = _result + [1]}; if (_isBAF) then {_result = _result + [2]}; if (_isPMC) then {_result = _result + [4]}; _result I dont see the ACR DLC here, even though I have it loaded. Any suggesstions? ---------- Post added at 12:46 PM ---------- Previous post was at 11:33 AM ---------- Hi Kempco, I've compiled a list of the classnames for the ACR DLC as follows for you to use, as you requested: Arma 2 ACR DLC Rifle, pistol and magazine class lists Weapons CZ_75_SP_01_PHANTOM CZ_75_SP_01_PHANTOM_SD Evo_ACR Evo_mrad_ACR evo_sd_ACR CZ805_A2_ACR CZ805_A2_SD_ACR Magazines 30Rnd_556x45_Stanag 30Rnd_762x39_SA58 30Rnd_556x45_G36SD 30Rnd_556x45_G36 30Rnd_556x45_StanagSD 20Rnd_762x51_B_SCAR 20Rnd_762x51_SB_SCAR 18Rnd_9x19_Phantom 18Rnd_9x19_PhantomSD 10Rnd_9x19_Compact 20Rnd_9x19_EVOSD 20Rnd_9x19_EVO 10Rnd_762x51_CZ750 20Rnd_B_765x17_Ball 10Rnd_B_765x17_Ball Let me know if you need anymore help. cheers Edited February 2, 2013 by the chief Share this post Link to post Share on other sites
Tonci87 163 Posted February 2, 2013 version 1.5Changed: (Addon version only) CBA is required Changed: (Addon version only) Module disables the use of suppressors instead of enabling them. Added: Script will terminate if it detects player has addon version running. Added: Bis weapons in ammo crate are added according to DLCs detected. Thank you Share this post Link to post Share on other sites
seba1976 98 Posted February 2, 2013 @seba1976 The weapons for the vanilla OA HK17s I used are: "scar_h_cqc_cco" and "scar_h_cqc_cco_sd" (for assault rifles fnc) "scar_h_lng_sniper" and "scar_h_lng_sniper_sd" (for sniper rifles fnc) Thanks. It seems I completely missed those ones :). Share this post Link to post Share on other sites
Vigil Vindex 64 Posted February 2, 2013 I tried this with the AKMS, it switched to the SD version, but the ammo didn't work. Does this script take into account the change necessary for ammo when switching between SD and non SD? Share this post Link to post Share on other sites
Tonci87 163 Posted February 3, 2013 I tried this with the AKMS, it switched to the SD version, but the ammo didn't work. Does this script take into account the change necessary for ammo when switching between SD and non SD? Do you use ACE? Share this post Link to post Share on other sites
Kempco 10 Posted February 3, 2013 @acknowledge How magazines are handled: non-ACE: The only way (that I know of) to return the ammo count in a current magazine is the ammo command. Unfortunately this command requires that the magazine currently be in the weapon. When your magazines are swapped the ammo count of your current magazine is counted and applied to the first new magazine added. However, the magazine system in arma automatically loads the magazine with the greater count first. So when your old mag is removed, and the new mag with the same count is added, said mag is bumped to the last spot, and a full new mag is given priority. Now, if you swap again, the ammo count of the current mag is full, and the state of the partial mag is not accounted for because it is not the current magazine. The result: All magazines are restored completely. This can be exploited by the player, by constantly swapping the suppressor on and off with partial magazines you essentially get "infinite ammo". How to fix: There must be a way of returning the bullet count of each magazine present in the players inventory because their status is displayed via a green progress bar. If I can figure out the idcs of each inventory slot and/or how they are determined then I can get their status via the ctrlPosition command of each respective idc. ATM I do not have this information. ACE: ACE is completely different. With the exception of FHQ weapons (they are not yet configured for ACE and use a unique caliber) the magazines are handled by ACE. The reason for the issues with the AKMs is ACE related. Share this post Link to post Share on other sites
Psychobastard 136 Posted February 3, 2013 Hi Kempco, looks like really interesting! But you haven't added a server key and bisign's to your addon version. So i and many other server owners can't use it for their teammates on a signed server. Can you please give us a signed .pbo with an server key? regards Share this post Link to post Share on other sites
Vigil Vindex 64 Posted February 3, 2013 Do you use ACE? Yeah, I was using ACE, sorry. I thought ACE was supported. Share this post Link to post Share on other sites