XCOM 2
44 ratings
Pistols Get PistolStandardShot
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
64.634 KB
9 Nov, 2017 @ 10:50pm
10 Nov, 2017 @ 11:20am
12 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Pistols Get PistolStandardShot

Description
This mod is for INI editors (modders). Use it as a prerequisite to your own INI compilation. I made it for WOTC, but its technically compatible with any XCOM 2 version, but I will only support WOTC configurations.

-= USAGE=-
It allows you to:

- Add Pistols to Rookies, or any other basic (custom) class without giving the ability via Ranking.
- Add Pistols to Templars without giving them the ability to use it manually. Yes, your Templar can use a Shadowkeeper, or the Chosen Pistol.

In short, any class not competent with a pistol that gets equipped one becomes instantly competent. This is how it should have always been from day 1. It's how Autopistols work in WOTC.

-= REQUIREMENTS =-
1. SNIPER ABILITIES REMOVAL
Once you install this mod, your mod should also remove PistolStandardShot from the Sniper Class ranks, as it is no longer required and will lead to duplication. The ability is now weapon dependant. This is in DefaultClassData.INI, replace it with something more fun like BloodTrail or whatever you want. Put ReturnFire there, and put something else above. Your choice.

2. ROOKIE LOADOUT
You will need to edit the 3 loadouts for Rookies in DefaultGameData. Your new lines should look like this, and should replace the loadouts (dont add this, overwrite).

Loadouts=(LoadoutName="RookieSoldier", Items[0]=(Item="KevlarArmor"), Items[1]=(Item="AssaultRifle_CV"), Items[2]=(Item="FragGrenade"), Items[3]=(Item="FragGrenade"), Items[4]=(Item="Pistol_CV"))
Loadouts=(LoadoutName="RookieSoldierM2", Items[0]=(Item="KevlarArmor"), Items[1]=(Item="AssaultRifle_MG"), Items[2]=(Item="FragGrenade"), Items[3]=(Item="FragGrenade"), Items[4]=(Item="Pistol_MG"))
Loadouts=(LoadoutName="RookieSoldierM3", Items[0]=(Item="KevlarArmor"), Items[1]=(Item="AssaultRifle_BM"), Items[2]=(Item="FragGrenade"), Items[3]=(Item="FragGrenade"), Items[4]=(Item="Pistol_BM"))

Any fresh recruit now comes with a pistol by default.

2b. REBEL LOADOUT
Not supported (as in I cant help you more than whats written here), they wont be able to use it properly anyway via AI. They might have it though, and you might be able to make use of it if you control them. And if you dont, the gun looks cool anyway. I dont use this, but heres how to do it.

The loadout for Rebels:

Loadouts=(LoadoutName="CivilianMilitiaLoadout", Items[0]=(Item="MilitiaRifle_CV"), Items[1]=(Item="Pistol_CV"))
Loadouts=(LoadoutName="CivilianMilitiaLoadoutM2", Items[0]=(Item="MilitiaRifle_MG"), Items[1]=(Item="Pistol_MG"))
Loadouts=(LoadoutName="CivilianMilitiaLoadoutM3", Items[0]=(Item="MilitiaRifle_BM"), Items[1]=(Item="Pistol_BM"))

3. ROOKIE ENABLED TO EQUIP PISTOLS
You will need to mod rookies in the DefaultClassData file.

bNoSecondaryWeapon=false
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="pistol")

Note that a Rookie that ranks up doesnt get a pistol and thus loses all knowledge how to use it, so the abilities wont linger and pollute your ability bar. It's great. Also, if you dont perform this step, your secondary weapon box will be locked or not appear at all.

4. TEMPLARS ENABLED TO EQUIP PISTOLS
Templars are easier. Just add this and it works out of the box in DefaultClassData.
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="pistol")

-= CUSTOM MOD PISTOLS =-
V2.0 supports feeding this mod an array of pistols that should be updated. Use this mod's CONFIG file and update it.

C:\Program Files (x86)\Steam\steamapps\workshop\content\268500\1196623510\Config\XComCustomPistols.ini

-= LIMITATIONS =-
AUTOPISTOL:
You cant give Autopistols to anyone else, because it causes animation problems. Sorry.
If you're curious, the bug is that when firing, the unit will hold it's main weapon AND the autopistol at the same time and it looks awful.

REAPERS:
The Claymore is a Secondary weapon, you cant give pistols to Reapers. I wanted too also, i feel your pain.

NEW GAME ONLY:
You really shouldnt use this in the middle of a campaign. Once you start a campaign with this mod, if you remove this mod your soldiers will NOT suddenly remember how to use a pistol, its gone.

BALANCE ISSUES:
This is entirely up to you to decide if a Templar with a Shadowkeeper or Chosen Pistol is overpowered (i wouldnt think so). I also think Rookies with Pistols is a good help for super early game, and you might consider it cheating.

-= FINAL NOTE =-
It took longer to write this description than to code the actual mod. Hope you enjoy the tutorial.
19 Comments
initium 18 May, 2019 @ 5:14pm 
@DivideByZero - Clause released a mod called Mercenary Plasma Weapons (IIRC)
He put a config file together which includes mobility for each weapon along with a Range Table. It doesn't replace the vanilla weapons and by default uses the same damage etc.
But I'm with AA on this. The item/weapon used should be applying the effect of its use, not a soldier ability.
ADVENT Avenger  [author] 18 May, 2019 @ 2:49pm 
Its easy to code but you cant do it via ini editing
DivideByZero 18 May, 2019 @ 2:01pm 
Many thanks for the clarification AA.
btw I'm doing some ini tinkering to try and add a mobility penalty to a weapon, do you know of a mod that already does that so I can check the code involved?
ADVENT Avenger  [author] 18 May, 2019 @ 1:20pm 
That's correct. You cannot have 2 secondary weapons.
DivideByZero 18 May, 2019 @ 1:16pm 
Just wondering, when you say you can't give pistols to reapers you mean you can't get them to have their signature claymore(s) AND carry a pistol too, I suppose?
Because I think after all I'd like to equip a pistol on a reaper when I know the Lost are present, since you're not going to want to blow up stuff anyway.
ADVENT Avenger  [author] 10 May, 2019 @ 9:38am 
Anytime captain
initium 10 May, 2019 @ 4:41am 
I suppose this mod provides the bases for all weapons to have a weapon based skill to use them. If that is the case I'm very happy as I've had an idea for a mod for ages but never had the time to learn how to mod properly. I'm still an ini tinkerer =)
So thank you AA - from us ini tinkerers that you so kindly called modders.
Spacetauren 16 Apr, 2019 @ 9:47am 
@The Real Cynik
Slight (lol) necro, but how did you manage to do that ? I'd like to do the same as well as giving ranged hacking to gremlins.
CyniksteR 2 Nov, 2018 @ 9:15am 
thanks, I ended up going overboard and giving LaunchGrenade to Grenade Launchers, and SwordSlice to Swords 😅
ADVENT Avenger  [author] 1 Nov, 2018 @ 10:47pm 
Probably, feel free to take my code and just swap it