XCOM 2
Welcome to the Resistance
Create your own aliens, weapons, maps, and other content to expand the XCOM2 universe
Chipchip 1 Sep, 2017 @ 7:52pm
Faction Weapons for regular soldiers?
Is there a way regular soldiers can equip faction weapons...? For example, ranger can equib bullpup or sharpshooter using vektor rifle??

Also faction armors looks soo cool... Is there a way to make regular soldiers equip faction armors too?

I tried with changing ini file, but it won't work... it keeps replaced by the game.
< >
Showing 1-15 of 33 comments
LiberTea 4 Sep, 2017 @ 1:05pm 
Go to Xcom War of the chosen folder. There in the config folder you will find DefaultClassData.ini

Find the class you want and there should be a line
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="XXX")
aswell as
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="XXX")

XXX being the respective weapon of that class

To add another weapon just add another line with
AllowedWeapons=(SoltType=eInvSlot_PrimaryWeapon, "name of the weapon you want")

As an example if you want to add the vektor rifle to a class tpye

AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="vektor_rifle")


Hope it helps
Last edited by LiberTea; 4 Sep, 2017 @ 1:05pm
Chipchip 4 Sep, 2017 @ 6:25pm 
I tried it... but it replaced back to original for some reason.... do you know why though?
Ignitus 5 Sep, 2017 @ 9:44pm 
I've tried to create a custom class using the bullpup (specifically for the debuff it has vs. normal XCOM weapons) but the weapon doesn't appear in the XCOM inventory until I recruit a Skirmisher. Likely that's your problem, that the weapons "unlock" when you have a soldier of that type? As far as I can see, it's true for SPARKs too.

So, any helpful modders want to indicate how to force the schematics to appear from the start of the game?
Chipchip 5 Sep, 2017 @ 10:50pm 
Oh... thats interesting.. yea!
Instinct 6 Sep, 2017 @ 1:08am 
Doesn't seem to work at all for me. While for example the bullpup rifle appears in the inventory after a Skirmisher is recruited, it still appears to be locked to the Skirmisher class despite making these config edits. No clue why.
Can't even make these weapons appear in the inventory with console commands, it seems.
I just want to use the new shiny toys ;-;
Ignitus 6 Sep, 2017 @ 5:24pm 
Hmm. Did you edit the permitted weapons both on the soldier's class and on the Squaddie loadout? And did you have the soldier rank up to Squaddie when you already had a Skirmisher recruited?

I'll admit I'm kind of stumped. Whatever custom code is controlling the SPARK/Faction weapons must be locked to certain events. I hate having to recreate an entire new "clone" of the weapon to use it somewhere else, but we might be stuck with that.

Anyone have any other ideas where to look for the lock?
Malidictus 12 6 Sep, 2017 @ 6:38pm 
The Resistance classes have some... non-standard programming on them. I managed to produce a custom class which uses the Bullpup SMG just fine, has a Ripjack, has Reaper armour and is able to use all of the grappling hook skills... Except for pulling an enemy to him. That causes an animation sequencer error.

I'd very much love to know where animations, weapon unlocks and such are handled, myself.
Ignitus 6 Sep, 2017 @ 9:12pm 
For those of us who are just tampering with the weapons, any hints how you managed to get the bullpup working properly?
Malidictus 12 7 Sep, 2017 @ 7:07am 
In my case, I spawned a soldier who already had that weapon as part of their Squaddie Template. In my case, I edited XComGameData.ini and added the following:

[XComGame.X2ItemTemplateManager] +Loadouts=(LoadoutName="SquaddieSkirmisherRookie", Items[0]=(Item="SkirmisherArmor"), Items[1]=(Item="Bullpup_CV"), Items[2]=(Item="WristBlade_CV"), Items[3]=(Item="FragGrenade"))

That's for my Skirmisher Rookie. This mod is still a work in progress, however, and may never work at all, so I've not tested this extensively. I can't guarantee that that'll work for everyone. If it doesn't, tweaking the current GameState might be necessary.
Last edited by Malidictus; 7 Sep, 2017 @ 7:07am
Ignitus 7 Sep, 2017 @ 4:40pm 
Ugh. GameState changes are tremendous overkill for what I'm trying to do. Spawning them directly as a Squaddie prompted the bullpup equip to work? Because so far, when mine have leveled up into it, they've been unable to auto-equip the bullpup even if its set in the loadout.

Might try it again though just to double-check.
Malidictus 12 7 Sep, 2017 @ 5:18pm 
My guess is Firaxis tried to keep tose weapons out of your other solders' inventories until you have a soldier who can use them, hence why they're locked. I think what does it in my case is I'm using a whole new class with the Skirmisher tags, which may be fooling the game into thinking I have one.

Honestly, at this point I think we'd want to start with finding what controls unlocking the weapons in the first place and seeing if maybe we can fake that somehow. I don't think it's gamestate-specific. More there's a check somewhere as to whether you have a specific soldier in your barracks before those weapons will become useable.

Hmm... Will the weapons disappear if you fire all your Resistance Class soldiers? Say, if you Dismiss all your Skirmishers, does the Bullpup disappear? If so, you may be able to add more classes to what's being checked for.
Ignitus 7 Sep, 2017 @ 8:35pm 
I just tested. Firing a Skirmisher once I had Voice soldiers equipped with bullpups did not remove the bullpups. So it seems to be a one-time unlock trigger. However, I did run into an interesting problem.

I have them equipped with bullpups and machine pistols (from the Templars). When they get promoted to Squaddie, they get machine pistols equipped, *but not bullpups*. There's something about the primary weapon slot where it stays an assault rifle for some reason.

This happens both with soldiers promoted and trained as my custom class, and also both before and after getting Skirmishers.
Malidictus 12 8 Sep, 2017 @ 5:27am 
Hmm... Now that's really weird. At this point, I can only guess as to whether that has something to do with being able to use ONLY the weapon in question or if it's some narrative trigger that has to fire. I had a quick search for "bullpup" across all of the class files, but it didn't turn up anything too interesting. You have X2Item_XpacSchematics where the templates for the upgrades are handled. The CreateTemplate_Bullpup_Magnetic_Schematic() function contains the line:

Template.Requirements.RequiredSoldierClass = 'Skirmisher';

I don't know if that means the schematic only applies to the Skirmisher class or if you're required to have that class before you can use the schematic. I think that's there so the magnetic weapon upgrade doesn't show up until you have a Skirmisher who can use it, similar to how SPARK cannon upgrades don't show up unless you have a SPARK. But that's the upgrade under "Build Items."

For the item itself, I looked at X2Item_XpacWeapons where their basic templates are created, specifically the CreateTemplate_Bullpup_Conventional() function. I don't see anything in there which is specific to Skirmishers, but there is this line:

Template.StartingItem = false;

I believe this determines whether you start with the item already in your inventory or if you have to meet some condition in order to unlock it. Maybe try either replacing the 'Bullpup_CV' template or pulling it out of the manager and changing its StartingItem variable to true. That might cause it to pop up in your inventory without needing a Skirmisher, but I'm just guessing at this point.
Ignitus 8 Sep, 2017 @ 10:19am 
Okay, I feel dumb, but I'm new to modding XCOM2 and can't find X2Item_XpacSchematics in the Classes folder. Am I looking in the wrong place?

My guess is that if I flip the StartingItem flag as you suggested it will fix it. In which case, definitely need to write it up and make sure other modders have that answer available. With proper credit, 'cause I'm still a little at sea. :)
Malidictus 12 8 Sep, 2017 @ 11:10am 
That's because I misspelled it... It's X2Item_XpackSchematics, "Xpack" rather than "Xpac." We're talking "Expansion Pack," not WWE wrestlers :) That's what I get for typing class names by hand rather than copy-pasting them...
< >
Showing 1-15 of 33 comments
Per page: 1530 50