Keeping Track of Shots Fired in Vats

Post » Mon Aug 16, 2010 2:06 am

I'm making a http://www.fallout3nexus.com/imageshare/images/1250436-1286083466.jpg that uses power armor charge for ammunition - so it doesn't use ammo, as far as the GECK is concerned. I can keep track of when the player fires it though to deduct the energy expended from the armor's charge by monitoring keystrokes, but VATS is another story. I don't have a huge problem with just disabling VATS entirely when the weapon is equipped, the weapon has a number of other cool features, but is there any way to check how many shots were fired during a round of VATS, apart from a before/after ammo count (which I can't do)?
User avatar
Kayleigh Mcneil
 
Posts: 3352
Joined: Thu Jun 29, 2006 7:32 am

Post » Mon Aug 16, 2010 5:32 am

Never mind, I can just do a before and after AP count and divide by the weapon's action points (duh). :facepalm:
User avatar
TRIsha FEnnesse
 
Posts: 3369
Joined: Sun Feb 04, 2007 5:59 am

Post » Mon Aug 16, 2010 12:52 am

Won't that potentially conflict with other actions such as sprinting? Alternatively you could make dummy PA ammo which would depend on your PA charge :celebration:
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm

Post » 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.
User avatar
Vahpie
 
Posts: 3447
Joined: Sat Aug 26, 2006 5:07 pm

Post » Mon Aug 16, 2010 6:48 am

Can't wait to try it out :celebration:
User avatar
Batricia Alele
 
Posts: 3360
Joined: Mon Jan 22, 2007 8:12 am

Post » Sun Aug 15, 2010 11:41 pm

I'll most likely be releasing the update this weekend.
User avatar
Tinkerbells
 
Posts: 3432
Joined: Sat Jun 24, 2006 10:22 pm


Return to Fallout 3