XCOM 2
68 ratings
[WOTC] True Primary Pistols Bonus
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
871.571 KB
28 Apr @ 4:44am
4 May @ 2:22pm
3 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] True Primary Pistols Bonus

Description
True Primary Pistols Bonus
Provide a configurable bonus for when pistols/autopistols are equipped in the primary weapon slot using True Primary Secondaries

About
This is a value-added feature for Musashi's True Primary Secondaries that gives a bonus when wielding Pistols/Autopistols in the primary weapon slot (without dual wielding).

In the (both deprecated) Primary Pistols or Primary Secondaries, there was a bonus to various stats when wielding primary pistols.

Possibly due to an oversight, this wasn't setup properly in True Primary Secondaries, even though most of the code is still there.

This mod restores the bonus (localized as the "Focused Handling" ability in all pistols) and additionally exposes more stats to be configured at your leisure/peril.

The original bonus (the default config in this mod) is as follows:
  • Mobility +1
  • Detection Radius Modifier 0.2
  • Damage +1

You can tweak these values in XComTruePrimaryPistolsBonus.ini in the Config folder, where' I've left comments explaining how to do so.
I've also additionally exposed many stats, including HP, Aim, Crit Chance, Defense, Dodge, etc. I've even included stats for which I have no idea what they do, but go ahead and knock yourself out.

FAQs
Can I run True Primary Secondaries without this mod?
Yes. True Primary Secondaries works just fine on its own (make sure to also subscribe to Musashi's Mods Fixes by Iridar though). You just won't get the totally cool and awesome bonus that was intentionally designed by Musashi.

Why is Chimera Squad Icons Pack listed as a required mod?
I am using an icon (O,13) from there for the "Focused Handling" ability (the ability/effect that gives the primary pistol bonus). If you are interested in making an original icon for the bonus, feel free to reach out and I would be happy to add incorporate that in this mod.
You can also customize the icon used by configuring it in XComTruePrimaryPistolsBonus.ini.

Will this work with ___?
Check the Compatibility section below.

Can I add this mid-campaign?
Yes. In fact, based on my personal testing, it should even work mid-tactical. As of version 2.0.0, it is better to load a strategy save as some changes don't apply properly mid-tactical.

How do I configure the bonuses from primary pistols/autopistols?
This pinned discussion post has detailed instructions on how to configure the .ini file to do so.

What about other primary secondaries?
When I finished version 1.0.0 of this mod, I realized I could probably make a generalized way to make this bonus separately configurable for any weapon.
For example, you could configure primary melee weapons to grant defense bonuses, primary sawed-off shotguns to grant crit chance bonuses etc. The code would have to be quite different though, so I may potentially release that as a separate mod if my time and interests align.

Can I make a localization for this mod
Yes, but there's an issue where I hardcoded the stat names in English for the ability description. I did it in the code so that the stats only appear when they are impacted. If a more experienced XCOM2 modder knows how to do this better, please let me know, thanks! as of version 2.0.0, all text from this mod can be localized.

Compatibility
  • Do not use with Primary Pistols or Primary Secondaries
    They are both deprecated anyway and you should be using True Primary Secondaries in this day and age.
  • RPG Overhaul
    Yes.
  • Covert Infiltration
    Yes. This mod doesn't touch anything to do with CI mechanics, though I think it would be interesting if primary pistols gave a bonus to Infiltration. If my time and interests align I may try making an update to add Infiltration bonuses when wielding primary pistols.
    As of version 2.0.0, you can now configure the Infiltration hours in XComInfiltration.ini. The default is -10 hours (bearing in mind pistols have a default of +2 hours, so the net effect is 2 - 10 = -8 hours)
  • LWotC
    Probably? I haven't played LWotC yet, so I can't say for sure what will happen, but since all this mod does is add a conditional ability to pistols, I think it should work just fine.
  • Other mods that add new pistols/autopistols
    Yes. As long as their weapon category in the code is 'pistol' or 'sidearm', this mod will apply the bonus to them using OPTC. Note that this means Handcannons and Smartpistols do not count, as they have their own weapon categories.

Credits and Appreciation
  • Musashi for True Primary Secondaries.
  • Iridar for helping me debug an issue I was facing while coding this mod, over at the XCOM 2 Modding Discord Channel[discord.gg]. I seriously can't understate how much he's done for the XCOM2 modding community over the years. In fact, here's a shameless plug for his Patreon[www.patreon.com] page.
  • Zelfana for pointing out how to get the stats to update in the Armory UI.

Everyone has permission to reuse my code (which is also available on my github[github.com]) or repackage it if necessary, especially if something breaks and I'm not actively modding XCOM 2 at the time. Just don't be a weirdo who reuploads other people's mods for internet clout??
Popular Discussions View All (1)
1
4 May @ 10:40pm
PINNED: How to configure the bonus
Hanter
19 Comments
SunnyMitten 22 May @ 5:00pm 
Now I'm curious about secondary primaries.
Chaphel 17 May @ 10:20am 
It would be great! Thank you!
Hanter  [author] 16 May @ 8:07am 
@Chaphel sounds fair. I'll make that configurable in the next update
Chaphel 16 May @ 7:47am 
Thank you for the mod!
Is there any chance to make bonus not disappear when dual wielding?
Im using this mod to make mobility of the soldiers same as when using smg. But its strange, that after equiping second pistol they become slower then a gunner)
Hanter  [author] 15 May @ 10:30am 
@Canthyse Thanks! I'll have a look at what's going on there
Canthyse 15 May @ 10:28am 
Right. For reference, im using the Phalanx Proficiency class, they use pistol as primary and shield as secondary
Hanter  [author] 15 May @ 9:52am 
@Canthyse are you referring to equipping pistol in primary and shield in secondary?

If so, I'll have to take a look.
Canthyse 14 May @ 3:07pm 
Is it intended that doesnt work with shields? I got the bonus with primary pistols and secondary swords and knifes, but the buff doesnt work with shields.
Hanter  [author] 4 May @ 2:26pm 
Heads up to anyone who had customized configs or localization for this mod:
The latest update ( 2.0.0 ) will break them, so please go over the config and localization files and double check if you need to tweak anything
Hanter  [author] 4 May @ 2:24pm 
@Wet Dog Squad you're gonna like update 2.0.0 that just dropped then :)