Jump to content

Squadsight Aim Penalties


Amineri

Recommended Posts

The functions that actually build the arrays of visible and squadsight visible targets are available to us in the upk. However, the function's call-points are in the native code.


To be honest, where I put my aim penalties, they may not apply to overwatch shots (because they are not player-activated "XGAbility_Targeted" type shots). I have no idea how to test this.

 

Something more for me to ponder. I'll update the wiki page with overwatch thing as a "possible issue"

Link to comment
Share on other sites

Occurred to me there's a bug in squadsight you might be able to fix within all these changes. Snipers on overwatch are able to fire their pistols at squad-sighted targets (beyond normal range) that enter their field of view. This lets you move your sniper, go on overwatch with a pistol, and take shots across the map. Squadsight shots should be limited to sniper rifles at all times -- Did you see a place where that could be fixed?

It seems the reaction range is set according to the ini setting iReactionRange, maybe changing the overwatch ability in xgabilityTree.buildAbilities, setting so the overwatch ability used the weapon range that could be limited. Not surein this case if that ini setting would act as a min range, max range or would be ignored.

Link to comment
Share on other sites

Ah, good point! I'll give the ini setting change a try for starters -- iReactionRange is -1 on all the pistols, setting it to 27 or less should force the sniper to hold fire until the alien is actually in view.

 

Hopefully we can figure out if the new squadsight code is in effect for overwatch.

Link to comment
Share on other sites

As for gameplay effects i like having shorter reaction range than shot distance, so there's a small gap of maybe 2 tile where you can make a safe approach... it's interesting how it slows things down, caue the same is true for aliens and your reaction fire range.
Link to comment
Share on other sites

  • 3 weeks later...

Have a bug report from a Long War player. Any ideas why this might be happening?

 

1) The nerfs to squadsight are pretty major, but currently I can't flank using squadsight and I'm not sure that's intended. The game is displaying aliens touching any cover as behind cover relative to my squadsight sniper, even if the cover is behind them and I'm in front of them. So imagine a three block east-west running wall, the alien is on the south side of that wall in the center tile, and I'm south of the alien. There is nothing between the alien and my sniper, other troopers get flank shots but the alien is being given the cover bonus (and no crit bonus) vs the squadsight sniper.

Link to comment
Share on other sites

This happens all the time with Squadsight in the vanilla game. I've seen multiple reports of it on the 2k forums, and have seen it in my games as well.

 

The game just doesn't check for flanking when using squadsight. If the target is next to cover, then it gets the cover bonus regardless of the positioning of the Sniper. The squadsight penalty hasn't changed this, but might have made it more apparent because the Sniper's aim isn't so high that the cover penalty isn't negligible.

 

All of the cover calculations appear to be buried down in the native code -- at least I haven't been able to find anything in my searches. This means that the "regular" flanking bug, this Squadsight flanking issue, as well as changing cover bonus values, and the SHIV-related cover issues are all un-moddable at this time.

 

However, if the target is exposed then everything works properly with Squadsight.

Edited by Amineri
Link to comment
Share on other sites

  • 3 weeks later...

I poked around a bit more at this squadsight flanking issue to see if it was something that could be fixable.

 

I've come to the conclusion that isn't fixable via upk edits, as the relevant flanking code is a native function.

 

XGUnit defines the following functions:

  • AddAllTargets
  • AddEnemiesInRangeByWeapon
  • AddTargetsInSight
  • AddTargetsInSquadsight
These are all only called from the native code via a function defined in XGUnitNativeBase.
The game maintains the var privatewrite array<XGUnit> m_arrFlankingUnits in XGUnitNativeBase, but it is set in the native code.
Ultimately the code that checks for flanking must be drawing only from units that are in sight, and not considering units that are in squadsight. The most likely array is the XGUnitNativeBase array : m_arrEnemiesSeenBy.
However, it's also possible that the flanking code calls the native function XGUnitNativeBase.CallGetTargetsInRange. This function has as one of its parameters int iRangeType which is of type:
enum EAbilityRange
0   eRange_None,
1   eRange_Weapon,
2   eRange_Sight,
3   eRange_SquadSight,
4   eRange_Loot,
5   eRange_Unlimited

If this function is used to generate the list of enemies to test flanking conditions against, and if it can be found in the native code, then changing the iRangeType parameter from 2 (eRange_Sight) to 3 (eRange_Squadsight) would allow units with squadsight to flank.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...