XCOM 2
170 ratings
[WOTC] Enemy Preview - Extended
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
550.488 KB
27 Jan, 2023 @ 8:44am
27 Jan, 2023 @ 9:48am
2 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Enemy Preview - Extended

Description
[WOTC] Enemy Preview - Extended

About the Mod
This mod extends the optional Target Preview UI element to support providing additional information about vision range and the impact of certain effects on targets based on the current movement preview tile / cursor. There are currently two primary elements - while previewing movement:

Vision Range Modifiers
Enemies in the selected soldier's vision range that are beyond their normal vision radius will be noted with a yellow squadsight target icon in their preview (vs the standard red squadsight target icon for enemies beyond the selected soldier's vision range). Without this mod, these enemies are previewed as if in normal vision range.

Vision beyond normal range can come from temporary effects or modifiers that may not be present after moving; bonuses could be based on terrain/elevation, or bonuses could be lost due to expiration or from moving. It can't predict whether the bonus will remain or not, but will at least highlight enemies in this partial or temporary squadsight that you may need to take into consideration.

An example of this would be Emplaced from the Proficiency Marine, which grants a vision range bonus from staying in-place. The partial/temp squadsight icon will give you the info you need when previewing movement to determine which enemies you can currently see only with this bonus that will be lost when you execute the move.

Ranged Effect Modifiers
Some soldier abilities only apply to certain enemies within a given range from the soldier. This mod allows setting up configurable entries for effects that will display icons on the Target Preview for enemies that would be within range based on the current movement preview tile / cursor.

An example of this would be Close Encounters (as shown in the pictures above), where only enemies within 4 Tiles from the soldier's position are valid targets for the effect. The preview icon will show you which enemies are within this range from the previewed movement tile without counting tiles (especially useful for bigger ranges or diagonals).

Other mods can setup their own config entries for their abilities that will be pulled in. A number of different icons are already included, but a mod can add and specify their own icons as well. There are a number of arguments that can be set in a config entry; this information and some examples are in the XComWOTC_EnemyPreview_Extended.ini config file:
  • EffectName (required) - this is the effect (NOT ability) that must be present on the selected soldier to evaluate the preview range effect entry.
  • IconPath - this is a string reference to the content package and icon that will be displayed on the target's preview icon. You can direct this to your own package/icon or use one of the existing options.
  • MinTileRange (default = 0) - the minimum range the effect would be valid, any targets under this range in tiles from the previewed location will not show the icon.
  • MaxTileRange - the maximum range the effect would be valid (this is usually the important one), targets over this range from the previewed location will not show the icon.
  • bReduceRangeToInt (default true) - most effect range-checking conditions need this set to true. Try changing this to false if you are getting errors with edges on your ability/effect.
  • bOnlyMech / bExcludeMech - self-explainatory.
  • bOnlyAlien / bExcludeAlien - self-explainatory.
  • bOnlyAdvent / bExcludeAdvent - self-explainatory.
  • bOnlyPsionic / bExcludePsionic - self-explainatory.
  • bOnlyLost / bExcludeLost - self-explainatory.

Known Issues and Incompatibilities
Overrides the UITacticalHUD_EnemyPreview class and will be incompatible with any other mod doing the same. Note, there are no mods that I am currently aware of that do this.

There are a few edge cases that probably exist in the vision ranges, but I've been sitting on this for months, so wanted to get it out there. I'll monitor and address any issues that come up.

Thanks and Credits
Special thanks to the following individuals who assisted me with questions and navigating flash: RustyDios, TePa, Xymanek, Robojumper, and Zelfana - their assistance has been crucial in getting this to release! Thanks!


Version History
(See Change Notes for full history)
    1.0.0
    • Initial Release!
Popular Discussions View All (1)
0
28 Mar, 2023 @ 3:36am
Colors for the movement tiles mod
45fg45
15 Comments
HyperRainbow 25 Jun @ 3:29pm 
@SABO yeah same here not working for me
Sest 13 May @ 7:34am 
Valuable.
SABO 24 Nov, 2024 @ 3:35pm 
this mod isnt working anymore? i have it installed but i have yet to see it in my game
khumak 15 Nov, 2023 @ 2:36pm 
Have you considered adding a preview option for combat protocol/haywire for robotic enemies that are outside of firing range but still have line of sight? Specialists can hack/combat protocol with unlimited range as long as they have line of sight but currently you can't tell if they have line of sight for a tile you want to move to unless they're in firing range.
CyberNeo 22 Oct, 2023 @ 9:42am 
Can someone tell me where I can find the EffectName of a Ability?
azairvine 1 Aug, 2023 @ 3:48am 
Can you add this mid-mission? If not, mid save at least?
Azzla 20 May, 2023 @ 11:31am 
Is this the long-awaited adjustment that allows us to tell if an enemy is/will be within CQB Dominance Radius?
marshmallow justice 21 Feb, 2023 @ 2:54am 
wonderful ui mod ! maybe until patches come out anyone using could just throw in the ability names that need to be slightly edited to point to the correct LWOTC / similar class abilities that would benefit from this mod here
shiremct  [author] 29 Jan, 2023 @ 9:38am 
Yes, it should be technically compatible with LWOTC, though it looks like the existing config entry for close encounters will not work for LWOTC's version of the ability. I'll add it to the list for the next update, but in the meantime, the EffectName needs to just be "CloseEncounters" for the LWOTC version.

By itself, the mod doesn't really do anything as there are few, if any, base game abilities that work in a range or give temporary sight bonuses (probably hence the lack of UI support for it...) - if there are other base game abilities or modded abilities that are no longer actively maintained, start making a list and I'll add them to the configs.
WarLLT1315 29 Jan, 2023 @ 7:25am 
This is another great mod in Gameplay transparency.