The men's fortress has the banner attached to their main model in the code the mesh is referred to as "GBFFLAG". So what you would need to do is have your fortress model exported with the flag in it. It can be hidden and unhidden via code. I'll explain the codes below:
In the animations states these two states are shown when placing your buildings, if it should be hidden here the "CurDrawableHideSubObject" can hide it here.
;// Animation state for build placement cursor
AnimationState = BUILD_PLACEMENT_CURSOR
BeginScript
CurDrawableHideSubObject("FIREGLOW")
CurDrawableHideSubObject("FLAMES")
CurDrawableHideSubObject("GBFFLAG")
CurDrawableHideSubObject("GBFFLAMING")
EndScript
End
;// Animation state for phantom structure
AnimationState = PHANTOM_STRUCTURE
BeginScript
CurDrawableHideSubObject("FIREGLOW")
CurDrawableHideSubObject("FLAMES")
CurDrawableHideSubObject("GBFFLAG")
CurDrawableHideSubObject("GBFFLAMING")
EndScript
End
This piece of the code has nothing to do with the mesh hiding and unhiding, this pertains to the production upgrades and bonuses it can receive after certain upgrades are purchased.
;-----------------------------------------------
;Used for hero revival and initial construction
Behavior = ProductionUpdate ProductionUpdateModuleTag
ProductionModifier ; An object-local discount.
RequiredUpgrade = Upgrade_MenFortressBanners
CostMultiplier = 0.80
ModifierFilter = NONE +MenPorter
End
ProductionModifier
RequiredUpgrade = Upgrade_MenFortressBanners
CostMultiplier = 0.90
TimeMultiplier = 0.90
HeroPurchase = Yes ; Instead of an object filter, needs to be explicitly hero-revival-system compatible
ModifierFilter = NONE +HERO
End
ProductionModifier
RequiredUpgrade = Upgrade_MenFortressHouseOfHealing
CostMultiplier = 0.80
TimeMultiplier = 0.80
HeroRevive = Yes
ModifierFilter = NONE +HERO
End
NumDoorAnimations = 1
DoorOpeningTime = 3000 ;in mSeconds how long you want doors to be in open state
DoorWaitOpenTime = 3000 ;in mSeconds time the door stays open, so units can exit
DoorCloseTime = 3000 ;in mSeconds how long you want doors to be in open state
End
This is the code that hides your banners (and anything else you want hidden from the start).
// Hide all the Improvements by default
Behavior = SubObjectsUpgrade ModuleTag_HideAll
TriggeredBy = Upgrade_StructureLevel1
HideSubObjects = GBFFLAMING GBFFLAG
End
Now the first part here deals with the leadership, the second part is the subobject command to unhide the flags after the upgrade is purchased.
// Banners improvement, the half that gives an aura bonus, not the purchase discount part (that is in the ProductionUpdate)
Behavior = AttributeModifierAuraUpdate ModuleTag_BannerLeadership
StartsActive = No ;If no, requires upgrade to turn on.
BonusName = MenFortressBannersLeadership
TriggeredBy = Upgrade_MenFortressBanners
RefreshDelay = 2000
Range = 300
ObjectFilter = GENERIC_BUFF_RECIPIENT_OBJECT_FILTER
End
Behavior = SubObjectsUpgrade ModuleTag_ShowBanners
TriggeredBy = Upgrade_MenFortressBanners
ShowSubObjects = GBFFLAG
End
If you are adding banners to your fortress you don't need to make new upgrades, recycling the already existing upgrades is a good habit to have, by constantly adding new upgrades, you'll eventually hit the limit.