Jump to content

Still no way to improve cover?


PSPSoldier534

Recommended Posts

I haven't really been following the modding advancements lately, and if someone can bring me up to speed, is there still no way to affect the constants that determine things like defense from cover? I know they've made their version of the engine particularly unfriendly to modding and the .exe only reads a precooked ini file inside it, and that the upk files are as of yet undecoded. Am I right so far?
Link to comment
Share on other sites

Unfortunately you are right. I have been searching for it for more than 6 hours without luck. May be written in C language somewhere.
Link to comment
Share on other sites

I also haven't been able to find it. I reached a deadend when I found a function that seems to be hardcoded. I also wasn't able to find a way to modify the number outside of that hardcoded function. Not without making "larger" changes to the code.

 

You can seach for "cover" to find a lot of results that could potentially be responsible for giving the cover bonus.

Edited by BlackAlpha
Link to comment
Share on other sites

No luck from my side so far as well... I have combed the upks for stuff like "cover", "coverbonus", "highcover" etc...

Lots of references and calls.

But the "cover" / "coverbonues" are used in expressions - like summing up / subtracting cover bonues to arrive at the final score etc.

But I have not found a place where cover is set explicitly like "CoverBonus = 40"

 

There is a function that nullifies cover (called "SetCover(0)"),

but I have not ben able to find any other call to that function thet would initialize the cover (like e.g. SetCover(40)).

I had a look at classes constructors to see if they maybe the cover is set up when constructing the objects, but no luk there either.

Link to comment
Share on other sites

No luck from my side so far as well... I have combed the upks for stuff like "cover", "coverbonus", "highcover" etc...

Lots of references and calls.

But the "cover" / "coverbonues" are used in expressions - like summing up / subtracting cover bonues to arrive at the final score etc.

But I have not found a place where cover is set explicitly like "CoverBonus = 40"

 

There is a function that nullifies cover (called "SetCover(0)"),

but I have not ben able to find any other call to that function thet would initialize the cover (like e.g. SetCover(40)).

I had a look at classes constructors to see if they maybe the cover is set up when constructing the objects, but no luk there either.

 

I have a feeling the SetCover function is boolean (you know, only 0 or 1)

 

Edit: Or maybe it isn't, but I can't really find any evidence to either it being a boolean function or just a value.

Edited by PSPSoldier534
Link to comment
Share on other sites

Hmm. I don't know much about how the Unreal Engine works, but could Cover be tied to the Objects actually placed in the game? By which I mean that the car model itself actually holds the cover information attached to it somehow.

 

They may have originally set it so that cover could have different values depending on what you were fighting behind (so maybe that planter was originally just 10% cover instead of 20%). That'd be a nightmare to change, I'd bet, but it's a possibility.

 

You'd think there'd be a nice central place for those variables but since people aren't finding one...this would be another way to do it. A clunky one, in my opinion, but still possible.

Link to comment
Share on other sites

Yes, that would be insane to change.

 

From what I've seen so far, it's tied to object's height and position, defining how character interacts with the cover (peeking and shooting animations, destruction of windows when shooting) and how much defense and hit penalty the cover gives.

 

Knowing practically nothing about Unreal engine, I am hoping, that there's somewhere defined that Defense = 20 or 40 depending on cover's height aaand Hit Chance Penalty = A or B...

 

Problem is we haven't found the place, because we don't have an access to script's source. Some functions like GetHighCoverBonus() could provide us some insight,but they are native and probably defined in C++ somewhere burried.

 

Tried looking into Commandlet class source within Core in UDK and there is cpptext section, that I don't see, when checking compiled Core.u with UE Explorer. And in that part is a function defined.

 

We are limited to byte and ini edits atm and can only change what we actually see and what doesn't change file's size. I would love to do some scripts extending classes, but it's not possible because of unability to compile scripts. And I fear we wouldn't be able to add new content without scripts.

Link to comment
Share on other sites

We want to change how much defense does low/high cover give. Currently low cover = +20 defense and high cover = +40 defense.

 

Edit: And where are hit penalties set as well.

 

There is GetShotSummary function in XGAbility_Targeted, that manages shot summary info. Looking at it I can say Low Cover is 20. But don't know where it is defined. Like "if something then set coverBonus = 20".

if(coverBonus != 0 && (!m_bHasFlank))
{
if(coverBonus == XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20)
{
	kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyLowCover);
}
else
{
	kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyHighCover);
}
kInfo.arrHitPenaltyValues.AddItem(-coverBonus);
if(kTarget.IsAffectedByAbility(38))
{
	kInfo.arrHitPenaltyStrings.AddItem(m_strHunker);
	kInfo.arrHitPenaltyValues.AddItem(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.2 - 1 * -coverBonus);
}
}

Edited by Drakous79
Link to comment
Share on other sites

There is SW_COVER_INCREASE=1.5f in DefaultGameCore.

 

It looks like one of planned Second Wave options was to increase cover.

But there is no such option in SW menu.

 

Can you find this constant in any functions?

Maybe all we have to do is remove bypasses on this option.

Edited by Just6669
Link to comment
Share on other sites

  • Recently Browsing   0 members

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