Anti air fire at ground units

Anti air fire at ground units

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

Post Reply
elias79
Posts: 57
Joined: 11 May 2008, 23:29

Anti air fire at ground units

Post by elias79 »

What is the new equivalence of this:

Code: Select all

NoChaseCategory=NOTAIR;
        Onlytargetcategory=VTOL;
        BadTargetCategory=NOTAIR;
The attacking unit is this category:

Code: Select all

Category=ARM WEAPON LEVEL3 NOTAIR NOTSUB;
the target is:

Code: Select all

category=ARM KBOT LEVEL2 ALL;
I do not want the anti air to fire at any ground units only air units.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14636
Joined: 17 Nov 2005, 02:43

Re: Anti air fire at ground units

Post by Forboding Angel »

bool canAttackGround Default: true
Determines if the weapon can be force-fired on ground positions or only fire on targeted units.
http://springrts.com/wiki/Units-WeaponDefs


Remove this:
BadTargetCategory=NOTAIR;

That tag does not do what you think it does.
0 x

elias79
Posts: 57
Joined: 11 May 2008, 23:29

Re: Anti air fire at ground units

Post by elias79 »

Im not talking about force firing but the targeting it should not even target ground units, and the wiki page links weapon def but not the units.

Im not sure when all this changed but it worked back in 2011 version 0.85

I want the aa unit to not target anything except air.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14636
Joined: 17 Nov 2005, 02:43

Re: Anti air fire at ground units

Post by Forboding Angel »

Forboding Angel wrote:
bool canAttackGround Default: true
Determines if the weapon can be force-fired on ground positions or only fire on targeted units.
http://springrts.com/wiki/Units-WeaponDefs


Remove this:
BadTargetCategory=NOTAIR;

That tag does not do what you think it does.
Just be quiet and use the damn tag. Sheesh. At least bother to test before saying silly stuff.

And Remove this:
BadTargetCategory=NOTAIR;

That tag does not do what you think it does.


Did you even bother to check the source of other games?
https://code.google.com/p/evolutionrts/ ... turret.lua
https://code.google.com/p/evolutionrts/ ... aatank.lua

Don't get excited about toairweapon. That tag no longer exists.
0 x

elias79
Posts: 57
Joined: 11 May 2008, 23:29

Re: Anti air fire at ground units

Post by elias79 »

Code: Select all

bool canAttackGround Default: true 
This tag made the unit failing to load, i assume it can only be used in lua files and not tdf ?

thank you for the answers even though i don't understand why you are so irritated.

UPDATE SOLVED

the solution was using this:

Code: Select all

onlytargetcategory1=VTOL;
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6181
Joined: 29 Apr 2005, 01:14

Re: Anti air fire at ground units

Post by FLOZi »

canattackground=1; Should work in FBI. And is completely irrelevant to what you asked for.

Also FBI is terrible don't use it. :P :mrgreen:
0 x

elias79
Posts: 57
Joined: 11 May 2008, 23:29

Re: Anti air fire at ground units

Post by elias79 »

Im sure lua is awesome if you know how to use it, but as i only know the old methods lua is terrible right now, i would also spend a year updating all files.
0 x

User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Anti air fire at ground units

Post by SanadaUjiosan »

Lua unit defs use the same tags (capitalization is slightly different but all of that is documented) and same parameters, its more of a change in format than a change in knowledge.

While I recognize the huge amount of work you'd have to do to change everything, it's always something to consider.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6181
Joined: 29 Apr 2005, 01:14

Re: Anti air fire at ground units

Post by FLOZi »

To be fair I still haven't gotten around to lua-fying S44 unitdefs (weapondefs were lua'd with pseudo OO inheritance :) )
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Anti air fire at ground units

Post by knorke »

Lua unit defs use the same tags (capitalization is slightly different but all of that is documented) and same parameters
capitalization does not matter in .lua and not in .fbi
maxdamage, MAXDAGE or maXdAmAGe all will work...
This tag made the unit failing to load, i assume it can only be used in lua files and not tdf ?
more likely you messed up a , ; or similiar. infolog should have error message.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14636
Joined: 17 Nov 2005, 02:43

Re: Anti air fire at ground units

Post by Forboding Angel »

elias79 wrote:
thank you for the answers even though i don't understand why you are so irritated.
Because you don't listen. Your "solution" is what I told you to do in the first place.
0 x

User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Anti air fire at ground units

Post by SanadaUjiosan »

knorke wrote:
Lua unit defs use the same tags (capitalization is slightly different but all of that is documented) and same parameters
capitalization does not matter in .lua and not in .fbi
maxdamage, MAXDAGE or maXdAmAGe all will work...
oh ok. i guess i came up with that rule in my head :wink:
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6181
Joined: 29 Apr 2005, 01:14

Re: Anti air fire at ground units

Post by FLOZi »

It's only true if you use lowerkeys() - lua is case sensitive.
0 x

elias79
Posts: 57
Joined: 11 May 2008, 23:29

Re: Anti air fire at ground units

Post by elias79 »

Forboding Angel wrote:
elias79 wrote:
thank you for the answers even though i don't understand why you are so irritated.
Because you don't listen. Your "solution" is what I told you to do in the first place.
Well you did not post it and i did not find it on the wiki anymore.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14636
Joined: 17 Nov 2005, 02:43

Re: Anti air fire at ground units

Post by Forboding Angel »

Actually I did, I just didn't spell it out.

Basically, your badtarget category was overriding your onlytargetcategory.

Because first you're saying only target this category and no others, and then you're saying, well ok you can target this other category but only if nothing else better is around.

That's why I kept saying that that tag does not do what you think it does, and I knew that by you removing the badtargetcategory tag, it would fix your issue and you would see that and understand.

It isn't your fault. The category tags are really screwy and at times can be pretty temperamental, especially if your logic is conflicted.

Moreover, the category tags use a very backwards logic. This is something that we are trying to address via a feature request in the feature request forum.
0 x

elias79
Posts: 57
Joined: 11 May 2008, 23:29

Re: Anti air fire at ground units

Post by elias79 »

Oh okay i think i understand.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6181
Joined: 29 Apr 2005, 01:14

Re: Anti air fire at ground units

Post by FLOZi »

Hmm, if badTargetCategory can override onlyTargetCategory like that, it is imo a bug.
0 x

Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Anti air fire at ground units

Post by Kloot »

It can't and it doesn't.

(note that the mentioned solution was using "onlytargetcategory1=VTOL;", NOT removing "badtargetcategory=NOTAIR")
0 x

elias79
Posts: 57
Joined: 11 May 2008, 23:29

Re: Anti air fire at ground units

Post by elias79 »

Kloot wrote:It can't and it doesn't.

(note that the mentioned solution was using "onlytargetcategory1=VTOL;", NOT removing "badtargetcategory=NOTAIR")
Thank you Kloot :lol:
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14636
Joined: 17 Nov 2005, 02:43

Re: Anti air fire at ground units

Post by Forboding Angel »

fbi :roll:
0 x

Post Reply

Return to “Game Development”

cron