Onlytargetcategory being ignored

Onlytargetcategory being ignored

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Onlytargetcategory being ignored

Post 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?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Onlytargetcategory being ignored

Post by FLOZi »

How many categories in total?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Onlytargetcategory being ignored

Post 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.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Onlytargetcategory being ignored

Post by CarRepairer »

Time to drop the silly NOT* categories.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Onlytargetcategory being ignored

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Onlytargetcategory being ignored

Post by Beherith »

I dont see any warning in infolog :(
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post 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.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Onlytargetcategory being ignored

Post by SanadaUjiosan »

What Smoth said. ^ ^ ^
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Onlytargetcategory being ignored

Post by Beherith »

I'm doing that, but its not helping :(
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

anyone know of a way to check the total list of categories? does it exist as a table?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Onlytargetcategory being ignored

Post 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)
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Onlytargetcategory being ignored

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Onlytargetcategory being ignored

Post 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?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

Well infolog used to warn if too many categories were in use.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

it is possible that the warning got accidentallied.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Onlytargetcategory being ignored

Post 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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Onlytargetcategory being ignored

Post 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.
Senna
Posts: 315
Joined: 17 Mar 2009, 00:20

Re: Onlytargetcategory being ignored

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post 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
Post Reply

Return to “Game Development”