Jump to content

Cover Defense values(again)


Thunder_GR

Recommended Posts

I have searched everywhere and I read that, what someone would think to be easy to alter, the cover defense value, is impossible to alter!?!. After all the amazing things the modders on this site have accomplished, expanding the game in an unthought of extend, it really makes me curious as to why is impossible to alter the cover defense value?

Noone has found where it is defined?

The change would break the AI?

It is impossible to change because at the place it is located the change cannot be integrated to the game?

Something else?

 

Thank you in advance to anyone that might take the time to answer.

Great work modding such a modding-hostile game. All the hard work is appreciated!

Link to comment
Share on other sites

I just had an idea! Heavies have this perk(will to survive, IIRC) that gets them -2 damage if in cover and not flanked. Is it possible to use this mechanism to give a defense value increase instead?? This would, effectively, alter the cover base value without the need to find where these values are defined. In conjunction with the "low profile" perk mechanism, it may even be possible to give a different defense increase in half-cover than in full cover.

I have no idea if it is possible but I thought it to be promising, in theory...

Link to comment
Share on other sites

The reason that it is impossible to edit the defense boost from cover is a result of the cooking process they used. When it cooked, it replaced all references to constants with the value of the constant, and thus, the cover bonuses became locked in native functions that we can't access. It is unlikely that they intended for us to be modding it at all, given how many things work. Beyond that, I don't think they had any intent on making cover harder to mod than any other variable.

 

As for the second thing, I was under the impression that there had been something done to that extent already, but I'm too lazy to look it up. It'd probably work, most of the perk data is easy to change.

Link to comment
Share on other sites

The reason that it is impossible to edit the defense boost from cover is a result of the cooking process they used. When it cooked, it replaced all references to constants with the value of the constant, and thus, the cover bonuses became locked in native functions that we can't access. It is unlikely that they intended for us to be modding it at all, given how many things work. Beyond that, I don't think they had any intent on making cover harder to mod than any other variable.

 

As for the second thing, I was under the impression that there had been something done to that extent already, but I'm too lazy to look it up. It'd probably work, most of the perk data is easy to change.

 

I see, thank you for specifying the reason.

About the perks, if it is possible to create a new perk that would be given to all soldiers and aliens which would increase their defense when behind cover, it would, actually, increase the cover's value and make it really useful for everyone. It would enhance the tactical game greatly, from the very start to the end game.

My searches for such a perk and how to implement it did not show up anything. Maybe I am searching the wrong way? Or, maybe, noone has, actually, done it yet?

Edited by Thunder_GR
Link to comment
Share on other sites

Unfortunately the to-hit values are also difficult to mod, as most of the to-hit calculations are also done "under the hood" in the native code.

 

So far the only released mod that affects to-hit values is the Squadsight aim penalty, which I put together in a somewhat hacked up way. The game has a function called "AdjustToHit" which is used to apply the various developer console as well as Easy/Normal difficulty "cheats" that vanilla provides. These to-hit values do not show up in the to-hit UI (in vanilla), nor does the AI use or know about this, as both of those functions use the more core to-hit function defined in the native code.

 

So, one significant issue with making more sweeping changes to to-hit values (including cover) in this manner is that it will alter the AI behavior, very likely making it make poor decisions.

 

However, there is a hopeful light at the end of the tunnel here, I think. It's been stated by the devs that more variables are being moved to the config files in Enemy Within. I very strongly suspect that all of these "cooked in" constant declarations are getting converted over to config variables. This likely has very little to do with modding, but if any of these values needed to be changed for balance reasons while 2k/Firaxis are testing the game, then the entire game has to be rebuilt (including the upks AND executable), which is a much bigger deal than just adjusting some values in a config file.

 

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

 

Ultimately, I personally think that making it less likely to hit a target in cover isn't the right design decision. In the GW line of games (which a lot of this iteration of XCOM was inspired by), there are two varieties of cover : hard cover and soft cover. Soft cover reduces the chances to hit, but hard cover also provides an additional armor save -- a chance to reduce the damage from the shot entirely.

 

Things like smoke grenades or bushes are prime examples of soft cover. They obscure the target making it harder to target as accurately, but don't provide any protection if the shot happens to be at the correct point.

 

Walls, concrete barriers and the like are hard cover. They often also obscure the target, but more importantly also can physically block the shot from hitting even if it is aimed at a point which would normally hit the target.

 

The best way I can think of to implement this is via something very similar to the existing Will To Survive mechanic. However, providing a fixed amount of damage reduction makes the perk very useful against low damage weapons (e.g. plasma pistol) and rather useless against high damage weapons (e.g. Heavy Plasma). My concept here would be for cover to provide a %-based amount of damage reduction, with full cover providing a larger bonus than low cover. Maybe something on the order of a 50% damage reduction for full and a 25% damage reduction for low cover.

 

This would be in addition to the to-hit malus for cover, but couldn't be overcome with high to-hit bonuses (which ultimately can render cover essentially obsolete). Attempting to chip away at a target in full cover would still be possible, but much less effective (for both the aliens and humans).

 

The big issue that I see would be in figuring out how to adjust the AI to take into account such cover-based damage reduction.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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