How to: Make new keyboard shortcuts

Need help? This is the right place!
Note, reporting bugs and issues should be in the Tech Support forum!

Moderator: PhilipJFry

Re: How to: Make new keyboard shortcuts

Postby JeeVeS » 19 Sep 2014, 08:52

Adding keys to hotbuild isn't difficult. I just need to know what the game calls salvation and support factories. It seemed like you knew how to find this by looking at the unit blueprints.
JeeVeS
Avatar-of-War
 
Posts: 139
Joined: 26 Nov 2012, 06:08
Has liked: 4 times
Been liked: 15 times
FAF User Name: IridiumBLOWS

Re: How to: Make new keyboard shortcuts

Postby nine2 » 19 Sep 2014, 09:18

You want the unit Id's ? Or categories or what? If you tell me where you change hotbuild, I can see for myself.

So by searching through the blueprints,
Salvation is XAB2307
Support factories all have category SUPPORTFACTORY.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: How to: Make new keyboard shortcuts

Postby Hascins » 19 Sep 2014, 09:43

I want to ADD the next idle t1 engineer closest to the cursor....what i have right now is...select all idle engineers onscreen.

['select_all idle engineers oncscreen'] = {action = 'UI_SelectByCategory +inview +idle ENGINEER', category = 'Custom Keys', order = 60,}

How do I add? How do i selcect nearest?
User avatar
Hascins
Contributor
 
Posts: 400
Joined: 28 Dec 2012, 23:07
Has liked: 66 times
Been liked: 24 times
FAF User Name: Hascins

Re: How to: Make new keyboard shortcuts

Postby Sir Prize » 19 Sep 2014, 10:00

partytime wrote:I have just made a new keyboard shortcut to 'select nearest idle air scout'. There was a similar one already but it selected all scouts, and only t1 - ignoring t3.

This post explains how to add it to your own game, and also how to invent new shortcuts.

Backup your game.prefs, you have the power to do some damage here, possibly crashing FA, definitely destroying your local settings.
Edit your game.prefs, find the UserKeyActions section.
Add an entry like this:

['Select nearest t1/t3 scout'] = {action = 'UI_SelectByCategory +nearest +idle AIR INTELLIGENCE', category = 'Custom Keys', order = 1,},

Now start the game, open the keybinding menu, the new action will be listed under a new category called 'custom keys'. Bind the key and you're done.


So I tried to do this a while back when I first saw this thread and I couldn't see it in my keybinds so I just reverted to my game.prefs backup and decided not to worry about it. But seeing as this thread's been bumped I thought I'd ask now.

Can you give me a real idiot-proof guide to how to make that work? I just tried again and I still screwed it up somehow :(. I copied your line of code in to the file's UserKeyActions section in notepad after a comma and bracket, saved, closed, fired up a test game and couldn't see any new possible keybinding in my F1 menu.
User avatar
Sir Prize
Evaluator
 
Posts: 573
Joined: 24 May 2014, 10:29
Has liked: 77 times
Been liked: 91 times
FAF User Name: Sir-Prize

Re: How to: Make new keyboard shortcuts

Postby nine2 » 19 Sep 2014, 10:02

Hascins wrote:How do I add? How do i selcect nearest?

you add a +nearest in there:
['select_all idle engineers oncscreen'] = {action = 'UI_SelectByCategory +inview +idle +nearest ENGINEER', category = 'Custom Keys', order = 60,}
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: How to: Make new keyboard shortcuts

Postby nine2 » 19 Sep 2014, 10:06

Sir Prize wrote:Can you give me a real idiot-proof guide to how to make that work?

Maybe its there and your just not seeing it, that happens to me sometimes, takes ages to scroll through. It's under a heading called "custom keys". Otherwise, post your game.prefs and I'll work out ze problem
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: How to: Make new keyboard shortcuts

Postby Sir Prize » 19 Sep 2014, 10:18

Yeah pretty sure I can't see it - my key binds don't have a custom keys category and there's nothing in the unassigned section.

I actually have to go out now - so no rush or anything obviously, and I can play fine without the extra hotkey. Thanks for your help though this thread should be stickied imo :)

https://www.dropbox.com/s/2injwyyx36je6 ... prefs?dl=0
User avatar
Sir Prize
Evaluator
 
Posts: 573
Joined: 24 May 2014, 10:29
Has liked: 77 times
Been liked: 91 times
FAF User Name: Sir-Prize

Re: How to: Make new keyboard shortcuts

Postby Hascins » 19 Sep 2014, 11:44

For some reason I can only change keybindings properly if i do it in the offline mode in a skirmish game...dont know why. It didn't show as "custom keys" when i first tried it in the online game....but i cant explain it...
User avatar
Hascins
Contributor
 
Posts: 400
Joined: 28 Dec 2012, 23:07
Has liked: 66 times
Been liked: 24 times
FAF User Name: Hascins

Re: How to: Make new keyboard shortcuts

Postby Hascins » 19 Sep 2014, 11:45

partytime wrote:
Hascins wrote:How do I add? How do i selcect nearest?

you add a +nearest in there:
['select_all idle engineers oncscreen'] = {action = 'UI_SelectByCategory +inview +idle +nearest ENGINEER', category = 'Custom Keys', order = 60,}


And the adding works without any additional key? usually it just selected the nearest....and thats it.

Im not at my pc right now, so i cant test it.

Thanks anyway!
User avatar
Hascins
Contributor
 
Posts: 400
Joined: 28 Dec 2012, 23:07
Has liked: 66 times
Been liked: 24 times
FAF User Name: Hascins

Re: How to: Make new keyboard shortcuts

Postby ZeRen » 19 Sep 2014, 11:54

whatch at my file and you will see how to put in ( find UserKeyActions)

why you using order:60? if it is first, I quess it is so order:1
Attachments
Game.rar
(9.56 KiB) Downloaded 189 times
Last edited by ZeRen on 19 Sep 2014, 11:58, edited 1 time in total.
User avatar
ZeRen
Evaluator
 
Posts: 641
Joined: 03 Aug 2014, 08:22
Has liked: 154 times
Been liked: 49 times
FAF User Name: ZeRen

PreviousNext

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest