Forged Alliance Forever Forged Alliance Forever Forums 2017-11-19T17:53:47+02:00 /feed.php?f=41&t=13763 2017-10-11T12:02:13+02:00 2017-10-11T12:02:13+02:00 /viewtopic.php?t=13763&p=155115#p155115 <![CDATA[Re: New mod: 'AddNearestByCategoryToSelection']]>
Ideally we would build up smart select to handle this.

Smart select is a slower, smarter version of selectbycategory that allows excluding categories as well and is used for mainly select all fighters, to exclude t2 and t4 bombers.

Statistics: Posted by nine2 — 11 Oct 2017, 12:02


]]>
2017-10-11T08:46:01+02:00 2017-10-11T08:46:01+02:00 /viewtopic.php?t=13763&p=155110#p155110 <![CDATA[Re: New mod: 'AddNearestByCategoryToSelection']]> Statistics: Posted by R_Charger — 11 Oct 2017, 08:46


]]>
2017-10-10T16:40:12+02:00 2017-10-10T16:40:12+02:00 /viewtopic.php?t=13763&p=155094#p155094 <![CDATA[Re: New mod: 'AddNearestByCategoryToSelection']]> Statistics: Posted by nine2 — 10 Oct 2017, 16:40


]]>
2017-01-04T20:16:18+02:00 2017-01-04T20:16:18+02:00 /viewtopic.php?t=13763&p=141609#p141609 <![CDATA[Re: New mod: 'AddNearestByCategoryToSelection']]> ['Add one idle T1 engineer'] = {
order = 32,
action = "UI_Lua import('/mods/AddNearestByCategoryToSelection/lua.lua').AddNearestByCategoryToSelection('+idle BUILTBYTIER1FACTORY TECH1 ENGINEER')",
category = 'Custom Keys'
}
Remember the trailing comma if there are additional UserKeyActions in this section.
order can be any number (the order you want them to appear in the F1 menu in-game)
Note the +nearest modifier is not necessary as the nearest unit is always selected and added to the existing selection with each incremental key press.
Remember to back up your game.prefs file before changing anything! There are other examples where it might be useful e.g. selecting the nearest idle bomber (or 2 or 3 with each incremental keypress), or the nearest non-idle fighter or artilllery, or any idle engineer (of any tech level) or tech level 2 or 3 engineers etc.

Statistics: Posted by R_Charger — 04 Jan 2017, 20:16


]]>
2017-11-19T17:53:47+02:00 2017-01-02T17:51:34+02:00 /viewtopic.php?t=13763&p=141543#p141543 <![CDATA[New mod: 'AddNearestByCategoryToSelection']]>
If you are not already happy with setting up custom hotkey actions, there is another thread you should read about this first.
(Forum software won't let me post a link to this, but thread id is 8230!)
[update: so I can post links now, and the thread I was talking about is here viewtopic.php?f=41&t=8230]

So then I have a bunch of hotkey actions for different unit types, and selection filters, e.g.:

Code:
                ['Select onscreen idle artillery'] = {
                    order = 32,
                    action = 'UI_SelectByCategory +inview +idle MOBILE LAND ARTILLERY',
                    category = 'Selection Matrix'
                },


Now, with this mod, I can also add hot keys like the following:

Code:
                ['AddOne idle artillery'] = {
                    order = 34,
                    action = "UI_Lua import('/mods/AddNearestByCategoryToSelection/lua.lua').AddNearestByCategoryToSelection('+idle MOBILE LAND ARTILLERY')",
                    category = 'Selection Matrix'
                },


Have fun!

Thomas

(Mod posted as attachment, because I couldn't get the mod upload thing to work, in the mod vault..)

Statistics: Posted by crispweed — 02 Jan 2017, 17:51


]]>