Author Topic: [ARMOR] Stealth Suit - armor that makes you harder to hit  (Read 28153 times)

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #30 on: April 25, 2015, 12:35:55 am »
Any chance of making this armor a bit more resilent as 20 all around won't survive a lot of the weapons. However I must say this suit is cool as I have my scouts using them in my current game of redux. One more thing I was wondering was if u leave ur troop blocking a door and the alien doesn't c u will the AI start firing blindly @ what is blocking its way thru the door or worse grenade the area?

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #31 on: April 25, 2015, 04:24:01 am »
@Harald_Gray: My apologies. I have underestimated your mod. It is a shame that your finding did not get the attention it deserved.

@SIMON: No. The AI is not coded to fire at obstacles, nor to blow up terrain. It targets soldiers and civilians and if it cannot see one, it will not fire.

That being said, the aliens remember your troopers for several turns and will know their exact position, so maybe it is possible that an alien could chuck a grenade at one of your invisible soldier because it remembers it, knows it's there, but can't fire at it.

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #32 on: April 26, 2015, 12:05:10 am »
@Harald_Gray: My apologies. I have underestimated your mod. It is a shame that your finding did not get the attention it deserved.

No harm done :-)

BTW, imagine my face the first time I've tested this with loftemps 0. My plan was to test whether the alien would stay vulnerable to explosive rounds. I was thinking maybe I could call this a deflector field to explain why some alien has to be killed by HE fire while bullets and beams seemingly pass through him. Turned out he was *invisible* and I had to aim my shots by observing where he fired from. I could drive a tank a meter from him in broad daylight and he'd *stay* invisible because loftemps 0 meant there was no part of him the code would consider visible.

What was even funnier was giving loftemps 0 to my own soldiers. This time it was the aliens who were unable to see their enemies. I was able to walk right next to an alien and the AI would ignore me. However, I saw no sensible application for either of these two extremes, as invisible aliens are too hardcore and invisible operatives too munchkiny to my taste.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
No, that stealthy mechtoid was not just graphical. I've run into the same kind of problems this design has, namely that using too empty loftemps leads to the unit becoming invisible and untargetable. So I gave that stealthsuit loftemp 001, the smallest possible one that remains reasonably targetable. It made him slightly harder to hit but not that overpowered.

Loftemp 001 really does nothing, I haven't noticed any real drop in enemy accuracy between 005 and 001 despite quite heavy testing. Makes it easier to fire 'through' your soldier with your own units though. loftemp #85 remains my favorite although it is quite hardcore, not to be abused too much.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #34 on: April 27, 2015, 10:27:05 am »
using loftemp 85 is a really bad idea, from an engine perspective. this number not only represents the loftemp index but ALSO the radius width of the unit in voxel space. this number should not go above 3 or 4. using 85 will bug out a lot of the calculations. seriously i cannot recommend anyone do this.

note: this does not apply to 2x2 units, they have special handling.
« Last Edit: April 27, 2015, 05:18:24 pm by Warboy1982 »

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #35 on: April 27, 2015, 04:56:45 pm »
using loftemp 85 is a really bad idea, from an engine perspective. this number not only represents the loftemp index but ALSO the radius width of the unit in voxel space. this number should not go above 3 or 4. using 85 will bug out a lot of the calculations. seriously i cannot recommend anyone do this.

Ummm... Since you know the code, at least I guess you do, could you let us know whether changing a unit's loftemps makes it easier/harder to hit?

I never had the patience to reliably test hit percentages so I've *assumed* that my mod would make the stealthsuit less visible and harder to hit. It seemed logical, based on what I read about hit calculations, but now that Dioxine claims it has no effect I'm a bit torn about this. Can you enlighten us?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #36 on: April 27, 2015, 05:13:39 pm »
short answer: sorta.

long answer:

a lower number makes them "thinner" so to speak. so yes, they present a smaller target, much like a crouching unit, making it harder to spot or target them in the first place. making a unit harder to hit is a sort of a misnomer. when taking a shot, a unit targets a voxel that they *can* hit, and it's more about how much the bullet deviates from there. a "hit" will deviate less and a "miss" will deviate more. the greater the distance the more appreciable the effect. a thinner unit requires less deviation for the bullet to miss than a thicker one would, just as a shorter (or crouching) unit does as compared to one standing tall. it does technically make them harder to hit in this regard, but it's by no means any guarantee, a really good shot will still hit you (and the aliens are really good shots).
« Last Edit: April 27, 2015, 05:25:00 pm by Warboy1982 »

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #37 on: April 27, 2015, 09:11:11 pm »
Thank you for the clarification. I think that none of us considered thinner units safe, this was about hit probability. My understanding of the algorithm was that when a unit fires, the game rolls pseudorandom numbers based on skill and weapon accuracy and these numbers (which can also be zero) determine the angle and direction relative to aimpoint. So a good shot hits the place it was aimed at and an exceptionaly bad one goes wildly off the target. And since this is based on angles, targets at a distance are easier to miss.

So the idea is that a thinner unit is harder to hit, the probability is say 20% instead of 30% for a standard one. Which is why Dioxine's results confused me and I'm glad to know that the thin units (alien, in the case of my mod) are indeed harder to hit.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #38 on: April 27, 2015, 09:25:38 pm »
I'd rather say, you'll get, like, 29% or so instead of 30%, from what I've seen, that's why I said it does nothing (even if technically it does something - certainly helps hiding behind objects). Although this is based on my observations only, which might be faulty.

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #39 on: April 27, 2015, 09:42:23 pm »
I'd rather say, you'll get, like, 29% or so instead of 30%, from what I've seen, that's why I said it does nothing (even if technically it does something - certainly helps hiding behind objects). Although this is based on my observations only, which might be faulty.

I'm not disproving your claims. Like I said, I've never had the patience to test this, because reloading a game several hundred times and writing down the results seemed too time consuming. And I saw no other method of testing this.

Which is why I'm bothering Warboy about this, as simple logic (which might not apply here) tells me that the difference in width should lead to non-negligible difference in hit probabilities. Sure, there would be no dramatic drop in hit ratios. The difference between 20% and 30% means the shooter needs, on average, 5 shots instead of 3.33 and we're all used to even longer streaks odf misses. I was *expecting* that the effect would be subtle. But in the long run, thin units should be harder to hit and I would like to know whether we're dealing with the 30%->20% scenario or the 30%->29% one.

Edit: I should add that I'm mostly talking about targets at longer ranges, as good shooters with good weapons will fire the majority of their shots within such a narrow angle that they'll hit even thin targets with high probability. But at say 10+ squares, the spread should be wide enough to cause said non-negligible difference.
« Last Edit: April 27, 2015, 09:56:37 pm by Harald_Gray »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #40 on: April 28, 2015, 02:18:44 am »
i couldn't give you a fixed % as there are too many factors to take into account, range being foremost among them.

very long answer:


assume the shooter to be on the left, the intended shot to be along the adjacent, and the actual shot trajectory to be along the hypotenuse.

in this example, you can see the difference that it makes, and you can see that in this case, at these ranges, the shot will miss both the small and the large target. however:



same shot deviation, same enemy sizes, transposed distances. the larger unit would be hit, and the smaller unit would be missed by a large margin.



again, same setup as before, but in this case, it would hit both targets because they are closer, so the deviation has less of an effect.

note that all these examples are given in 2d form as viewed from directly above, with the deviation taking place purely in the lateral plane. shots also deviate vertically.

any given shot can deviate by any given angle, and the smaller or further away the target the greater the chance this deviation will cause the shot to miss. but the chance to deviate, and the angle of deviation can be thought of in terms of a constant when comparing two shots. in this respect, it is no harder to score a shot that deviates very little against a thin target than it is a thick one. remember that there are multiple calculations taking place, the "to hit" determination effectively dictates the multiplier for the amount of POSSIBLE deviation, which is fairly random. if the shot is good, it's good. however if the shot DOES deviate, the angle of deviation required for a shot to miss a thinner unit is shallower.
« Last Edit: April 28, 2015, 06:02:46 am by Warboy1982 »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #41 on: April 28, 2015, 07:25:16 am »
i have thoroughly tested this mod and i can tell you this

1. loftemp 0 makes units completely invisible meaning AI doesn't react at all . is like you're in a parallel dimension. is no fun.

2. any loftemps that are not mirrored up down left right in other words not same from all sides will have odd and unpredictable effects such as the unit randomly appears and disappears or visible but untargetable etc

3. any loftemps that dont have a centered side will also cause problems

4. any non 0 loftemp will still make your guy targetable by misfire ..so your dude can still die.

5. 85 for me was the best . the other ones had unpredictable results.

6. if any alien spotted you ONCE all aliens spot you and they remember your last location and will try to shoot you from a position that you can be shot at. 85 is the only loftemp that does not confuse AI shooting calculations.  if an enemy unit has enough TU left and spotted you and still remembers you then you will die cause they just go and shoot you at an angle.

once spotted they will know you are there. that's why i like 85. makes easy and predictable. don't come at an angle ..only up down left right. etc


Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #42 on: April 28, 2015, 10:35:14 am »
i couldn't give you a fixed % as there are too many factors to take into account, range being foremost among them.

very long answer:

Is it too rude to tell you that those graphics were unnecessary because I do understand basic geometry?

I was not asking for exact %. You could say I was asking whether the shot deviation angles were evenly distributed between zero and maximum for a given situation or whether the function in non-linear.

Even distribution should mean that once the hit probability against a normal-sized target on flat and empty terrain drops to say 40%, a target half as wide has roughly 20% hit probality. So this would mean that lower loftemps provide non-negligible drop in hit probabilities, say something like the 30%->20% scenario.

If the angle distribution is uneven and more shots have minimal deviation (say one fifth of the shots in a given setup have zero deviation and the rest are evenly distributed between zero and maximum) then lower loftemps are less helpful. Should say 20% of shots fly into the aimpoint voxel, and the rest with a random deviation, we would be getting closer to Dioxine's 30%->29% scenario.

And I guess there's no need to deal with the fact that this is about voxel space instead of an abstract continuous one. The differences in results should not matter much.

Have I explained my question? Or am I still being too incomprehensible?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #43 on: April 28, 2015, 03:46:10 pm »
sure, YOU understand geometry, but there's no harm breaking it down for anyone else researching into the topic.

the "to hit" determination effectively dictates the multiplier for the amount of POSSIBLE deviation, which is fairly random.

there's probably no such thing as "0 deviation" (or at least, it's like... unicorn rare). the only factors influencing the "to hit" determination are your firing accuracy and that of the weapon you are holding. if the action menu says 80% acc, you have about 80% chance to hit. if you are determined to have hit, your shot will deviate by somewhere between let's say -5 and 5 degrees for the sake of argument (this includes decimals). if you are determined to have missed, the shot will deviate by somewhere between -40 and 40 degrees (or something). so it's possible for a "hit" to miss, and a "miss" to hit. at a range of say, 10, a thinner unit would stand less chance of being hit, statistically speaking. we're talking like.. 3 degrees of deviation either side being the "margin" between what misses a larger unit compared to a thin one, or roughly 7.5% of our "missed shot" field. let's assume these margins lie between 4 and 7 and -4 to -7 degrees.

so in this case, there's an 80% chance of having a 20% chance to miss, and a 20% chance of having a 90% chance to miss, or for a larger unit, an 80% chance of having 0% chance and 20% to have a 82.5% chance of missing.

bear in mind that these numbers are all purely theoretical to explain the mechanics, real world results may vary.

Have I explained my answer? Or am I still being too incomprehensible?
« Last Edit: April 28, 2015, 04:45:04 pm by Warboy1982 »

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: [ARMOR] Stealth Suit - armor that makes you harder to hit
« Reply #44 on: April 28, 2015, 05:27:33 pm »
Have I explained my answer? Or am I still being too incomprehensible?

Thank you, that was perfectly understandable and thorough enough. Sorry for that jab about geometry, I was feeling like I've failed to make it obvious I do understand at least some of this, even if I've never read the actual code. Soooo....

If I do understand this correctly, this should lead to the following:

At close ranges, the effect of thinner loftemps will be less pronounced. This is caused by several factors. The unit's height stays the same. 5 degrees at four metres is only about 0.4 m from the aimpoint and that is about the maximum possible deviation for a "hit" so many of those will hit even the thinner targets. "Misses" can go so wildly off the target and are so frequent, at least in early and mid game, that this random noise drowns the whole effect. Use of burst fire at close ranges also drowns this effect, as one-hit kills are frequent and most players are unlikely to perceive how often it was the second or third shot that hit because the TUs are wasted anyway.

At longer ranges, the effect of thinner units should be measurable but not overwhelming. "Misses"are likely to miss both thin and normal units and "hits" are less likely to actually hit the thinner units. E.g. a shooter with 60% displayed accuracy has a 25% chance of hitting a normal unit and, roughly speaking, 13% chance against one that's half normal width. And low hit rates at long ranges are perceived as common and their relative rarity leads to both psychological and statistical consequences.

Yes, I do like the results. Stealth suits based on loftemps 1 or 2 offer reasonable protection at longer ranges and very limited help at close ranges, which makes sense. Suits based on loftemps 85 offer far better protection but lead to various glitches. Some other loftemps, like 78, 65 or 96, might also lead to both interesting results and glitches.