Thread:TarasqueCL/@comment-34929636-20180716045945/@comment-31173317-20180718233620

Hi again, I checked calc_fwr and indeed it does not account for the fwr part at all. Here follows the algorithm so you can implement it.

So, this is slightly complicated because tests show that there are 2 things to the RWF (or FWR) weapons. One, the continuous recharge making the burst longer and the recharge in general shorter. Two, the fact that recharge begins only after the 1st shot has been fired. If one ignores the latter, one gets, for instance, the number of shots wrong forthe Thunder burst.

The first one you compute by finding the zero of the equation giving the number of shells in the clip when it has n_full size, shots_per_sec shots fired per second, rec_per_sec shots recharged per second, and solving for time:

n_full - shots_per_sec * t0 + rec_per_sec * t0 = 0

t0 is the time at which the clip is empty and the burst ends.

The recharge time has to be corrected by the fact that recharge has a delayed beginning corresponding to the time needed to fire the first shot. The amount of reloads lost is

reload_wait_loss = rec_per_sec / shots_per_sec

Solving you get:

t0 = ( n_full - reload_wait_loss) / (shots_per_sec - rec_per_sec)

This is the "theoretical" duration of the burst. However you will fire only the shots which can be fully fired within that time. If your burst time would allow to fire 10.4 shots, you are actually firing 10. The remaining 0.4 is the partial recharge that will shorten the recharge time. So (to go on with the example) you compute that you are actually firing only 10 shots, compute back the actual burst duration (and burst damage and burst dps). Then you compute the time needed to recharge the whole clip minus the fraction of shot that has been recharged already, and that is you real recharge time.

Below the way this is done in compute_damage.

Let me know if something is unclear :-)

if w['rwf']: #how many ammos reloaded per second reloads_per_sec=np.float64(w['clip'])/np.float64(w['rel']) #for RWF weapons, reload begins only after the 1st shot is fired. #so I compute how much time is lost to the reload process because of this reload_wait_loss=reloads_per_sec/np.float64(w['rof']) #actual burst length accounting for rwf, reload wait loss and partial reloads. actual_burst=(np.float64(w['clip'])-reload_wait_loss)/(np.float64(w['rof'])-reloads_per_sec) #how many shots are actually fired in a burst (more than clip for RWF weapons) actual_shots=np.floor(actual_burst*np.float64(w['rof'])) #partial reload during burst will not be fired but will shorten reload time act_rf = actual_burst * reloads_per_sec - np.floor(actual_burst * reloads_per_sec) rtreload=np.float64(w['clip'])-act_rf #how many are really to be reloaded after burst ends actual_reload_time=rtreload/reloads_per_sec cycle_time=actual_reload_time+actual_burst cycle_dps=w['dmg']*actual_shots/cycle_time dam_per_salvo=w['dmg']*actual_shots reload_time=actual_reload_time burst_time=actual_burst