1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

Swing speed calculator in the making! Offical Response Please!

Discussion in 'UHall' started by imported_archite666, Feb 24, 2008.

  1. Ok so my guild on Siege Perilous is putting together a accurate swing speed calculator since we don't currently have a functioning one.

    We are using the below formula, however i'd like to see the actual post saying this is correct, also we are quite curious as to what happens when you have decimals.

    For instance
    With weapon speed 2.75 and Swing speed increase 20% You get the same swing speed with stamina values of 78-113. This is of course assuming you round up for ticks.


    "Post the formula for determining swing speed...."
    Leurocian dug this up and translated it for us non-coders:

    1. Figure out Weapon Base speed in ticks. Take whatever speed in seconds your weapon says on the tooltip and multiply that number by 4. If you are barehanded, you swing at the fastest weapon rate (10 ticks = 2.5 seconds). Example: The Halberd (4.25 second base speed) has a base speed of 17 ticks.
    2. Figure out Stamina Ticks (Current Stamina / 30). Example: Current Stamina = 50. So Stamina Ticks rounded down = 1.
    3. Figure out Swing Speed Increase modifier from equipment. Example: 20.

    Here is the formula:
    a. Hit Start = ((Base Weapon Speed - Stamina Ticks) * (100.0 / (100 + Swing Speed Increase)))
    ex. Hit Start = ((17 - 1) * (100.0 / (100 + 20)))
    c. Make sure minimum swing time is never less than 5 ticks (1.25 seconds).
    ex. The calculated Halberd Hit Start speed = 13 ticks (3.25 seconds)
     
  2. I'm not UO Dev but I wrote a hopefully-correct calculator for this when the FoF notes first came out.

    The correct handling of the decimals is critical or your results will be completely screwed up.

    Your numbers tell me that you've got some trouble in there... try this to help. For the sake of completeness, here's the entire process that my calculator does.

    First, determine the "base weapon speed in 'tics'" and the "stamina tics" values. The base weapon speed in 'tics' is calculated by multiplying the displayed weapon speed in seconds by 4. The stamina tics is determined by dividing the stamina by 30, and then TRUNCATING the decimals. Don't round, truncate!

    Then, you determine the raw weapon swing speed by plugging your numbers into this formula:

    Hit Start = ((Base Weapon Speed in 'Tics' - Stamina Ticks) * (100.0 / (100 + Swing Speed Increase))), then divide the result by 4 to convert into seconds.

    Then, you determine the final swing speed by examining this result and comparing it to the allowable values for weapon swingspeeds. In the event that the numbers are not an exact match (due to decimal values that don't match up), you choose the next SLOWEST swingspeed value (IE: the higher value). Do not round or truncate!

    The allowable weapon swingspeeds exist in increments of .25 and go like this:

    1.25 <---- fastest allowed swing speed
    1.50
    1.75
    2.00
    2.25
    etc

    The stamina ranges you're noting are actually like 60-89, 90-119, 120-149, 150-179. You'll see that these ranges come straight out of the stamtics calculation:

    1 - 29 stamina = 0 stamtics
    30 - 59 stamina = 1 stamtic
    60 - 89 stamina = 2 stamtics
    90 - 119 stamina = 3 stamtics
    120 - 149 stamina = 4 stamtics
    150 + stamina = 5 stamtics

    I've tested the heck out of this means of determining swingspeed and it appears to be correct. If something's wrong with it I sure want to hear about it.
     
  3. rtlfc

    Isn't the one on stratics front page correct?

    You put in your stamina and ssi and it tells you delay between swings in ticks. If you then adjust the stamina up or down you can find the numbers where the difference occurs.
    I know it still displays the old speed numbers but isn't that just a visual thing?

    I only mention it because I've been using it for several years and it seems right to me.
     
  4. GarthGrey

    GarthGrey Crazed Zealot
    Stratics Veteran Stratics Legend GoT

    Joined:
    Mar 18, 2003
    Messages:
    3,640
    Likes Received:
    1,405
    Nothing like having to solve an algebraic equation to compete...
     
  5. Sam the Scribe

    Sam the Scribe Visitor

    Joined:
    Mar 10, 2007
    Messages:
    699
    Likes Received:
    0
    <blockquote><hr>

    Nothing like having to solve an algebraic equation to compete...

    [/ QUOTE ]

    Yup, these equations should have never been released to the public.

    Safe Travels, Sam
     
  6. <blockquote><hr>

    Yup, these equations should have never been released to the public.

    [/ QUOTE ]

    Thats so true. Part of the reason theres not much challenge left in the game for older players is because everything is so over documented.

    "O rly? theres a new dragon coming out?"
    *puts on dragon proof suit and dragon slayer*
     
  7. Death Adder

    Death Adder Guest

    <blockquote><hr>

    I've tested the heck out of this means of determining swingspeed and it appears to be correct. If something's wrong with it I sure want to hear about it.

    [/ QUOTE ]I believe I have detected a small error. It's my understanding that you round DOWN, not up, when accounting for decimals (we agree that you must round down when determining the effect of stamina).

    For example, assuming 180 stamina and a 30 SSI Heavy Xbow (5 seconds base speed) results in the following equation:

    Base Speed: 14 ticks (20 ticks base - 6 ticks for stamina), or 3.5 seconds
    SSI formula: 14 * (100/130) = 10.77 ticks, or 2.75 seconds (rounding up)

    However, if you test it you see that it actually swings at 10 ticks (2.5 seconds). I have a spreadsheet for all swingspeeds using the above formula (rounding down), and I have tested it at several points (including, according to my notes, a 30 SSI Heavy at 180 stam). It has been correct each time. Please let me know if your testing shows differently.
     
  8. <blockquote><hr>

    <blockquote><hr>

    Yup, these equations should have never been released to the public.

    [/ QUOTE ]

    Thats so true. Part of the reason theres not much challenge left in the game for older players is because everything is so over documented.

    "O rly? theres a new dragon coming out?"
    *puts on dragon proof suit and dragon slayer*

    [/ QUOTE ]

    I couldn't disagree more... these kinds of details should be explained and prominently displayed so that all players can come to understand how these things work.
     
  9. <blockquote><hr>

    rtlfc

    Isn't the one on stratics front page correct?

    You put in your stamina and ssi and it tells you delay between swings in ticks. If you then adjust the stamina up or down you can find the numbers where the difference occurs.
    I know it still displays the old speed numbers but isn't that just a visual thing?

    I only mention it because I've been using it for several years and it seems right to me.

    [/ QUOTE ]

    If we are thinking of the same one, it appears to have been correct up until the last change they made to swingspeeds (I don't know the publish number this happeend in). The one I've seen on the web tested as being completely off, when I looked at it. If I recall correctly, it had a 10 SSI repeating crossbow swinging at cap for a 140 stamina player, and that's easily observably as being incorrect. It was something like that, anyway.
     
  10. <blockquote><hr>

    <blockquote><hr>

    I've tested the heck out of this means of determining swingspeed and it appears to be correct. If something's wrong with it I sure want to hear about it.

    [/ QUOTE ]I believe I have detected a small error. It's my understanding thatthat you round DOWN, not up, when accounting for decimals (we agree that you must round down when determining the effect of stamina).

    For example, assuming 180 stamina and a 30 SSI Heavy Xbow (5 seconds base speed) results in the following equation:

    Base Speed: 14 ticks (20 ticks base - 6 ticks for stamina), or 3.5 seconds
    SSI formula: 14 * (100/130) = 10.77 ticks, or 2.75 seconds (rounding up)

    However, if you test it you see that it actually swings at 10 ticks (2.5 seconds). I have a spreadsheet for all swingspeeds using the above formula (rounding down), and I have tested it at several points (including, according to my notes, a 30 SSI Heavy at 180 stam). It has been correct each time. Please let me know if your testing shows differently.

    [/ QUOTE ]

    At first, I thought that measuring the swing times on a slow weapon, the heavy crossbow, would be the most effective way to get accurate numbers. But when I tried it, I found that my measurements jumped around too much. Client side lag was interfering with my ability to accurately measure swingspeeds to .25 of a second accuracy, despite the long-ish interval that the slow weapon was providing.

    So I moved on, and found that my best test cases of where the swing speed increments were occurring came from the fastest available magical shortbows. While in these cases you have no chance of measuring the swingspeed by hand, the difference between a 1.25 ssi shortbow and a 1.50 one is a big enough percentage difference of the entire swing duration that you can stand there shooting and hit equip last weapon between the two bows and the speed difference is observable.

    A 35 ssi shortbow when fired with 150 stamina would be swinging at cap if rounding down, and one tic slower than cap if rounded up, the raw swing speed number being 1.2962962962963 ((3 * 4) - 5) * (100.0 / (100 +35)) / 4.

    A 40 SSI shortbow when fired at 150 stamina swings at cap either way: the raw number comes in right at 1.25 ((3 * 4) - 5) * (100.0 / (100 +40)) / 4.

    I was able to detect a swing speed difference between a 35 ssi shortbow and a 40 ssi one on a 150 stamina guy.

    Let me know what you think....
     
  11. No, it should be rounded down.

    I have tested just now, of which results are as follows:

    --
    Calculation:

    Heartseeker is a reward of a quest for new players in Haven.

    This is a composite bow, therefore has base speed of 4s(=16 ticks).

    And this bow has SSI +10%.

    My archer has 86 stamina.

    Equatation will be:



    [ 16 ticks - ( 86/30 )] * 100 / (100 + 10 )
    =&gt; 14 ticks * 100 / 110 = 12.727272727272727272727272727273

    It is rounded down, so 12 ticks = 3s.

    --
    Experiment:

    I fired at my pet with Heartseeker in Trammel.

    I told my pet to guard me ("All guard me").

    Then I toggled into war mode then double click my pet.

    I began to fire my pet without damage. And I counted how many times I fired in a minute.

    I fired at my pitiful pet 20 times in a minute: 3s.

    --
    Conclusion: It should be rounded down.
     
  12. Death Adder

    Death Adder Guest

    To test down to the .25 sec, you have to time 10 shots or 20 shots, at which point the small incremental difference becomes apparent.
     
  13. That's a great means to test the slower bows. Back when I was messing with this, I didn't know about the be-unguilded and fire-at-pet thing. Nothing I shot at would have lived long enough to test a slow bow this way.
     
  14. Death Adder

    Death Adder Guest

    I do my tests using a second char on my wife's computer, with max resists, dci, protection and spamming Great Heal.
     
  15. I don't have access to a setup like that, but also I can't duplicate any 180-stam tests because I can't think of a timely way to get ahold of a 180 stam player of my own. Even on test shard it would be troublesome to get 180 stam together.

    Thing is, one never knows if the server is doing something funky with some certain combination of stam, weapon, and swingspeed. The swingspeed calculator I wrote was more difficult to get to work properly than it seems like it should have been, and it's always possible there's some quirks in the server's own implementation of it.

    One serious thing is that we don't know how far out the server takes the decimal points when it does a division and if it rounds the last decimal or just chops. I've seen one case where my program spits out two different answers for one bow because of something like this. In cases like that, there's no way to know which figure is "correct" aside from testing the server's behavior by some means.

    Because of potential cases like this, if someone believes they saw a heavy crossbow which at 180 stam swings at a speed that doesn't jive with what the math says it should, it doesn't necessarily mean they tested badly. I'm thinking that any such test should be repeated and continued in a way to where the swingspeed turnover point of the weapon is narrowed down while not changing the stam. Like, if that was a 30 ssi heavy on a 180 stam guy, you'd want to test a 25 ssi and 35 ssi on the same guy and narrow down where the swingspeed change occurs. The test itself will need to be done carefully and not have any question marks as to the accuracy of the measurement, like if measuring a large number of shots and then dividing to get the per-shot figure, one would want to use a really big sampling of shots so that the changeover point is obvious.

    But like I said, I don't have good access to a 180 stamina guy, so it would be interesting to see the results if someone can replicate the 180 stam test with heavy crossbows around 30 ssi.
     
  16. Guest

    Guest Guest

    Very good work. For real.
    But I cant believe all this data is out there. No wonder we get flavor of the day templates.

    But thats another thread. So much for letting players learn from playing and getting experience.

    I always thought it was a mistake to release every bit of code and calculations. Somehow it doesnt seem right.

    I did learn i need that one more stamina to 90. I have of all things 89.