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.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Ultraviolet, 3gabriellae5885fL3, Roy