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.



Who am I, and why should I care?

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



Who am I, and why should I care?

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.
[11:56 pm]
Vrael -- Slyence
Slyence shouted: Hello world.
He stared into the Void, and the Void said "no u"
[2021-11-28. : 5:29 pm]
lil-Inferno -- ya
[2021-11-28. : 1:17 pm]
Slyence -- Hello world.
[2021-11-27. : 8:19 pm]
UndeadStar -- 🌱 :wob: :wob: :wob: 🌱
[2021-11-27. : 5:32 pm]
Slyence -- I'd say I'd have to agree.
[2021-11-26. : 10:44 pm]
Ultraviolet -- 1337 ejaculator
[2021-11-26. : 10:29 pm]
ejac1337 -- derp
[2021-11-26. : 7:08 pm]
Slyence -- Well shucks ..
[2021-11-26. : 4:02 am]
O)FaRTy1billion[MM] -- Slyence
Slyence shouted: I could've swore I used to have a colored username.
probably, they did get reset at some point
[2021-11-26. : 4:02 am]
Apos -- :wob:
Please log in to shout.


Members Online: Roy