XCOM 2
2,253 vurderinger
[WOTC] Cost-Based Ability Colors
12
9
3
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Filstørrelse:
Offentliggjort:
Opdateret:
180.784 KB
2. feb. 2018 kl. 18:09
30. mar. kl. 6:21
12 ændringsbemærkninger ( vis )
Du mangler DLC for at kunne bruge dette emne.

Abonner for at downloade
[WOTC] Cost-Based Ability Colors

I 1 samling af shiremct
Proficiency Class Pack Suggested Mods Collection
95 genstande
Beskrivelse
[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).

To use with LWOTC, change "USE_ACTION_ICON_COLORS" to false in XComLW_Overhaul.ini, then inside the game, after loading a save, open the Options > Abilities menue and check the "Use Base-Game Tactical Ability HUD" box.


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, ModifyingActionName=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

  • ModifyingActionName (string)
    OPTIONAL - The name of the actionpoint type 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 multiple Modifying conditions are present in the same AbilityCostColorOverride entry, they will be treated as an AND statement. Use multiple Override entries for OR statements.

    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)
    1.2.1:
    • Updated default config to remove override for Whiplash ability (no longer needed) for compatibility support.
    1.2.0:
    • Added additional override variable to conditionalize color changes based on the presence of an actionpoint type.
    • Reworked override struct handling so multiple conditions in the same override entry function as an AND statement.
    • Changed ModifyingEffectName to look at effects applied to the unit vs effects the unit has applied.
    1.1.1:
    • Introduced a few new color variables to support either dynamic cost changes, straight AP cost changes, or a middle ground. Check the config file for more details.
    1.1.0:
    • Updated with code supplied by Iridar (thanks!) to support abilities with multiple action point costs
    • Added a separate color to distinguish between actions that cost 2+ actions and do or do not end the turn (2 different shades of orange now).
    1.0.5:
    • Added support for 2+ action abilities (default color is Orange).
    • Added a config to auto-detect Free Reload Anytime and adjust handling of the reload ability accordingly (defaults to True).
    1.0.4:
    • Updated the SPARK's Bombard ability to remove the extra ActionPointCost causing it to show up incorrectly.
    1.0.3:
    • 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.
    1.0.2:
    • 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).
    1.0.1:
    • Fixed error in override logic causing bIsTurnEnding = true overrides not to process.
    • Added a few more overrides to the config file.
    1.0.0:
    • Initial Release!.
305 kommentarer
Pearson 4. apr. kl. 12:25 
@Dragon32
The Alternative Mod Launcher worked, thank you
RustyDios 3. apr. kl. 13:13 
Mod works fine for myself, streamers, youtubers and about 145,000 other people
100% something wrong on your end ...
Pearson 3. apr. kl. 12:44 
Just bought WOTC, fresh install, added only a couple of basic mods (Evac all, Stop wasting time, male & female haircuts)... Enabled this mod, this mod doesn't work
JG 6. feb. kl. 14:02 
killzone costs 2 actions, but it says it only costs 1.
apart from that, i have used this mod for years and it's great
MrMister 6. feb. kl. 12:18 
Feature request: add a parameter that makes it as if the action cost is the same as iTypicalActionCost from the weapon template.
Dragon32 18. nov. 2023 kl. 9:51 
@copyrite
But as it does we can conclude that it needs to. No?
copyrite 18. nov. 2023 kl. 8:25 
@Dragon32 Therefore CBAC shouldn't need to force it.
Dragon32 18. nov. 2023 kl. 8:21 
@copyrite
It's a free action in the base game though.
copyrite 18. nov. 2023 kl. 8:13 
Hello. Could you please remove +AbilityCostColorOverrides=(AbilityName=Whiplash, bIsFreeAction=true) from the default config? Whiplash is not a free action in LWOTC, and a sizable playerbase of LWOTC use CBAC, so it's causing confusion.