XCOM 2
Confirm Free Reload - WotC
26 Komentar
Dark 11 Jun 2024 @ 9:34am 
Fix for Insider Knowledge resistance order which boost upgrades. Now mod will shows a dialog when use bonus reload from Insider Knowledge.


private function bool IsLimitedFreeReload()
{
local array<X2WeaponUpgradeTemplate> weaponUpgrades;
local UnitValue numFreeReloadsUsed;
local int numFreeReloadsRemaining, i, TotalFreeReloads;

UnitState.GetUnitValue('FreeReload', numFreeReloadsUsed);

weaponUpgrades = AbilityState.GetSourceWeapon().GetMyWeaponUpgradeTemplates();

for (i = 0; i < weaponUpgrades.Length; i++)
{
if(weaponUpgrades .NumFreeReloads > 0)
{
if (weaponUpgrades .GetBonusAmountFn != none)
{
TotalFreeReloads = weaponUpgrades .GetBonusAmountFn(weaponUpgrades );
numFreeReloadsRemaining = int(TotalFreeReloads - numFreeReloadsUsed.fValue);

if(numFreeReloadsRemaining > 0 && numFreeReloadsRemaining < 10)
{
return true;
}
}
}
}
return false;
}
zin 5 Apr 2023 @ 11:10am 
Oh yeah, that’s actually a good point. For some reason, I didn’t think of that.
BlueRaja  [pembuat] 3 Apr 2023 @ 1:14pm 
@zin If you have "free reload anytime" you shouldn't need this mod.
zin 3 Apr 2023 @ 3:27am 
This mod doesn’t work well with Free Reload Anytime, as it still warns you even if you use the regular reload action if you have free reloads available. A compatability fix would be sweet!
HaziTru 20 Nov 2022 @ 1:03pm 
Okay
BlueRaja  [pembuat] 20 Nov 2022 @ 12:47pm 
@HaziTru I'm not certain, but I think so?
HaziTru 20 Nov 2022 @ 12:42pm 
Controller support?
| grєч wínd | 15 Des 2021 @ 8:05pm 
Just a small tip for those who might be bothered by the double space after the first period in the popup message (there are two spaces after, "You have ammo remaining.")

Go to your Steam directory, steamapps\workshop\content\268500\858237491\Localization and open ConfirmFreeReload.int in any text editor like Notepad. Change the line

PopupBody=You have ammo remaining. Are you sure you want to use your free reload?

... or anything you want really. You can customize the popup message entirely to your liking.
Aks 13 Sep 2021 @ 6:15am 
Russian Localization

UTF-16

ConfirmFreeReload.RUS

[X2TargetingMethod_ConfirmFreeReload]
PopupTitle=Трата свободной перезарядки
PopupBody=У вас остались боеприпасы. Вы уверены, что хотите использовать свободную перезарядку?
AcceptMessage=Перезарядить
CancelMessage=Отмена
Bardagh 23 Mar 2021 @ 7:02pm 
It's also necessary in order to use abilities which use more than 1 ammo (Saturation Fire and Suppression come to mind).
Mr. Nice 9 Mar 2018 @ 11:21am 
This doesn't correctly account for "Insider Knowledge" boosting upgrades. It means it doesn't ask to confirm using the last free reload (since this mod thinks they are already all used up). It's because you check .NumFreeReloads directly. With WotC, you should instead call .GetBonusAmountFn(), which will correct for Insider Knowledge as required.
Wealthy Aardvark 1 Des 2017 @ 12:30am 
Note that this mod and Free Reload Anytime don't play nice in that the confirm popup still pops up even if you're using the regular reload instead.
meyerik 4 Okt 2017 @ 9:26pm 
oh thanks for the fix, it was annoying but not enough to make an official complaint, its a great mod, thanks for your work
BlueRaja  [pembuat] 4 Okt 2017 @ 12:37pm 
@iTz_Cobra @Proaxel: That bug has now been fixed
(Note: The game didn't actually freeze, it just stopped responding to the 'tab' button until you attempted another action)
Astartes Johnny Rico 23 Sep 2017 @ 4:27pm 
It doesn't work. The game freezes every time I hit cancel when it pops up. I'm uninstalling.
jsoftcheck 1 Jun 2017 @ 7:39am 
Thanks for this!
Proaxel 21 Mei 2017 @ 9:23pm 
This is great, but the bug with Shift and Tab not working after you hit cancel is a little annoying. @BlueRaja Please fix this bug if you are still around!
=[NK]= Col. Jack O'Neil 27 Mar 2017 @ 12:45am 
I too had a simliar problem when cancelling from the pop up, I couldn't do anything else but use my mouse to end my turn :(
summer here kids 20 Feb 2017 @ 11:12am 
This mod is excellent, but there may be cases where this mod momentarily breaks some of my keybinds (at least cycling through soldiers with TAB and SHIFT). It seems related to selecting CANCEL on the confirmation dialog - but the game was also simultaneously playing a reload animation for another soldiers who had a free reload (the dialog was not shown for him though as he was fully empty), although this simultaneous reload animation may not be related to the issue here. Selecting soldiers by clicking on them still worked, and after setting one soldier to overwatch by pressing Y the keybinds for cycling through soldiers resumed working.

I'm running tons of mods though so I'm not 100% sure it's being caused by this one, but it would seem most obvious.
naschkokthe3rd 6 Feb 2017 @ 12:38pm 
To riff on what's already been said, it would be AMAZING to get a reminder to call for Evac on the turn when you break concealment
Juravis 6 Feb 2017 @ 11:24am 
@BlueRaja What LeWe0Fun said, it's so frustrating. Please put a confirmation on concealment breaking moves.
LeWe0FuN 6 Feb 2017 @ 5:07am 
How about mod which shows same dialog if you attempt to broke concealment in case of missklick
BlueRaja  [pembuat] 6 Feb 2017 @ 12:32am 
@Hazard: There is already a mod for that: http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=670217680
I have no idea if it works with this mod.
Hazard 5 Feb 2017 @ 10:50pm 
Though this makes me wonder, how about separating Free Reload completely from normal Reload, so that both actions are available? Would that be feasible?

Including the number of uses left on the ability icon would also be pretty nifty.
Hazard 5 Feb 2017 @ 10:35pm 
Ha, this is great. Thanks a lot!