TedClass and Category

TedClass and Category

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
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

TedClass and Category

Post 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...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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).
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

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

Return to “Game Development”