PDA

View Full Version : [GUIDE] How to do custom keys for SC2


Points
03-20-2010, 03:56 PM
This guide will explain how to setup custom keys for SC2. I plan to post files on web so that the files won't need to be extracted manually. I also plan to create a GUI that will allow users to edit the custom keys and generate the needed output files (just like the one I made for Warcraft III). These are the steps to creating custom keys for StarCraft II:

1. Download and install Ladik's MPQ Editor (http://www.zezula.net/mpq.html)
2. Open Mods\Liberty.SC2Mod\enUS.SC2Data*
3. Extract LocalizedData\GameStrings.txt to Starcraft II Beta directory (Note: The text will get screwed up after your first game. You have to exit SC2 after each game if you want the text to show up correctly!)

Optional (for playing vs the computer):
4. Open Mods\Liberty.SC2Mod\Base.SC2Data*
5. Extract GameData\UnitData.xml (Note: You cannot use UnitData.xml while playing multiplayer. It will cause the game to desync! Use only for testing)

* Note: Make sure to close the data files or open in read-only mode when running SC2

The GameStrings.txt is for hotkeys and UnitData.xml file is for button positions. You can edit these files as needed for use on battle.net. (Note: The GameStrings.txt will work in the root directory but the UnitData.xml must be in the GameData direcotry.)

For example, in GameStrings.txt there are lines such as:
Button/Hotkey/Attack=A
You can change any of the Button/Hotkey/... lines to modify hotkeys such as:
Button/Hotkey/Attack=Z

For button positions, look for lines containing LayoutButtons:
<LayoutButtons Face="MovePatrol" Type="AbilCmd" AbilCmd="move,Patrol" Row="0" Column="3"/>
You can move the patrol down 2 rows by changing the row that it is in:
<LayoutButtons Face="MovePatrol" Type="AbilCmd" AbilCmd="move,Patrol" Row="2" Column="3"/>

Edit: added examples

Edit 2: added notes about issues

Mindless
03-20-2010, 03:57 PM
So why could they not just add custom keys originally?

Points
03-20-2010, 03:58 PM
They might not have mentioned how to do it yet for the Beta.

Teltnuag
03-20-2010, 03:59 PM
Awesome. I still have the WC3 warkeys installed. Much faster than editing that text file. Thanks for the good work buddy.

Milenko
03-20-2010, 04:00 PM
just tried editing this.
i can't find anything related to custom keys inside these files.

Points
03-20-2010, 04:01 PM
I added an example to show how you can change the hotkeys.

Jab
03-20-2010, 04:02 PM
What if you put two buttons on top of each other or assign two things to the same shortcut? Could that crash SC2 or something?

Points
03-20-2010, 04:03 PM
What if you put two buttons on top of each other or assign two things to the same shortcut? Could that crash SC2 or something?

Possibly, it would crash Warcraft III. That's one of the reasons I made a GUI editor.

In Warcraft III, if you had the same hotkey for 2 commands, one would simply over ride the other one. If you had two buttons in the same position, one would be moved elsewhere by the game.

However, if you used an out-of-range value for your button position, Warcraft III would crash!

Endureth
03-20-2010, 04:04 PM
If it's possible to change key bindings like this they should just include an option IN GAME to change the hot keys. It's the only way to keep it fair. How many typical players do you think there are that want to change their key bindings but don't know how.

If it's an advantage in any way, it should be easily available to everyone to keep it fair.

Teltnuag
03-20-2010, 04:05 PM
Supposedly they're going to add that ability at some point.

Zolrath
03-20-2010, 04:06 PM
I assume this means that if we can get that file from someone with a German copy of the game we can get our hotkeys set up as
qwert
asdfg
zxcvb
as their copy of Starcraft 2 is already set up like this.
Anyone know any Germans? :)

Cloaked
03-20-2010, 04:07 PM
I've uploaded a zip file with the qwert grid hotkeys. Inside is a readme with simple instructions on how to install:
http://www.filefront.com/15709019/instal-qwert-grid-keys.zip

I just grabbed the German shortcuts, and pasted them into the english file. Had to switch Z/Y too though, because those letters are swapped on the German keyboard. Basically this will change all your in-game hotkeys to:
qwert
asdfg
zxcvb

Please don't forget to sign this thread in the suggestion forum to show your support for grid layout as a default option:
http://forums.battle.net/thread.html?topicId=23307590716&sid=5000

(edited to update file link)

Minor
03-20-2010, 04:08 PM
I've uploaded a zip file with the qwert grid hotkeys. Inside is a readme with simple instructions on how to install:
http://rapidshare.com/files/357224217/instal-qwert-grid-keys.zip

I just grabbed the German shortcuts, and pasted them into the english file. Had to switch Z/Y too though, because those letters are swapped on the German keyboard. Basically this will change all your in-game hotkeys to:
qwert
asdfg
zxcvb

Please don't forget to sign this thread in the suggestion forum to show your support for grid layout as a default option:
http://forums.battle.net/thread.html?topicId=23307590716&sid=5000
This is amazing. You are my hero.

Cloaked
03-20-2010, 04:09 PM
This is amazing. You are my hero.
Thanks. =)

I just changed the download link to filefront:
http://www.filefront.com/15709019/instal-qwert-grid-keys.zip

I also changed up the install instructions so it will work in single player too whenever that gets released by blizzard. Basically now you just need to extract the GameStrings.txt file into your main \Starcraft II Beta\ folder, no need to mess with that enUS.sc2data file.

Darkgamer
03-20-2010, 04:10 PM
Thanks. =)

I just changed the download link to filefront:
http://www.filefront.com/15709019/instal-qwert-grid-keys.zip

I also changed up the install instructions so it will work in single player too whenever that gets released by blizzard. Basically now you just need to extract the GameStrings.txt file into your main \Starcraft II Beta\ folder, no need to mess with that enUS.sc2data file.

as far as i can tell the layout is setup perfect however its side effects include very sloppy looking parts of the ui including the main loading screen for example it will say UI/LoadingScreen/VS in large letters instead of just VS or w/e it normally says. Weapon tool tips are especially messy and display long messages in the format of e_gameUIStringDamageColon followed by the value and does this for stats that aren't relevent to that unit if someone knows how to fix this or if somehow i did something wrong let me know till then i won't be using this

EDIT:clarification of the issue

Endureth
03-20-2010, 04:11 PM
I've uploaded a zip file with the qwert grid hotkeys. Inside is a readme with simple instructions on how to install:
http://www.filefront.com/15709019/instal-qwert-grid-keys.zip

I just grabbed the German shortcuts, and pasted them into the english file. Had to switch Z/Y too though, because those letters are swapped on the German keyboard. Basically this will change all your in-game hotkeys to:
qwert
asdfg
zxcvb

Please don't forget to sign this thread in the suggestion forum to show your support for grid layout as a default option:
http://forums.battle.net/thread.html?topicId=23307590716&sid=5000

(edited to update file link)

Will this show the correct hot key over the abilities in-game as well?

Minor
03-20-2010, 04:12 PM
Will this show the correct hot key over the abilities in-game as well?
Yup! I have a question about hotkeys though:

I'd love attack-move to be "A", but that would be very awkward the way the buttons are arranged. I scanned the file, and didn't see anything about this, but would there be any way to rearrange the buttons at the bottom left so Attack would be in the "A" position, Stop is in the "S" position, etc? This would be amazing.

Darkgamer
03-20-2010, 04:13 PM
Yup! I have a question about hotkeys though:

I'd love attack-move to be "A", but that would be very awkward the way the buttons are arranged. I scanned the file, and didn't see anything about this, but would there be any way to rearrange the buttons at the bottom left so Attack would be in the "A" position, Stop is in the "S" position, etc? This would be amazing.

i think following the link the OP has in his allows you to do this which must actually be a seperate file and then follow the format he posted also should do the trick

Minor
03-20-2010, 04:14 PM
i think following the link the OP has in his allows you to do this which must actually be a seperate file and then follow the format he posted also should do the trick
Oh, wow. I should have read a little further haha. Thanks man.

Darkgamer
03-20-2010, 04:15 PM
ok i fixed the issue :)

Zolrath
03-20-2010, 04:16 PM
No I have the same issue with the interface showing strange strings of text instead of the proper labels for the UI. Also, the hotkey for building a tech lab and reactor were both set to X so I had to go in and modify the values of the TechLab to Z.
Setting a Rally Point on on a Barracks was set to L instead of G as well.
Any luck on fixing this UI corruption?

Minor
03-20-2010, 04:17 PM
This seems to be making my game crash on battle.net games. Does it not work when playing other people?

Darkgamer
03-20-2010, 04:18 PM
No I have the same issue with the interface showing strange strings of text instead of the proper labels for the UI. Also, the hotkey for building a tech lab and reactor were both set to X so I had to go in and modify the values of the TechLab to Z.
Setting a Rally Point on on a Barracks was set to L instead of G as well.
Any luck on fixing this UI corruption?

i think my issue was i accidently had the file open/ edited it while the game was running after just redoing it quick with the game closed i've had no issues

as a side note this is very easy to edit and do yourself i changed mine so that a was still attack and moved the icon to its appropriate spot and fixed it so repair was over a slot and had s for its shortcut in addition i just can't get use to z and x being my building so i changed it back to b and v as long as you take a second to look it over its very easy to customize whatever you want about the layout of the buttons

Minor
03-20-2010, 04:19 PM
This seems to be making my game crash on battle.net games. Does it not work when playing other people?

To add on to this: Seems like only the keybindings work on battle.net. Changing the unitdata.xml file to change rearrangements causes battle.net to crash.

Darkgamer
03-20-2010, 04:20 PM
To add on to this: Seems like only the keybindings work on battle.net. Changing the unitdata.xml file to change rearrangements causes battle.net to crash.

indeed confirmed also despite what i said early it seems after the 1st game or to UI bugs start to appear even just changing the keybindings around so if someone can work on a fix for this or we can get some info from blizz would be appreciated

Minor
03-20-2010, 04:21 PM
I guess I'll just wait for custom keybindings, assuming Blizzard adds them (I mean, come on, it would be silly not to add them).

Zolrath
03-20-2010, 04:22 PM
I can ignore the fact that sometimes I see the name of the variable of a button instead of the text description but so far the only real gamebreaker with me using this set of keybindings is that as Protoss the game has a hotkey to select all Warpgates as w but now as w is bound to actions with the units it no longer works.
Any way to change the binding for the games global warpgate hotkey or is it hardcoded into the game?

Points
03-20-2010, 04:23 PM
indeed confirmed also despite what i said early it seems after the 1st game or to UI bugs start to appear even just changing the keybindings around so if someone can work on a fix for this or we can get some info from blizz would be appreciated

I'm seeing both issues as well. The UI game strings are distorted and just having the UnitData.xml file present (even a default or empty one) will cause SC2 to desync and crash. There isn't a problem when creating a game vs the computer.

Milenko
03-20-2010, 04:24 PM
http://www.megaupload.com/?d=969DVPUH

i fixed the placement of the german keys (that weren't perfectly grid keys), and i added a nice readme file.

Hydro
03-20-2010, 04:25 PM
thank youuuuuuuuuu

also, i loved warkeys

starcraft2n00b
05-05-2010, 04:21 AM
I think custom keying is the "edge" that can take you from gold to platinum

JamesRaynor
10-07-2010, 10:34 PM
Custom hotkeys can definitely help, although I think StarCraft 2 (http://starcraft-2-strategy.net) already has really good default hotkeys that are all located on the left side.