Monday, April 16, 2012

SPECIALHIGHPRI

Anyone know what specific units this refers to?
I've seen numerious references to this in:
platoon.lua
BaseOPAI.lua
As well as every unit in the game has this referenced within their targeting preferences. However not a single unit in the game is using this within their defined categories!
Resin|||It's put in as the very rare case of OMGYOUMUSTKILLTHISATALLCOSTS.
Every weapon has it as the highest targetting priority.|||But none of the units in the game use this category... :?
How is being used if not actively part of a units category?
Most importantly, what units would generally be considered HIGHPRI ?
Resin|||It's either unused, or the engine automatically assigns it to units with certain other categories.
Try a repr(categories.SPECIALHIGHPRI). If it isn't nil, it should list something about userdata at address blah blah blah. You can also try spawning a bunch of units, and running a function via the console that gets a list of units from that brain based on that category, and logs their unitids.|||Mithy|||If you make a unit with that category, everything will shoot the crap out of it.
It is being used because weapons are searching for objects with that category... they'll just never find one.|||You do realize that if this isnt being used by the AI or game engine, it's a huge waste of CPU cycles. Effectively every unit in the game has this set within their weapon priorities as the first unit cat to look for....
Resin|||The check is trivial due to the way that compiled categories are processed by the engine.
Checking which unit is nearby is far more taxing.|||You're doing it wrong. 'SPECIALHIGHPRI' is not categories.SPECIALHIGHPRI. You're just printing text. You have to actually parse that category and then repr that, or just repr(categories.SPECIALHIGHPRI).
And chances are, the game's weapon priority checks are very efficient and don't waste time on empty categories, if in fact this category is empty.|||The engine will just use bit shifting to check categories, which is an essentially irrelevant check. Creating a single table will take hundreds of these checks in equivalent time, and then much more in access, insert, and delete operations.|||The BlackOps protector bot uses that category specifically.

No comments:

Post a Comment