Jump to content

Open Doors Give Cover?


Recommended Posts

The following shot is from 9 squares away, kneeling, with no obstructions between, excepting an open UFO door. The shot is fired straight (no deviation angle).

So why does he get cover for being in an open doorway?

Of course, since there's a guy standing next to the door way, the laser blast magically goes and hits my soldier. ::eyeroll::

[2196] Target: level = 0, pos = (46, 23)[2196] Unmodified accuracy calculation:[2196]   range penalty (1.000000) = 1 - ( max(0, dist. to target (9.000000) - weapon range (10)) / weapon range (10) )[b][2196]   shoot accuracy from props: 0.500000[/b][2196]   shoot accuracy (0.500000) = shoot accuracy (0.500000) - max(0, weapon recoil (0) / 100 - strength (0.500000) )[2196]   unmodified accuracy (15.000000) = shoot accuracy (0.500000) * range penalty (1.000000) * weapon accuracy (30.000000)[2196] Generate random value from 1 to 100: rnd = 27[2196] Random value (27) > unmodified accuracy (15.000000) => offset target pos[2196] New target pos = (47, 23)[2196] Generate new random value from 1 to unmodified accuracy (15): rnd = 14[2196] Tile damage (41.500000) = weapon damage (50) * random bonus/penalty (0.830000) * (weapon range (10) / max(dist. to target (9.055386), weapon range (10) )[2196] Terrain bullet score:[2196]   terrain bullet score = 1.000000[2196] modified accuracy (15.000000) = unmodified accuracy (15.000000) * terrain bullet score (1.000000)[2196] Random value (14) <= modified accuracy (15.000000) => no check for terrain intersection[2196] master accuracy (15.000000) = modified accuracy (15.000000) (no unit on target tile or it's a vehicle)[2196] >>> End calc bullet trajectory <<<[2196] Pending animation[2196] armour damage reduction (30) = max(0, armour resistance (30) - armour mitigation (0))[2196] Damage (12) = max(0, damage (42) - armourValue (30))[2196] Unit HP (56) = max( -20, unit HP (68) - damage (12) )[2196] Stun damage (0) = max(0, stun damage (0) - armourValue (30)[2196] Unit stun HP (68) = max( 0, unit stun HP (68) - damage (0) )[2196] Pending animation

Can we get a reduction in the deviation angle for precision weapons, maybe? You know, things that aren't fired full auto?

Edited by Ishantil
Link to comment
Share on other sites

The reason the angle for missed shots is so wide is because of the way the engine calculates hits. If the shot passes through a square with an actor (Xenonaut, alien, whatever) then it hits said actor. Actors have 100% hit change, or something like that. Thus, the shot can't simply pass by their ear, graphically. If it's a miss, it has to either hit a tile in front of them, go completely over their heads, or not pass through their tile at all.

Rather lame, I know.

Link to comment
Share on other sites

Not necessarily. For the shots to hit the actors when they should every time, they need to have a 100% hit chance or something like that. Otherwise shots that are supposed to hit could actually go through the actors, even if they were spot on.

So, engine limitation, yes. Flaw, sure, I'd say that.

Link to comment
Share on other sites

It's to do with stopping chances. If a tile has a prop in it, the chance for the prop to stop the projectile is calculated.

Non-target soliders are treated as props.

Non-target soliders which are standing are treated as props with a 100% stopping chance.

Now, if the solider was kneeling, that would drop to a 60% stopping chance. Bit of cold comfort there, I'm afraid.

Link to comment
Share on other sites

Basically I guess my question is this: why is it really hard to hit what you are aiming at, but really easy to hit what you aren't aiming at?

Example: if I have a three guys lined up and take a shot at the guy in the middle, I have a much better chance of hitting the two guys next to him. Because the game treats the guys next to him has automatic hits. I don't know how many times I've been hit by enemy "blind fire" auto shots.

Link to comment
Share on other sites

I'm not sure what the solution to this would be. If we have a lot of deviation, people complain it looks unrealistic. However, if you don't have much deviation then the bullets are naturally going to hit the tiles on either side of the target fairly frequently, because they won't have enough deviation to miss by much.

If you put a check on the bullets not hitting bystanders, you end up with some strange logic - presumably you'd then also be able to shoot through other units to hit your preferred target too? Our current method just applies the same logic consistently to all actors.

I guess the biggest real-life difference is that you don't have a 100% chance to hit a standing person in a 1.6m x 1.6m area if you fire a bullet into it. But it's an important underlying assumption for the game, I imagine changing it would cause problems with a number of systems.

Link to comment
Share on other sites

I'm not sure what the solution to this would be. If we have a lot of deviation, people complain it looks unrealistic. However, if you don't have much deviation then the bullets are naturally going to hit the tiles on either side of the target fairly frequently, because they won't have enough deviation to miss by much.

If you put a check on the bullets not hitting bystanders, you end up with some strange logic - presumably you'd then also be able to shoot through other units to hit your preferred target too? Our current method just applies the same logic consistently to all actors.

I guess the biggest real-life difference is that you don't have a 100% chance to hit a standing person in a 1.6m x 1.6m area if you fire a bullet into it. But it's an important underlying assumption for the game, I imagine changing it would cause problems with a number of systems.

Hi, Chris. I really don't think people would have a problem with some shots simply passing through a tile and continuing on down the line. Those are true misses. It might look a little weird to a noobie, but once they understood what was going on I do believe it would be more acceptable than large amounts of deviation at point blank range. I'm kind of tired of guys to left and right of my "expert soldiers" getting shot in the back unless they are 90 degrees or more to the side. Also, it still leaves the possibly of hitting something behind the original target. The combat viewpoint is far enough back/up from the actors that a pass through shot could be interpeted as a miss by most people. My suggestion is to try it in an experimental release and see what the players think. Edited by StellarRat
Link to comment
Share on other sites

Perhaps I need to understand better:

1. If a shot misses the square it's aimed at, a random deviation angle is selected

2. If a shot hits a square there is a 100% chance it hits a prop in that square

Questions:

1. Does cover block shots, provide a to-hit penalty, or both?

2. What effect does kneeling in an open square have on to-hit and pass through?

3. Would having the rolls being visible in the game be viable?

4. Is kneeling behind half-height cover the same as standing behind full height cover?

5. Since we only have squares, how do diagonals work with cover?

I have two solutions, but please treat them as humble suggestions:

1. Perhaps a "bystander" roll could be made based on how big the prop is and reflexes You could even put "Dodges!" in green when a shot misses to inside a square to let the player know what happened. This would make it pretty easy to hit an Andron accidentally, but much more difficult to hit a light drone

2. Introduce a "glancing" blow, where there is a high chance of a wild shot doing half or quarter damage.

Should I put this formally in the suggestions forum, you think?

Link to comment
Share on other sites

There's probably all kinds of mistakes here, but my understanding of things (based on playing and the wiki):

1) Cover blocks shots, but it is applied kind of like a to-hit penalty (I think). Meaning, for example, that if you have a base to-hit of 50%, and there is a 50% cover prop interceding the shot, your chance to hit is reduced to 25% (0.5 * 0.5 = 0.25) but if the attack roll is 26-50, the shot hits the prop (rather than missing completely and scattering). So kind of both?

2) Don't know what effect kneeling has in terms of the accuracy of a shooter, although it *increases* the likelihood of hitting interceding props meaning that if you don't have clear line of sight you'll usually end up with a worse chance to hit than if you're standing. In terms of a kneeling target, I think such targets have a 60% stopping value (which, I guess, means shots have a *0.6 modifier on them against kneeling targets).

3) Would there be any benefit to that beyond debugging? (Or was that the point?).

4) Don't think so, but don't know.

5) If the shot passes over the cover prop, it provides cover. Otherwise it doesn't. If you have enough of an angle, you'll miss the cover, but it's all or nothing. For what it's worth, there's never a cover bonus for being around a corner - either there's line of sight (and thus a straight shot) or there's not (therefore no shot). This took some getting used to; I was a bit too used to XCOM: EU's cover system at first and some poor Xenonauts paid the price.

Link to comment
Share on other sites

Thanks for answering, kabill. This helps me understand better. I'll take a look around that wiki you mentioned. That should probably answer more of my questions.
The Wiki hasn't been updated for a long time. I know for sure the gun fire accuracy stuff is wrong. Take everything with a grain of salt.
Link to comment
Share on other sites

The Wiki hasn't been updated for a long time. I know for sure the gun fire accuracy stuff is wrong. Take everything with a grain of salt.

Yeah, sorry, should have made that clearer. For what it's worth, the stuff to do with cover seems right to me based on play experience, but I've never made an effort to check the numbers.

Link to comment
Share on other sites

My concern with reducing the 100% hit chance for actors is that I'd be very surprised if it didn't underpin a whole bunch of other systems in the game, so might cause unexpected results. Such as not having a 100% chance of taking damage from an explosion or stepping into fire, and probably weirder stuff still.

Link to comment
Share on other sites

But you could introduce a mechanic that happens after the hit, I think, right?
That's true. You could do all the evaluation in code than add a routine that simply puts the damage "back" after the fact i.e. save a copy of actor object before the hit, then restore it after the hit. Normally, that wouldn't be the best coding practice, but it certainly would work if you worried messing up something else. Even if the guy whinces in pain it would just be a "flesh wound". The only thing you'd have to worry is a death animation that shouldn't have happened...although if the guy fell down and got back up that might look pretty cool! Edited by StellarRat
Link to comment
Share on other sites

Well, you could modify the damage code for a check to see if it was primary target, if secondary target, it adds a roll to see if the prop gets hit or not. There should be some options here, but I understand it's a modification to the existing targeting/damage engine, so it's a big deal and could have unintended consequences.

Link to comment
Share on other sites

Personally, this doesn't seem to be that large of a flaw (if I'm understanding the issue properly). Aiming past your own soldiers is risky, shooting just past them even more so. I like how it is now. Only thing I'd like to see is the ability to have soldiers be allowed to shoot over kneeling soldiers that are adjacent to them. Otherwise, I think it's fair how the game has it. Pointing a gun and firing in the direction of friendlies needs to be a risky choice.

Link to comment
Share on other sites

Personally, this doesn't seem to be that large of a flaw (if I'm understanding the issue properly). Aiming past your own soldiers is risky, shooting just past them even more so. I like how it is now. Only thing I'd like to see is the ability to have soldiers be allowed to shoot over kneeling soldiers that are adjacent to them. Otherwise, I think it's fair how the game has it. Pointing a gun and firing in the direction of friendlies needs to be a risky choice.
Right, but we're talking about instances where you hit someone 45 degrees to the side of your shot. Yes, that can happen because the game is forcing a miss at something that right in front of you.
Link to comment
Share on other sites

Exactly, if you could miss through squares, you wouldn't have as much friendly fire and it would balance out. The problem is that chnage would screw up the rest of the game :(

So I was hoping to model that by making "non-direct hits" have a good chance to either miss, or do less damage. I get hit way to often by aliens shooting at someone and missing and accidentally hitting someone nearby.

Link to comment
Share on other sites

Exactly, if you could miss through squares, you wouldn't have as much friendly fire and it would balance out. The problem is that chnage would screw up the rest of the game :(

So I was hoping to model that by making "non-direct hits" have a good chance to either miss, or do less damage. I get hit way to often by aliens shooting at someone and missing and accidentally hitting someone nearby.

That's exactly what I proposed MONTHS ago. Misses simply pass through the target tile and have a chance to hit something behind it. Much more realistic than having your guy shoot his buddy standing to the side because somehow he has to miss to the left or right by a full tile.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...