VeeOt Dragon, on 30 November 2023 - 10:01 AM, said:
well that or a macro that does all the work of cycling for you (ie setting it so that it automatically resets after a given amount of time so all you need do is hold the button down until you are ready to shoot.). one of the many reasons i consider macros as low lvl cheating even if PGI allows it.
a simple macro, no. i needed a state machine and accurate timing. you need to know the weapons charge time, hold time and cd. you need to run a state machine (you need memory) and you need timing. i wrote mine in c++ and ran it on an arduino as a virtual keyboard and use a low pass filtered arcade button to trigger it.
first you need a timing model for your guns, numbers for charge time, hold time, and cd (all after quirks/skills for your build). i put the gun timings, the key to fire the group, some bitflags and a timestamp in a struct, and set up one per gun. initially these are all put in a "ready pool" via one of the bitflags.
when a start function is called, pointed to the appropriate struct, a timestamp is set and the virtual button is pressed. it is then held until timestamp-time exceeds the charge time its ready to fire, when it exceeds the charge+hold time the cycle is complete the virtual button is released and it needs to be cycled again, its flagged as ready. if it fired during the cycle its flagged as fired, the timestamp is set to expire after a cd cycle, and when that timestamp expires its flagged as ready.
then you also have to maintain a charge pool (effectively the first 2 guns with the charge flag set). essentially 2 guns cycling 180 degrees out of phase. with two guns this is pretty straightforward, call the start function on the first gun, wait 1/4 of the combined cycle time for both guns, and start the second, both being restarted when they complete their cycle. this will continue in lockstep until you fire. with more than 2 you can start charging the next immediatly after the last was fired. the old weapon goes into cd, and a ready-flagged weapon gets promoted to charging. in this case charging is started immediately. this gives you more autocannon like timings (turning gauss into a dps weapon). however this puts the timings out of phase and the next shot may not be guaranteed. timings can be adjusted to move them 180 degrees apart in phase over a few cycles of the state machine by inserting small imperceptible delays.
firing is simply accomplished by pushing the button, this scans the struct array for guns flagged as charged, and forces a release of the associated button. holding the button causes this to run every cycle so you can get a nice staccato out of it. is it worth it? no not really. you get one instant firing gauss rifle and a follow up shot, or a string of well timed shots, you have just turned a ppfld weapon into a dps weapon, or a poor mans hag. you are better off with an actual hag.
i think i would rather have new gauss charge limit rules. you give gauss a rating based on its damage, from lgr being a 1 to the hag40 being a 4 (1per 10 damage). so long as the sum rating for all weapons fired does not exceed 5 you can charge them (2 hgr, a hag 30 and 20, but not 2 30s). charge time is rating * 0.3, maxing out at 1.5s and and 0.3s minimum. you might have a minimum threshold under which weapons fire instantly, this makes sense if you want to add things like magshot or apgauss, though single lgrs might also qualify when used singularly or in chain fire.