Onlytargetcategory being ignored - Page 2

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

Senna
Posts: 315
Joined: 17 Mar 2009, 00:20

Re: Onlytargetcategory being ignored

Post by Senna »

smoth wrote: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
toairweapon= 1, its set on weapon and target VTOL , even forcing the onlytargetcategory to land it will not shot on land units, cuz weapon has values over unit fbi
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

ToAir weapon has been deprecated, does any project even use it?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Onlytargetcategory being ignored

Post by Beherith »

Yeah ba used it, but its fixed in svn.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

good, that tag needed to go.

still left with:
Senna wrote: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
Again, name the units.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Onlytargetcategory being ignored

Post by knorke »

smoth wrote: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
what? onlyTargetCategory is per weapon, how else would you have, say a unit with one anti-ground weapon and one anti-air weapon.
http://springrts.com/wiki/Units-UnitDefs
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Onlytargetcategory being ignored

Post by SanadaUjiosan »

I think he means it is in the unit def, not the weapon def.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

SanadaUjiosan wrote:I think he means it is in the unit def, not the weapon def.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

smoth wrote:good, that tag needed to go.
toairweapon was necessary because it did not allow AA units to be fpsed and then force fired at anything the controller wanted. Tag has been replaced with.... ehh lemmie look it up...

canAttackGround = false,
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

canattackground determines if a weapon can be force fired at the ground forb.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

Yes I know... You weren't listening. The main feature of toairweapon was that it made fps firing of weapons at ground and ground units impossible. Yes it did only target category vtol too, but that wasn't the reason to use toairweapon, it was the fps fire lock.

People who previously made use of toairweapon need to know to replace it with canattackground
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

that doesn't make any sense.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Onlytargetcategory being ignored

Post by CarRepairer »

Forb is right. I will try to explain using a list.

Toairweapon did two things:
1) make onlytargetcategory=flying units
2) make canattackground=false

Both those defs are available separately now, so toairweapon is not needed.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

I know what it did, I was saying that his statement about the FPS stuff being the "main point"
Senna
Posts: 315
Joined: 17 Mar 2009, 00:20

Re: Onlytargetcategory being ignored

Post by Senna »

knorke wrote:
smoth wrote: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
what? onlyTargetCategory is per weapon, how else would you have, say a unit with one anti-ground weapon and one anti-air weapon.
http://springrts.com/wiki/Units-UnitDefs
yeah it has no sense, but its an esample to smoth
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Onlytargetcategory being ignored

Post by FLOZi »

CarRepairer wrote:Forb is right. I will try to explain using a list.

Toairweapon did two things:
1) make onlytargetcategory=flying units
2) make canattackground=false

Both those defs are available separately now, so toairweapon is not needed.
btw, looking at the commit that removed toairweapon, and noting the lack of results from grepping the source otherwise, I'm not sure if toairweapon doing part 2 hasn't been gone for some time.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

lol, glad I never used it :P.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Onlytargetcategory being ignored

Post by Kloot »

FYI, toAirWeapon has never had anything to do with canAttackGround between the latter's introduction (github.com/spring/spring/commit/4f00af09a8ca6978cdb30e2d00521bee9aec0d7a for 0.75b1) and the former's removal.

(this here be a fine example of conflation, like the persistent "negative sun directions caused crashes" claim...)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

Kloot wrote:FYI, toAirWeapon has never had anything to do with canAttackGround between the latter's introduction (github.com/spring/spring/commit/4f00af09a8ca6978cdb30e2d00521bee9aec0d7a for 0.75b1) and the former's removal.
Image
(this here be a fine example of conflation, like the persistent "negative sun directions caused crashes" claim...)
How I read the post

thanks for clearing that up Kloot. What about the fps thing forb is talking about
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Onlytargetcategory being ignored

Post by Kloot »

I got no clue, but let's analyze it.
"The main feature of toairweapon was that it made fps firing of weapons at ground and ground units impossible."
Now given what toAirWeapon did (set a weapon's onlyTargetCategory to VTOL), it would have been true that "toAirWeapon made firing of weapons at ground units" impossible (if those units happened to be in a category other than VTOL, which would be expected), whether in FPS mode or not. I would not expect toAirWeapon=true to have also blocked "firing of weapons at ground", but looking at the code today that was probably true also: any weapon with a non-default onlyTargetCategory (or canAttackGround=false, for which a check was obviously added later) can not attack the ground, again whether in FPS mode or not.

So, this is what FA should have said:
"toAirWeapon=true made firing of weapons at ground and ground units with category=VTOL impossible. the more recent canAttackGround tag lifted the inability of such weapons to fire at ground."
(and toAirWeapon did not literally "make canAttackGround=false" as CR's post might lead to you believe, but it had the same effect before canAttackGround existed)
Last edited by Kloot on 08 Feb 2012, 18:15, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

Kloot wrote:any weapon with a non-default onlyTargetCategory (or canAttackGround=false, for which a check was obviously added later) can not attack the ground, again whether in FPS mode or not.
:shock:
Post Reply

Return to “Game Development”