XCOM 2
Confirm Free Reload - WotC
26 comentarios
Dark 11 JUN 2024 a las 9:34 
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 ABR 2023 a las 11:10 
Oh yeah, that’s actually a good point. For some reason, I didn’t think of that.
BlueRaja  [autor] 3 ABR 2023 a las 13:14 
@zin If you have "free reload anytime" you shouldn't need this mod.
zin 3 ABR 2023 a las 3:27 
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 a las 13:03 
Okay
BlueRaja  [autor] 20 NOV 2022 a las 12:47 
@HaziTru I'm not certain, but I think so?
HaziTru 20 NOV 2022 a las 12:42 
Controller support?
| grєч wínd | 15 DIC 2021 a las 20:05 
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 a las 6:15 
Russian Localization

UTF-16

ConfirmFreeReload.RUS

[X2TargetingMethod_ConfirmFreeReload]
PopupTitle=Трата свободной перезарядки
PopupBody=У вас остались боеприпасы. Вы уверены, что хотите использовать свободную перезарядку?
AcceptMessage=Перезарядить
CancelMessage=Отмена
Bardagh 23 MAR 2021 a las 19:02 
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 a las 11:21 
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 DIC 2017 a las 0:30 
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 OCT 2017 a las 21:26 
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  [autor] 4 OCT 2017 a las 12:37 
@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 a las 16:27 
It doesn't work. The game freezes every time I hit cancel when it pops up. I'm uninstalling.
jsoftcheck 1 JUN 2017 a las 7:39 
Thanks for this!
Proaxel 21 MAY 2017 a las 21:23 
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 a las 0:45 
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 a las 11:12 
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 a las 12:38 
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 a las 11:24 
@BlueRaja What LeWe0Fun said, it's so frustrating. Please put a confirmation on concealment breaking moves.
LeWe0FuN 6 FEB 2017 a las 5:07 
How about mod which shows same dialog if you attempt to broke concealment in case of missklick
BlueRaja  [autor] 6 FEB 2017 a las 0:32 
@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 a las 22:50 
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 a las 22:35 
Ha, this is great. Thanks a lot!