Yzaxtol Posted April 26, 2013 Share Posted April 26, 2013 (edited) 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 April 26, 2013 by Yzaxtol Link to comment Share on other sites More sharing options...
Amineri Posted April 26, 2013 Share Posted April 26, 2013 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 More sharing options...
anUser Posted April 27, 2013 Share Posted April 27, 2013 Isn't there a SW option that affects cover? Maybe there's some workable leftover code ... ¿? Link to comment Share on other sites More sharing options...
Recommended Posts