Jump to content
twisted

All The Weapons

Recommended Posts

New version.

 

Now contains Apex weapons. Plus I fixed a bug that affected RHS weapons. Please let me know if you have any issues but i checked and it should all be good. It is also signed for used in multiplayer but please make sure all players and server is running it of course.

 

Note aimfix is no longer included but is a separate addon. available on steam - http://steamcommunity.com/sharedfiles/filedetails/?id=619834340

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Quick question, if i wanted to make the weapons swap independent of side (So CSAT could get NATO or Independent weapons) what do i have to edit?

 

Share this post


Link to post
Share on other sites

Hey Twisted is there a way to make the units spawn with only submachine guns and pistols? I'm looking for a way to use all of the awesome things your mod does but just exclude certain weapons more specifically anything that's not a pistol or a smg. I am knowledgeable of unpacking the mod pbo and altering the scripts I've tried a couple things but could only achieve getting just blufor to spawn with random smgs regardless of role (medic,sniper,etc.) So let me describe clearly what I would appreciate any help achieving.

1. Make Blu use random smgs and pistols

2. Make opfor use Lee Enfields and random pistols

3. Make ind use Lee Enfields and random pistols

4. Will settle for making everyone use random pistols

5. Or Make everyone use smgs and pistols

Which ever is easier

Mods I'm using Massi pack and rhs pistols

I'm open to any thoughts on how to do something like this in a simple way

Share this post


Link to post
Share on other sites

Hey Twisted is there a way to make the units spawn with only submachine guns and pistols? I'm looking for a way to use all of the awesome things your mod does but just exclude certain weapons more specifically anything that's not a pistol or a smg. I am knowledgeable of unpacking the mod pbo and altering the scripts I've tried a couple things but could only achieve getting just blufor to spawn with random smgs regardless of role (medic,sniper,etc.) So let me describe clearly what I would appreciate any help achieving.

1. Make Blu use random smgs and pistols

2. Make opfor use Lee Enfields and random pistols

3. Make ind use Lee Enfields and random pistols

4. Will settle for making everyone use random pistols

5. Or Make everyone use smgs and pistols

Which ever is easier

Mods I'm using Massi pack and rhs pistols

I'm open to any thoughts on how to do something like this in a simple way

 

 

hey i'll try and help.

 

ive uploaded the latest script files in 7zip form in the editing forum. . Suggest using these at least then we have a consisitent point of reference. Note that terms of use for any part of this code.

 

first to control which weapons each side gets you edit the weapon names per side in loadSideWeapons2.sqf.

 

@Roberto Goulart. you can simply edit the tables in loadsideweapons2 to determine exaclty which side gets what weapon. then just binarize ad you're good to go.

 

 

so if you only want opfor to use lee enfield then you remove all the weapon names except that one. Be careful though, this will affect every mission you play in that session of arma and campaigns too.

 

however be aware also that this mod tries to match weapon type to unit type. so machinegunners always get machinegun types. this happens in tws_simpleRearm.sqf

 

so you have to go in there and change the weapon type allocated to each soldier. currently all pilots get smgs. as a heavy handed but quick fix you could simply adjust it so it changes weapontype by side instead and remove the unneeded process.

 

 
the shared script and basic instructions on how to edit can be found here
 

Share this post


Link to post
Share on other sites

New version out.

 

updated to solve rare error of accessories not defined.

 

Version A. All weapons change automatically version is here > https://steamcommunity.com/sharedfiles/filedetails/?id=434595503

Version B. Only ai weapons change automatically, player weapons stay the same > https://steamcommunity.com/sharedfiles/filedetails/?id=520665250

  • Like 4

Share this post


Link to post
Share on other sites

Hey Twisted... and the AI skill limiter addon (aimfix mod), did you discontinued it? Or you´re still gonna update it?

 

Cheers!

Share this post


Link to post
Share on other sites
On 10/29/2018 at 5:21 PM, corporal_lib[br] said:

Hey Twisted... and the AI skill limiter addon (aimfix mod), did you discontinued it? Or you´re still gonna update it?

 

Cheers!

 

Hi, the aimfix mod is on steam.  https://steamcommunity.com/sharedfiles/filedetails/?id=619834340

 

cant remember what was needing to be updated, it was a long break before getting back into arma3.

Share this post


Link to post
Share on other sites

Hi

 

cool mod,im making an insurgency mission with it,however a have a serious issue...launchers are being removed from AI when new weapon is assigned.

 

is this intentional? any way to fix it?

  • Like 1

Share this post


Link to post
Share on other sites

I'm getting the same issue, I'm playing The East Wind campaign with this mod.

Launchers are missing from all AT soldiers, the only ones I can find throughout the campaign are in camp inventories, supply crates, and on pre-placed corpses. I even had launchers disappear from Kerry's inventory while gearing up before a mission.

 

Additionally, soldiers spawn with Type 115 with only 5.8 mags, I can't find .50 magazines for that gun anywhere.

I'm not sure if it's related to this mod but whenever I try to loot a corpse that was carrying a CAR-95-1, the inventory screen shows up for a second then closes, and the gun disappears.

Share this post


Link to post
Share on other sites

I fixed the issues with missing launchers and Type 115 ammo, and a problem with grenadiers getting weapons without a GL. I also improved ammo and grenade selection a bit. Not sure if it's ok to just post the .pbo here, but I can share it via PMs.

Share this post


Link to post
Share on other sites
On 2/3/2019 at 12:00 PM, syf said:

I fixed the issues with missing launchers and Type 115 ammo, and a problem with grenadiers getting weapons without a GL. I also improved ammo and grenade selection a bit. Not sure if it's ok to just post the .pbo here, but I can share it via PMs.

 

Hey can you PM it? Thanks. 

Share this post


Link to post
Share on other sites

Since TWS seems to have disappeared and is seems people are still using this mod, I'm releasing my version here: https://www.dropbox.com/s/6k9eqdej33dsgn0/ATW2020.7z?dl=1

 

Fixes and changes are:

  • fixed Tanks DLC soldiers getting new launchers and ammo
  • fixed type 115 soldiers not getting .50 ammo for the secondary barrel
  • many other minor issues I forgot were there
  • externalized weapon selection to userconfig
  • matched calibers to soldier roles, marksmen can get sniper rifles, but only snipers/specops get .50 ones
  • randomized rifle grenade and ammo selection
  • made ammo carriers carry missiles and belts matching soldiers in their squad

The config file contains the following settings:

  • tws_player_keeps_weapons = 1 or 0;

set to 1 to prevent the mod from changing the player's weapons/ammo. Set to 0 to get random gear for each mission. No longer need separate mod file.

 

  • tws_guns_east[] = {...};
  • tws_guns_west[] = {...};
  • tws_guns_ind[] = {...};

These contain a list of weapon id parts that match weapons available to each faction. Case insensitive.
For example entering "dmr" will match "srifle_DMR_02_F", "srifle_DMR_01_F" and all other guns with "dmr" in their id.
Official weapon ids are on the wiki: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
Current list is a mix of stuff from mods I use, and leftover stuff from original ATW

 

  • tws_sidearms_east[] = {...};
  • tws_sidearms_west[] = {...};
  • tws_sidearms_ind[] = {...};

Same, but for pistols and such.

 

  • tws_ammo_light[] = {...};
  • tws_ammo_rifle_std[] = {...};
  • tws_ammo_rifle_hvy[] = {...};
  • tws_ammo_sharpshooter[] = {...};
  • tws_ammo_sniper[] = {...};
  • tws_ammo_hvy[] = {...};

These work the same, but are used to match against ammo/magazine names when looking for weapons.

 

Basically the weapon selection process is:

  1. check if the given soldier is a specialist of some sort, pick a random weapon of a fitting type (eg. a MG for a machinegunner)
  2. check if the ammo it uses matches what the soldier is allowed to use

For example a marksman will use sniper rifles and DMRs, but not .50 or .408 rifles. Similarly most soldiers can use a 6.5 LSW, but not .338 MMGs. I mean, in gameplay terms, it just seemed silly when a significant fraction of enemy soldiers had MMGs and anti-materiel rifles. Now that's limited to slightly rare units.
 

Here's a code snippet that shows who can use what:

call {

    if (_isSniper == 1) exitWith
    {
        _scopeMainChance = 200; _silencerMainChance = 75; _lightMainChance = 10; _bipodMainChane = 99;
        _primweapon =  [ ["SniperRifle","Rifle"], _atw_ammo_sniper ] call atw_pick_weapon;
    };

    if (_isSharpshooter == 1) exitWith
    {
        _scopeMainChance = 200; _silencerMainChance = 80; _lightMainChance = 25; _bipodMainChane = 99;
        _primweapon =  [ ["SniperRifle","Rifle"], _atw_ammo_sharpshooter ] call atw_pick_weapon;
    };

    if (_isCrew == 1 or _isPilot == 1) exitWith
    {
        _scopeMainChance = 50; _silencerMainChance = 20; _lightMainChance = 75; _bipodMainChane = 50;
        _primweapon =  [ ["AssaultRifle","SubmachineGun"], _atw_ammo_light ] call atw_pick_weapon;
    };

    if (_isAT == 1) exitWith
    {
        _scopeMainChance = 75; _silencerMainChance = 20; _lightMainChance = 50; _bipodMainChane = 20;
        _primweapon =  [ ["AssaultRifle","SubmachineGun"], _atw_ammo_light+_atw_ammo_rifle_std ] call atw_pick_weapon;
    };

    if (_isLightAT == 1) exitWith
    {
        _scopeMainChance = 80; _silencerMainChance = 33; _lightMainChance = 75; _bipodMainChane = 40;
        _primweapon =  [ ["AssaultRifle"], _atw_ammo_rifle_std+_atw_ammo_rifle_hvy ] call atw_pick_weapon;
    };

    if (_isMG == 1) exitWith
    {
        _scopeMainChance = 80; _silencerMainChance = 40; _lightMainChance = 50; _bipodMainChane = 99;
        _primweapon =  [ ["MachineGun"], _atw_ammo_rifle_hvy+_atw_ammo_hvy ] call atw_pick_weapon;
    };

    if (_isAssist == 1 or _isLite == 1) exitWith
    {
        _scopeMainChance = 60; _silencerMainChance = 20; _lightMainChance = 35; _bipodMainChane = 25;
        _primweapon =  [ ["AssaultRifle","SubmachineGun"], _atw_ammo_light ] call atw_pick_weapon;
    };

    if (_isOfficer == 1 or _isLeader == 1) exitWith // officers and squad/team leaders can get sniper rifles
    {
        _scopeMainChance = 90; _silencerMainChance = 50; _lightMainChance = 75; _bipodMainChane = 75;
        _primweapon =  [ ["AssaultRifle","SniperRifle"], _atw_ammo_sharpshooter, _isGrenadier ] call atw_pick_weapon;
    };

    if (_isRecon == 1) exitWith // recon riflemen, medics, mechanics etc
    {
        _scopeMainChance = 99; _silencerMainChance = 80; _lightMainChance = 80; _bipodMainChane = 99;
        _primweapon =  [ ["AssaultRifle","SniperRifle"], _atw_ammo_rifle_std+_atw_ammo_rifle_hvy+_atw_ammo_hvy, _isGrenadier ] call atw_pick_weapon;
    };

    if (_isSupport == 1) exitWith
    {
        _scopeMainChance = 60; _silencerMainChance = 20; _lightMainChance = 60; _bipodMainChane = 50;
        _primweapon =  [ ["AssaultRifle"], _atw_ammo_rifle_std, _isGrenadier ] call atw_pick_weapon;
    };

    //default code
    _scopeMainChance = 75; _silencerMainChance = 40; _lightMainChance = 75; _bipodMainChane = 50;
    _primweapon =  [ ["AssaultRifle"], _atw_ammo_rifle_std+_atw_ammo_rifle_hvy+_atw_ammo_hvy, _isGrenadier ] call atw_pick_weapon;
};

While it's a fun mod on its own, it really comes to life with TPW Mods skirmish. I've never had so much fun in Arma singleplayer as with these two mods.

 

You can easily check what this mod does, and if it works, in Virtual Arsenal. Check the runtime log (~\AppData\Local\Arma 3\*.rpt) to see if soldiers are getting the gear you want. In case you're having trouble changing equipment before the a mission starts, try waiting until the script completes swapping everyone's gear, sometimes it fixes that. Sometimes it just keeps resetting player's gear, dunno what's causing that.

Share this post


Link to post
Share on other sites

Hey there syf, I don't know if you're still active here, but your version of ATW was working well for me, until recently where it started giving me this error:

20:13:38 "twisted's aLL THE WEAPONS mod is initialising at 0 "
20:13:38 "All the weapons isServer or isDedicated at 0 "
20:13:38 "tws_first_run is 1 "
20:13:38 "init: tws_ammo_array [[[""9x"",""9 mm"","".45"",""5.7"",""570"",""4.6"",""12ga""],[""5.8"",""6.5"",""6.8"",""5.56"",""5.45"",""556"",""545""],[""7.62"",""762"","".300""],[""7.62"",""762"","".300"",""9.3"","".338""],[""9.3"","".50"","".408"",""12.7"","".338"",""20mm"",""25mm""],[""9.3"","".50"","".408"",""12.7"","".338"",""20mm"",""25mm""]]]"
20:13:38 "in all the weapons - gloabla weapons already defined at 0"
20:13:38 "tws_global_weapon_array_global_init is set up at 0"
20:13:38 "in all the weapons - execvm rearm loop at 0"
20:13:38 Unknown task state: 
20:13:38 Unknown task state: 
20:13:38 Unknown task state: 
20:13:38 "************************************* -> B Alpha 1-1:1 (Utilizador) "
20:13:38 Error in expression <nsToUse select _pickOne;
_primweapon = [_chosenweapon] call BIS_fnc_baseWeapon;
>
20:13:38   Error position: <_chosenweapon] call BIS_fnc_baseWeapon;
>
20:13:38   Error Undefined variable in expression: _chosenweapon
20:13:38 File tws_randWeapons\tws_simpleRearm.sqf..., line 370

This is all it shows everytime ATW runs, so at the start of each mission. I've not messed with the addon other than the userconfig file to change the weapon pools for each side, and I've done a full East Wind campaign with it working for the most part (eventually I just swapped it for Virtual Arsenal because I just wanted to use a few weapons that rarely showed up, but until then it was definitely working without issues), but now it just trips this error everytime. I'm actually playing without weapon mods, as I wanted to try more of the normal and DLC weapons this time. I guess I could just use VA again, but I honestly prefer ATW to VA, so if you (or someone else) could take a look and help with this error I would appreciate. I don't have modding experience, so while I took a look at the code (unpacked the addon), other than maybe deleting the section that is triggering the error, I wouldn't know exactly how to fix this, if it's fixable idk.

 

Edit: So I had already re-unzipped the original download and installed the mod again just in case somehow the addon had gone corrupted or something, but I had kept my modified userconfig file, and hadn't tried also using the original config file. I did that this time and now it works. So apparently the issue was with my weapon choices or something that I've changed in the code itself that I never noticed. Sorry for the post, nothing was broken apparently, it's all good now.

Edited by SLB4ever
fixed issue

Share this post


Link to post
Share on other sites

Syf, I don`t know why, but using your mod with RHS all red faction changes weapons to SVD. All - ATs, MGs, AAs, Riflemen! Can you fix it?  

Share this post


Link to post
Share on other sites
On 4/20/2020 at 4:37 AM, syf said:

Since TWS seems to have disappeared and is seems people are still using this mod, I'm releasing my version here: https://www.dropbox.com/s/6k9eqdej33dsgn0/ATW2020.7z?dl=1

 

Fixes and changes are:

  • fixed Tanks DLC soldiers getting new launchers and ammo
  • fixed type 115 soldiers not getting .50 ammo for the secondary barrel
  • many other minor issues I forgot were there
  • externalized weapon selection to userconfig
  • matched calibers to soldier roles, marksmen can get sniper rifles, but only snipers/specops get .50 ones
  • randomized rifle grenade and ammo selection
  • made ammo carriers carry missiles and belts matching soldiers in their squad

The config file contains the following settings:

  • tws_player_keeps_weapons = 1 or 0;

set to 1 to prevent the mod from changing the player's weapons/ammo. Set to 0 to get random gear for each mission. No longer need separate mod file.

 

  • tws_guns_east[] = {...};
  • tws_guns_west[] = {...};
  • tws_guns_ind[] = {...};

These contain a list of weapon id parts that match weapons available to each faction. Case insensitive.
For example entering "dmr" will match "srifle_DMR_02_F", "srifle_DMR_01_F" and all other guns with "dmr" in their id.
Official weapon ids are on the wiki: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
Current list is a mix of stuff from mods I use, and leftover stuff from original ATW

 

  • tws_sidearms_east[] = {...};
  • tws_sidearms_west[] = {...};
  • tws_sidearms_ind[] = {...};

Same, but for pistols and such.

 

  • tws_ammo_light[] = {...};
  • tws_ammo_rifle_std[] = {...};
  • tws_ammo_rifle_hvy[] = {...};
  • tws_ammo_sharpshooter[] = {...};
  • tws_ammo_sniper[] = {...};
  • tws_ammo_hvy[] = {...};

These work the same, but are used to match against ammo/magazine names when looking for weapons.

 

Basically the weapon selection process is:

  1. check if the given soldier is a specialist of some sort, pick a random weapon of a fitting type (eg. a MG for a machinegunner)
  2. check if the ammo it uses matches what the soldier is allowed to use

For example a marksman will use sniper rifles and DMRs, but not .50 or .408 rifles. Similarly most soldiers can use a 6.5 LSW, but not .338 MMGs. I mean, in gameplay terms, it just seemed silly when a significant fraction of enemy soldiers had MMGs and anti-materiel rifles. Now that's limited to slightly rare units.
 

Here's a code snippet that shows who can use what:


call {

    if (_isSniper == 1) exitWith
    {
        _scopeMainChance = 200; _silencerMainChance = 75; _lightMainChance = 10; _bipodMainChane = 99;
        _primweapon =  [ ["SniperRifle","Rifle"], _atw_ammo_sniper ] call atw_pick_weapon;
    };

    if (_isSharpshooter == 1) exitWith
    {
        _scopeMainChance = 200; _silencerMainChance = 80; _lightMainChance = 25; _bipodMainChane = 99;
        _primweapon =  [ ["SniperRifle","Rifle"], _atw_ammo_sharpshooter ] call atw_pick_weapon;
    };

    if (_isCrew == 1 or _isPilot == 1) exitWith
    {
        _scopeMainChance = 50; _silencerMainChance = 20; _lightMainChance = 75; _bipodMainChane = 50;
        _primweapon =  [ ["AssaultRifle","SubmachineGun"], _atw_ammo_light ] call atw_pick_weapon;
    };

    if (_isAT == 1) exitWith
    {
        _scopeMainChance = 75; _silencerMainChance = 20; _lightMainChance = 50; _bipodMainChane = 20;
        _primweapon =  [ ["AssaultRifle","SubmachineGun"], _atw_ammo_light+_atw_ammo_rifle_std ] call atw_pick_weapon;
    };

    if (_isLightAT == 1) exitWith
    {
        _scopeMainChance = 80; _silencerMainChance = 33; _lightMainChance = 75; _bipodMainChane = 40;
        _primweapon =  [ ["AssaultRifle"], _atw_ammo_rifle_std+_atw_ammo_rifle_hvy ] call atw_pick_weapon;
    };

    if (_isMG == 1) exitWith
    {
        _scopeMainChance = 80; _silencerMainChance = 40; _lightMainChance = 50; _bipodMainChane = 99;
        _primweapon =  [ ["MachineGun"], _atw_ammo_rifle_hvy+_atw_ammo_hvy ] call atw_pick_weapon;
    };

    if (_isAssist == 1 or _isLite == 1) exitWith
    {
        _scopeMainChance = 60; _silencerMainChance = 20; _lightMainChance = 35; _bipodMainChane = 25;
        _primweapon =  [ ["AssaultRifle","SubmachineGun"], _atw_ammo_light ] call atw_pick_weapon;
    };

    if (_isOfficer == 1 or _isLeader == 1) exitWith // officers and squad/team leaders can get sniper rifles
    {
        _scopeMainChance = 90; _silencerMainChance = 50; _lightMainChance = 75; _bipodMainChane = 75;
        _primweapon =  [ ["AssaultRifle","SniperRifle"], _atw_ammo_sharpshooter, _isGrenadier ] call atw_pick_weapon;
    };

    if (_isRecon == 1) exitWith // recon riflemen, medics, mechanics etc
    {
        _scopeMainChance = 99; _silencerMainChance = 80; _lightMainChance = 80; _bipodMainChane = 99;
        _primweapon =  [ ["AssaultRifle","SniperRifle"], _atw_ammo_rifle_std+_atw_ammo_rifle_hvy+_atw_ammo_hvy, _isGrenadier ] call atw_pick_weapon;
    };

    if (_isSupport == 1) exitWith
    {
        _scopeMainChance = 60; _silencerMainChance = 20; _lightMainChance = 60; _bipodMainChane = 50;
        _primweapon =  [ ["AssaultRifle"], _atw_ammo_rifle_std, _isGrenadier ] call atw_pick_weapon;
    };

    //default code
    _scopeMainChance = 75; _silencerMainChance = 40; _lightMainChance = 75; _bipodMainChane = 50;
    _primweapon =  [ ["AssaultRifle"], _atw_ammo_rifle_std+_atw_ammo_rifle_hvy+_atw_ammo_hvy, _isGrenadier ] call atw_pick_weapon;
};

While it's a fun mod on its own, it really comes to life with TPW Mods skirmish. I've never had so much fun in Arma singleplayer as with these two mods.

 

You can easily check what this mod does, and if it works, in Virtual Arsenal. Check the runtime log (~\AppData\Local\Arma 3\*.rpt) to see if soldiers are getting the gear you want. In case you're having trouble changing equipment before the a mission starts, try waiting until the script completes swapping everyone's gear, sometimes it fixes that. Sometimes it just keeps resetting player's gear, dunno what's causing that.

Hi again. Will you fix it?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×