Onlytargetcategory, badtargetcategory etc

Onlytargetcategory, badtargetcategory etc

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

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

Onlytargetcategory, badtargetcategory etc

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

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

Post 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.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Do you get 'warning too many unit categories missed X' in the infolog.txt?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

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

Post 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
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

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

Return to “Help & Bugs”