511 ratings
[WOTC] Cost-Based Ability Colors
File Size
0.162 MB
Feb 2 @ 6:09pm
May 4 @ 5:52pm
5 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Cost-Based Ability Colors

[WOTC] Cost-Based Ability Colors

This is an updated version of Cost-Based Ability Colors for WOTC. All credit for the original mod and concept goes to infectedm and you should go rate it if you haven't already.

Overrides UITacticalHUD_Ability and is incompatible with any other mod doing the same (unsubscribe from the original).

What's New

For the most part, the original Cost-Based Ability Colors works fine in WOTC, but there were a few situations where it needed an update, especially with regards to improving support for mod-added abilities. Here are the big changes from the original version:
  • Updated Free Reload Handling: The handling of Free Reloads has been updated to take bonus charges into account and has been set to an ini toggle so that it may be disabled entirely by users when using other mods that handle free reloads (like [WOTC] Free Reload Anytime , for example).
  • Better Override Support: The mod has been re-written to provide more robust, conditional color overrides for mod authors. The cost category can be changed or a completely custom color can be assigned to an ability and it can be conditional to the presence of an another ability or an activated effect on the unit.
  • Updated Cost Check Logic: The cost-checking logic has been updated, primarily to support action point altering effects from mods utilizing XModBase. The mod will now recognize actions with a cost of 0 as free (was previously only considering the bFreeCost variable). A check for valid action point types has also been added and when a unit does not have a valid action point type for an ability (for example, when a unit only has Movement-only action points, etc.) the Unavailable color will be used.

For Mod Authors: How to Setup an Override

If you have an ability that needs an override entry to display correctly, you can include a copy of XComWOTC_CostBasedAbilityColors.ini with your mod that contains the following:

[WOTC_CostBasedAbilityColors.UITacticalHUD_Ability_WOTC_CostBasedAbilityColors] +AbilityCostColorOverrides=(AbilityName=Name, ModifyingAbilityName=Name, ModifyingEffectName=Name, OverrideColor=Color_String, bIsFreeAction=Bool, bIsTurnEnding=Bool, bNotTurnEnding=Bool)

Some examples of when you might want to use an override include abilities that only return actions via PostAbilityCostPaid(), abilities that are bFreeCost = true, but will remove action points through further processing, or when you want an ability to use a different border color than any of the preset categories under certain conditions.

The overrides are entered using a struct and the members and their usage are detailed below. Only include the OPTIONAL members that you need. See the ini file included in this mod for more information and examples:
  • AbilityName (string)
    REQUIRED - The name of the ability being modified

  • ModifyingAbilityName (string)
    OPTIONAL - The name of the ability that the unit must have to validate the modify

  • ModifyingEffectName (string)
    OPTIONAL - The name of the effect that the unit must have to validate the modify

  • OverrideColor (string)
    OPTIONAL - If a color string is entered, the ability being modified will use that color instead

  • bIsFreeAction (bool)
    OPTIONAL - If true, the ability being modified will be considered a free action

  • bIsTurnEnding (bool)
    OPTIONAL - If true, the ability being modified will be considered a turn ending action

  • bNotTurnEnding (bool)
    OPTIONAL - If true, the ability being modified will be considered a non-turn ending action

  • NOTES:
    More than one entry for a single ability can be entered when there are more than one ModifyingAbilityName or ModifyingEffectName that may modify that ability. When a ModifyingAbilityName AND a ModifyingEffectName are present in the same AbilityCostColorOverride entry, they will be treated as an OR statement.

    The OverrideColor, if defined, will take first priority - use this to give an ability a border color outside the preset categories. The bIsFreeAction bool will be evaluated next and, if true, will use the FreeAction border color. If neither an OverrideColor or the bIsFreeAction bool are defined, then the TurnEnding bools will be evaluated for their preset colors.

    bIsFreeAction and bIsTurnEnding are immediate overrides - when either one is found in an override, their preset color is used and no other override entries are evaluated. bNotTurnEnding, however, is not immediate - the value is stored and continues evaluating other override entries, primarily to allow any potential bIsFreeAction overrides to supercede it.

Some Examples:
+AbilityCostColorOverrides=(AbilityName=SmartOverwatchAll, bIsTurnEnding=true) +AbilityCostColorOverrides=(AbilityName=SmartOverwatchOthers, bIsFreeAction=true)

Version History
(See Change Notes for full history)
    • Updated the SPARK's Bombard ability to remove the extra ActionPointCost causing it to show up incorrectly.
    • Attempt to fix issues with Free Reload charges reporting incorrect values and added handling to support multiple upgrades per weapon granting Free Reloads, should that ever exist.
    • Added Full Color Mode toggle in the config file (defaults to Off/False). Colors the Icon border AND inner symbol based on the action cost.
    • Added a check for valid action point types. If the unit does not have a valid action point type for an ability, it will display the Unavailable color (for example, when a unit has a movement-only action point, normal actions will be colored as unavailable).
    • Fixed error in override logic causing bIsTurnEnding = true overrides not to process.
    • Added a few more overrides to the config file.
    • Initial Release!.
< >
MoistBaguette Nov 13 @ 5:00pm 
Renamed to what?
Snowy Nov 9 @ 1:58am 
Hi,sharing the fix that worked for my problem. Renamed the "Config" folder in Documents/My Games/ XCOM2 War of the Chosen and had the game remake the Config folder. Enabled all the usual mods and everything loaded as it should. Hope this helps someone else. More detailed steps and other possible solutions are shared in a link in another comment.
Snowy Nov 9 @ 1:39am 
Not working for me as well. Anyone else having similar problems? Testing now with the original mod from the vanilla.
Kirgar Nov 8 @ 9:21pm 
I confirm, it stopped working with WOTC about a week ago. Sadly for me. No overrides, I checked.
RustyDios Nov 7 @ 5:55pm 
Okay, so I unsubbed to the original. Cleared my config folder for good measure. Disabled ALL my other mods. Ran my vanilla game with just this, and the Legacy MCM.. and .. nope. No coloured icons. So I can confirm it is NOT retro-active. Which is a shame, the updated code looks better and smoother.

Don't get me wrong, I've never had any problems per-se with the original in my Vanilla game either, just liked the looks of this one better, looked easier to config for the future, etc.

Ah well, maybe christmas this year I'll get enough money to come over to the WOTC side.
shiremct  [author] Nov 7 @ 8:56am 
I've never tried it, but l suspect it would work fine so long as there are no issues introduced from it being compiled by the updated tools. It very well might work in vanilla.
RustyDios Nov 6 @ 5:00pm 
Just wondering as this is likely to remain updated and the original had few issues with WOTC... does this work retro-actively too? ie will this version work with the vanilla game?

The code just seems cleaner and better, I had a quick browse through what I could and it doesn't look like much would break going "backwards" compatable?

((Some of us still haven't actually got the WOTC update, yet still enjoy vanilla XCOM2))
Angelo Oct 28 @ 11:04pm 
Help it's not working for me
kdg338 Oct 19 @ 6:06am 
nooo it stopped working
how can i fix this without installing mod launcher