This is the rank line:
It is the second line beneath the Unit Name. We can modify it to display information to the player. First things first, if your unit is not Terran you will have to make it Terran in order for this to work. Go to Datedit > Unit > Basic and change it here:
EDIT: Something to consider. I've discovered sometimes it isn't enough to just check the Terran box. For instance buildings won't get ranks unless you temporarily transform them into units first. It's tricky stuff that I don't yet fully understand so my advice is to experiment yourself to see what works and doesn't work with the Rank line.
Next move from the Basic tab to the Staredit tab. Here you will find the list of ranks, which you can modify to say whatever you want. I've changed the rank of Admiral to say "Stunned!"
Now in order to apply this rank in game with triggers, you have to use an EUD action in TriggerEditor called SetDatfile, which looks like this:
This one action has a LOT of uses, but for my purposes I'm going to choose the following options:
Datfile = units.dat
Object = the unit you want to give the "rank" to.
OffsetName = Rank/Sublabel
DValue = this is a dropdown menu of all the ranks, which you will have modified to the string of your choice in the steps above.
Now, save your settings, boot up the game, and behold:
My Terran Zerg Defiler High Templar abomination can be Stunned! This can be turned off and on with triggers via Death Counters! For extra effect, you can modify two ranks to identical strings with different colours, then use death counter timers to toggle between the two strings, to create a flashing text effect! This will be handy to let the player know they've been stunned, or frozen, or poisoned, or whatever!
DAY & NIGHT SYSTEMS, BLINDING EFFECTS, ETC.
Say goodbye to using Medics blinds and burrowed units to modify vision radius, we have some handy new tools we can use which make them completely redundant.
In TriggerEditor use the SetDatfile EUD action, which looks like this:
Now select units.dat, the unit whose vision radius you want to modify, and select SightRange, and then choose an integer, with 1 being the smallest SightRange (comparable to a burrowed unit). For me, it now looks like this:
Now, when I open my map, you can see my new vision radius:
EDIT: I discovered something important to consider regarding modifying SightRange. If you have an upgrade like Ocular Implants (increases Ghost sight range by 1) purchased, it will make the Terran Ghost's sight range permanently at that number and you can no longer modify it with the above technique. However it doesn't affect the hero ghosts. Other sight upgrades are Antennae (Overlord), Sensor Array (Observer) and Apial Sensors (Scout).
You can see a full list of upgrades here: https://liquipedia.net/starcraft/Upgrades#Sight_Upgrades
I suspect the same rule applies with SetDatfile and other upgrade types (speed, attack range, etc.)
EDIT: There is another thing to consider which I forgot to mention, and that is these change every unit, not specific units. So if I am changing the vision of High Templar, for example, all High Templars on the map will have their vision changed.
Now, there is another EUD action we can use, called SetLight:
We can use this to increase or decrease the in-game brightness (it doesn't affect the UI, thankfully). This is perfect for creating a moody night-time atmosphere, or a dark cave, especially when combined with the above technique.
You can also use this action to create cinematic scene changes: fading to black, centering location to your next scene, then unfading. And of course, if the player gets blinded by some spell, you can decrease their vision radius or brightness.
Here is a GIF which demonstrates SetLight in action:
https://i.imgur.com/Y2JMQxC.mp4
Good luck, mappers!
Post has been edited 7 time(s), last time on Sep 12 2021, 4:16 pm by Oh_Man.