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 bamboofats » 12 May 2015, 15:44

ZeRen wrote:is here anyone who could take this shotcut:
['select_all_units_of_same_type'] = {action = 'UI_ExpandCurrentSelection', category = 'selection', order = 44,},

and change(copy+change) it to:
['select_all_units_of_same_type on screen'] = {action = 'UI_ExpandCurrentSelection', category = 'selection', order = 44,}

it would be much more usefull, please? :|


I wrote a simple UI mod for this function. It is standalone, but does not work correctly when other selection restricting mods are active. It does not affect them though, just gets itself bugged. You can bind the hotkey with F1 under "mods" section.

The mod is rather crude, it places the unit id of the current selection into an array, then compares every onscreen unit with the array iteratively to pick out the similar ones. I haven noticed any selection lag with it even with selecting 1000 units though. Do anything you want with the mod.
Attachments
OnscreenUImod.zip
UI mod for on screen selection of the same unit(s)
(2.41 KiB) Downloaded 156 times
bamboofats
Crusader
 
Posts: 32
Joined: 10 May 2015, 14:38
Has liked: 0 time
Been liked: 7 times
FAF User Name: bamboofats

Re: How to: Make new keyboard shortcuts

Postby ZeRen » 15 May 2015, 17:26

bamboofats wrote:
ZeRen wrote:is here anyone who could take this shotcut:
['select_all_units_of_same_type'] = {action = 'UI_ExpandCurrentSelection', category = 'selection', order = 44,},

and change(copy+change) it to:
['select_all_units_of_same_type on screen'] = {action = 'UI_ExpandCurrentSelection', category = 'selection', order = 44,}

it would be much more usefull, please? :|


I wrote a simple UI mod for this function. It is standalone, but does not work correctly when other selection restricting mods are active. It does not affect them though, just gets itself bugged. You can bind the hotkey with F1 under "mods" section.

The mod is rather crude, it places the unit id of the current selection into an array, then compares every onscreen unit with the array iteratively to pick out the similar ones. I haven noticed any selection lag with it even with selecting 1000 units though. Do anything you want with the mod.


thx, that is exactly what I wanted :) , but that bugging make me sad :cry:
User avatar
ZeRen
Evaluator
 
Posts: 641
Joined: 03 Aug 2014, 08:22
Has liked: 154 times
Been liked: 49 times
FAF User Name: ZeRen

Re: How to: Make new keyboard shortcuts

Postby wasdf » 26 Sep 2015, 18:21

Replying on thread so this isn't hard to find for me anymore.

P.S. someone please sticky this? It's super helpfull
wasdf
Avatar-of-War
 
Posts: 81
Joined: 17 Feb 2015, 13:47
Has liked: 0 time
Been liked: 4 times

Re: How to: Make new keyboard shortcuts

Postby mirroredwang » 26 Sep 2015, 18:26

ajkayforty7 wrote:Replying on thread so this isn't hard to find for me anymore.

P.S. someone please sticky this? It's super helpfull


bump
mirroredwang
Avatar-of-War
 
Posts: 119
Joined: 22 Aug 2015, 22:56
Has liked: 9 times
Been liked: 8 times
FAF User Name: Topkack

Re: How to: Make new keyboard shortcuts

Postby nine2 » 26 Sep 2015, 18:52

make a wiki page and link to here
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 Nexus_of_Reality » 27 Sep 2015, 04:28

I tried the idle air scout thing and copied it to look exactly like yours as shown in the downloadable .rar file ZeRen, and it doesn't work for me ,-, Anything i try doesn't show up in the F1 menu >.>

really annoying because I've been trying to get this hotkey to show up in the F1 menu for like 40 min xD (any help would be appreciated) ^^
User avatar
Nexus_of_Reality
Avatar-of-War
 
Posts: 135
Joined: 17 Feb 2015, 01:51
Has liked: 59 times
Been liked: 40 times
FAF User Name: Nexus_of_Reality

Re: How to: Make new keyboard shortcuts

Postby Gorton » 27 Sep 2015, 23:04

stickied
"who is this guy, he didnt play gpg or what?" - RA_ZLO

*FAF Moderator*
Gorton
Councillor - Moderation
 
Posts: 2543
Joined: 16 Apr 2013, 21:57
Location: United Kingdom
Has liked: 1067 times
Been liked: 455 times
FAF User Name: Gorton

Re: How to: Make new keyboard shortcuts

Postby mirroredwang » 07 Oct 2015, 23:35

['Select nearest idle t1 engineer'] = {
order = 2,
action = 'UI_SelectByCategory +add +nearest +idle TECH1 ENGINEER',
category = 'Custom Keys'
},

it selects more than one, but only if i move the mouse closer to the second, third etc. engineer. Only the literal nearest gets added to the selection, which is always the same one unfortunately.

i want to select 3 near idle engineers by tapping my hotkey 3 times without moving the mouse in any direction. Is this possible?


BTW, are there more modifiers?

EDIT: Maybe a combination of cycle and add without the camera hop, if that is possible?
mirroredwang
Avatar-of-War
 
Posts: 119
Joined: 22 Aug 2015, 22:56
Has liked: 9 times
Been liked: 8 times
FAF User Name: Topkack

Re: How to: Make new keyboard shortcuts

Postby nine2 » 08 Oct 2015, 02:11

It is not possible to write a key that does what you describe, that would require a mod.
However the function you describe is actually built in to the game (possibly since hotbuild) and only works for t1 engies.
There are no other modifiers (that I know of). There is a way to remove categories from a selection but that's kind of different
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 » 08 Oct 2015, 02:21

What would be cool is if there was an +unselected modifier... Then u could add the nearest unselected engie to the selection.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

PreviousNext

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest