mNo edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
I am bad at the game so I edit the wiki
 
<div class="mw-collapsible">I am bad at the game so I edit the wiki</div>
 
==How to Debug in Scribunto==
==How to Debug in Scribunto==
<code><nowiki>{{#invoke:Test|a|sep=;|b}}</nowiki></code>
<code><nowiki>{{#invoke:Test|a|sep=;|b}}</nowiki></code>
Line 24: Line 26:
         # sustained has delta time of infinity
         # sustained has delta time of infinity
         # meaning, sustained takes into account time-to-empty clip and reload time
         # meaning, sustained takes into account time-to-empty clip and reload time
         # All reload actions have ReloadDelay played first,
         # All reload actions have ReloadDelay played first,
         # but typically only single bullet reloads have a non-zero delay
         # but typically only single bullet reloads have a non-zero delay
Line 32: Line 33:
         # ClipSize of 10,
         # ClipSize of 10,
         # =time to reload 1 bullet is 1.5s, time to reload 10 bullets is 10.5s
         # =time to reload 1 bullet is 1.5s, time to reload 10 bullets is 10.5s
         # BurstInterShotInterval represents time between shots in a burst
         # BurstInterShotInterval represents time between shots in a burst
         # Abbreivated dictionary for easier access
         # Abbreivated dictionary for easier access
         d = dps_stats.copy()
         d = dps_stats.copy()
         cycle_time = 1 / d['RoundsPerSecond']
         cycle_time = 1 / d['RoundsPerSecond']
         total_cycle_time = cycle_time + d['BulletsPerBurst'] * d['BurstInterShotInterval']
         total_cycle_time = cycle_time + d['BulletsPerBurst'] * d['BurstInterShotInterval']
         if type == 'burst':
         if type == 'burst':
             return (
             return (
                 d['BulletDamage'] * d['BulletsPerShot'] * d['BulletsPerBurst'] / (total_cycle_time)
                 d['BulletDamage'] * d['BulletsPerShot'] * d['BulletsPerBurst'] / (total_cycle_time)
             )
             )
         elif type == 'sustained':
         elif type == 'sustained':
             if d['ReloadSingle']:
             if d['ReloadSingle']:
Line 59: Line 55:
             damage_from_clip = d['BulletDamage'] * d['BulletsPerShot'] * d['ClipSize']
             damage_from_clip = d['BulletDamage'] * d['BulletsPerShot'] * d['ClipSize']
             return damage_from_clip / (time_to_empty_clip + time_to_reload)
             return damage_from_clip / (time_to_empty_clip + time_to_reload)
         else:
         else:
===Input for JS?===
===Input for JS?===