Staredit Network > Forums > Modding Assistance > Topic: Unit selection priority (who talks in unit groups)
Unit selection priority (who talks in unit groups)
Aug 3 2021, 10:28 am
By: Netbek  

Aug 3 2021, 10:28 am Netbek Post #1



There must be a value that determines which unit type in a group of selected units is the one whose responses are played when giving commands. I just looked in PyDAT - am I overlooking something? I know there is such a value in WC3, called 'priority' (integer).




Aug 3 2021, 12:01 pm Voyager7456 Post #2

Responsible for my own happiness? I can't even be responsible for my own breakfast

I could be wrong, but I think unit rank determines that.



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Aug 3 2021, 3:10 pm Luigi Post #3

In God I trust.

Quote from Voyager7456
I could be wrong, but I think unit rank determines that.
I'm curious, is it unit rank for Terran units or is it something more generic?



I'm the creator of StarCraft Adventures.
For Spanish version "Aventuras de StarCraft":
Aventuras de StarCraft (blog)

Aug 3 2021, 4:39 pm Voyager7456 Post #4

Responsible for my own happiness? I can't even be responsible for my own breakfast

Quote from Luigi
Quote from Voyager7456
I could be wrong, but I think unit rank determines that.
I'm curious, is it unit rank for Terran units or is it something more generic?

Yes, I'm talking about the same unit rank that Terran units display. All units actually have a value for this in units.dat, but only Terran units display it ingame. It controls some pathfinding things as well.



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Aug 3 2021, 5:22 pm IlyaSnopchenko Post #5

The Curious

Quote from Voyager7456
Quote from Luigi
Quote from Voyager7456
I could be wrong, but I think unit rank determines that.
I'm curious, is it unit rank for Terran units or is it something more generic?

Yes, I'm talking about the same unit rank that Terran units display. All units actually have a value for this in units.dat, but only Terran units display it ingame. It controls some pathfinding things as well.
Do lower ranked units give way to the higher ranked ones? Never heard of that, interesting.



Trial and error... mostly error.

Aug 3 2021, 5:43 pm Netbek Post #6



You guys are correct.
I tested it in game, and the rank set in units.dat (in PyDAT under tab StarEdit) indeed determines which unit's soundset dominates.

Irrelevant sidenote:
I actually suspected this, but out of laziness I checked the 2 unit ranks in the unmodded units.dat that shows upon opening PyDAT, assuming that I hadn't changed them in my modded units.dat... Turns out I did.





Aug 3 2021, 6:59 pm IlyaSnopchenko Post #7

The Curious

Quote from Netbek
Irrelevant sidenote:
I actually suspected this, but out of laziness I checked the 2 unit ranks in the unmodded units.dat that shows upon opening PyDAT, assuming that I hadn't changed them in my modded units.dat... Turns out I did.
Don't worry, we've all been there at least once. :D



Trial and error... mostly error.

Aug 3 2021, 8:57 pm Netbek Post #8



Quote from IlyaSnopchenko
[...]
Do lower ranked units give way to the higher ranked ones? Never heard of that, interesting.

When hovering over the Rank field in PyDAT, it says: "units with lower Rank will stop and wait to allow units with higher Rank to continue movement"
FULL TEXT




Aug 4 2021, 11:57 am Nekron Post #9



Doesnt look like this behavior works at all in-game; any idea where does it come into practice, Voyager?




Aug 4 2021, 12:25 pm Voyager7456 Post #10

Responsible for my own happiness? I can't even be responsible for my own breakfast

I was basing my statement off the description Netbek posted (which dates back all the way to the Arsenal days). Looking at the assembly though, I don't think it's actually true. The only place I see the rank comparison function called is when determining the portrait and sounds to play after selecting units.



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Aug 5 2021, 3:31 am Luigi Post #11

In God I trust.

Quote from Voyager7456
Yes, I'm talking about the same unit rank that Terran units display. All units actually have a value for this in units.dat, but only Terran units display it ingame. It controls some pathfinding things as well.
I see. Thanks.
Quote from Voyager7456
The only place I see the rank comparison function called is when determining the portrait and sounds to play after selecting units.
It wouldn't have been very useful for pathfinding though. Rank aside, I've noticed the AI has some priorities as to which units to attack first (e.g. BCs kill Ghosts first, Cannons atack cloaked units first...), but that is for another topic...

Post has been edited 1 time(s), last time on Aug 5 2021, 2:13 pm by Luigi.



I'm the creator of StarCraft Adventures.
For Spanish version "Aventuras de StarCraft":
Aventuras de StarCraft (blog)

Aug 5 2021, 8:50 am Nekron Post #12



I still wanted to see if there's any practical effect to ranks when it comes to movement, so out of curiosity I checked if they affect anything the AI does during grouping and attacking/moving to attack, but it looks like they don't. A shame really, since a push-priority-esque thingy would be welcome IMO




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:32 pm]
Oh_Man -- yea APM vs eAPM
[08:48 am]
NimoStar -- plus most of the human APM is just spam clicking APM inflation
[08:47 am]
NimoStar -- the thing with the "*12" thing is completely misleading. The AI isn't using two control groups, it can use each of those actions to command a single unit individually and issue different commands to each single unit.
[08:06 am]
NudeRaider -- NudeRaider
NudeRaider shouted: Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
*Pluto's wraiths
[08:05 am]
NudeRaider -- Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
[02:18 am]
Oh_Man -- Close enuf
[2026-9-21. : 4:14 pm]
Vrael -- perhaps there is a small professional player trapped in a box in the server rack where pluto is running? hmm?
[2026-9-21. : 4:14 pm]
Vrael -- 240*12*2 is 5760, where is the other 240 APM?
[2026-9-21. : 3:44 pm]
Oh_Man -- 1 action is selecting the unit and another action is moving it
[2026-9-21. : 2:58 pm]
Vrael -- 240*12 is 2880, where is the other 3000 APM?
Please log in to shout.


Members Online: Moose