Actually, I've gotten everything solved now. I started off knowing nothing whatsoever but I guess I figured things out.
First off: If you do what you listed above, then pick up an Ammo Pile for FW ammo, it will REDUCE your current ammo amounts to certain numbers listed in the packages for picking up ammo. That's what I meant by max ammo.
Check Item_FWAmmo.cs:
package FWAmmoPileStaticPackage
{
function Armor::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
{
if(%col.dataBlock $= "FwPilestaticItem" && %col.canPickup && %obj.getDamagePercent() < 1.0 && minigameCstar fishe(%obj.client, %col))
{
%obj.client.quantity["21Gauge"] = $Pref::Server::FW1Max;
%obj.client.quantity["45Caliber"] = $Pref::Server::FW2Max;
%obj.client.quantity["ImpactGrenade"] = $Pref::Server::FW5Max;
%obj.client.quantity["Slugs"] = $Pref::Server::FW6Max;
%obj.client.quantity["BlastRounds"] = $Pref::Server::FW7Max;
serverPlay3D(FWammogetSound,%obj.getPosition());
if(isObject(%col.spawnbrick))
{
%col.fadeOut();
%col.schedule(%col.spawnbrick.itemrespawntime, "fadeIn");
}else{
%col.schedule(10, delete);
}
%this.onPickup(%obj, %player);
return;
}
Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
}
};
activatePackage(FwAmmoPileStaticPackage);
In the unmodified version(s) of Frog's Weaponry, there are no $Pref::Server::FW#Max prefs (above is my own modified version). There are just specific numbers that everything is set to. Note that ALL ammo packages in Frog's Weaponry are like this, so that if you do what you just described above, and pick up any of the dropped ammo for a given ammo type, your ammo for that type will be reduced to whatever that specific number was.
That was NOT the problem I was discussing with this topic, and I evidently didn't make things clear enough.
Second off, the issue was one with the reloading system.
If you open up one of Frog's weapons and one of Bushido's Tier Tac weapons at the same time, you'll notice some differences in their reload functions.
Frog's Weaponry reload sequence has
%obj.client.quantity["whatever"] -= %obj.AmmoSpent[%obj.currTool]
instead of
%obj.client.quantity["whatever"] -= %this.item.maxAmmo;
.
Frog's Weaponry weapons also lack the
%obj.client.quantity["whatever"] += %obj.toolAmmo[%obj.currTool];
%obj.toolAmmo[%obj.currTool] = 0;
parts at the beginning of the reload function.
To see the issue in action, as an example:
Using an unmodified copy of Frog's Weaponry (doesn't matter whether it's the old or new version), do the following:
Pick up a Heavy Pistol. Fire four shots, then throw it away using Control+W, without reloading it first.
Then pick up a Heavy SMG, making sure it goes into the same weapon slot that the Heavy Pistol was in. Fire three more shots. Then reload the Heavy SMG. The "reserve ammo" for the Heavy SMG will be depleted by seven, even though the Heavy SMG only got three ammo back.
The issue, as it turns out, is that %obj.AmmoSpent[%obj.currTool] is stored by slot rather than by item, and is not cleared when you throw away or pick up a weapon. Adjusting the reload function such that it doesn't need that variable fixes the problem that I outlined above. I have successfully set up and tested a fix, and it works. The two grenades are unaffected by this due to their nature, and the way the Ballistic Shotgun reloads means that if there's actually a problem in it, I can't find it.
On a side note, Heedicalking's Impact Rifle has the same problem with its reload function.
Anyway, this thread is now solved.