XCOM 2
Yet Another F1
 This topic has been pinned, so it's probably important
robojumper  [developer] 27 May, 2017 @ 2:55pm
MODDERS: How to make enemies, abilities and equipment play nicely:
There are some rules involved:

Active Abilities will only be shown when they would normally appear in the Ability Container. This is controlled by Template.eAbilityIconBehaviorHUD. Set it to eAbilityIconBehavior_AlwaysShow for abilities that should also be shown, or eAbilityIconBehavior_NeverShow for those that should never be shown.

For active abilities that should be shown on the ability container but hidden in the summary (overwatch, hunker down), there's a way to hide it in config: Create a file called XComUI.ini and add the following lines to it:

[YetAnotherF1.YAF1_UIUnitInfo] +DefaultHidden="HideThisAbility" +DefaultHidden="HideThisAbilityToo" +DefaultShown="ShowThisAbility"

Passive abilities are effects with display info. If the passive ability has an effect with infinite duration, make it responsible for showing with
Effect.SetDisplayInfo(ePerkBuff_Passive, Template.LocFriendlyName, Template.GetMyLongDescription(), Template.IconImage, true,,Template.AbilitySourceName);

Buffs and debuffs should be self-explanatory, they use the same path as passives except ePerkBuff_Passive is now ePerkBuff_Bonus or ePerkBuff_Penalty. X2StatusEffects.uc has numerous examples.

Primary weapons are only shown if the weapon has localization set up.
Secondary weapons are only shown if the weapon has localization set up or belongs to a known category. See this mod's ini file to see how that works.

Units can have a short help description that will be shown if the unit has it set up. To add it, add a line below strCharacterName in the localization file that looks like this:
strAcquiredText="The Boa is a Snek."
There also is an event you can use to override the string, see YAF1_UIUnitInfo.uc for details.
Last edited by robojumper; 27 May, 2017 @ 3:16pm
< >
Showing 1-1 of 1 comments
76561198049919792 15 Sep, 2017 @ 3:27am 
How is UI localized?
< >
Showing 1-1 of 1 comments
Per page: 1530 50