Page 1 of 3

Onlytargetcategory being ignored

Posted: 05 Feb 2012, 21:10
by Beherith
I have a hovercraft with the following category entry:

category = "ALL HOVER MOBILE NOTSUB NOWEAPON NOTSHIP NOTAIR",

I have set my torp launcher's weapon set to:

def = "COAX_TORPEDO",
onlytargetcategory = "NOTHOVER",

NOTHOVER is a category I created by adding it to all the non hover's category tags.

Yet the torp launcher still shoots at the hovercraft. What am I missing?

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 21:40
by FLOZi
How many categories in total?

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 21:48
by jK
Yup, maximum categories are limited to 32 (32bit = int = used structure), Spring prints a warning into the infolog.txt if you reach/exceed this.

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 21:52
by CarRepairer
Time to drop the silly NOT* categories.

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 22:10
by gajop
CarRepairer wrote:Time to drop the silly NOT* categories.
But what would you replace that with? It's not like mankind has developed a suitable replacement.

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 22:18
by Beherith
I dont see any warning in infolog :(

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 22:33
by smoth
Beherith wrote:category = "ALL HOVER MOBILE NOTSUB NOWEAPON NOTSHIP NOTAIR",
I would start looking at what categories are still being used and take this as an opportunity to reduce the category count.

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 23:19
by SanadaUjiosan
What Smoth said. ^ ^ ^

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 23:24
by Beherith
I'm doing that, but its not helping :(

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 23:27
by smoth
anyone know of a way to check the total list of categories? does it exist as a table?

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 23:41
by Beherith
Where are the category tags taken into effect? Only in targetting and damage? ( just so I know where to search for obsolete ones)

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 23:50
by jK
smoth wrote:anyone know of a way to check the total list of categories? does it exist as a table?
http://springrts.com/wiki/Lua_ConstGame#Categories

Re: Onlytargetcategory being ignored

Posted: 05 Feb 2012, 23:53
by smoth
Beherith wrote:Where are the category tags taken into effect? Only in targetting and damage? ( just so I know where to search for obsolete ones)
the unit categories are NOT the armor def categories. They are used afaik, only in targeting.

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 00:12
by FLOZi
Hitting max categories was just a hunch, if there's no error message it may be something else, but I'm not sure what. :? Anything in {unit,weapons}defs_post.lua tweaking categories?

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 05:33
by Forboding Angel
Well infolog used to warn if too many categories were in use.

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 05:51
by smoth
it is possible that the warning got accidentallied.

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 10:26
by knorke
smoth wrote:it is possible that the warning got accidentallied.
category = [[BIO LAND A B C D E F G H I J K L AA BB CC DD EE FF GG HH II JJ KK LL MM NN OO ASD WER FGH CVB GHJ ZUI ASDF YXCV HJK ZUI GFH VBN FDFDF HGHG ZTZTZ JHJH IUIU]],
:arrow:
[f=0000000] Warning: too many unit categories (32), skipping l
[f=0000000] Warning: too many unit categories (33), skipping aa
[f=0000000] Warning: too many unit categories (34), skipping bb
[f=0000000] Warning: too many unit categories (35), skipping cc
...
still there in 85.0

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 11:24
by Beherith
Goddamit im retarded. I had a 'backup' folder in /units... Sorry for wasting everyone's time :(

But there did turn out to be 31 categories, many of which will now be removed because they are unused.

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 14:56
by Senna
Did u tested that torpedo, ignores categorys? because ive tested them, and seems like torpedos keeps ignoring the forcing onlytargetcategory, or maybe a missing command in torpedo wich i didnt found on wiki

Re: Onlytargetcategory being ignored

Posted: 06 Feb 2012, 16:10
by smoth
target category is not done on a weapon level it is done on a unit level senna. You need to name the units in question