sc: replace bw speed measurements by game data
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 30 Jun 2015 19:52:41 +0000 (21:52 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 1 Jul 2015 17:32:34 +0000 (19:32 +0200)
From Liquipedia <http://wiki.teamliquid.net/starcraft/Unit_Movement_Speed>
which is extracted from game files flingy.dat/iscript.bin and fixes many
minor and some significant errors.

sc-units-bw.inc.pl

index 7d3feb17563e0ce308c4c899760ca343feab197c..06e59f12b52e07078072a2957af11b1555825bb5 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 my $FPS = 24;  # frames per second
 # toss shield += .65 per second
 # zerg regen  += .37 per second
 my $FPS = 24;  # frames per second
 # toss shield += .65 per second
 # zerg regen  += .37 per second
-my $SM = .2;  # speed multiplication
+my $SM = .555;  # pixels per frame to tiles per second multiplication
 
 [
 '<span title="no known changes as of v1.16.1">versionā‰„1.08</span>',
 
 [
 '<span title="no known changes as of v1.16.1">versionā‰„1.08</span>',
@@ -39,7 +39,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 14 * $SM,
+speed => 5 * $SM,
 counter => ['vulture', 'dark templar'],
 },
 
 counter => ['vulture', 'dark templar'],
 },
 
@@ -106,11 +106,11 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 11 * $SM,
+speed => 4 * $SM,
 upgrade => [
        {
                name => 'Leg Enhancements',
 upgrade => [
        {
                name => 'Leg Enhancements',
-               speed => (16 - 11) * $SM,
+               speed => (6 - 4) * $SM,
                min => 150,
                gas => 150,
                build => 133,
                min => 150,
                gas => 150,
                build => 133,
@@ -151,7 +151,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 15 * $SM,
+speed => 5.25 * $SM,
 upgrade => [
        {
                name => 'Singularity Charge',
 upgrade => [
        {
                name => 'Singularity Charge',
@@ -189,7 +189,7 @@ hp => 40,
 shield => 40,
 armor => 0,
 sight => 7,
 shield => 40,
 armor => 0,
 sight => 7,
-speed => 9 * $SM,
+speed => 3.33 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -259,7 +259,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 15 * $SM,
+speed => 5 * $SM,
 special => [
        {
                name => 'Cloaked',
 special => [
        {
                name => 'Cloaked',
@@ -303,7 +303,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 14 * $SM,
+speed => 5 * $SM,
 },
 
 {
 },
 
 {
@@ -328,7 +328,7 @@ hp => 25,
 shield => 200,
 armor => 1,
 sight => 10,
 shield => 200,
 armor => 1,
 sight => 10,
-speed => 14 * $SM,
+speed => 5 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -413,7 +413,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 13 * $SM,
+speed => 5 * $SM,
 upgrade => [
        {
                name => 'Apial Sensors',
 upgrade => [
        {
                name => 'Apial Sensors',
@@ -427,7 +427,7 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 166,
                min => 200,
                gas => 200,
                build => 166,
-               speed => (18 - 13) * $SM,
+               speed => (6.67 - 5) * $SM,
        },
 ],
 },
        },
 ],
 },
@@ -464,7 +464,7 @@ attack => [
        },
 ],
 sight => 9,
        },
 ],
 sight => 9,
-speed => 17 * $SM,
+speed => 6.67 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -521,7 +521,7 @@ attack => [
        },
 ],
 sight => 11,
        },
 ],
 sight => 11,
-speed => 10 * $SM,
+speed => 3.33 * $SM,
 special => [
        {
                name => 'Build Interceptor',
 special => [
        {
                name => 'Build Interceptor',
@@ -597,7 +597,7 @@ attack => [
        },
 ],
 sight => 9,
        },
 ],
 sight => 9,
-speed => 12 * $SM,
+speed => 5 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -661,7 +661,7 @@ attack => [
        {
                anti => 1,
                damage => 100,
        {
                anti => 1,
                damage => 100,
-               cooldown => 60 / $FPS,
+               cooldown => 60 / $FPS, # 30 after drop
                splash => 1,
                min => 15,
                build => 7,
                splash => 1,
                min => 15,
                build => 7,
@@ -670,7 +670,7 @@ attack => [
        },
 ],
 sight => 10,
        },
 ],
 sight => 10,
-speed => 5 * $SM,
+speed => 1.77 * $SM,
 upgrade => [
        {
                name => 'Scarab Damage',
 upgrade => [
        {
                name => 'Scarab Damage',
@@ -726,7 +726,7 @@ shield => 20,
 armor => 0,
 sight => 9,
 detect => 1,
 armor => 0,
 sight => 9,
 detect => 1,
-speed => 9 * $SM,
+speed => 3.33 * $SM,
 upgrade => [
        {
                name => "Sensor Array",
 upgrade => [
        {
                name => "Sensor Array",
@@ -740,7 +740,7 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 166,
                min => 150,
                gas => 150,
                build => 166,
-               speed => (13 - 9) * $SM,
+               speed => (5 - 3.33) * $SM,
        },
 ],
 special => [
        },
 ],
 special => [
@@ -773,7 +773,7 @@ hp => 80,
 shield => 60,
 armor => 1,
 sight => 8,
 shield => 60,
 armor => 1,
 sight => 8,
-speed => 13 * $SM,
+speed => 4.44 * $SM,
 transport => 1,
 upgrade => [
        {
 transport => 1,
 upgrade => [
        {
@@ -781,7 +781,7 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 166,
                min => 200,
                gas => 200,
                build => 166,
-               speed => (19 - 13) * $SM,
+               speed => (6.67 - 4.44) * $SM,
        }
 ],
 },
        }
 ],
 },
@@ -814,7 +814,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 15 * $SM,
+speed => 5 * $SM,
 },
 
 {
 },
 
 {
@@ -875,7 +875,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 11 * $SM,
+speed => 4 * $SM,
 upgrade => [
        {
                name => 'U-238 Shells',
 upgrade => [
        {
                name => 'U-238 Shells',
@@ -897,7 +897,7 @@ special => [
                gas => 100,
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
                gas => 100,
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
-               speed => 17 * $SM,
+               speed => (6 - 4) * $SM,
                attack => [
                        {
                                anti => 3,
                attack => [
                        {
                                anti => 3,
@@ -936,7 +936,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 11 * $SM,
+speed => 4 * $SM,
 upgrade => [
 ],
 special => [
 upgrade => [
 ],
 special => [
@@ -947,7 +947,7 @@ special => [
                gas => 100,
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
                gas => 100,
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
-               speed => 17 * $SM,
+               speed => (6 - 4) * $SM,
                attack => [
                        {
                                anti => 1,
                attack => [
                        {
                                anti => 1,
@@ -988,7 +988,7 @@ attack => [
        },
 ],
 sight => 9,
        },
 ],
 sight => 9,
-speed => 11 * $SM,
+speed => 4 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -1065,7 +1065,7 @@ attr => {
 hp =>  60,
 armor => 1,
 sight => 9,
 hp =>  60,
 armor => 1,
 sight => 9,
-speed => 11 * $SM,
+speed => 4 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -1141,14 +1141,14 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 20 * $SM,
+speed => 6.67 * $SM,
 upgrade => [
        {
                name => 'Ion Thrusters',
                min => 100,
                gas => 100,
                build => 100,
 upgrade => [
        {
                name => 'Ion Thrusters',
                min => 100,
                gas => 100,
                build => 100,
-               speed => (28 - 20) * $SM,
+               speed => (10 - 6.67) * $SM,
        },
 ],
 special => [
        },
 ],
 special => [
@@ -1177,7 +1177,7 @@ special => [
                        },
                ],
                sight => 3,
                        },
                ],
                sight => 3,
-               speed => 25 * $SM,
+               speed => 9 * $SM, #XXX
     },
 ],
 },
     },
 ],
 },
@@ -1205,13 +1205,13 @@ attack => [
                anti => 1,
                damage => 30,
                upgrade => 3,
                anti => 1,
                damage => 30,
                upgrade => 3,
-               cooldown => 37 / $FPS,
+               cooldown => 37 / $FPS, # 15 after drop
                type => 'explosive',
                range => 7,
        },
 ],
 sight => 10,
                type => 'explosive',
                range => 7,
        },
 ],
 sight => 10,
-speed => 12 * $SM,
+speed => 4 * $SM,
 special => [
        {
                name => 'Siege Mode',
 special => [
        {
                name => 'Siege Mode',
@@ -1259,7 +1259,7 @@ attack => [
                anti => 1,
                damage => 12,
                upgrade => 1,
                anti => 1,
                damage => 12,
                upgrade => 1,
-               cooldown => 22 / $FPS,
+               cooldown => 22 / $FPS, # 15 after drop
                range => 5,
        },
        {
                range => 5,
        },
        {
@@ -1272,7 +1272,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 13 * $SM,
+speed => 4.7 * $SM,
 upgrade => [
        {
                name => 'Charon Boosters',
 upgrade => [
        {
                name => 'Charon Boosters',
@@ -1323,7 +1323,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 17 * $SM,
+speed => 6.67 * $SM,
 energy => 50,
 capacity => 200,
 special => [
 energy => 50,
 capacity => 200,
 special => [
@@ -1379,7 +1379,7 @@ attack => [
        },
 ],
 sight => 11,
        },
 ],
 sight => 11,
-speed => 7 * $SM,
+speed => 2.5 * $SM,
 energy => 50,
 capacity => 200,
 special => [
 energy => 50,
 capacity => 200,
 special => [
@@ -1433,7 +1433,7 @@ hp => 200,
 armor => 1,
 sight => 10,
 detect => 1,
 armor => 1,
 sight => 10,
 detect => 1,
-speed => 15 * $SM,
+speed => 5 * $SM,
 energy => 50,
 capacity => 200,
 special => [
 energy => 50,
 capacity => 200,
 special => [
@@ -1515,7 +1515,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 19 * $SM,
+speed => 6.6 * $SM,
 },
 
 {
 },
 
 {
@@ -1536,7 +1536,7 @@ air => 1,
 hp => 150,
 armor => 1,
 sight => 8,
 hp => 150,
 armor => 1,
 sight => 8,
-speed => 15 * $SM,
+speed => 5.47 * $SM,
 transport => 1,
 },
 
 transport => 1,
 },
 
@@ -1567,7 +1567,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 14 * $SM,
+speed => 5 * $SM,
 },
 
 {
 },
 
 {
@@ -1590,7 +1590,7 @@ armor => 0,
 cargo => 0,
 sight => 9,
 detect => 1,
 cargo => 0,
 sight => 9,
 detect => 1,
-speed => 2 * $SM,
+speed => .83 * $SM,
 transport => 1,
 upgrade => [
        {
 transport => 1,
 upgrade => [
        {
@@ -1612,7 +1612,7 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 133,
                min => 150,
                gas => 150,
                build => 133,
-               speed => (10 - 2) * $SM,
+               speed => (3.33 - .83) * $SM,
        },
 ],
 },
        },
 ],
 },
@@ -1729,14 +1729,14 @@ attack => [
        },
 ],
 sight => 5,
        },
 ],
 sight => 5,
-speed => 14 * $SM,
+speed => 5.57 * $SM,
 upgrade => [
        {
                name => 'Metabolic Boost',
                min => 100,
                gas => 100,
                build => 80,
 upgrade => [
        {
                name => 'Metabolic Boost',
                min => 100,
                gas => 100,
                build => 80,
-               speed => (22 - 14) * $SM,
+               speed => (8.36 - 5.57) * $SM,
        },
        {
                name => 'Adrenal Glands',
        },
        {
                name => 'Adrenal Glands',
@@ -1779,7 +1779,7 @@ attack => [
        },
 ],
 sight => 6,
        },
 ],
 sight => 6,
-speed => 11 * $SM,
+speed => 3.71 * $SM,
 upgrade => [
        {
                name => 'Grooved Spines',
 upgrade => [
        {
                name => 'Grooved Spines',
@@ -1797,7 +1797,7 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 100,
                min => 150,
                gas => 150,
                build => 100,
-               speed => (16 - 11) * $SM,
+               speed => (5.57 - 3.71) * $SM,
        },
        {
                name => 'Lurker Aspect',
        },
        {
                name => 'Lurker Aspect',
@@ -1835,7 +1835,7 @@ attack => [
        },
 ],
 sight => 8,
        },
 ],
 sight => 8,
-speed => 17 * $SM,
+speed => 6 * $SM,
 },
 
 {
 },
 
 {
@@ -1855,7 +1855,7 @@ air => 1,
 hp => 120,
 armor => 0,
 sight => 10,
 hp => 120,
 armor => 0,
 sight => 10,
-speed => 18 * $SM,
+speed => 6.67 * $SM,
 energy => 50,
 capacity => 200,
 special => [
 energy => 50,
 capacity => 200,
 special => [
@@ -1912,7 +1912,7 @@ special => [
                        },
                ],
                sight => 5,
                        },
                ],
                sight => 5,
-               speed => 19 * $SM,
+               speed => 6.04 * $SM,
        },
 ],
 },
        },
 ],
 },
@@ -1941,7 +1941,7 @@ attack => [
        },
 ],
 sight => 5,
        },
 ],
 sight => 5,
-speed => 17 * $SM,
+speed => 6 * $SM,
 },
 
 {
 },
 
 {
@@ -1968,7 +1968,7 @@ attack => [
        },
 ],
 sight => 5,
        },
 ],
 sight => 5,
-speed => 18 * $SM,
+speed => 6.67 * $SM,
 counter => ['cannon', 'goliath', 'hydralisk'],
 },
 
 counter => ['cannon', 'goliath', 'hydralisk'],
 },
 
@@ -1999,7 +1999,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 18 * $SM,
+speed => 6.67 * $SM,
 special => [
        {
                alt => 'Cocoon',
 special => [
        {
                alt => 'Cocoon',
@@ -2045,7 +2045,7 @@ attack => [
        },
 ],
 sight => 11,
        },
 ],
 sight => 11,
-speed => 7 * $SM,
+speed => 2.5 * $SM,
 },
 
 {
 },
 
 {
@@ -2076,7 +2076,7 @@ attack => [
        },
 ],
 sight => 10,
        },
 ],
 sight => 10,
-speed => 15 * $SM,
+speed => 5 * $SM,
 counter => ['goliath', 'dragoon', 'scourge'],
 },
 
 counter => ['goliath', 'dragoon', 'scourge'],
 },
 
@@ -2096,7 +2096,7 @@ attr => {
 hp => 80,
 armor => 1,
 sight => 10,
 hp => 80,
 armor => 1,
 sight => 10,
-speed => 12 * $SM,
+speed => 4 * $SM,
 energy => 50,
 capacity => 200,
 special => [
 energy => 50,
 capacity => 200,
 special => [
@@ -2168,7 +2168,7 @@ attack => [
        },
 ],
 sight => 7,
        },
 ],
 sight => 7,
-speed => 16 * $SM,
+speed => 5.4 * $SM,
 upgrade => [
        {
                name => 'Chitinous Plating',
 upgrade => [
        {
                name => 'Chitinous Plating',
@@ -2182,7 +2182,7 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 133,
                min => 200,
                gas => 200,
                build => 133,
-               speed => (21 - 16) * $SM,
+               speed => (8.1 - 5.4) * $SM,
        },
 ],
 },
        },
 ],
 },