Jump to content
EleTD.com
Sign in to follow this  
WindStrike

Score

Recommended Posts

(I apologize for taking so long to get this up, part of it was due to constant changes)

 

How the heck Scoring works:

  • Each creep is worth (Wave # + 5) score. So Wave 1 Creeps are worth 6 Score each.
    • That said, each wave is worth ([Wave # + 5] * 30). So Wave 1 is worth 180 Score total.
    • For Express, it's worth (Wave # + 3) score. So Wave 1 is worth 120 Score total.
  • When you finish clearing a wave, you receive a set of multiplier bonuses:
    • Clean Finish
      • If no creeps leaked during the wave, your score is multiplied by x1.3
    • Speed Bonus
      • From the time the wave finishes spawning, should you clear them as fast as possible, you can get a multiplied of x1.9
      • For each second past that point, the multiplier is reduced by 0.03.
        • After 30 Seconds, the multiplier is down to x1
        • After 63.3 Seconds, the multiplier is down to x0
          • Technically, it can go lower; however, you cannot get negative score, so regardless of whether this goes to a negative multiplier or not, 0 Score is the lowest you can get on any wave.
    • Difficulty Bonus
      • If you're on any Difficulty higher than Normal, you get a multiplier:
        • Hard - x2
        • Very Hard - x3
        • Insane - x4
          • For next version, this multiplier is jumping up to x4.5
    • Calculations:
      • Total Score = Score * Clean Finish * Speed Bonus * Difficulty Bonus
  • When you clear Wave 55 (or Wave 30 on Express), you then receive another set of bonuses.
    • Networth Bonus
      • For every 2 Networth you have, you gain 1 Score.
    • Endspeed Bonus
      • This is a multiplicative bonus based on a set number. Here's the formulas listed, based on Minutes.
        • Classic: ([(45 / Your Time) - 1] * 2) + 1
        • Express: ([(20 / Your Time) - 1] * 2) + 1
        • For example, if your clear time is 40 Minutes:
          • 45 / 40 = 1.125 - 1 = 0.125 * 2 = 0.25 + 1 = 1.25
          • Multiplier is x1.25
    • Calculations
      • End Score = (Score + Networth Bonus) * Endspeed Bonus
  • If you're on Classic, you have the endless Icefrog Waves. Here's how their scoring works:
    • Each Icefrog is worth 200 Score.
      • The first wave is worth 200 * 30, so 6000 Score.
    • However, the score of each Icefrog increases by 50 Score each wave.
      • So the first five waves are worth:
        1. 200 * 30 = 6000
        2. 250 * 30 = 7500
        3. 300 * 30 = 9000
        4. 350 * 30 = 10500
        5. 400 * 300 = 12000
      • And so on and so forth.
    • In the end, your total Score just adds on top of previous End Score.

 

I do not have spreadsheets for this, but wah-lah, that's how Score works!

Share this post


Link to post

how do we know round clear time? or game clear time?

 

 

Edited by GoatAss

Share this post


Link to post

Hmm, we actually don't have an indicator for either. Well, technically we do for game clear time via the time at the top of the screen's UI where the day/night cycle is listed, but yeah, it shouldn't hurt to add both anyways. Twill have it added for next patch, which should be out in the next few days.

Share this post


Link to post

Yeah that would be good... I've been benchmarking myself every 5 waves to know where im slow..

 

road to 1mil.

Share this post


Link to post

Adding a timer that turns red when you are slow would be a good addition, got it

Share this post


Link to post

To expand on this score, I made a theoretical/ideal score calculator in python. It also includes information like cumulative gold and per creep health per wave.

 

All the stats are done for classic mode only.

 

Here are the results from the script. Note that the final score calculation does not include score from frog waves. All the scores are theoretical maximums based on if you kill the entire wave instantly every wave (thus also no leakage). To my knowledge it factors in the delays between waves correctly (please let me know if my calculations are off).

 

difficulty normal
wave | time  | score   | cum score | per creep gold | wave gold | cum gold | per creep health
----------------------------------------------------------------------------------------------
   1 |    45 |     444 |       444 |              1 |        30 |      280 |               75
   2 |    67 |     518 |       963 |              1 |        30 |      310 |               87
   3 |    89 |     592 |      1556 |              2 |        60 |      370 |              102
   4 |   111 |     666 |      2223 |              2 |        60 |      430 |              119
   5 |   133 |     741 |      2964 |              2 |        60 |      490 |              139
   6 |   178 |     815 |      3779 |              2 |        60 |      550 |              163
   7 |   200 |     889 |      4668 |              2 |        60 |      610 |              190
   8 |   222 |     963 |      5631 |              3 |        90 |      700 |              222
   9 |   244 |    1037 |      6669 |              3 |        90 |      790 |              259
  10 |   266 |    1111 |      7780 |              3 |        90 |      880 |              303
  11 |   311 |    1185 |      8966 |              4 |       120 |     1000 |              354
  12 |   334 |    1259 |     10225 |              4 |       120 |     1120 |              413
  13 |   357 |    1333 |     11559 |              4 |       120 |     1240 |              483
  14 |   380 |    1407 |     12967 |              5 |       150 |     1390 |              564
  15 |   403 |    1482 |     14449 |              5 |       150 |     1540 |              659
  16 |   448 |    1556 |     16005 |              6 |       180 |     1720 |              770
  17 |   471 |    1630 |     17635 |              7 |       210 |     1930 |              899
  18 |   494 |    1704 |     19340 |              7 |       210 |     2140 |             1050
  19 |   517 |    1778 |     21118 |              8 |       240 |     2380 |             1227
  20 |   540 |    1852 |     22971 |              9 |       270 |     2650 |             1433
  21 |   585 |    1926 |     24897 |             10 |       300 |     2950 |             1674
  22 |   608 |    2000 |     26898 |             11 |       330 |     3280 |             1955
  23 |   631 |    2074 |     28973 |             12 |       360 |     3640 |             2284
  24 |   654 |    2148 |     31122 |             13 |       390 |     4030 |             2668
  25 |   677 |    2223 |     33345 |             14 |       420 |     4450 |             3116
  26 |   722 |    2297 |     35642 |             15 |       450 |     4900 |             3640
  27 |   745 |    2371 |     38013 |             17 |       510 |     5410 |             4251
  28 |   768 |    2445 |     40458 |             18 |       540 |     5950 |             4966
  29 |   791 |    2519 |     42978 |             20 |       600 |     6550 |             5800
  30 |   814 |    2593 |     45571 |             22 |       660 |     7210 |             6774
  31 |   859 |    2667 |     48239 |             24 |       720 |     7930 |             7913
  32 |   883 |    2741 |     50980 |             26 |       780 |     8710 |             9242
  33 |   907 |    2815 |     53796 |             29 |       870 |     9580 |            10795
  34 |   931 |    2889 |     56686 |             32 |       960 |    10540 |            12608
  35 |   955 |    2964 |     59650 |             35 |      1050 |    11590 |            14727
  36 |  1000 |    3038 |     62688 |             38 |      1140 |    12730 |            17201
  37 |  1024 |    3112 |     65800 |             41 |      1230 |    13960 |            20091
  38 |  1048 |    3186 |     68987 |             45 |      1350 |    15310 |            23466
  39 |  1072 |    3260 |     72247 |             50 |      1500 |    16810 |            27408
  40 |  1096 |    3334 |     75582 |             54 |      1620 |    18430 |            32013
  41 |  1141 |    3408 |     78990 |             59 |      1770 |    20200 |            37391
  42 |  1165 |    3482 |     82473 |             65 |      1950 |    22150 |            43673
  43 |  1189 |    3556 |     86030 |             71 |      2130 |    24280 |            51010
  44 |  1213 |    3630 |     89661 |             78 |      2340 |    26620 |            59580
  45 |  1237 |    3705 |     93366 |             85 |      2550 |    29170 |            69589
  46 |  1282 |    3779 |     97145 |             93 |      2790 |    31960 |            81281
  47 |  1307 |    3853 |    100998 |            101 |      3030 |    34990 |            94936
  48 |  1332 |    3927 |    104925 |            111 |      3330 |    38320 |           110885
  49 |  1357 |    4001 |    108927 |            121 |      3630 |    41950 |           129514
  50 |  1382 |    4075 |    113002 |            133 |      3990 |    45940 |           151272
  51 |  1427 |    4149 |    117152 |            145 |      4350 |    50290 |           176686
  52 |  1452 |    4223 |    121375 |            158 |      4740 |    55030 |           206369
  53 |  1477 |    4297 |    125673 |            173 |      5190 |    60220 |           241039
  54 |  1502 |    4371 |    130045 |            189 |      5670 |    65890 |           281534
  55 |  1527 |    4446 |    134491 |            207 |      6210 |    72100 |           328832
Final score with game time bonus: 341116


difficulty hard
wave | time  | score   | cum score | per creep gold | wave gold | cum gold | per creep health
----------------------------------------------------------------------------------------------
   1 |    45 |     889 |       889 |              1 |        30 |      280 |               97
   2 |    66 |    1037 |      1926 |              1 |        30 |      310 |              113
   3 |    87 |    1185 |      3112 |              2 |        60 |      370 |              132
   4 |   108 |    1333 |      4446 |              2 |        60 |      430 |              154
   5 |   129 |    1482 |      5928 |              2 |        60 |      490 |              180
   6 |   174 |    1630 |      7558 |              2 |        60 |      550 |              211
   7 |   195 |    1778 |      9336 |              2 |        60 |      610 |              247
   8 |   216 |    1926 |     11263 |              3 |        90 |      700 |              288
   9 |   237 |    2074 |     13338 |              3 |        90 |      790 |              336
  10 |   258 |    2223 |     15561 |              3 |        90 |      880 |              393
  11 |   303 |    2371 |     17932 |              4 |       120 |     1000 |              460
  12 |   325 |    2519 |     20451 |              4 |       120 |     1120 |              536
  13 |   347 |    2667 |     23119 |              5 |       150 |     1270 |              627
  14 |   369 |    2815 |     25935 |              5 |       150 |     1420 |              733
  15 |   391 |    2964 |     28899 |              6 |       180 |     1600 |              856
  16 |   436 |    3112 |     32011 |              6 |       180 |     1780 |             1001
  17 |   458 |    3260 |     35271 |              7 |       210 |     1990 |             1168
  18 |   480 |    3408 |     38680 |              8 |       240 |     2230 |             1365
  19 |   502 |    3556 |     42237 |              8 |       240 |     2470 |             1595
  20 |   524 |    3705 |     45942 |              9 |       270 |     2740 |             1862
  21 |   569 |    3853 |     49795 |             10 |       300 |     3040 |             2176
  22 |   591 |    4001 |     53796 |             11 |       330 |     3370 |             2541
  23 |   613 |    4149 |     57946 |             12 |       360 |     3730 |             2969
  24 |   635 |    4297 |     62244 |             13 |       390 |     4120 |             3468
  25 |   657 |    4446 |     66690 |             15 |       450 |     4570 |             4050
  26 |   702 |    4594 |     71284 |             16 |       480 |     5050 |             4732
  27 |   724 |    4742 |     76026 |             18 |       540 |     5590 |             5526
  28 |   746 |    4890 |     80917 |             19 |       570 |     6160 |             6455
  29 |   768 |    5038 |     85956 |             21 |       630 |     6790 |             7540
  30 |   790 |    5187 |     91143 |             23 |       690 |     7480 |             8806
  31 |   835 |    5335 |     96478 |             26 |       780 |     8260 |            10286
  32 |   858 |    5483 |    101961 |             28 |       840 |     9100 |            12014
  33 |   881 |    5631 |    107593 |             31 |       930 |    10030 |            14033
  34 |   904 |    5779 |    113373 |             34 |      1020 |    11050 |            16390
  35 |   927 |    5928 |    119301 |             37 |      1110 |    12160 |            19145
  36 |   972 |    6076 |    125377 |             41 |      1230 |    13390 |            22361
  37 |   995 |    6224 |    131601 |             45 |      1350 |    14740 |            26118
  38 |  1018 |    6372 |    137974 |             49 |      1470 |    16210 |            30505
  39 |  1041 |    6520 |    144495 |             54 |      1620 |    17830 |            35630
  40 |  1064 |    6669 |    151164 |             59 |      1770 |    19600 |            41616
  41 |  1109 |    6817 |    157981 |             65 |      1950 |    21550 |            48608
  42 |  1132 |    6965 |    164946 |             71 |      2130 |    23680 |            56774
  43 |  1155 |    7113 |    172060 |             77 |      2310 |    25990 |            66313
  44 |  1178 |    7261 |    179322 |             85 |      2550 |    28540 |            77454
  45 |  1201 |    7410 |    186732 |             93 |      2790 |    31330 |            90465
  46 |  1246 |    7558 |    194290 |            102 |      3060 |    34390 |           105665
  47 |  1270 |    7706 |    201996 |            112 |      3360 |    37750 |           123416
  48 |  1294 |    7854 |    209851 |            122 |      3660 |    41410 |           144150
  49 |  1318 |    8002 |    217854 |            134 |      4020 |    45430 |           168368
  50 |  1342 |    8151 |    226005 |            147 |      4410 |    49840 |           196653
  51 |  1387 |    8299 |    234304 |            161 |      4830 |    54670 |           229691
  52 |  1411 |    8447 |    242751 |            176 |      5280 |    59950 |           268279
  53 |  1435 |    8595 |    251347 |            193 |      5790 |    65740 |           313350
  54 |  1459 |    8743 |    260091 |            211 |      6330 |    72070 |           365994
  55 |  1483 |    8892 |    268983 |            231 |      6930 |    79000 |           427481
Final score with game time bonus: 710456


difficulty very hard
wave | time  | score   | cum score | per creep gold | wave gold | cum gold | per creep health
----------------------------------------------------------------------------------------------
   1 |    45 |    1333 |      1333 |              1 |        30 |      280 |              120
   2 |    65 |    1556 |      2889 |              1 |        30 |      310 |              139
   3 |    85 |    1778 |      4668 |              2 |        60 |      370 |              163
   4 |   105 |    2000 |      6669 |              2 |        60 |      430 |              190
   5 |   125 |    2223 |      8892 |              2 |        60 |      490 |              222
   6 |   170 |    2445 |     11337 |              2 |        60 |      550 |              260
   7 |   190 |    2667 |     14004 |              3 |        90 |      640 |              304
   8 |   210 |    2889 |     16894 |              3 |        90 |      730 |              355
   9 |   230 |    3112 |     20007 |              3 |        90 |      820 |              414
  10 |   250 |    3334 |     23341 |              4 |       120 |      940 |              484
  11 |   295 |    3556 |     26898 |              4 |       120 |     1060 |              566
  12 |   316 |    3779 |     30677 |              4 |       120 |     1180 |              660
  13 |   337 |    4001 |     34678 |              5 |       150 |     1330 |              772
  14 |   358 |    4223 |     38902 |              5 |       150 |     1480 |              902
  15 |   379 |    4446 |     43348 |              6 |       180 |     1660 |             1054
  16 |   424 |    4668 |     48016 |              6 |       180 |     1840 |             1232
  17 |   445 |    4890 |     52907 |              7 |       210 |     2050 |             1438
  18 |   466 |    5112 |     58020 |              8 |       240 |     2290 |             1680
  19 |   487 |    5335 |     63355 |              9 |       270 |     2560 |             1963
  20 |   508 |    5557 |     68913 |             10 |       300 |     2860 |             2292
  21 |   553 |    5779 |     74692 |             11 |       330 |     3190 |             2678
  22 |   574 |    6002 |     80694 |             12 |       360 |     3550 |             3128
  23 |   595 |    6224 |     86919 |             13 |       390 |     3940 |             3654
  24 |   616 |    6446 |     93366 |             14 |       420 |     4360 |             4268
  25 |   637 |    6669 |    100035 |             16 |       480 |     4840 |             4985
  26 |   682 |    6891 |    106926 |             17 |       510 |     5350 |             5824
  27 |   703 |    7113 |    114039 |             19 |       570 |     5920 |             6801
  28 |   724 |    7335 |    121375 |             21 |       630 |     6550 |             7945
  29 |   745 |    7558 |    128934 |             23 |       690 |     7240 |             9280
  30 |   766 |    7780 |    136714 |             25 |       750 |     7990 |            10838
  31 |   811 |    8002 |    144717 |             28 |       840 |     8830 |            12660
  32 |   833 |    8225 |    152942 |             30 |       900 |     9730 |            14787
  33 |   855 |    8447 |    161389 |             33 |       990 |    10720 |            17272
  34 |   877 |    8669 |    170059 |             36 |      1080 |    11800 |            20172
  35 |   899 |    8892 |    178951 |             40 |      1200 |    13000 |            23563
  36 |   944 |    9114 |    188065 |             44 |      1320 |    14320 |            27521
  37 |   966 |    9336 |    197402 |             48 |      1440 |    15760 |            32145
  38 |   988 |    9558 |    206961 |             53 |      1590 |    17350 |            37545
  39 |  1010 |    9781 |    216742 |             58 |      1740 |    19090 |            43852
  40 |  1032 |   10003 |    226746 |             64 |      1920 |    21010 |            51220
  41 |  1077 |   10225 |    236971 |             70 |      2100 |    23110 |            59825
  42 |  1099 |   10448 |    247419 |             77 |      2310 |    25420 |            69876
  43 |  1121 |   10670 |    258090 |             85 |      2550 |    27970 |            81616
  44 |  1143 |   10892 |    268983 |             93 |      2790 |    30760 |            95328
  45 |  1165 |   11115 |    280098 |            102 |      3060 |    33820 |           111342
  46 |  1210 |   11337 |    291435 |            112 |      3360 |    37180 |           130049
  47 |  1233 |   11559 |    302994 |            123 |      3690 |    40870 |           151897
  48 |  1256 |   11781 |    314776 |            135 |      4050 |    44920 |           177416
  49 |  1279 |   12004 |    326781 |            148 |      4440 |    49360 |           207222
  50 |  1302 |   12226 |    339007 |            162 |      4860 |    54220 |           242035
  51 |  1347 |   12448 |    351456 |            178 |      5340 |    59560 |           282697
  52 |  1370 |   12671 |    364127 |            195 |      5850 |    65410 |           330190
  53 |  1393 |   12893 |    377020 |            214 |      6420 |    71830 |           385662
  54 |  1416 |   13115 |    390136 |            235 |      7050 |    78880 |           450454
  55 |  1439 |   13338 |    403474 |            258 |      7740 |    86620 |           526131
Final score with game time bonus: 1110606


difficulty insane
wave | time  | score   | cum score | per creep gold | wave gold | cum gold | per creep health
----------------------------------------------------------------------------------------------
   1 |    45 |    1778 |      1778 |              1 |        30 |      280 |              150
   2 |    64 |    2074 |      3853 |              1 |        30 |      310 |              174
   3 |    83 |    2371 |      6224 |              2 |        60 |      370 |              204
   4 |   102 |    2667 |      8892 |              2 |        60 |      430 |              238
   5 |   121 |    2964 |     11856 |              2 |        60 |      490 |              278
   6 |   166 |    3260 |     15116 |              2 |        60 |      550 |              326
   7 |   185 |    3556 |     18673 |              3 |        90 |      640 |              380
   8 |   204 |    3853 |     22526 |              3 |        90 |      730 |              444
   9 |   223 |    4149 |     26676 |              3 |        90 |      820 |              518
  10 |   242 |    4446 |     31122 |              4 |       120 |      940 |              606
  11 |   287 |    4742 |     35864 |              4 |       120 |     1060 |              708
  12 |   307 |    5038 |     40903 |              4 |       120 |     1180 |              826
  13 |   327 |    5335 |     46238 |              5 |       150 |     1330 |              966
  14 |   347 |    5631 |     51870 |              6 |       180 |     1510 |             1128
  15 |   367 |    5928 |     57798 |              6 |       180 |     1690 |             1318
  16 |   412 |    6224 |     64022 |              7 |       210 |     1900 |             1540
  17 |   432 |    6520 |     70543 |              7 |       210 |     2110 |             1798
  18 |   452 |    6817 |     77360 |              8 |       240 |     2350 |             2100
  19 |   472 |    7113 |     84474 |              9 |       270 |     2620 |             2454
  20 |   492 |    7410 |     91884 |             10 |       300 |     2920 |             2866
  21 |   537 |    7706 |     99590 |             11 |       330 |     3250 |             3348
  22 |   557 |    8002 |    107593 |             12 |       360 |     3610 |             3910
  23 |   577 |    8299 |    115892 |             14 |       420 |     4030 |             4568
  24 |   597 |    8595 |    124488 |             15 |       450 |     4480 |             5336
  25 |   617 |    8892 |    133380 |             16 |       480 |     4960 |             6232
  26 |   662 |    9188 |    142568 |             18 |       540 |     5500 |             7280
  27 |   682 |    9484 |    152053 |             20 |       600 |     6100 |             8502
  28 |   702 |    9781 |    161834 |             22 |       660 |     6760 |             9932
  29 |   722 |   10077 |    171912 |             24 |       720 |     7480 |            11600
  30 |   742 |   10374 |    182286 |             27 |       810 |     8290 |            13548
  31 |   787 |   10670 |    192956 |             29 |       870 |     9160 |            15826
  32 |   808 |   10966 |    203923 |             32 |       960 |    10120 |            18484
  33 |   829 |   11263 |    215186 |             36 |      1080 |    11200 |            21590
  34 |   850 |   11559 |    226746 |             39 |      1170 |    12370 |            25216
  35 |   871 |   11856 |    238602 |             43 |      1290 |    13660 |            29454
  36 |   916 |   12152 |    250754 |             47 |      1410 |    15070 |            34402
  37 |   937 |   12448 |    263203 |             52 |      1560 |    16630 |            40182
  38 |   958 |   12745 |    275948 |             57 |      1710 |    18340 |            46932
  39 |   979 |   13041 |    288990 |             63 |      1890 |    20230 |            54816
  40 |  1000 |   13338 |    302328 |             69 |      2070 |    22300 |            64026
  41 |  1045 |   13634 |    315962 |             76 |      2280 |    24580 |            74782
  42 |  1066 |   13930 |    329893 |             84 |      2520 |    27100 |            87346
  43 |  1087 |   14227 |    344120 |             92 |      2760 |    29860 |           102020
  44 |  1108 |   14523 |    358644 |            102 |      3060 |    32920 |           119160
  45 |  1129 |   14820 |    373464 |            112 |      3360 |    36280 |           139178
  46 |  1174 |   15116 |    388580 |            123 |      3690 |    39970 |           162562
  47 |  1196 |   15412 |    403993 |            135 |      4050 |    44020 |           189872
  48 |  1218 |   15709 |    419702 |            148 |      4440 |    48460 |           221770
  49 |  1240 |   16005 |    435708 |            163 |      4890 |    53350 |           259028
  50 |  1262 |   16302 |    452010 |            179 |      5370 |    58720 |           302544
  51 |  1307 |   16598 |    468608 |            197 |      5910 |    64630 |           353372
  52 |  1329 |   16894 |    485503 |            217 |      6510 |    71140 |           412738
  53 |  1351 |   17191 |    502694 |            238 |      7140 |    78280 |           482078
  54 |  1373 |   17487 |    520182 |            262 |      7860 |    86140 |           563068
  55 |  1395 |   17784 |    537966 |            288 |      8640 |    94780 |           657664
Final score with game time bonus: 1544483

 

Here is the code I used:

 

import math

# Get the amount of time to wait between waves as a building/cooldown time
def get_wave_delay(difficulty, wave):
    # source game/dota_addons/element_td/scripts/kv/gamesettings.kv
    time_between_waves = {
            "normal":    ((1, 10, 7), (11, 30, 8), (31, 45, 9), (46, 55, 10)),
            "hard":      ((1, 10, 6), (11, 30, 7), (31, 45, 8), (46, 55, 9)),
            "very hard": ((1, 10, 5), (11, 30, 6), (31, 45, 7), (46, 55, 8)),
            "insane":    ((1, 10, 4), (11, 30, 5), (31, 45, 6), (46, 55, 7)),
    }

    for wave_delay in time_between_waves[difficulty]:
        start, end, delay = wave_delay
        if wave >= start and wave <= end:
            return delay

# Get the time for a break, this is given every 5 waves to give you time to
# kill the element you pick
def get_break_time():
    # source game/dota_addons/element_td/scripts/vscripts/wavedata.lua StartBreakTime()
    return 30.0

# Get the amount of time between each creep spawn
def get_per_creep_delay():
    # source game/dota_addons/element_td/scripts/vscripts/awave.lua Wave:SpawnWave()
    return 0.5

# Get the total time from the start of a wave, to when the final creep spawns.
# This includes the break/delay time as well as the creep wave spawn time.
def get_wave_total_time(difficulty, wave):
    # Time to spawn 30 creeps
    time = get_per_creep_delay() * 30

    if (wave - 1) % 5 == 0:
        # One out of 5 waves we have a break (currently always 30 sec)
        time += get_break_time()
    else:
        # Otherwise, apply the wave delay (changes based on wave)
        time += get_wave_delay(difficulty, wave)

    return time

# Get the amount of gold per creep at this difficulty and this wave
def get_per_creep_bounty(difficulty, wave):
    # source game/dota_addons/element_td/scripts/kv/gamesettings.kv
    bounty = { "normal": 1.093, "hard": 1.095, "very hard": 1.097, "insane": 1.099 }
    return int(bounty[difficulty] ** (wave + 5))

# Get the score per creep
def get_per_creep_score(wave):
    # source https://forums.eletd.com/topic/95539-score/
    return wave + 5

# Get the difficulty bonus multiplier
def get_score_bonus_difficulty(difficulty):
    # source https://forums.eletd.com/topic/95539-score/
    difficulty_scaler = { "normal": 1, "hard": 2, "very hard": 3, "insane": 4 }
    return difficulty_scaler[difficulty]

# Get the bonus for this wave given the time it took to kill it
# wave_time is the time taken (in seconds) to finish the wave, starting from
# when the final (30th) creep spawns
def get_score_bonus_speed(wave_time):
    # source https://forums.eletd.com/topic/95539-score/
    multiplier = 1.9
    return max(0.0, multiplier - (wave_time * 0.03))

# Get the health for a given greep on a difficulty and wave
def get_per_creep_health(difficulty, wave):
    # source game/dota_addons/element_td/scripts/kv/gamesettings.kv
    health_scaler = { "normal": 1.0, "hard": 1.3, "very hard": 1.6, "insane": 2.0 }
    
    return int(health_scaler[difficulty] * int(75 * (1.168 ** (wave - 1))))

# For each difficulty mode print out a stats table
for difficulty in ("normal", "hard", "very hard", "insane"):
    # Initialize values
    score  = 0
    time   = 0.0
    gold   = 250

    print "\n\ndifficulty %s" % difficulty
    print "wave | time  | score   | cum score | per creep gold | wave gold | cum gold | per creep health"
    print "----------------------------------------------------------------------------------------------"

    # For each wave
    for wave in xrange(1, 56):
        # Cumulative time
        time += get_wave_total_time(difficulty, wave)

        # Total score we got from this wave
        wavescore = get_per_creep_score(wave) * 30 * get_score_bonus_speed(0.0) * get_score_bonus_difficulty(difficulty)

        # Clean wave (no leaks) bonus
        wavescore *= 1.3

        # Bounty per creep
        bounty = get_per_creep_bounty(difficulty, wave)

        # Cumulative gold earned
        gold += bounty * 30

        # Cumulative score
        score += wavescore

        # Per creep health
        health = get_per_creep_health(difficulty, wave)

        # Print out stats for this wave
        print "%4d | %5d | %7d | %9d | %14d | %9d | %8d | %16d" % (wave, time, wavescore, score, bounty, bounty * 30, gold, health)

    # Game time bonus
    score *= (((45.0 / (time / 60.0)) - 1) * 2) + 1

    print "Final score with game time bonus: %d" % int(score)

 

Share this post


Link to post

Excellent.... script.. if you're trying to improve your python.. why not help me write a python software (im actually looking to learn python to get some software done)

Share this post


Link to post
Sign in to follow this  

×
×
  • Create New...