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.
[08:01 am]
Moose -- :megaya:
[12:28 am]
KrayZee -- The fishes make me think of Animal Crossing
[11:59 pm]
Vrael -- excellent
[07:04 pm]
Sie_Sayoka -- blown out of the water
[06:50 pm]
NudeRaider -- https://staredit.net/381160/ fucking mind blown :drool:
[2025-6-29. : 1:46 am]
Vrael -- I was there Aslan, 3000 years ago when the deep magic of the One Ring was forged on the Battleship Enterprise, and Voldemort stole it
[2025-6-29. : 1:39 am]
KrayZee -- Vrael
Vrael shouted: NUDERAIDER - What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USAGermanyland and your IP is being traced right now so you better prepare for the storm, maggot.
I wonder when this was written.
[2025-6-29. : 12:46 am]
Vrael -- NudeRaider has not been on Battle.net for 311 days and 8 hours - I propose we Ban this Inactive Person for ever
[2025-6-27. : 3:48 pm]
NudeRaider -- a M.2 drive would fit here https://snipboard.io/waGiXl.jpg
[2025-6-27. : 3:46 pm]
NudeRaider -- dumbducky
dumbducky shouted: I opened my box up this morning and the M2 drive doesn't fit anything in there. Ten years worth of dust is impressive though
this drive dumbducky
dumbducky shouted: If I'm reading this right M2 keys are either 5 or 6 pins wide but mine looks like maybe 8? Wtf? http://www.supertalent.com/datasheets/6_100485.pdf
fits here: https://snipboard.io/tC7oVv.jpg because it's PCIe, not M.2
Please log in to shout.


Members Online: Moose, lil-Inferno