XCOM 2
[WotC] Limited Reloads [Old, Unsupported]
looplick 1 Apr, 2019 @ 2:35am
Odd bug
I've been doing some troubleshooting and there's a bug where the starting squad's (i.e. gatecrashers) weapons do not register extra reloads.

For example, if you edit the .ini file so rookies start with extra mags instead of a grenade, the gatecrashing soldiers will have the proper number of "give ammo" charges, but not the proper number of weapon reload charges.

It has to do with the weapons the gatecrashers are carrying because if that soldier carries that same weapon into subsequent missions, it still doesn't register extra reloads when you have extra mags equipped. However, if you swap the weapon in the loadout screen before a mission, it shows the proper number of reloads from then on.
< >
Showing 1-12 of 12 comments
looplick 1 Apr, 2019 @ 2:35am 
Odd bug... If I add CurrentWeapon.Abilities.AddItem('GiveAmmoRS') to the AddReloadTier functions in X2DownloadableContentInfo_LimitedReloads, and remove Template.AdditionalAbilities.AddItem('GiveAmmoRS') from the 'ReloadRS' ability template, both reload and give ammo don't register any extra reloads equipped...

The solution is to create a PurePassive ability that holds both 'ReloadRS' and 'GiveAmmoRS' and then add that to the AddReloadTier functions. Mine looks like this.

static function X2AbilityTemplate ReloadContainer()
{
local X2AbilityTemplate Template;

Template = PurePassive('ReloadContainer', "img:///UILibrary_PerkIcons.UIPerk_reload", false, 'eAbilitySource_Perk', false);

Template.AdditionalAbilities.AddItem('ReloadRS');
Template.AdditionalAbilities.AddItem('GiveAmmoRS');

return Template;
}
Richard  [developer] 3 Apr, 2019 @ 3:05pm 
Thanks I'll give it a shot.
looplick 3 Apr, 2019 @ 3:29pm 
I was able to find this by setting the icon behavior in the ReloadRS template to the following:

Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;

I personally like this better as you always know how many reloads you have.

If you're interested, I also have a conditional where only soldiers with matching weapons can give ammo to each other. It adds a pretty cool tactical dimension to the game. I'm also currently trying my hand at UI programming to show the number of clips in the HUD next to the weapon.
Richard  [developer] 3 Apr, 2019 @ 4:46pm 
Thanks for your help with this it works great.
I think there are too many problems with splitting the weapon types personally, not to mention making it really difficult haha.
Feel free to upload a version of this if you want, I'm sure you can do a lot better than me :)
looplick 3 Apr, 2019 @ 5:10pm 
Do you think you'll keep working on this mod?
Richard  [developer] 4 Apr, 2019 @ 1:55am 
I haven't worked on any of my mods since the TLP/TLE pack came out. I don't have any time or desire to continue modding xcom 2 and will only return to fix my mods on dlc releases as a courtesy. Both the game and modding it took up a lot of my time and I just got a bit fed up in the end. I've only recently started playing it again after like a 6 month break.

So feel free to expand on it if you want. I will return to modding for Xcom 3 whenever it launches on Steam.
looplick 4 Apr, 2019 @ 2:51am 
Alright. I do feel it's wrong to undercut this one though. Also, you've done a lot of the heavy lifting on this one. I don't know if it's possible for me to continue to work on this one? Could you add me as a contributor? Or would you rather I just upload my own version of this mod with credits to the original?
Richard  [developer] 4 Apr, 2019 @ 4:10am 
I will update the mod with the bugfix and ammo display, after that feel free to post your own version. You could go ahead with your ammo segregation then. See the credits on the mod page because I had some help with other stuff.
Richard  [developer] 4 Apr, 2019 @ 4:18am 
Alright the fix is live now. There is also another issue in the mod that I was unable to fix, it relates to save games and/or missions that are more than 1 part long (such as Shens mission or the Chosen Fortress assaults). When entering a new area or reloading a save I've noticed sometimes ammo count doesnt save, so all the ammo resets to the starting amount.

To make it a bit clearer if you use a grenade you cannot reload your save to get grenades back, they are used up for the rest of the mission however with this exploit ammo count can be reset. It's not a major issue but it's still there regardless.
Richard  [developer] 6 Apr, 2019 @ 8:24am 
The Saving issue may be fixed due to fixing the extra mags bug. As for forcing a reload on empty idk if thats 100% a good idea. I know the soldiers loose ammo when they reload but it's like they are swapping out a new mag and I doubt they have time to manage magazines during a mission.
looplick 6 Apr, 2019 @ 8:34am 
Sorry I deleted a bunch of posts. I felt like I was harassing you... lol.
Richard  [developer] 6 Apr, 2019 @ 10:20am 
Dont worry about it, besides I can still see deleted posts :P
< >
Showing 1-12 of 12 comments
Per page: 1530 50