[WOTC] Enemy Preview – Extended
[WOTC] Enemy Preview – Extended
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:
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.
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.
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.
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!
(See Change Notes for full history)
- 1.0.1
- Small code cleanup to resolve log issue.
- Initial Release!
1.0.0
