Jump to content

Has anyone figured out how to modify values for cover?


Yzaxtol

Recommended Posts

Has anyone figured out how to modify values for cover?

 

I would love to be able to change cover from a 20/40 defense, to 40/60 defense. Make flanking extremely useful and necessary

Edited by Yzaxtol
Link to comment
Share on other sites

As far as I can tell, those values are handled in the native code.

 

The native functions GetLowCoverBonus() and GetHighCoverBonus() are defined in XGTacticalGameCoreNativeBase. So, you can see what the Low and High cover bonuses are, but they can't be changed in the upk files.

 

However, the native code does keep the value m_iCurrentCoverValue (a variable in XGUnitNativeBase) up to date. This is where the ShotSummary upk code gets the current cover bonus for display purposes.

 

The only way to modify the cover values would be a workaround similar to what I did for the Squadsight hack. In XGAbility_Targeted.RollForHit, you'd have to read in the current m_iCurrentCoverValue and then adjust the RollForHit number up (or down) by the appropriate amount. This would change the actual to-hit value, but not update the to-hit value displayed.

 

Also, the AI would be making decisions on actions based on the wrong to-hit %, so AI performance would degrade a bit.

 

-------------------------------------------------

 

I really wish this could be cracked in general (finding the native code for to-hit calculations), as I'd love to make the alloy SHIV grant full cover instead of low cover. Alas I haven't found a way.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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