allow overwatch shots to ignore cover
Dependencies
- [2]
WWMGBP4Lmerge with Highlander 1.24.0 - [3]
6GNTEDE4use real LOS functions to determine Far Cover (automatically accounts for roof edge protection) - [4]
CBG5GWG7peeking over an overhang doesn't work - add a little height to the firing location - [5]
JSCVVDFDremove commented code and excess tabs - [6]
ZC7RMRAEsimpler no-line-of-sight which also accounts for existing cover, higher resolution far cover - [7]
VHVL5HH4simplify far cover by starting at only the peek tile - [8]
Q5WQ6EMVreplace good angle malus with existing far cover - [9]
X4IR7ZAHbaseline from krumiro's [WotC] RW Realistic Aiming Angles - [*]
UA2L2WYUuse correct config file
Change contents
- edit in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 42
var config bool OVERWATCH_BYPASS_COVER;var config array<name> OVERWATCH_ABILITIES;var config array<name> MOVEMENT_ABILITY; - edit in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 537
// ========================================// From -bg-'s EU Aim Rolls mod// ========================================local XComGameState LastGameState;local bool isRunningOverwatch;local XComGameStateContext_Ability LastAbilityContext; - edit in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 576
// ========================================// From -bg-'s EU Aim Rolls mod// ========================================// Check if it's overwatchif (default.OVERWATCH_ABILITIES.Find(kAbility.GetMyTemplateName()) != INDEX_NONE){// Check if target is moving// Is interrupt state, so using same game stateLastGameState = History.GetGameStateFromHistory(History.GetCurrentHistoryIndex());LastAbilityContext = XComGameStateContext_Ability(LastGameState.GetContext());if (LastAbilityContext != none)if (default.MOVEMENT_ABILITY.Find(LastAbilityContext.InputContext.AbilityTemplateName) != INDEX_NONE)isRunningOverwatch = true;} - edit in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 695
`log("TargetState.CanTakeCover():"@TargetState.CanTakeCover()@", isRunningOverwatch:"@isRunningOverwatch, true, 'XCom_HitRolls'); - replacement in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 699
if (TargetState.CanTakeCover())if (TargetState.CanTakeCover()// ========================================// From -bg-'s EU Aim Rolls mod// ========================================&& (!OVERWATCH_BYPASS_COVER || !isRunningOverwatch)) - replacement in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 769
if (default.AllowFarCoverToGiveSomeCoverProtection || default.GiveHitChanceZeroWhenTargetableEnemiesAreInsteadNotTrulyInLineOfSight)if ((default.AllowFarCoverToGiveSomeCoverProtection || default.GiveHitChanceZeroWhenTargetableEnemiesAreInsteadNotTrulyInLineOfSight)// ========================================// From -bg-'s EU Aim Rolls mod// ========================================&& (!OVERWATCH_BYPASS_COVER || !isRunningOverwatch)) - edit in RWRealisticAimingAnglesHL/Config/XComRWRealisticAimingAnglesHL.ini at line 79[11.11766]
; ========================================; From -bg-'s EU Aim Rolls mod; ========================================; ===Overwatch ignore cover functionality=== (You may add OVERWATCH_ABILITY and MOVEMENT_ABILITY in your own mods to make them have an effect here)+OVERWATCH_BYPASS_COVER=false ; Set to true to cause overwatch shots to ignore cover; Note OVERWATCH_ABILITIES are the abilities that is used to fire the shot and damage, not the ability to prime the overwatch.+OVERWATCH_ABILITIES=OverwatchShot+OVERWATCH_ABILITIES=SuppressionShot+OVERWATCH_ABILITIES=LongWatchShot+OVERWATCH_ABILITIES=KillZoneShot+OVERWATCH_ABILITIES=PistolOverwatchShot; Movement abilities are names of abilities that will cause overwatches to ignore cover if said ability is used to trigger overwatch+MOVEMENT_ABILITY=StandardMove+MOVEMENT_ABILITY=StunLance ; StunLance is added because the whole movement part also count as this ability.+MOVEMENT_ABILITY=SwordSlice+MOVEMENT_ABILITY=SKULLJACKAbility+MOVEMENT_ABILITY=SKULLMINEAbility; ======= WOTC NEW SKILLS ========+MOVEMENT_ABILITY=Rend+MOVEMENT_ABILITY=ArcWave+MOVEMENT_ABILITY=ChosenKidnapMove+MOVEMENT_ABILITY=ChosenExtractKnowledgeMove+MOVEMENT_ABILITY=PartingSilk+MOVEMENT_ABILITY=SpectralStunLance+MOVEMENT_ABILITY=Shadowbind+MOVEMENT_ABILITY=ShadowbindM2+MOVEMENT_ABILITY=ShadowbindMP