Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
So, I have a way to give the effect of swapping weapons, by swapping invisible ammo instead. (Swapping the ammo allows for multiple guns easily. If I try to swap the guns, while letting the player able to buy more than one, I'd have to detect how many guns they have, and this gets complex and cron-heavy.)
This involves keeping the ammo at 1 unit, and using high burst counts while using ammo at the end of the burst, to simulate infinite ammo. The problem is, is that even with 3,000 ammo the player will eventually run out of ammo. I did some testing, and it seems Nova remembers how much of the burst you have used up even if you sell/re-buy the ammo or the gun. This makes periodic "re-setting" of the ammo difficult. As it seems I have to actually wait for the ammo to run out before it can be reset.
In some cases I can explain this away. For a gun that has multiple fire modes (changeable with an abortable mission) I can say something along the lines of "The X-58 Cannon has been known to jam occasionally. If this happens to you, try switching it's mode, and this should clear the problem." Then the player switches the mode, and in the process the ammo is re-granted.
But I also have a system of guns where there's no abortable missions. The only reason to add one would be only to clear a "jam", and this seems clunky. I could use crons to detect missing ammo, but without manual clearing, the player could get stuck weaponless until a day passes.
It there another, preferably automatic, way to go about this?
Hmmm. Maybe I found a way.
I can make 2 units the basic ammo load. Then every day I can delete them both and re-grant them. Now, Nova will still remember how much was used, and will drop to 1 at some point, but the player still get to shoot. As long as he doesn't use more than 3,001 ammo in a single day, things will be ok. Or I can make the base ammo 3, and the player will get 6,001 ammo per day.
Those are guaranteed numbers, the player could actually have more shot per day. If he happened to be at 3,001 ammo and a day passes, he'll still be at 3,001. If he had been at only 3,000 he'd have 6,000 then next day.
Still uses 1 cron per weapon mode, though.
Hm. If you're burning a cron per ammo type anyway, why not give the player - say - ten ammo? Then have the cron, if there exists ammo type X, delete ten X, then grant 10 X. Then, as long as the player doesn't use 27,001 shots in a single day, you're set. Not enough? Make it 20, or 30... the only limit is how long an NCB expression you can actually keep track of the contents of.
I was hoping for a non-cron solution. But yeah, that's the technique I came up with.