Page 1 of 1

TedClass and Category

Posted: 21 Oct 2006, 11:25
by PauloMorfeo
Are TedClass and Category the exact same thing in a unit's definition?

From what i could read in das wiki, it seems so...

Posted: 21 Oct 2006, 13:16
by KDR_11k
Category is a list of strings that are used by the tags BadTargetCategory and OnlyTargetCategory (not sure if there are other uses, Spring has a very hacky way of using those files). E.g. if you want a weapon to shoot only at infantry you add the category INFANTRY to all infantry units and OnlyTargetCategory=INFANTRY to the unit with the weapon. A unit can have multiple categories but AFAIK the targeting tags accept only one of them so if you want to have a weapon shoot at infantry and tanks you need to introduce a category that both belong to.

TED Class wasn't used by OTA at all but Spring uses it for telling some unit types apart (only one I know of is PLANT which marks a unit as a factory instead of a mobile constructor).

Posted: 22 Oct 2006, 09:54
by PauloMorfeo
Funny i ran into it by accident in the sources, haha.

Anyway, you are right. When loading a unit from the fbis, it seems to only be used for that (maybe it is used for something else sonewhere in the code).

Anyway, a funny note, from the sources, the only 2 tags that report a warning massage if not found in the FBI, are UnitName and Name, as oposed to what the wiki says.