Errors in the Starcraft 2 Hotkey System
This post comes from all my experiences dealing with hotkeys for TheCore. It began as a cathartic exercise, simply venting my frustrations into a document. Every hidden key, every conflict test that doesn’t work, every non-conflict that is detected, every button that I needed to change but couldn’t get to without delving into the Starcraft 2 editor.
From the table of contents below you can see I have categorised the errors and given examples. From there I look at the Terran production buildings in WoL and HotS and there’s even a quiz to test your new knowledge.
And then the ending changed. While writing what was not intended to be anything more than an exercise in mockery, I accidently discovered the fix that exists within the Starcraft 2 editor for a large number of hotkey errors. It is this section, Chapter 4, that will be of the most interest to makers of custom maps.
Contents
- 1. Types of Errors.
1.1. Examples.
2. Errors in Action.
2.1. A Quick Look at HotS.
2.2. T Boned.
3. Zerg Quiz.
4. The Curious Case of BlizzFixeda Button.
5. Summary.
6. Footnotes.
Types of Errors
I have defined five common errors in the Starcraft 2 custom hotkey system.
- Set Theory Error:
- The game incorrectly considers keys to conflict, or incorrectly allows conflicts to occur.
Inheritance Error:
- Failure to rebind related keys where one is changed. An example of inheritance working correctly is with weapon and armor upgrades. Levels 1, 2 and 3 are actually considered three different upgrades, only one of which the front end allows you to change. However, levels 2 and 3 inherit changes made to level 1 so there is no issue.
Missing Keys Error:
- The front end is simply missing an ability. Usually the only workaround is to manually edit the SC2Hotkeys file. This error is the source of many hidden conflicts.
Extra Keys Error:
- The opposite of above. The front end contains a key but it is not used in game. It is also the opposite in behaviour since the front end will now complain about a conflict that doesn’t exist, rather than ignore one which does.
Inconsistency Error:
- A clear pattern is broken.
Icing on the Cake:
- Those are the five common errors. However they don’t quite cover everything. At certain points a kind of anti-synergy develops a super-error, greater than the sum of its parts. Or just think of this as a bonus point for screwing something up so badly it demands a special mention.
Examples
There are four errors on the Mercenary Compound.
- Set Theory:
- Select Builder incorrectly conflicts with unit production. If the Mercenary Compound is still being built then no units can be produced.
- Halt Construction conflicts with unit production.
- War Pig. Because this key is missing no conflict check is performed so another unit can be made to conflict with the hardcoded default value. This is an example of a hidden conflict.
- Reaper Speed.
Missing Keys:
Extra Keys:
There are five errors on the Engineering Bay.
- Set Theory:
- Select Builder conflicts with upgrades.
- Halt Construction conflicts with upgrades.
- When Ultra-Capacitors are chosen in the campaign the weapons upgrade does not inherit the custom key.
- When Vanadium Plating is chosen in the campaign the armor upgrade does not inherit the custom key⁽¹⁾.
- As mentioned earlier Level 2 and 3 weapons and armor are considered separate upgrades yet they correctly inherit a custom key.
Inheritance:
Inconsistency:
Errors in Action
Let’s look at some more Terran buildings and see how many errors we can find. The following should give you a good idea on how to check for mistakes, there will be a quiz at the end.
There are seven errors on the Armory.
- Set Theory:
- Select Builder conflicts with upgrades.
- Halt Construction conflicts with upgrades.
- When Ultra-Capacitors or Vanadium Plating are chosen in the campaign the vehicle and ship weapons and armor upgrades do not inherit the custom key.
- Level 2 and 3 weapons and armor are also considered separate upgrades yet they correctly inherit a custom key.
Inheritance (x4):
Inconsistency:
There are eight errors on the Barracks.
- Set Theory:
- Select Builder conflicts with unit production.
- Build Tech Reactor conflicts with Tech Lab or Reactor when it is a campaign replacement.
- Halt Construction.
- Build Tech Reactor on flying Barracks.
- Build Spectre.
- Build TechReactorAI. When you do change the Tech Reactor key from ‘Z’ to something else you will find that nothing changes in game. The front end allows you to change the key for the TechReactorAI, an addon that exists only in the picture above. Playing the actual game the addon is called the Tech Reactor - a unit you can’t get to through the front.
- Build Tech Reactor.
- Tech Reactor. You can’t get to the key through the front, you think that you can but you can’t set it to the same key as the addons it replaces, but if you can find the correct addon in the map editor you can set the key as you wish without any conflict.
Missing Keys:
Extra Keys:
Missing Keys:
Icing on the Cake:
There are six errors on the Factory.
- Set Theory:
- Select Builder conflicts with unit production.
- Build Tech Reactor conflicts with Tech Lab or Reactor when it is a campaign replacement.
- Halt Construction.
- Build Tech Reactor on flying Factory.
- Build Tech Reactor AI.
- Build Tech Reactor.
Missing Keys:
Extra Keys:
Missing Keys:
There are seven errors on the Starport.
- Set Theory:
- Select Builder conflicts with unit production.
- Build Tech Reactor conflicts with Tech Lab or Reactor when it is a campaign replacement.
- Build Science Vessel.
- Halt Construction.
- Build Tech Reactor on flying Starport.
- Build Tech Reactor AI.
- Build Tech Reactor.
Missing Keys:
Extra Keys:
Missing Keys:
A Quick Look at HotS
So far we have looked at a few Terran buildings and found they produce almost as many errors as units or upgrades. Let’s see what has changed three years later.
There are fifteen errors on the Barracks (HotS).
- Set Theory:
- Spectre conflicts with Ghost.
- Science Vessel has been entered without conflicting with the Raven.
- Psi-Emitter still missing from SCV.
- Every single mercenary unit conflicts with the regular version.
- Halt Construction.
- Select Builder.
- Build Tech Reactor on flying Barracks.
- Build TechReactorAI.
- Build TechReactor.
- We couldn’t change the Spectre’s key for years, then when we can change the key it’s in HotS where we don’t use them, but it conflicts with the Ghost, yet in WoL where we do use them there is no conflict, but we can’t get to the key. To add insult to injury the Science Vessel was corrected, albeit in HotS where you don’t use it, but by a different guy at Blizzard who clearly isn’t on speaking terms with the genius who was assigned the Spectre fix. Furthermore, whoever assigned the programmers these fixes didn’t first find all the missing keys so the problem still exists for other units.
- I’m not sure how many custom games bother with the Merc Compound. And why would they? Even HotS doesn’t. Much better then to have mercenaries come from a primary structure. So Blizzard have made a whole extra command card and even a button to get to it... and then added all the regular units creating unnecessary conflicts. If this had not been done then mapmakers could use the HotS mod and players could build mercs without learning any extra keys. Either Blizzard felt that would be too easy or custom maps were not considered a factor.
Inconsistency:
Set Theory (x5):
Missing Keys:
Extra Keys:
Missing Keys:
Icing on the Cake:
There are eleven errors on the Factory (HotS).
- Set Theory (x3):
- Every single mercenary unit conflicts with the regular version.
- Halt Construction.
- Build Tech Reactor on flying Factory.
- Mercenary Thor
- Build TechReactorAI.
- Build TechReactor.
- If the Diamondback has a mercenary version it is missing. If it doesn’t then the Diamondback shouldn’t be there at all. If a mercenary version is added later the Diamondback should still be removed along with the other regular units.
- This time the separate command card is for campaign units. The Siege Tank is missing but if the card is for units unique to the campaign then that is correct and the Hellion and Thor shouldn’t be there⁽²⁾.
- With that said the Warhound should be on the campaign card and not with Hellion and Siege Tank where the Thor is missing and possibly the Widowmine and Hellbat. I can’t tell how these cards were, for want of a better word, designed, so rather than list all the extra and missing keys I will count this all as one great big inconsistent mess.
Missing Keys:
Extra Keys:
Missing Keys:
I know it’s wrong but I don’t know why:
There are twelve errors on the Starport (HotS).
- Same Errors (x7):
- The Starport is the only Terran production building which has come through with only the original command card errors. There were of course errors added with HotS, but they are isolated to the HotS command cards and nothing more was broken in WoL. In the context of the Barracks and Factory that counts as an achievement.
- Now that you have had time to get your head around that concept I can tell you that Blizzard fixed one error from WoL. You can now get to the Science Vessel key. I could have included this in the above but I wanted to make a special point of congratulating Blizzard on fixing one key without breaking anything else. Obviously the A Team was working that day. As previously mentioned the B Team was assigned the Spectre.
- Every single mercenary unit conflicts with the regular version.
- The Starport comes close to isolating units unique to the campaign but the Battlecruiser shouldn’t be there.
- If the Wraith has a mercenary version it is missing. If it doesn’t then the Wraith shouldn’t be there at all. If a mercenary version is added later the Wraith should still be removed along with the other regular units.
- With the Wraith changed to ‘W’ in HotS you might be tempted to change the WoL key, which is set to ‘A’. Doing so would unbind Warp-In. The game doesn’t see any difference between global keys for Protoss and Terran, a key is either global or it isn’t. To work around this Blizzard have set Warp In to ‘Shift-W’ to avoid a conflict; but only in the HotS campaign, on ladder Warp In is still on ‘W’. This means the Blizzard layouts can have keys change between modes but custom layouts can’t.
Same Errors (-1):
Set Theory (x3):
Extra Keys:
I know it’s wrong but I don’t know why:
Set Theory:
As you can see HotS brought a lot of changes to the hotkey system. More errors were added, keys that previously worked if you could get to them in the file were broken, and the addition of mercenaries has future-fracked (that’s the opposite of future-proofed) unit production for makers of custom games. Most of these errors could be circumvented without Blizzard involvement if only the custom file could force different modes to read different keys, but only the Blizzard layouts do that.
Here is a sample of Terran units and then there will be a quiz on the Zerg.
T Boned
There are five errors on the SCV.
- Inheritance:
- Command Center with Orbital Relay does not inherit the key for the Command Center.
- Supply Drop does not inherit the command for the Supply Depot
- Automatic Refinery does not inherit the key for the Refinery.
- Fortified Bunker does not inherit the key for the Bunker.
- Psi Disruptor.
Missing Keys:
There are five errors on the Spectre.
- Set Theory:
- If you tick Allow Toggle Conflicts then Hold Fire and Weapons Free still conflict and can’t share a hotkey.
- Everything works fine for the Ghost.
- Decloak. This may seem odd since it is right there in the picture. But the above shows the old command card. The HotS command card does not have Decloak. To get to Decloak you have to go to the campaign Banshee or the multiplayer Ghost. This now allows a conflict between Decloak and the other Spectre abilities.
- It is now possible to create conflicts with Decloak.
- Fixing something that wasn’t broken and breaking something else.
Inconsistency:
Missing Keys:
Set Theory:
Icing on the Cake:
There are two errors on the Thor.
- Missing Keys:
- Immortality Protocol. Again, it’s right there in the picture, how is this key missing? The picture shows the key for Thor Wreckage which has the Immortality Protocol ability and is correctly separate from the Thor’s command card. However the Thor itself also has a Immortality Protocol button hardcoded to ‘I’ which cannot be reached through the front. This creates a hidden conflict if 330mm Barrage Cannon is set to ‘I’, which right handed layouts use in TheCore.
- 330mm Barrage Cannon does not inherit 250mm key.
Inheritance:
Zerg Quiz
As a small distraction for those of you now wishing to play along I have created this section so you too can marvel at the level of indifference Blizzard will display towards something they truly, truly, truly do not care about.
It is outside the scope of this blog to give a tutorial on the map editor so only the Swarm Host needs that level of analysis. Most of the errors can be found simply by changing keys in the front and seeing if they come through in game. Remember to check upgrades! Answers are given in the next post.
How many errors can you find on Kerrigan?
How many errors can you find on the Larva (HotS)?
There is one error on the Swarm Host Creeper Strain. Hint: It will be very time consuming to find this without the editor.
The Curious Case of Blizzfixeda Button
While dealing with each and every single one of the hassles that must be overcome customising hotkeys I started to wonder if someone at Blizzard was being paid to sabotage the entire system. However, while writing this I delved back into Left2Die and found what to me was a different game. I also discovered the fix to most of the errors above and consequently a different ending to this blog.
I made my first contribution⁽³⁾ to TheCore adding the campaign hotkeys along with Left2Die. None of the Left2Die abilities were accessible through the front, and each had to be entered manually in the hotkey file twice since Tech Reactor upgrades did not inherit from Tech Lab upgrades. Leading to dozens of lines in TheCore like this:
ResearchG4Charge/BarracksTechLab=K
ResearchG4Charge/BarracksTechReactor=K
ResearchRegenerativeBioSteel/FactoryTechLab=Apostrophe
ResearchRegenerativeBioSteel/FactoryTechReactor=Apostrophe
At some point (I have not yet found the patch notes) two major changes were made. The keys were made available through the front and someone set them to inherit correctly. It’s the second part that is most impressive.
Only the keys for upgrades on the Tech Lab are accessible but when you upgrade to Tech Reactors the keys inherit correctly. These two fixes make 21 previously hidden keys accessible. There are still missing keys, Stim on the Firebat Merc⁽⁴⁾ and all the Science Facility upgrades, but 21 keys is a step in the right direction.
Now when I say ‘most impressive’ - I mean impressive on whatever scale Blizzard’s performance reviews are based. I do not mean impressive in any classical or dictionary sense of the word which might lead you to be impressed.
I was curious about how the above voodoo was performed, especially since it hasn’t been for so many other units where the need is more dire. About 15 minutes of poking around in the data editor, comparing fields on buttons which inherited to ones that didn’t, lead me to a fix for the problem. I do hope there is a fan-frackin-tastic reason why Blizzard can’t do it. Actually we know for a fact they can do it. Make that a reason they don’t.
The easiest way to go through the fix for yourself is on the Zergling.
- Open the ZEvolutionZerglingMap and open the Data module.
- Go to the Larva unit.
- Go to the Zergling button.
It has a Hotkey alias which can be inherited by other buttons.
- You can either right click Morph to Zergling and View Linked button, or edit the two Zergling strains underneath.
- Change both of their hotkey aliases to Morph to Zergling.
- Test the Document.
- Get to the part where you have a base for the Swarmlings.
- Make a change to the standard Zergling.
- The change is inherited by the Swarmling.
- Marvel at this⁽⁵⁾ and remember to Not Save changes.
Summary
There are dozens more campaign errors which must be navigated when customising your hotkeys. In fact when fixing all of these errors for TheCore I spent more time in the data editor than in game.
In the lead up to HotS I knew I would have my work cut out for me, but I did not think that the front end would be worse than before. For LotV it would be a profound improvement if in three years time Blizzard are as bad at this as they were three years ago.
And for the most part it is utterly unnecessary. All the threads on BNet complaining about custom keys that can’t be set, a month of waiting for nothing to change, and all that is needed is for someone to apply the fix that already exists in the editor.
Footnotes
1. This is the smallest count of errors since by using inheritance all the Engineering Bay problems would be fixed. Technically there are another six errors I could have counted for a total of eleven. Level 1, 2 and 3 of Ultra-Capacitors and Vanadium Plating are also missing keys allowing hidden conflicts. Swapping the Weapons and Hi-Sec keys will work in the front, but the Ultra-Capacitors key is missing and doesn’t inherit so the custom key will be ignored and you will have a conflict.
2. Regarding all the new HotS command cards I have counted errors only where the goal was not achieved, not the goal itself, i.e the attempt to isolate units unique to the campaign was not achieved, but if it had been the goal itself was still absolutely stupid. All that happens now is that some campaign units can be assigned the same key as ladder units, which will unbind if you go into WoL or Left2Die.
3. This is the post here. At the end I asked if anyone with access to the HotS Beta forums could ask the Blizzard Devs if they had improved campaign hotkeys. Somewhere in that chain of events someone said “No”.
4. Another great oversight. Stim was already a shared ability used by the Marine and Marauder. Deftly avoiding all the convenience that would have been caused by using that button Blizzard created a new Stim ability for Left2Die and then made it inaccessible. Then made it accessible, but not for all units.
5. I have no idea if this breaks something else. Perhaps it’s part of the fan-frackin-tastic reason Blizzard won’t do it. Research on this Hotkey Alias proved fruitless so I just had to make change and see what happened. The only thing I could find on SC2Mapster threads and wiki is they don’t know what this field does. If anyone has an account there please feel free to tell them, I can’t be bothered making an account for one post.