Page 1 of 1
Selection Keys Based On Tags, Not Categories?
Posted: 28 Jul 2008, 15:35
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.
Re: Selection Keys Based On Tags, Not Categories?
Posted: 29 Jul 2008, 17:54
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...
Re: Selection Keys Based On Tags, Not Categories?
Posted: 29 Jul 2008, 18:42
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

)
Re: Selection Keys Based On Tags, Not Categories?
Posted: 29 Jul 2008, 20:23
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?
Re: Selection Keys Based On Tags, Not Categories?
Posted: 29 Jul 2008, 20:28
by trepan
Written, not released.
Re: Selection Keys Based On Tags, Not Categories?
Posted: 29 Jul 2008, 20:31
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).
Re: Selection Keys Based On Tags, Not Categories?
Posted: 29 Jul 2008, 20:58
by Forboding Angel
thanks trepan
Re: Selection Keys Based On Tags, Not Categories?
Posted: 30 Jul 2008, 06:04
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.
Re: Selection Keys Based On Tags, Not Categories?
Posted: 30 Jul 2008, 06:53
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 :)