» Mon Aug 16, 2010 12:05 am
It took some trial and error but I was able to figure out what was happening in VATS, and when. Your action points get deducted during VATS playback each time your weapon actually fires, so I just do the AP checking when VATSMode == 4 - since the player's controls are disabled during vats playback, you won't be sprinting or anything, so about the only error will be the small amount of AP that might regenerate while you're watching the playback. No big deal. Your method could maybe have saved me some time, but I'm doing some weird stuff with firing that would have still required a bunch of scripting. Plus my system means never having to reload.
So, the energy for each shot gets deducted directly from the suit's charge, making the charge readout a sort of ammo counter. For nuclear armors, the ones that don't require recharging, I'm treating it as if the armor can't quite keep up with the amount of power required to fire the weapon continuously (some high power reactors do a better job of it than others though). Each PA powered weapon has its own internal energy storage device that begins charging as soon as the weapon enters your inventory, if you're wearing nuclear armor. When the charge that's built up gets depleted, the weapon stops firing. So nuclear armors get energy weapon ammo for free, but can only fire for so long before you have to stop and let the power supply catch up.
I've got the laser rifle pretty much done. It's got three firing modes, semi-auto, full auto, and overcharge - overcharge is semi-auto with low rate of fire and a much higher damage cap (damage and rate of fire are adjustable, but limited by heat buildup) and it uses the Liberty Laser projectile instead of that red laser beam. I'm also working on three more power armor powered energy weapons - a laser pistol that will fire in 1, 3, or 5 round bursts, a gatling laser (I was planning on having it have some sort of higher spread, higher damage shotgun mode, but once a weapon has stats like Vengeance there isn't much you can do to make it more effective at killing), and a laser sniper rifle. With the sniper rifle, the weapon fires when you release the fire button - the longer you hold the button down before firing, the more charge it builds up, and the higher the damage. The laser pistol is being a pain though, and I still have the weapon skins to put together, and PPA is otherwise ready to release, so I'll probably just ship it out with just the laser rifle and maybe the gatling laser.
If I did go the power armor ammo route, it would be easy for people to create weapons that used power armor ammo. I think I can create a script though that's generic enough that a modder could just attach it to their weapon, set the ammo type to none, and it would just work.