Now then, I made it so that If I'm playing against a Hard Army, then each faction would have their own particular "type" of upgrade that their units start with.
For example:
Gondor's units start with Heavy Armor
Rohan's units start at Rank 2 and their cavalry start with Horse shields
Isengard's units start with Forged Blades
And Mordor's archers start with Fire Arrows
Here's an example of the code.
[codebox](In GondorHordes.ini)
Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality2
TriggeredBy = Upgrade_GondorHeavyArmor Upgrade_TechnologyGondorHeavyArmor
RequiresAllTriggers = Yes
End
Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality3
TriggeredBy = Upgrade_HardAIMultiPlayer
End
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
(In GondorInfantry.ini)
Behavior = ArmorUpgrade ArmorUpgradeModuleTag
TriggeredBy = Upgrade_GondorHeavyArmor
ArmorSetFlag = PLAYER_UPGRADE
;KillArmorUpgrade = Yes ;This cancels any previous armor upgrade.
End
Behavior = ArmorUpgrade ArmorUpgradeModuleTagFromHardAI
TriggeredBy = Upgrade_HardAIMultiPlayer
ArmorSetFlag = PLAYER_UPGRADE
;KillArmorUpgrade = Yes ;This cancels any previous armor upgrade.
End
Behavior = SubObjectsUpgrade Armor_Upgrade
TriggeredBy = Upgrade_GondorHeavyArmor
UpgradeTexture = GUManAtArms.tga 0 GUManAtArms_HA.tga
RecolorHouse = Yes
ExcludeSubobjects = Forged_Blade
End
Behavior = SubObjectsUpgrade Armor_UpgradeFromHardAI
TriggeredBy = Upgrade_HardAIMultiPlayer
UpgradeTexture = GUManAtArms.tga 0 GUManAtArms_HA.tga
RecolorHouse = Yes
ExcludeSubobjects = Forged_Blade
End[/codebox]
Now, in terms of the system, this works. You can definitely tell that they have Heavy Armor, as it takes a heck of a lot to kill them.
But visually, the heavy armor texture dosen't show.
Now, the curious thing is that if a unit dies, but the horde survives, and has rank, when the dead units are respawned by the banner carrier, they come to life with the Heavy Armor texture.
So you end up with a horde where half of the units look like they have Heavy Armor, and the other half don't. But in reality, they ALL DO.
I'm pretty sure that it's because the code isn't made to have units that start with upgrades.
(I already tested making Gondor soldiers start with Forged Blades and that displays fine.)
But I was wondering if anyone knows a workaround for this.
Edited by Ganon, 10 September 2011 - 07:28 PM.