• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:01
CEST 14:01
KST 21:01
  • 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
WTL 2023 Summer - Week 6 Recap/Week 7 Preview2Team Liquid Map Contest #18: Voting4[Interview] iRk-AgGe10WTL 2023 Summer - Week 5 Recap/Week 6 Preview6Maru wins Code S Season 1, achieves "6SL"49
Community News
ESL Open Week #177: herO, Clem, Astrea win1Matcherino starts SC2 team with Astrea, Future18ESL Open Week #176: Creator, Clem, Solar win7Alpha X disbands15ESL Open Week #175: ByuN, MaxPax, Solar win1
StarCraft 2
General
trigger Talks: SC2 Balance, Basilisk, Serral... WTL 2023 Summer - Prediction Game Matcherino starts SC2 team with Astrea, Future ESL Open Week #177: herO, Clem, Astrea win WTL 2023 Summer - Week 6 Recap/Week 7 Preview
Tourneys
[WTL 2023] Summer - Week 6 WardiTV 2023 Opens (Monthly) [WTL 2023] Summer - Week 7 Grand Platypus Open (EPT Asia Region) WardiTV TL Map Contest Tournament #10!
Strategy
Counting drones (zerg)
Custom Maps
TLMC#18 Judging Comments and Feedback Thread [M] (2) Magannatha [M] (2) Ultralove [M] (2) Vertigo
External Content
Mutation # 372 Medieval Times Mutation # 371 Never Say Die Mutation # 370 Astigmatism Mutation # 369 Undermined
Brood War
General
BGH auto balance -> http://bghmmr.com/ Chat StarLAN Chicago! August 26-27 Mouse wheel scrolling speed [24H] mmr bot on USWest Official Maps by Minerals
Tourneys
[Megathread] Daily Proleagues BSL 2v2 ProLeague S2 - Day 4 - Sunday 20:00 CEST Small VOD Thread 2.0 Artosis vs the World
Strategy
Fighting Spirit mining rates [H] Yet even more questions about DT builds Carriers or arbiters Abusive drop locations on Vermeer
Other Games
General Games
Frost Giant announce Stormgate Diablo IV Nintendo Switch Thread FF7 remake for PS4 announced Diablo 4 lvl 100 HC challenge!
Dota 2
Official 'what is Dota anymore' discussion Berlin Major 2023
League of Legends
MSI is happening, the thread TSM pausing esports and CLG Dead Building the Future of Sport at Riot Games
Heroes of the Storm
Heroes International Nations Cup - Berlin 2023
Hearthstone
TL Mafia
TL Endures Mafia TL Mafia Community Thread TL Endures Voting Thread TL Mafia Plays: Diplomacy [410]TL.net/forum/mafia Appeal Disambiguation 1.02
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Bitcoin discussion thread Summer Games Done Quick 2023! NASA and the Private Sector
Fan Clubs
The Guru Fan Club INnoVation Fan Club
Media & Entertainment
Series you have seen recently... [Manga] One Piece Korean Music Discussion Movie Discussion! Rome (TV Series)
Sports
2022 - 2023 Football Thread TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
FIFA World Cup Qatar 2022 Thread
Tech Support
StarCraft 2 Is Crashing on My PC
TL Community
Recent Gifted Posts
Blogs
Going for a kidney transp…
Jockmcplop
Atom-Mech (Chapter 4)
Terryberri
Berlin and Balloons!
FuDDx
Unexpected Wholesome SC Mome…
JieXian
Job interview
mantequilla
15 years
Shady Sands
The truth about Final Fan…
jameswatts
Big Bad Battles & Midjourney…
Falling
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1102 users

Marine rate of fire

Forum Index > Brood War Strategy
Post a Reply
1 2 Next All
MeSaber
Profile Joined December 2009
Sweden1041 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.
-.-
Peeano
Profile Blog Joined March 2009
Netherlands4014 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
Sweden1041 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.
-.-
Peeano
Profile Blog Joined March 2009
Netherlands4014 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
Sweden1041 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.
-.-
Freakling
Profile Joined October 2012
Germany1520 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
Germany1520 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
Germany1520 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
Germany1520 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
Sweden1041 Posts
January 10 2023 08:41 GMT
#10
Super thanks for explaining this.
-.-
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
Sweden1041 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)
-.-
prosatan
Profile Joined September 2009
Romania6588 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
Sweden1041 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! =)
-.-
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
Sweden1041 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.
-.-
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
Sweden1041 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!
-.-
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.
1 2 Next All
Please log in or register to reply.
Live Events Refresh
Wardi Open
12:00
$1,000 June Open
LiquipediaDiscussion
OSC
08:00
Mid Season Playoffs #1 - Day 6
MeomaikA vs HonMonOLIVE!
CranKy Ducklings196
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 381
Harstem 319
RotterdaM 250
Forgg! 59
Stats 23
Dragon 13
StarCraft: Brood War
Sea 10202
Horang2 5577
Calm 5394
Mong 2020
Bisu 1690
Jaedong 998
BeSt 676
actioN 554
Shuttle 527
EffOrt 458
[ Show more ]
Noble 403
Light 390
ToSsGirL 353
ggaemo 298
Mini 247
Bale 207
Soulkey 174
ZerO 146
Soma 146
Rush 133
Stork 119
Hyun 71
Mind 64
sorry 54
ZerO(Twitch) 53
sSak 37
PianO 30
Movie 21
Barracks 17
Free 11
ChaeLyn 10
Hm[arnc] 3
eros_byul 0
GuemChi 0
Dota 2
BananaSlamJamma1318
XcaliburYe1132
Cr1tdota978
ODPixel432
Counter-Strike: Global Offensive
olofmeister3264
pimpcsgo1911
shoxiejesuss661
Taz189
kRYSTAL_74
Super Smash Bros
Mew2King751
Other Games
tarik_tv17298
summit1g9891
singsing3514
Fnx 1198
crisheroes416
Pyrionflax394
Livibee351
Lowko307
XaKoH 280
Fuzer 130
ViBE97
ProTech93
QueenE63
FunKaTv 50
nookyyy 50
Hui .30
Westballz8
Organizations
Counter-Strike: Global Offensive
ESL CS:GO1706
Other Games
B2W.Neo1649
StarCraft 2
Esl_sc2219
ESL.tv219
WardiTV16
StarCraft: Brood War
StarcraftVOD5
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 17 non-featured ]
StarCraft 2
• StrangeGG 45
• Adnapsc2 14
• Poblha
• Migwel
• Laughngamez YouTube
• LaughNgamez Trovo
• IndyKCrew
• Kozan
• Gussbus
• intothetv
• aXEnki
• Matcherino
StarCraft: Brood War
• sscaitournament1
• BSLYoutube
• AfreecaTV YouTube
• STPLYoutube
League of Legends
• Jankos3180
Upcoming Events
Kung Fu Cup
22h 59m
PassionCraft
2 days
World Team League
2 days
Korean StarCraft League
3 days
Tenacious Turtle Tussle
4 days
ESL Open Cup
5 days
World Team League
5 days
ESL Open Cup
6 days
ESL Open Cup
6 days
World Team League
6 days
Liquipedia Results

Completed

TT Offline Party
WardiTV TLMC #10
HOTS Unchained
ESL Impact League S3 Finals

Ongoing

FS Mania
KCM Ladies Race Survival 2023 Season 2
KCM Race Survival 2023 Season 2
GRS Season 6
Super Anchor Qualifying S1
Platinum StarCraft League S1
CSL 9: 2023 Summer
BSL 2v2 ProLeague #2
WTL 2023 Summer
Nexus Never Dies #3

Upcoming

Copa Latinoamericana Season 2
ESL Winter
2023 GSL S3: Code S
2023 GSL S2: Code S
HSC XXIII
ESL Summer
LTK Thunderball
Nations Cup 2023
ESL Pro League Season 18
IEM Cologne 2023
BLAST Premier Fall Groups
ESL Challenger Katowice 2023
BLAST Premier Spring Final
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.