WASD instead of arrow keys

regeneration64

Warlord
Joined
May 15, 2012
Messages
222
Location
Shropshire, England
After hundreds of hours playing CiV I've always thought about having WASD control screen scrolling instead of the arrow keys but have been unsure of how to change the controls.

Can someone give me a beginner's step-by-step guide on how to set WASD to scroll the screen please?

The most I've done with CiV's files is stopping the quick load hotkey (F12) so that F12 can be used for Steam screenshots instead. That is about as advance as I've gotten.

From what I can gather, the WorldView.lua file located in [Steam > steamapps > common > sid meier's civilization v > assets > UI > InGame > WorldView] is the one that needs editing but I have no idea where to start and this might not even be the right file.

Thanks in anticipation.
 
First, that file is correct if you're running vanilla only (or with G+K disabled). The G+K version is \Assets\DLC\Expansion\UI\InGame\WorldView\WorldView.lua and the BNW is \Assets\DLC\Expansion2\UI\InGame\WorldView\WorldView.lua.

I haven't tested it, but you should be able to replace the instances of Keys.VK_LEFT and Keys.VK_RIGHT, etc. with Keys.VK_KEY_A and Keys.VK_KEY_D, etc.
 
First, that file is correct if you're running vanilla only (or with G+K disabled). The G+K version is \Assets\DLC\Expansion\UI\InGame\WorldView\WorldView.lua and the BNW is \Assets\DLC\Expansion2\UI\InGame\WorldView\WorldView.lua.

I haven't tested it, but you should be able to replace the instances of Keys.VK_LEFT and Keys.VK_RIGHT, etc. with Keys.VK_KEY_A and Keys.VK_KEY_D, etc.

Thank you very much for your help. I'll hold off until Friday until I can get BNW and give this a go!
 
Created an account on here to follow up this post, I tried changing the above mentioned files (both DLC and orig) and it didn't work. From other forums I've gathered this is probably the best method so far:

AutoHotKey

I tested and can verify it works, you have to turn the script on and off before and after you play though. GL
 
I've finally managed to have a go at editing the .lua folder but that didn't make any difference. I'm not entirely sure how to use AutoHotKey.

Has anyone else managed to edit the relevant CiV file(s) to have WASD permanently control the camera?
 
Apparently, it should have just been Keys.W, Keys.A, etc. And you're going to have conflicts with ingame hotkeys. EDIT: I just disabled them. Any one want to suggest ones that don't conflict with the others? Hotkey reference.

Anyway, I made it into a mod.

I integrated this with the CameraRotation mod, since they both change the same file. DOWNLOAD HERE or Subscribe on Steam.
 
Thanks for your help Nutty. I managed to edit the WorldView file to get the camera set to WASD and eliminated most of the hotkey conflicts. However, things went downhill when I tried to assign new hotkeys for just two commands - "Alert" and "Setup ranged attack". These are usually assigned to "A" and "S" respectively and I thought it logical to assign them to "Z" and "X" as they are next to the old hotkeys and I can't think of another unit that uses Z and X. I had the game crash on startup a few times and when I did manage to get into a game the new hotkeys didn't work. :confused:

I did install your mod (the easy option!) but that didn't do anything I'm afraid. EDIT: I've managed to get it working. I was being stupid

Is there any chance you can add/have the option to add the hotkeys mentioned above in your mod? In my opinion, "Alert" and "Setup ranged attack" are two of the most useful hotkeys in game and I think "Z" and "X" are sensible alternative hotkeys.
 
Hm. I was thinking of making Alert 'F' instead of Fortify, since it's usually preferable, but 'Z' for "Zzz" (snore) or "snooZe" seems pretty good too, if people prefer to have both hotkeys available.

These are the other "conflicting" ones (some use modifiers; I could still retain those that use modifiers other than Shift+A and Shift+D, which only applies to Airlift at the moment... unless I remove that as a possibility to rotate), or I can assign new modifiers...

EDIT: Missed a few!

'AUTOMATE_BUILD' (A)
'BUILD_ACADEMY' (A)
'BUILD_ARCHAEOLOGY_DIG' (Ctrl+A)
'BUILD_SCRUB_FALLOUT' (S)
'CONTROL_AUTOMOVES' (Ctrl+A)
'CONTROL_CYCLEUNIT' (W)
'CONTROL_SAVE_GROUP' (Ctrl+Alt+S)
'CONTROL_SAVE_NORMAL' (Ctrl+S)
'INTERFACEMODE_AIRLIFT' (Shift+A)
'INTERFACEMODE_AIRSTRIKE' (S)
'INTERFACEMODE_AIR_SWEEP' (Alt+S)
'INTERFACEMODE_ATTACK' (Ctrl+A)
'MISSION_AIR_SWEEP' (S)
'MISSION_DISEMBARK' (D)
'MISSION_SET_UP_FOR_RANGED_ATTACK' (S)
 
Hm. I was thinking of making Alert 'F' instead of Fortify, since it's usually preferable, but 'Z' for "Zzz" (snooze) seems pretty good too, if people prefer to have both hotkeys available.

These are the other conflicting ones, though I could put back in those that use modifiers other than Shift+A and Shift+D (which only applies to Airlift at the moment... unless I remove that as a possibility to rotate), or assign new modifiers...
'AUTOMATE_BUILD';
'BUILD_SCRUB_FALLOUT';
'BUILD_ACADEMY';
'CONTROL_CYCLEUNIT';
'CONTROL_AUTOMOVES';
'CONTROL_SAVE_GROUP';
'CONTROL_SAVE_NORMAL';
'CONTROL_AUTOMOVES';
'INTERFACEMODE_AIRLIFT';
'INTERFACEMODE_ATTACK';
'INTERFACEMODE_AIRSTRIKE';
'INTERFACEMODE_AIR_SWEEP';

"F" for "Fortify" is a pretty useful one and likely to be used by the Community quite often I should imagine.

I always find myself using the following hotkeys (out of the letters) in order of preference:

"A" for "Alert"
"B" for "Ranged Attack"
"H" for "Heal"
"S" for "Setup Artillery"
"F" for "Fortify"
"G" for "Grid"

I think those are the most time-saving ones. It is pretty annoying that "A" and "S" can't be used as they are obviously part of the WASD setup. If "Alert" and "Setup Artillery" could be reassigned to other letters (I can't see an issue with "Z" and "X" unless I'm missing something) then that would solve many problems. :)

The other hotkey conflicts you've listed are nice hotkeys to have but I would hazard a guess that they are less commonly used ones and could be reintroduced through "SHIFT+hotkey" which is of course better than having them disabled.
 
The other conflict that sees a lot of action for me is Automate Builds for workers.

Anyway, I don't see any X conflicts, and Z only conflicts with Build Feitoria/Chateau (which I think is safe to not worry about), so I think that's probably the best route for Alert and Setup.

The problem with Shift is that I'm using Shift+A and Shift+D as alternates for the rotation (in addition to Shift+arrow and / and * on the numpad). I think it's best to leave those there, but Ctrl and Alt are still available...
 
OK, a new version has been uploaded with updated hotkeys (see the links in post #6).

New hotkeys (let me know if you have any better ideas):
Ctrl+D - Disembark
X - Scrub Fallout
X - Set Up Artillery
X - Airstrike
Alt+X - Air Sweep
Z - Alert
Z - Automate Worker
 
OK, a new version has been uploaded with updated hotkeys (see the links in post #6).

New hotkeys (let me know if you have any better ideas):
Ctrl+D - Disembark
X - Scrub Fallout
X - Set Up Artillery
X - Airstrike
Alt+X - Air Sweep
Z - Alert
Z - Automate Worker

I think that they work perfectly with the options you've got. I'll be giving them a go as soon as I can get back on CiV!

Btw - The camera rotation is a nice luxury to have.

Thanks again for implementing WASD into your mod and the said hotkeys. You sir are a genius! :goodjob:
 
Back
Top Bottom