• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 03:24
CET 09:24
KST 17:24
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Power Rank - IEM Katowice 202363The Road to Katowice - 2022/23 Retrospective24Disasterpiece Theater: Soulkey vs sOs (2013-05-21)11WTL 2022 Winter - Regular Season Awards + Wrap-up24WTL Winter - The 2v2 Tour25
Community News
IEM Katowice 2023 - RO36 concludes, RO24 groups drawn1ESL Open #161: Dark, SKillous, MaxPax win3ESL Open #160: Dark wins KR, HeroMarine doubles8Rex leaves ONSYDE, Ryung joins4[BSL16] - RO16 Group Stage11
StarCraft 2
General
IEM Katowice 2023 - RO36 concludes, RO24 groups drawn Power Rank - IEM Katowice 2023 The Road to Katowice - 2022/23 Retrospective Which region will win IEM Katowice 2023? ESL Open #161: Dark, SKillous, MaxPax win
Tourneys
[IEM] Katowice 2023 - RO36 play-in stage WardiTV 2023 Opens (Monthly) Sniper's Team League Season 2 NorCal StarFest I [Alpha Pro Series] MaxPax vs ByuN
Strategy
Custom Maps
Coop Commanders Missing Levels now? Looking for LOTV 'Purity of Purpose' hard savefile [A] (Minigames) Raynor Party [A] [TPS RPG] Transformers: Open World (WIP)
External Content
Mutation # 355 Thunder Dome Mutation # 354 Media Blackout Mutation # 353 Hostile Territory Mutation # 352 Railroad Switch
Brood War
General
[Interview] skb9728_CyGnus – Legendary Mapmaker [24H] mmr bot on USWest BW General Discussion BGH auto balance -> http://bghmmr.eu/ Custom Campaign Upload
Tourneys
[BSL16] RO16 - Group C - Saturday 18:00 CET Small VOD Thread 2.0 Sunday Slaughter [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers Marine rate of fire Valkyrie dmg formula? 2v2 Spell Combos
Other Games
General Games
Nintendo Switch Thread Fire Emblem The XBox Thread Destiny 2 - PC/Xbox/PS4 Dead Island: Epidemic [Closed Beta](Mega OP For U)
Dota 2
[DPC 23] Tour 1 Discussion Official Dota and Chess General Discussion
League of Legends
[Spring 2023] LoL E-sports General Discussion LiquidLegends to reintegrate into TL.net [Patch Notes] Release General Discussion
Heroes of the Storm
HotS: WP and Funny Moments
Hearthstone
TL Mafia
TL Mafia Community Thread TL Mafia Plays: Diplomacy
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread NASA and the Private Sector YouTube Thread MA thesis ideas - American Studies
Fan Clubs
The Scarlett Fan Club The Flash Fan Club The GoOdy Fan Club
Media & Entertainment
[TV] HBO The Last Of Us series Korean Music Discussion Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
NBA General Discussion 2022 - 2023 Football Thread TeamLiquid Health and Fitness Initiative For 2022 2021 NFL/CFB Season
World Cup 2022
FIFA World Cup 2022 - Knockout Stage FIFA World Cup Qatar 2022 Thread
Tech Support
SC2 lagging in windowed (fullscreen) mode Left control suddenly mutes volume Red text blurry and funky blue on black text
TL Community
Ask TL Staff Anything Happy Birthday R1CH! Is there a SQSA thread for this site?
Blogs
Hosting/casting tournies for t…
Trozz
It's that time of year YET A…
Umpteen
I'm still around doodling and…
Glider
Someone Crashed my Plane …
micronesia
The Kitty Arcade Saga
MrBitter
My Goals for 2023
DeNikSSB
State of StarCraft II
Jealous
Burning it all down - Reti…
BreAKerTV
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1549 users

Marine rate of fire

Forum Index > Brood War Strategy
Post a Reply
MeSaber
Profile Joined December 2009
Sweden939 Posts
January 07 2023 17:02 GMT
#1
There are probably plenty more mistakes on Liquipedia but this one is quite big.

It assumes Stim Pack doubles the rate of fire which after testing it does not.

This page: (Wiki)Talk:Marine already mentions it and previous revisions claims too low DPS so i was wondering if someone could look into the code to find the true values?

Seeing as its quite a big difference between RoF +100% vs +65-70%, DPS 19.047 vs DPS 15.71 - 16.189 (33 or 34 hits per stim for 12.6 sec)

DPS without stim is accurate.

In a second test i got 78 shots in 30 seconds: RoF +63.87%, DPS 15.6, 32.76 shots per stim.
-.-
TL+ Member
Peeano
Profile Blog Joined March 2009
Netherlands3589 Posts
Last Edited: 2023-01-08 07:56:25
January 08 2023 07:48 GMT
#2
From playing a lot of UMS I have noticed that hold position units have a higher cooldown RoF (slower attack speed) than stopped/attack move units. This is especially noticable in marines and I believe it also affects melee units.

If someone is diving into this, it would also be interesting to see double check how Ensnare affects that...
FBH #1!
MeSaber
Profile Joined December 2009
Sweden939 Posts
Last Edited: 2023-01-08 09:32:34
January 08 2023 09:28 GMT
#3
On January 08 2023 16:48 Peeano wrote:
From playing a lot of UMS I have noticed that hold position units have a higher cooldown RoF (slower attack speed) than stopped/attack move units. This is especially noticable in marines and I believe it also affects melee units.

If someone is diving into this, it would also be interesting to see double check how Ensnare affects that...


I know for sure Hold position is especially bad if you are switching target very often, like if you have a lot of marines and your target dies very fast. Its maybe because "Hold" incurs some extra penalty in target acquisition because its static state. Im just guessing here.

I even made a video about this 4 years ago: https://www.twitch.tv/videos/448085144

Ive not noticed any other unit in Hold to be affected.

Edit: I just remembered that Wraiths (probably any flying unit) when using Hold spreads the damage out (less overkill) so maybe it has something to do with it why its so slow at finding a new target.
-.-
TL+ Member
Peeano
Profile Blog Joined March 2009
Netherlands3589 Posts
Last Edited: 2023-01-08 09:51:10
January 08 2023 09:48 GMT
#4
The marines in your clip seems to acquire a new target in the same manner, I don't see any obvious difference anyway.
I'm pretty sure it is not (only) target acquiring, but (also) RoF that is different.

For example on Poker D maps where you attack the lurker egg for the quest, I could see a notable difference in RoF between using attack/stop vs hold position.
FBH #1!
MeSaber
Profile Joined December 2009
Sweden939 Posts
Last Edited: 2023-01-08 10:27:36
January 08 2023 10:10 GMT
#5
On January 08 2023 18:48 Peeano wrote:
The marines in your clip seems to acquire a new target in the same manner, I don't see any obvious difference anyway.
I'm pretty sure it is not (only) target acquiring, but (also) RoF that is different.

For example on Poker D maps where you attack the lurker egg for the quest, I could see a notable difference in RoF between using attack/stop vs hold position.


Replay: https://repmastered.app/game/fNo8kfvZhPU1BDBip_w2KtQkX5VkAKxR4DXINR_9umU

Couldnt find any difference Hold vs Stop on a single target.
-.-
TL+ Member
Freakling
Profile Joined October 2012
Germany1517 Posts
Last Edited: 2023-01-09 20:02:48
January 09 2023 09:45 GMT
#6
From OpenBW code (https://github.com/OpenBW/openbw/blob/master/bwgame.h#L13390):

	int get_modified_weapon_cooldown(const unit_t* u, const weapon_type_t* weapon) const {
int cooldown = weapon->cooldown;
if (u->acid_spore_count) {
cooldown += std::max(cooldown / 8, 3) * u->acid_spore_count;
}
int mod = 0;
(1) if (u->stim_timer) ++mod;
(1) if (u_cooldown_upgrade(u)) ++mod;
(1) if (u->ensnare_timer) --mod;
(2) if (mod > 0) cooldown /= 2;
(3) if (mod < 0) cooldown += cooldown / 4;
if (cooldown > 250) cooldown = 250;
(4) if (cooldown < 5) cooldown = 5;
return cooldown;
}


This function handles unit base cooldowns:
(1) if the unit is stimmed or has a cooldown upgrade (read: Adrenal Glands), one modifier is added. If the unit is ensnared, one modifier is subtracted
  • This means that Ensnare directly counteracts the effects of Stim Packs and Adrenal Glands.

(2) If there is a positive modifier (if the unit has increased attack speed from Stim or Adrenal Glands), its base cooldown is halved (calculation in integers, so rounded down):
  • Marines have a base cooldown 15, that makes it 7 when stimmed.
  • For Firebats, base cooldown is 22, so that gets reduced to 11 when stimmed.
  • For Zerglings, base cooldown 8, that makes it 4
    (reference list for weapon cooldowns: https://bwapi.github.io/namespace_b_w_a_p_i_1_1_weapon_types.html#ad885bcaa092286d10a80133abcfbbfe1)

(3) For positive modifiers (unit ensnared and no attack speed upgrades), the base cooldown increases by 25% (also rounded down).
(4) Base cooldown cannot be less than 5
  • This means Cracklings have an actual base cooldown of 5.
Freakling
Profile Joined October 2012
Germany1517 Posts
Last Edited: 2023-01-10 10:21:58
January 09 2023 10:00 GMT
#7
The actual attack in the code (https://github.com/OpenBW/openbw/blob/master/bwgame.h#L2848):

void attack_unit_fire_weapon(unit_t* u) {
st.prev_bullet_source_unit = nullptr;
if (u_cannot_attack(u)) return;
unit_t* target = u->order_target.unit;
const weapon_type_t* weapon;
int cooldown;
int anim;
if (target && u_flying(target)) {
weapon = unit_air_weapon(u);
cooldown = u->air_weapon_cooldown;
anim = iscript_anims::AirAttkRpt;
} else {
weapon = unit_ground_weapon(u);
cooldown = u->ground_weapon_cooldown;
anim = iscript_anims::GndAttkRpt;
}
if (!weapon) return;
if (cooldown != 0) {
(5) if (u->order_process_timer > cooldown - 1) u->order_process_timer = cooldown - 1;
return;
}
if (!unit_can_fire_weapon(u, weapon)) return;
u_set_movement_flag(u, 8);
(6) cooldown = get_modified_weapon_cooldown(u, weapon) + (lcg_rand(12) & 3) - 1;
u->ground_weapon_cooldown = cooldown;
u->air_weapon_cooldown = cooldown;
sprite_run_anim(u->sprite, anim);
}

(5) This is where things start to get less straight forward. The game has a "hidden" "order process timer", that usually refreshes every 9 frames, but for attacking units is (supposed to be, at least) synchronized with the cooldown, so units do not have to wait for the 9 frames to expire before they can repeat attacking.
However, the attack function is only run at each cycle reset. That means that cooldowns below 9 frames cannot be synchronized, and thus the effective cooldown defaults to the order refresh cycle length of 9 frames..
(6) The actual cooldown gets randomized within [base cooldown (-1/+2)], so on average it is expected to be .5 over the base cooldown.
  • For stimmed Marines, that means they have a cooldown between 6 and 9 frames, which in any case gets superseded by the order process timer.
  • For stimmed Firebats the cooldown lies between 10 and 13 frames. At the 9th frame of the cooldown the order process timer gets reset to match the cooldown.
  • Zerglings are a special case. They are the only unit in the game which can and does exceed the 9 frame cooldown threshold, due to its own exception in the code that synchronizes its attack cooldown and order process timer every frame (https://github.com/OpenBW/openbw/blob/master/bwgame.h#L1221):
    		if (unit_is(u, UnitTypes::Zerg_Zergling) || unit_is(u, UnitTypes::Hero_Devouring_One)) {
    if (u->ground_weapon_cooldown == 0) u->order_process_timer = 0;
    }


Freakling
Profile Joined October 2012
Germany1517 Posts
Last Edited: 2023-01-09 16:56:16
January 09 2023 14:58 GMT
#8
The third factor that needs to be considered when calculating unit DPS is the length of its attack animation. This is determined by unit's attack iscript, which generally consists of 3 parts: an initialization (e.g. "Marine lifts rifle" - only some units have this), a repeating part (e.g. "Rifle fires") and a back-to-idle part (e.g. "Marine lowers rifle" - only some units have this).

  • This is how the Marine's attack iscript looks like:
    MarineGndAttkInit:
    playfram 0x00 # frame set 0
    wait 1
    playfram 0x11 # frame set 1
    wait 1
    playfram 0x22 # frame set 2
    MarineGndAttkRpt:
    wait 1
    nobrkcodestart
    playsnd 69 # Bullet\TMaFir00.wav
    attackwith 1
    playfram 0x33 # frame set 3
    wait 1
    playfram 0x22 # frame set 2
    wait 1
    playfram 0x33 # frame set 3
    wait 1
    playfram 0x22 # frame set 2
    wait 1
    playfram 0x33 # frame set 3
    wait 1
    playfram 0x22 # frame set 2
    wait 1
    nobrkcodeend
    gotorepeatattk
    ignorerest
    MarineGndAttkToIdle:
    playfram 0x11 # frame set 1
    wait 1
    playfram 0x00 # frame set 0
    wait 1
    goto MarineWalkingToIdle

    We can determine the frame duration by simply summing up the the "wait" durations in each part, so there is a 2 frame attack initiation animation, then a repeating attack part of 8 frames, and a 2 frame back-to-idle animation.
    However, when processing iscripts, the game engine actually uses up two animation frames in the first game frame of the animation, so effectively animations are 1 frame shorter than their iscript suggests.
    This means a Marine's first attack on a target takes 2+8-1 = 9 frames to finish, any following repeating attack takes 7 frames.

  • For the Firebat we get:
    FirebatGndAttkInit:
    playfram 0x00 # frame set 0
    FirebatGndAttkRpt:
    wait 1
    nobrkcodestart
    imgol 421 0 0 # FlameThrower (thingy\flamer.grp)
    playfram 0x11 # frame set 1
    attkshiftproj 24
    wait 1
    attkshiftproj 52
    wait 1
    attkshiftproj 80
    wait 5
    playfram 0x00 # frame set 0
    wait 2
    ignorerest
    FirebatGndAttkToIdle:
    goto FirebatWalkingToIdle

    So there is no initiation animation in this case, and each attack repeat animation lasts for a total of 10-1 = 9 frames.

  • The Zergling does not have any additional initiation frames, so every attack has an animation duration of 5-1 = 4 frames:
    ZerglingGndAttkInit:
    playfram 0x00 # frame set 0
    wait 1
    nobrkcodestart
    playfram 0x11 # frame set 1
    wait 1
    playfram 0x22 # frame set 2
    attackmelee 1 894 # Zerg\Ultra\zulHit00.WAV
    wait 1
    playfram 0x33 # frame set 3
    wait 1
    playfram 0x44 # frame set 4
    wait 1
    nobrkcodeend
    gotorepeatattk
    goto ZerglingGndAttkToIdle

Freakling
Profile Joined October 2012
Germany1517 Posts
Last Edited: 2023-01-10 10:18:33
January 09 2023 16:33 GMT
#9
Now, to sum everything up, for a unit to initialize an attack, 3 conditions need to be met:
  • Its attack cooldown timer must be 0.
  • Its order process timer must be 0.
  • Its previous animation (in case of a repeat attack, that is its previous attack animation) must be finished.
    If the order process timer hits 0 and the unit is still in an active animation, the next attack cannot be executed and instead the order process timer will be reset to enter its next 9 frame cycle.


Let's summarize all the relevant unit stats from the previous posts:

UNIT_TYPE BASE_CD MIN_CD MAX_CD AVG_CD INIT_ANIMATION REPEAT_ANIMATION
Marine 15 14 17 15.5 9 7
Marine (stimmed) 7 6* 9 7.5* 9 7
Firebat 22 21 24 22.5 9 9
Firebat (stimmed) 11 10 13 11.5 9 9
Zergling 8 7 10 8.5 4 4
Crackling 5 4 7 5.5 4 4

*less than 9-frame order process timer cycle!



So with all this information one can finally determine actual attack rates for units:
  • For Marines, we get an average cooldown of 15.5 frames. However, when stimmed, the possible cooldowns 6,7,8,9 drop below the duration of the 9 frame order process timer cycle, so after each attack the game actually waits for the next reset of that cycle to initialize the next attack, making the effective cooldown 9.
    This gives us an attack rate (and hence DPS) increase of 15.5/9 - 1 = 72.22…%
  • For Firebats we get an effective DPS increase of 22.5/11.5 - 1 = 95.65…%
  • For Cracklings the DPS increase is 8.5/5.5 - 1 = 54.5454…%


Note: There is also an additional 150 frame cycle for each unit in which its order process timer gets reset to a random value, which would lead to occasional irregularities in the attack cycle, further complicating matters and slightly distorting the result.

Some observations:
  • One can easily observe that Marines under the effect of Stim have uniform cooldowns of 9 frames by attacking a high HP target. All Marines will fire at it in perfect unison.
  • The effect of an attack animation exceeding the duration of the unit's cooldown can best be observed with the Ultralisk, which has a base attack cooldown of 15 frames, exactly the same as its attack animation. This means that its cooldown rolls of {14, 15, 16, 17}, with a theoretical average of 15.5, will effectively be executed as {23, 15, 16, 17}, with an average of 17.75.
    This is the reason behind the irregular attack pattern one can observe with this unit, with a noticeable pause every 4 attacks, on average.
    This also explains why Ultralisk DPS is virtually unaffected by the effect of Ensnare. Ensnare increases the Ultralisk's base cooldown to 15 + ⌊15/4⌋ = 15+3 = 18, making {17,18,19,20} the possible cooldown rolls, with an average of 18.5, only slightly more than an unaffected Ultra.
  • Another irregularity can be observed with Corsairs, which have a theoretical base cooldown of 8, less than the order process cycle, turning their theoretical {7, 8, 9, 10} rolls into effective cooldowns of {9, 9, 9, 10}, thus reducing their DPS by some 8% compared to what the unit stat suggests, as well as effectively lessening the effect Ensnare has, as it sets the base cooldown to 10, thus only causing a 1 - 9.25/10.5 = 11.90…% DPS reduction, as opposed to the nominal 20%.


Special thanks to Ankmairdor on the SSCAIT Discord, who helped me sort out all the nitty-gritty details

Here are some additional helpful sources for unit attack stats:
https://docs.google.com/spreadsheets/d/1YWFzY0_MEE4fOy9HrvZCYSpRqjgSBdCeRYVxB6zmJpQ/edit#gid=0
and for animation durations:
https://docs.google.com/spreadsheets/d/1bsvPvFil-kpvEUfSG74U3E5PLSTC02JxSkiR8QdLMuw/edit#gid=0
MeSaber
Profile Joined December 2009
Sweden939 Posts
January 10 2023 08:41 GMT
#10
Super thanks for explaining this.
-.-
TL+ Member
Armathai
Profile Joined October 2007
1013 Posts
January 10 2023 23:00 GMT
#11
On January 08 2023 16:48 Peeano wrote:
From playing a lot of UMS I have noticed that hold position units have a higher cooldown RoF (slower attack speed) than stopped/attack move units. This is especially noticable in marines and I believe it also affects melee units.

If someone is diving into this, it would also be interesting to see double check how Ensnare affects that...


On January 08 2023 18:28 MeSaber wrote:
Show nested quote +
On January 08 2023 16:48 Peeano wrote:
From playing a lot of UMS I have noticed that hold position units have a higher cooldown RoF (slower attack speed) than stopped/attack move units. This is especially noticable in marines and I believe it also affects melee units.

If someone is diving into this, it would also be interesting to see double check how Ensnare affects that...


I know for sure Hold position is especially bad if you are switching target very often, like if you have a lot of marines and your target dies very fast. Its maybe because "Hold" incurs some extra penalty in target acquisition because its static state. Im just guessing here.

I even made a video about this 4 years ago: https://www.twitch.tv/videos/448085144

Ive not noticed any other unit in Hold to be affected.

Edit: I just remembered that Wraiths (probably any flying unit) when using Hold spreads the damage out (less overkill) so maybe it has something to do with it why its so slow at finding a new target.



This affects all units. I can't find the BWAPI guide online anymore, but from the downloaded copy of their FAQ this helps explain the context.

--
What are the differences between Stop and Hold Position?
The difference will impact your unit's rate of fire. Hold position will make your unit's first shot faster, but consecutive shots will be slower, and Stop will make your unit's consecutive shots faster, but your first shot slower. When a unit is ordered to Hold Position, it runs a loop to acquire a target, perform the attack, and then stop moving, the additional command to stop moving requires additional frames, making your unit's consecutive attacks slower, but because Hold Position first acquires a target, its initial attack will be faster.
Stop will order your unit to first stop doing everything immediately, which also stops it from acquiring a first target until it goes idle, increasing the time for a first attack, however it will not order your unit to stop moving after every
attack, making consecutive attacks faster.

The below explanation may not represent the exact behaviour, but here is the short version:
Stop: Stop -> Go to Idle -> Acquire Target -> Attack -> Attack -> ...•
Hold Position: Stop -> Acquire Target -> Attack -> Stop -> Attack -> Stop -> ...
Looking for ArcticCerebrate formerly from @USEast
MeSaber
Profile Joined December 2009
Sweden939 Posts
Last Edited: 2023-01-11 07:10:04
January 11 2023 07:06 GMT
#12
So ive concluded with this test that the difference Stop vs Hold only (at least from a meaningful standpoint) affects target changing. Shooting the same target until it dies is seemingly unaffected which is why we dont see a clear difference.

Stop vs Hold on a stimmed Marine however is the biggest difference where the Hold:ed Marine RoF is close to same as unstimmed.

As for goons target changing, they are already so slow that they seem unaffected. Unstimmed Marines however shows a clear difference as this video demonstrates. (its also shown in the replay killing half the lings unstimmed)
-.-
TL+ Member
prosatan
Profile Joined September 2009
Romania6390 Posts
January 11 2023 07:20 GMT
#13
I propose that MeSaber gets a star for his contributions !
Lee JaeDong Fighting! The only church that illuminates is the one that burns.
MeSaber
Profile Joined December 2009
Sweden939 Posts
January 11 2023 08:16 GMT
#14
On January 11 2023 16:20 prosatan wrote:
I propose that MeSaber gets a star for his contributions !


I already did. Thanks again Peeano! =)
-.-
TL+ Member
WolFix
Profile Joined December 2009
Poland26 Posts
January 28 2023 01:19 GMT
#15
Did u guys every dig on how it works for goliaths as they have different guns for ground and air atacks (this is also instant attack vs projectile)? I remember hearing somewhere that goliaths can somehow prioritize zealots (or i guess any other closest ground unit) while fighting carrieres + ground Ps army, but i never tested anything with it. Killing zealots 1st during fighjts against carriers would be actually useful.
MeSaber
Profile Joined December 2009
Sweden939 Posts
January 28 2023 08:30 GMT
#16
On January 28 2023 10:19 WolFix wrote:
Did u guys every dig on how it works for goliaths as they have different guns for ground and air atacks (this is also instant attack vs projectile)? I remember hearing somewhere that goliaths can somehow prioritize zealots (or i guess any other closest ground unit) while fighting carrieres + ground Ps army, but i never tested anything with it. Killing zealots 1st during fighjts against carriers would be actually useful.


Watch this: https://repmastered.app/game/Slpmy1-z47a5531VsWMY5RUMa1hO_VQLfrlkcscbCTg

Im explaining as i go.

I will make a better dedicated post about it soon.
-.-
TL+ Member
WolFix
Profile Joined December 2009
Poland26 Posts
Last Edited: 2023-01-29 20:38:26
January 29 2023 20:38 GMT
#17
Wow, thanks MeSaber! I learned something new today
Ankmairdor
Profile Joined February 2023
2 Posts
February 01 2023 15:06 GMT
#18
Howdy, I've been working on putting together a document to explain some of the mechanics of attack orders with a focus on the timings. It addresses some closely related mechanics like target selection, but does not do much related to unit movement as that is usually trivial or quite difficult. I assumed that readers would have some familiarity with most concepts, so it skips some basic explanations to focus on the technical details. If something isn't clear or I forgot to explain something, please let me know so I can improve it.

I haven't got around to setting up Starcraft for my current computer, so I haven't verified it in-game or viewed the UMS replays.

I plan to add more unit types and a sheet for mid-attack target switching, but haven't got around to it yet as it took a while to assemble and proofread what I have already. If there are requests for certain units or scenarios I may try to include those.

https://docs.google.com/spreadsheets/d/1LhC8rdqHTrhze6Gh7HitemGs-g2Xq-hVRDaA6X4bBnM/edit?usp=sharing
MeSaber
Profile Joined December 2009
Sweden939 Posts
Last Edited: 2023-02-02 06:11:09
February 02 2023 05:28 GMT
#19
Be sure to post that in an own thread. Solid info. *Keeps reading*

Hold position attacks random target is really something, can you elaborate why its random? As my Replay above show its not random for turret units (it does follow target priority though, workers are ignored if a higher priority target is available) but i presume it is for all others. What i mean by not random is that once a target has been selected, consecutive Hold commands wont change target.

I would love to see overkill examples.

Ie 12 gols firing at a group of lings/rines attack vs hold, how much overkill (wasted dmg) would it do.

Which units to use idle/attack and which to use Hold.

Hold seems to be better for some units say goon/gol, while its bad on rines.

I will do some experiments on this. Thank You!
-.-
TL+ Member
Ankmairdor
Profile Joined February 2023
2 Posts
Last Edited: 2023-02-02 13:15:18
February 02 2023 11:03 GMT
#20
On February 02 2023 14:28 MeSaber wrote:
Be sure to post that in an own thread. Solid info. *Keeps reading*

Hold position attacks random target is really something, can you elaborate why its random? As my Replay above show its not random for turret units (it does follow target priority though, workers are ignored if a higher priority target is available) but i presume it is for all others. What i mean by not random is that once a target has been selected, consecutive Hold commands wont change target.

I would love to see overkill examples.

Ie 12 gols firing at a group of lings/rines attack vs hold, how much overkill (wasted dmg) would it do.

Which units to use idle/attack and which to use Hold.

Hold seems to be better for some units say goon/gol, while its bad on rines.

I will do some experiments on this. Thank You!

This document was mostly made in response to the questions and test cases posed by this thread, but it has already been posted as a resource on https://www.starcraftai.com/wiki/Main_Page.

Hold position calls a function that sorts potential targets into the lists by priority and then selects a random target from the highest priority non-empty list. This much was explained in the middle of the first page. It is not a pure random selection in the sense that if there are only two targets of different priorities then it will only select the higher priority one. If there are only two targets with the same priority, then the unit will have a 50% chance of selecting either one.

I have not yet covered any of the special case attack orders (unless we count Medics). If by turret units you mean structures that attack then those are not included yet. Structures use Tower Guard, which is very similar to Hold Position. If by turret units you mean the top half of goliaths and siege tanks, then those units have their own peculiarities and at a first glance they cannot Hold Position(Edit: verified, valid_for_turret is false) so no random targeting, only nearest targeting. So not only do they use orders that I have not covered, but the orders I have covered don't apply the same way to them.

The problem with calculating overkill with groups of units is the large number of unconstrained variables. Hold Position does random targeting, so you might get a good distribution, a bad distribution, or somewhere in between. Idle or Attack Move use nearest targeting, so the distribution depends on relative unit positions with two parallel lines having good distribution and two lines extending away from the center having bad distribution. The combination of random variations in cooldowns and the potential for target denial(1 frame window to kill a new found target and have to wait on another search cooldown without attacking) by your own units can become chaotic with many branching results. It's easy to do some basic damage distribution for one wave of attacks for Hold Position and trivial for other orders, but a full battle with so many units is more in the realm of stochastic measurements from simulations.

You cannot precisely determine what is the best command to use based only on the unit types. I provided the one-hit kill and two-hit kill scenarios to demonstrate this point. While units generally do not one-hit kill in game, a group of units can land enough hits on targets to result in the target dying from one hit from each attacker.

In the one-hit kill scenario there is a significant difference in timings between the orders for faster attacking units, but far less difference for slower units. Stop and Attack Unit (Once) are consistently slower than orders like idle or Attack Move and Hold position is usually the slowest.

In the two-hit kill scenario the timings were far more consistent with Stop and Attack Unit (Once) usually being the slowest and Hold Position generally matches idle and Attack Move for speed.

To sum up them as general guidelines:
(Fast attacking are like stimmed marines or zerglings, slow attacking are like dragoons or mutalisks.)
- Avoid using Stop to attack the enemy immediately, there are usually better alternatives.
- Commanding units to Attack Unit is only better if there is one unit(e.g., high templar or defiler) that needs to die before other units or you are a bot that can issue perfectly timed and distributed commands to each of your units. For fast attacking units it is a bit slower than other commands and for slow attacking units it is either the same speed or slightly slower than other commands.
- For fast attacking units avoid using Hold Position when there can be a lot of one-hit kills. In normal games this will rarely be relevant except when low health enemies approaches in a single file line, which will often not be much of a threat anyways.
- Otherwise, the choice should be made according to whether the battle is moving and what sort of targeting is preferred.
Please log in or register to reply.
Live Events Refresh
Next event in 2h 36m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
NeuroSwarm 191
ROOTSuperNova 99
Forgg! 80
StarCraft: Brood War
Horang2 7818
Bisu 1167
actioN 472
ggaemo 338
Sacsri 88
BeSt 42
Rush 39
zelot 29
Hm[arnc] 8
Jumperer 1
Dota 2
XcaliburYe1027
420jenkins797
XaKoH 449
febbydoto29
Counter-Strike: Global Offensive
m0e_tv734
Other Games
tarik_tv15682
summit1g12566
Stewie2K1748
singsing1507
C9.Mang0698
WinterStarcraft549
JimRising 431
ceh9223
Mew2King152
rGuardiaN91
Trikslyr65
KnowMe41
nookyyy 38
PainUser1
Organizations
Counter-Strike: Global Offensive
ESL CS:GO1857
Dota 2
PGL Dota 2 - Main Stream1679
StarCraft 2
Esl_sc21158
ESL.tv1158
Dota 2
BeyondTheSummit390
StarCraft: Brood War
StarcraftVOD2
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 17 non-featured ]
StarCraft 2
• davetesta30
• Gussbus
• Laughngamez YouTube
• Alpha X_
• aXEnki
• Poblha
• intothetv
• Migwel
• Kozan
• IndyKCrew
• LaughNgamez Trovo
StarCraft: Brood War
• sscaitournament1
• STPLYoutube
• AfreecaTV YouTube
• BSLYoutube
League of Legends
• Ambition2418
Other Games
• Scarra1299
Upcoming Events
IEM
2h 36m
IEM
1d 2h
PSISTORM Gaming Misc
1d 15h
IEM
2 days
BSL: ProLeague
2 days
Mihu vs TerrOr
Bonyth vs LCYDH
ESL Pro Tour
2 days
IEM
3 days
BSL: ProLeague
3 days
Sziky vs BoA
QiaoGege vs UltrA
ESL Pro Tour
4 days
ESL Pro Tour
4 days
Liquipedia Results

Completed

Spring Cup 4: Chinese Qualifier 1
OSC Championship Season 10
Torneo Latinoamericano Héroes de la Tormenta (TLHT) - Season 7
BLAST Premier Spring Groups

Ongoing

BSL Season 16
KCM Race Survival 2023 Season 1
KCM Ladies Race Survival 2023 Season 1
Individual Golden League
Strength Challenge 30K
Tournament of Honor
Y.H Spring cup
FS Mania
RISS Season 1
Spring Cup Season 4: Korea
Spring Cup 4: Chinese Qualifier 2
Spring Cup 4: Chinese Qualifier
KOR-CHN Invitational League 3: 815 vs Zhanhun
WTL 2022 Winter
IEM Katowice 2023
NGS Storm Division S6
ESL Challenger League S44 NA
ESL Challenger League S44 EU
ESL Challenger League S44 AP
IEM Katowice 2023

Upcoming

Spring Cup Season 4
Hongtu Solo League S5: KOR
Spring Cup Season 4: China
ASL Season 15
Ultimate Battle: Light vs Soma
CHN vs KOR Week32
#PassionCraft Knockout
Boom tournament #2
BLAST.tv Paris Major 2023
ESL Challenger Melbourne 2023
BLAST.tv Paris 2023: EU RMR B
BLAST.tv Paris 2023: EU RMR A
BLAST.tv Paris 2023: AME RMR
BLAST.tv Paris 2023: APAC RMR
BLAST Premier Spring AME Showdown
BLAST Premier Spring EU Showdown
ESL Pro League Season 17
CCT Central EU Malta Finals
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2023 TLnet. All Rights Reserved.