Selection Keys Based On Tags, Not Categories?

Selection Keys Based On Tags, Not Categories?

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Selection Keys Based On Tags, Not Categories?

Post by Evil4Zerggin »

Currently, SelectionKeyHandler decides if a unit is a commander or aircraft by looking at its category for COMMANDER and VTOL respectively. I would like it to look at the isCommander and canfly unit definition tags instead. My reasoning is as follows:
  • Since categories are used for targeting, I do not think they should be entangled with other aspects of a unit as far as is possible.
  • Modders would not be forced to use or know about these categories in order to have their selection keys work properly.
  • This allows for more than one air targeting category while allowing air units to be selected as a group.
  • It seems there is already a select-by-category keyword, which means that having keywords for COMMANDER and VTOL specifically is redundant.
I've attached a patch below which hopefully does what I think it does. I would like to hear any comments, objections, and suggestions you may have about this proposal and the patch.
Attachments
TagBasedSelectionKeys.zip
(559 Bytes) Downloaded 37 times
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Selection Keys Based On Tags, Not Categories?

Post by Forboding Angel »

Awwww Crap!

It's looking for a category??? Ungh the fail! No wonder ctrl+c is broken in Evo. I couldn't figure out why in the hell...
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: Selection Keys Based On Tags, Not Categories?

Post by trepan »

This can easily be implemented with a widget
(I even happen to have this one written, as
well as one that replaces uikeys.txt ;-))
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Selection Keys Based On Tags, Not Categories?

Post by Forboding Angel »

someone assuage my anguish... Is it honestly all my fault that I didn't know that. Is it documented somewhere obviously?

Am I the only one that didn't know htis?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: Selection Keys Based On Tags, Not Categories?

Post by trepan »

Written, not released.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: Selection Keys Based On Tags, Not Categories?

Post by trepan »

On a somewhat related topic, I should probably remove
the bindbuildtype uikeys.txt feature. It too can be replaced
by a widget, and serves as little more than needless
complication to the file format (I doubt that many even know
that it exists).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Selection Keys Based On Tags, Not Categories?

Post by Forboding Angel »

thanks trepan
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Selection Keys Based On Tags, Not Categories?

Post by Evil4Zerggin »

Forboding Angel wrote:Am I the only one that didn't know htis?
Nope. When I first did the CA category rework the COMMANDER thing tripped me up.

Also, NOTA figured this out only recently:
TradeMark wrote:
Pressure Line wrote:afaik those ota tags dont do anything in spring, i think its actually having the commander=1 tag in the fbi
edit: i did some research now, and the correct way is to put just COMMANDER in the category:

armbase:

Code: Select all

Category=ARM NOTAIR NOTSUB NOTSHIP COMMANDER;
corbase:

Code: Select all

Category=CORE NOTAIR NOTSUB NOTSHIP COMMANDER;
Forboding Angel wrote:Is it documented somewhere obviously?
If by "obviously" you mean "Spring source + find in files" :p

Although looking through the wiki shows player-side documentation at http://spring.clan-sy.com/phpbb/viewtopic.php?t=2190.

Actually, come to think of it, I should write some category documentation on the wiki. Not many people seem to know that you can have multiple categories in badTargetCategory / onlyTargetCategory / noChaseCategory, which is why we end up with all these messy NOTAIR, NOTSHIP, etc.

Edit: Here it is: http://spring.clan-sy.com/wiki/Unit_Categories. Don't know exactly how noChaseCategory works, though.
Last edited by Evil4Zerggin on 30 Jul 2008, 08:06, edited 2 times in total.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: Selection Keys Based On Tags, Not Categories?

Post by Gnomre »

Evil4Zerggin wrote:Actually, come to think of it, I should write some category documentation on the wiki. Not many people seem to know that you can have multiple categories in badTargetCategory / onlyTargetCategory / noChaseCategory, which is why we end up with all these messy NOTAIR, NOTSHIP, etc.
Actually, I saw you mention that a few weeks ago and after that cleaned up all of IW. We're now running on five categories :)
Post Reply

Return to “Feature Requests”