Thunderbrd
C2C War Dog
Good question. I can hazard a partial answer here.I have been reading the unit code and a question came up. For almost every unit the <Class> and <Type> tags are the same (ex. UNITCLASS_A10_BOMBER and UNIT_A10_BOMBER). Could we just have one UNITCLASS_MISSIONARY instead of having UNITCLASS_ANDEAN_MISSIONARY, for example? Is there a functional reason to have separate unit classes for these?
My other question is about the units (only a few) who do have different <Class> and <Type> tags. For example UNIT_ARMOR_M60 is the only unit with UNITCLASS_ARMOR and UNIT_HEAVY_TANK_M26 is the only unit with UNITCLASS_HEAVY_TANK. Is there a functional reason why these units have different unit types and unit classes or is it an anomaly?
Just trying to make sense of how the code works before I get to a point where I'm called upon to change anything for the team.
When a Unique Civilization unit replaces a core unit in Vanilla BtS, they share the same unit class but differ on unit type. I'm not overly familiar with the coding on THAT replacement transition but we don't really use it in C2C.
Being a little unclear on what that means and the full implications of the sharing of a unit class, I'd think we would not want to do what you suggested, particularly since it appears now, for us, the female missionary mod relies on this difference as well. Additionally, some things are determined by unit class info, including, I believe, the base spread probability for missionary types (it differs by religion) but I could be wrong there.
All missionaries, however, are united in two other categorization methods we have, specialunittype - which they always have been defined as missionaries there, and Combat Class (C2C gives all units a combat class but vanilla never did bother with many, including missionaries for example.)
Unit Class is also specifiable as combat modifiers and a number of other select interactions like the ability to target a particular unit class first if attacking a stack. But it's not used TOO often and is not really set up for wide use as a unit categorizing method. In general, it's always been employed to indicate a unit as an alternative of a similar type.