I've made good progress today. I'm done creating team units for all the classes and I've made all the team spells for all classes.
With all this in place, the teams will now only be able to damage members of the opposing team, for all skills, except for auto attack. I don't know how to make it target a specific unit types yet, or if it's even possible to work around it at all.
Here's how the teams are done:
* First you need to create a "team unit type" for each team. I've made a blue and a red team. (I'll only show code from the blue team)
TLA_TEAM_BLUE
[TLA_TEAM_BLUE] <STRING>NAME:TLA_TEAM_BLUE [/TLA_TEAM_BLUE]* Next you need to create a unit type for each team, of all the classes, for both genders.
Here's the Team Blue Female Hexhunter unittype:
[TLA_BLUE_HEXHUNTER_FEMALE] <STRING>NAME:TLA_BLUE_HEXHUNTER_FEMALE <STRING>child:PLAYER_FEMALE <STRING>child1:PLAYER <STRING>child2:CHARACTER <STRING>child3:ANY <STRING>child2:PLAYERS_AND_PETS <STRING>child1:FEMALE <STRING>child:TLA_HEXHUNTER <STRING>child:TLA_TEAM_BLUE [/TLA_BLUE_HEXHUNTER_FEMALE]As you can see. This unit type inherits the following unit types: PLAYER_FEMALE, TLA_HEXHUNTER and TLA_TEAM_BLUE.
* Now you need player units for each team, for all classes. (Both genders) You also need a base for each class and each team.
Here are the relevant parts from the Team Blue Female Hexhunter player unit:
[UNIT] <STRING>BASEFILE:media/units/players/tla_hexhunter/hum_tla_blue_hexhunter_base.dat <STRING>NAME:Hum_TLA_BLUE_Hexhunter_F <STRING>RESOURCEDIRECTORY:media/models/PCs/Hum_F/ <STRING>MESHFILE:Hum_F <STRING>UNITTYPE:TLA_BLUE_HEXHUNTER_FEMALE <TRANSLATE>DISPLAYNAME:Blue - Hexhunter [...] [UNITTHEMES] <STRING>THEME:TLA_TEAM_BLUE [/UNITTHEMES] [/UNIT]* You also need a copy of the skill .dat file for each team. As you need to add the string 'TARGET_UNITTYPE' to the opposing team in the skills.
Example:
<STRING>TARGET_UNITTYPE:TLA_TEAM_REDHere's top section of the Burning Stake skill for the Team Blue Hexhunter:
[SKILL] <STRING>NAME:TLA Burning Stake BLUE <TRANSLATE>DISPLAYNAME:Burning Stake <TRANSLATE>BASE_DESCRIPTION:You fire a burning stake which pierce your enemies, slowing down their speed and attacks, while they burn in agony. <TRANSLATE>TIER1_DESCRIPTION:Increased range and velocity <TRANSLATE>REQUIREMENT_DESCRIPTION:Requires a bow, crossbow, shotgonne, or pistol <STRING>SKILL_ICON:skillicon_blazingpillar2 <STRING>SKILL_ICON_INACTIVE:skillicon_blazingpillar2_gray <STRING>ACTIVATION_TYPE:NORMAL <STRING>TARGET_ALIGNMENT:EVIL <STRING>TARGET_UNITTYPE:TLA_TEAM_RED <BOOL>USEWEAPONANIMATION:1 <FLOAT>RANDOMRANGE:0 [...]As you can see, the TARGET_UNITTYPE is set to TLA_TEAM_RED. And the skill's name has the word BLUE in it, so it can be easily added the Team Blue Base Hexhunter.
* Last you also need to create a skill tree over ride for each team, of each class.
As a result you'll have teams with skills which can only damage members of the opposing team.
Spoiler (hover to show)