[WOTC] True Primary Pistols Bonus

If you liked this item, please rate it up on Steam Workshop page.

Author: Hanter

Last revision: 4 May, 2024 at 21:22 UTC (1)

File size: 871.57 KB

On Steam Workshop

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??

Download
Required DLC:

These DLC should be installed in order to use this item.


XCOM 2: War of the Chosen
Required items:

Click the title to search on this site.


True Primary Secondaries [BETA]Steam Workshop
Chimera Squad Ability IconsSteam Workshop
Revisions:

Old revisions of this mod are available below. Click the link to download.