Page 1 of 1

Onlytargetcategory, badtargetcategory etc

Posted: 11 Sep 2007, 18:29
by Forboding Angel
Is 100% fucked.

The only thing that does seem to work anymore is toairweapon=1;

However, if toairweapon is set to 0 (Which should make it not shoot at air at all) it doesn't do anything.

Fix Plox.

Posted: 11 Sep 2007, 18:56
by FLOZi
toairweapon is set to 0 (Which should make it not shoot at air at all)


Incorrect.

Also, if you are meaning in 0.75b2, you're wrong as its fine in S44. SVN I can't comment on.

Posted: 11 Sep 2007, 19:14
by Forboding Angel
flozi, take out toairweapon=0; in your weapon and see if they shoot at air or not. It might be the category that is working for you. Cause I specifically tested this last night, and it did not work at all.

Posted: 11 Sep 2007, 19:17
by Tobi
Do you get 'warning too many unit categories missed X' in the infolog.txt?

Posted: 11 Sep 2007, 20:09
by KDR_11k
toairweapon=0 is the default, =1 means it will only target units of category VTOL. Try Gundam, if Xamels can shoot air (which last I checked they can't unless it's a transport with a unit loaded) then categories really don't work, otherwise it's an issue on your end.

Posted: 11 Sep 2007, 20:34
by Forboding Angel
Tobi wrote:Do you get 'warning too many unit categories missed X' in the infolog.txt?
TBH I'm not entirely sure, I will check as soon as my wife kills my firewall so I can use vnc on my machine (I'm at work).

Posted: 11 Sep 2007, 22:40
by FLOZi
KDR_11k wrote:toairweapon=0 is the default, =1 means it will only target units of category VTOL. Try Gundam, if Xamels can shoot air (which last I checked they can't unless it's a transport with a unit loaded) then categories really don't work, otherwise it's an issue on your end.
Is the point I was trying to make, in regards to toairweapon.

OnlyTargetCategory works fine in S44 afaik

Posted: 12 Sep 2007, 07:26
by yuritch
That's what toAirWeapon really does (WeaponDefHandler.cpp from svn):

Code: Select all

   if (wdTable.GetBool("toAirWeapon", false)) {
      // fix if we sometime call aircrafts otherwise
      wd.onlyTargetCategory = CCategoryHandler::Instance()->GetCategories("VTOL");
      //logOutput.Print("air only weapon %s %i",weaponname.c_str(),wd.onlyTargetCategory);
   }
That means toAirWeapon=1 is equal to OnlyTargetCategory=VTOL. ToAirWeapon=0 is equal to not having toAirWeapon tag at all, it won't prevent fire at VTOL units. And, if your mod doesn't have a VTOL category, toAirWeapon won't work for you.