Changes between Version 3 and Version 4 of Ticket #3600, comment 1


Ignore:
Timestamp:
Feb 17, 2016, 11:23:25 PM (8 years ago)
Author:
Palaxin

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3600, comment 1

    v3 v4  
    1 I'm glad you made this ticket. I was wondering about the same, but there are even more inconsistencies in the modification of unit stats so I thought there is some intention behind it. I'm actually a physicist so the right usage of values and units is very common and important to me. But since I'm a physicist I have not studied computer science and I don't know if there are some trade-offs for the implementation in the current code.
     1I'm glad you made this ticket. I was wondering about the same, but there are even more inconsistencies in the modification of unit stats so I thought there is some intention behind it. I'm actually a physicist so the right usage of values and units is very common and important to me.
    22
    33As far as I have observed, the descriptions are wrong in the following cases where stats are multiplied:
    4 - Speed/time modifications: you are right, +20% speed implies a 0.8333 multiplier for the respective time, -20% speed implies a 1.25 multiplier (1).
    5 - Several techs~~/auras~~ increasing the same stat: increase is determined on base value, not on current value, e.g. two bonuses described as "+20%" mean you have a 100%, 120%, 140% value for your stat (actually +20%, then +16.7%) instead of 100%, 120%, 144% (+20% increase for both). IMO this is not a design question but a question of correctness. "+XX% on base stat" and "+XX%" is a huge difference. Also modify the multiplication operation and not the descriptions because the descriptions would actually depend on the cirumstances of the ~~aura/~~tech usage (if it's currently the only tech/aura for this stat or not).
    6 
    7 I hope I'm not the only one who thinks that way and this will be fixed.
    8 
    9 
    10 (1) This may seem strange at first sight. Let me explain (I'm no English native, so I hope these terms are still as accurate as intended):
     4- Speed/time modifications: you are right, +20% speed implies a 0.8333 multiplier for the respective time, -20% speed implies a 1.25 multiplier. For further explanations see below.
     5- Several techs increasing the same stat: increase is determined on base value, not on current value, e.g. two bonuses described as "+20%" mean you get 100%, 120%, 140% values (actually +20%, then +16.7%) instead of 100%, 120%, 144% (+20% increase for both). IMO this is not a design question but a question of correctness. "+XX% on base stat" and "+XX%" is a huge difference. Also the multiplication operation should be modified and not the descriptions because the descriptions would actually depend on the circumstances of the tech usage (if it's currently the only tech/aura affecting the value or not).
     6----
     7Some explanations regarding the maths (I'm no English native, so I hope these terms are still as accurate as intended):
    118Speed in the actual physical sense is v = ds/dt (time derivative of distance). We can simplify this to v = (Delta s) / (Delta t) (time and distance differences for constant motion). A some more general "kind of speed" is frequency (or "rate"), f = 1/t. This implies t = 1/f. f is the number of actions which occur / can be done in a specific amount of time t.
    129In fact, train "speed", attack "speed" etc. are fitting to this category ("how many units can be trained / how many arrows can be shot in a certain amount of time"). So if we change f (or these kinds of "speed") by +20% or -20%, respectively, we get for time t a -16.7% or +25% change. In detail:
    13 f_new = (1+20%)*f_old = 1.2*f_old
    14 t_new = 1/f_new = 1/(1.2*f_old) = 1/(1.2*(1/t_old)) = 0.8333*t_old
    15 f_new = (1-20%)*f_old = 0.8*f_old
    16 t_new = 1/f_new = 1/(0.8*f_old) = 1/(0.8*(1/t_old)) = 1.25*t_old
     10* f,,new,, = (1+0.2)*f,,old,, = 1.2*f,,old,,
     11* t,,new,, = 1/f,,new,, = 1/(1.2*f,,old,,) = 1/(1.2*(1/t,,old,,)) = 0.8333*t,,old,,
     12* f,,new,, = (1-0.2)*f,,old,, = 0.8*f,,old,,
     13* t,,new,, = 1/f,,new,, = 1/(0.8*f,,old,,) = 1/(0.8*(1/t,,old,,)) = 1.25*t,,old,,
    1714
    18 (2) The general rules are:
     15The general rules are:
    1916- f = 1/t
    2017- t = 1/f
    21 - f_new = (1+bonus)*f_old = (100%+bonus%)*f_old
    22 - t_new = (1+bonus)*t_old = (100%+bonus%)*t_old
    23 - f_new = 100%/((100%+bonus%)*t_old)
    24 - t_new = 100%/((100%+bonus%)*f_old)
     18- f,,new,, = (1+bonus)*f,,old,, = (100%+bonus%)/100%*f,,old,,
     19- t,,new,, = (1+bonus)*t,,old,, = (100%+bonus%)/100%*t,,old,,
     20- f,,new,, = 1/((1+bonus)*t,,old,,) = 100%/((100%+bonus%)*t,,old,,)
     21- t,,new,, = 1/((1+bonus)*f,,old,,) = 100%/((100%+bonus%)*f,,old,,)
    2522
    26 Edit: I just tested that auras actually calculate their bonuses on current stats (not base stats), but technologies work as described above. I will look how different auras interact which are affecting the same value.
     23Edit: I just tested that auras actually calculate their bonuses on current stats (not base stats), but technologies work as described above.