Jump to content

Smoke Grenades Revisited


Zombie

Recommended Posts

As of late, I have been doing a little more testing on the Smoker. In the past I always thought that aliens could succomb to stun due to smoke inhalation. However, after testing the Sectoid, Floater and Reaper (beginner skill level), they do not appear to incur stun damage due to smoke while under their own (alien) power. While under X-COM Mind Control, yes, those units will suffer stun. I guess I never really tested this fully so it came as a big surprise. If the other aliens in the game follow the same format, we may have to rewrite the strategy for stunning aliens without a Stun Rod or Small Launcher. Keep the alien standing in smoke under mind control - when it gets close to falling over unconscious, release MC and shoot it with a low power weapon. That should do the trick. No MC yet? Then it's up to the weapon itself to impart stun. :D

 

I also did some tests on those aliens in the smoke cloud to see what happens when an Incendiary round detonated on the map somewhere. No stun is applied. Kinda guessed this from the above test but I had to make sure... :)

 

- Zombie

Link to comment
Share on other sites

  • 8 months later...

Recently I was doing some more testing with the Stun Grenade. The tests I did here a while ago were either for the initial detonation (and the distance you can see through the cloud) or the size. I wanted to know how many rounds and at what distance will your soldier see an alien. After checking the distances for a few rounds, I needed to reload as I wanted to double-check my previous result. I was horrified to realize that the distance changed. I then remembered that Smoke has 3 different concentrations and is probably applied randomally when it spreads. When I checked the game files, I found that even the initial blast has a varying density of smoke. I suppose the only way around this is to edit the smoke to have either 1, 2 or 3 for the density and tally the distance. That would give a general idea on how far/short your men can see after each turn. :)

 

- Zombie

Link to comment
Share on other sites

Maybe. I just can't stand starting a new thread when there is another one covering the same subject. And seeing that I am constantly revisiting my testing scenarios, it only makes sense to remember where everything goes. :)

 

- Zombie

Link to comment
Share on other sites

The initial blast from a Smoke Grenade covers 113 tiles with smoke. The file which stores the smoke and fire information has a limit of 400 tiles total. Thus, 3 full Smoke Grenades are the max. However, a fourth will also produce a little bit of smoke assuming the file limit has not been reached yet due to other smoke or fire on the map. :)

 

Well, more testing on the Smoke Grenade for me last night. I re-tested whether an alien controlled unit will take stun when standing in a smoke cloud. Nope. Then I saw this in the X-COM Wiki:

 

The first method simply involves choking units in dense clouds of smoke. Be warned, however, that smoke is filtered by armour -- the more armour a target has, the less likely it will choke. Rank and difficulty influence armour greatly -- superhuman commanders are less likely to fall unconscious than beginner soldiers.

Not sure how armor comes into play with smoke except with X-COM's environmentally sealed Power Suit and Flying Suit. If armor does play a role, then why is an alien impervious to stun from smoke, while an X-COM controlled alien (with the same armor values) does take stun from smoke? I'll have to edit my test aliens' armor values down to 0 and check to see what happens. My theory is aliens will not take stun from smoke no matter what their armor levels are at. This boils down to that Smoke bypasses armor completely and tacks on a little bit of stun for X-COM controlled units, while an alien controlled unit is impervious due to:

  1. Inherent characteristics which cannot be modified, or
  2. A variable which hasn't been decoded yet.

Me thinks the first is likely as fire works in a similar way. More testing will solve this though... :)

 

- Zombie

Link to comment
Share on other sites

Re smokers, keep in mind that smoke clouds disperse over time and often the grenades are thrown into enclosed areas. The limit "in practise" depends on the situation and the terrain.

 

Units under alien control are immune to smoke, and will never aquire fatal wounds. How smoke affects X-Com controlled units seems to depend on the eigth bit of offset 120 in their UnitRef record.

 

Not sure how true this is for fire damage... I know you can set aliens on fire, but I'm not sure about armored troopers.

Link to comment
Share on other sites

Most "enclosed" areas do not block the propagation of smoke though. An obvious example is a UFO. A smoker dumped outside the craft will spread inside and I think visa versa.

 

You can set units wearing manufactured armor on fire, see this pic:

 

On_Fire.png

 

But fire doesn't affect (hurt) the armored soldier like an unarmored one (fire damage bypassing armor and going directly to health). I suppose that flag in unitref[120] is what determines that. :)

 

- Zombie

Link to comment
Share on other sites

Right, so some more smoke/stun testing for me. I modified a Sectoid's armor (all sides) to 255 and it didn't take stun while standing in a smoke cloud. Lowering the armor to 0 for all sides had no effect - the Sectoid still didn't take any stun damage. My next test involved setting the "armor" values of a normal soldier to 0 and 255. The result was the same, both times the solder took stun damage while standing in smoke. I guess this proves beyond a shadow of a doubt that armor "quantity" plays no role whatsoever in blocking stun from smoke. Armor "quality" (urm, I should say "type") is the primary factor. :)

 

I didn't have time to fool around with unitref[120] much, but if aliens are supposed to follow the same format as X-COM soldiers, then their last bit in this filed shoud be 128. It's not. A totally unmodified land-locked alien on the first round is always 0. Setting their last bit to 128 doesn't seem to do anything physically, but I didn't check the scenario when they are under mind control. Will do that tonight as I want to get to the bottom of this! :)

 

- Zombie

Link to comment
Share on other sites

I didn't have time to fool around with unitref[120] much, but if aliens are supposed to follow the same format as X-COM soldiers, then their last bit in this filed shoud be 128. It's not. A totally unmodified land-locked alien on the first round is always 0. Setting their last bit to 128 doesn't seem to do anything physically, but I didn't check the scenario when they are under mind control. Will do that tonight as I want to get to the bottom of this! :)

No, aliens typically don't use that bit. As I was saying before, if a unit is controlled by aliens, smoke won't affect it: The same unit under your control, however, will take stun damage unless that bit is set. Same rules as fatal wounds, see. More or less.

Link to comment
Share on other sites

What about the rank of the unit? That's the next best thing to armour quality that aliens of the same race can have (that, and possibly difficulty level).

 

I had this one experience with a commander sectoid (unarmed), and all I had were two smoke grenades and nothing else to fire back at it. My soldiers blocking it into a corner were knocked out, but the sectoid commander still stood strong.

 

- NKF

Link to comment
Share on other sites

No, aliens typically don't use that bit. As I was saying before, if a unit is controlled by aliens, smoke won't affect it: The same unit under your control, however, will take stun damage unless that bit is set. Same rules as fatal wounds, see. More or less.

Gotcha (I think). MC'd aliens also have a value of 0 for unitref[120], but that doesn't really solve anything on my end. Alien controlled units don't incur stun from smoke and the last bit of unitref[120] is always 0. This last bit can't be a "Can't be stunned by smoke" flag, it must be something else like the "Unit wearing Power/Flying Suit. Otherwise, land-locked aliens would have a value of 128 for the variable. Do you see what I'm saying here? Something else controls (toggles, actually) the stats when an alien is Mind Controlled so that it takes fatal wounds, incurs stun from smoke, etc. :)

 

What about the rank of the unit? That's the next best thing to armour quality that aliens of the same race can have (that, and possibly difficulty level).

 

I had this one experience with a commander sectoid (unarmed), and all I had were two smoke grenades and nothing else to fire back at it. My soldiers blocking it into a corner were knocked out, but the sectoid commander still stood strong.

Well, my tests included Sectoids of every rank (excluding Commanders since I was on a Terror Mission) and every one of them didn't take stun from smoke. Sectoid Commanders, by default, would therefore act the same. I was playing on Beginner so one would think that if stunning via smoke was possible, it would happen at this skill level. Your experience with the Sectoid Commander only leds credibility to my findings that aliens can't be stunned from smoke. :)

 

- Zombie

Link to comment
Share on other sites

I'm pretty sure that byte does what I said it does, and all alien controlled units are simply immune... Easiest way to eliminate all other variables is this: Allow one of your "unarmored" soldiers to fall under alien control, and then see what a smoke grenade does to him.

 

For quick referrance, to put him under "permanent" control, you just need to edit the ninth offset in his UnitPos record.

 

(Usually, the game would also flag the seventh bit of the tenth offset as well, so that it knows to change the prior byte back on the next turn. You can see why this system messes up with civilians).

 

Once you've done that, you can unflag that UnitRef bit for one of your armored units, to see if that removes the smoke protection.

Link to comment
Share on other sites

  • 2 months later...

Well, the low visibility created by darkness only apply to humans. In full daylight your soldiers and the aliens can see 20 tiles away. However, in darkness (without a light source) your men can only see 9 tiles away while the aliens can still see the full 20 tiles out. Not too sure what effect smoke would have in darkness, but if it is nearly on top of your men it may help. I could see smoke playing more of a role in darkness if it is used in combination with Electro-flares or fire which extends your visibility to the full 20 tiles. Testing couldn't hurt though. :D

 

- Zombie

Link to comment
Share on other sites

  • 3 months later...
Recently I was doing some more testing with the Stun Grenade. The tests I did here a while ago were either for the initial detonation (and the distance you can see through the cloud) or the size. I wanted to know how many rounds and at what distance will your soldier see an alien. After checking the distances for a few rounds, I needed to reload as I wanted to double-check my previous result. I was horrified to realize that the distance changed. I then remembered that Smoke has 3 different concentrations and is probably applied randomally when it spreads. When I checked the game files, I found that even the initial blast has a varying density of smoke. I suppose the only way around this is to edit the smoke to have either 1, 2 or 3 for the density and tally the distance. That would give a general idea on how far/short your men can see after each turn. :P

Time to bump this again. This time I have a question: in SMOKREF.DAT, the 9th entry [08] has the animation frame offset for the smoke density produced. It's values range from 0-3. I assume the values of 1-3 are used for the smoke density type, but what does 0 do? Bomb Bloke, I'm looking in your direction. :oh:

 

- Zombie

Link to comment
Share on other sites

No, it's got nothing to do with that: As per the general notes near the top of the wiki page, density is determined by how many turns a smoke patch has left to live.

 

The animation offset is a cosmetic "bump". The game has a counter which goes from 0-7, and this is used to work out which sprite to display for a given tile or certain units (hence why every MCD record lists eight sprites).

 

But a great big field of smoke would look dead boring if all the clouds showed the exact same frame at once, so whenever a patch is generated it gets this random number assigned to it to make it look just that little bit more "unique". Two clouds with the same density will cycle through the exact same sprites, but from which they'll start depends on this byte.

 

I dunno if you ever tested those changes you requested to my editer re smoke, if not I'd highly recommend reviewing them. There's also a view option that lets you see smoke in much the same way as that numbered terrain I built lets you see weapon damage (tap "d" once to see density, twice to see "time to live", and a third time to return to normal. See the "Tile Tweaking" part of the manual for more info).

Link to comment
Share on other sites

Ah, I see now (I think). I used your map editor to check the smoke density of each tile in a smoke cloud initially produced by the Smoke Grenade and compared that to the numbers in smokref.dat. From what I can make out, smokref[03] = time smoke will last = density of smoke. This number is then translated by the game to determine the smoke sprite animation group to display (smokref[08]). Furthermore, editing the smokref[08] to a different number doesn't change density, just the smoke animation. Do I understand this correctly? :P

 

It claims on the wiki smokref.dat page that there are 9 different densities produced in a smoke cloud. However, on a few occasions I witnessed a min of 5 and a max of 14 (on the initial cloud of the smoke grenade). This indicates 10 possible smoke densities, not 9. A check with your editor also confirms the range witnessed. Misworded wiki? :oh:

 

- Zombie

Link to comment
Share on other sites

From what I can make out, smokref[03] = time smoke will last = density of smoke. This number is then translated by the game to determine the smoke sprite animation group to display (smokref[08]). Furthermore, editing the smokref[08] to a different number doesn't change density, just the smoke animation. Do I understand this correctly? :P

Closer, but not quite...

 

Smokeref[8] is a random value. It's not derived from anything. It doesn't have anything to do with the density of smoke or which sprites are used to display it, instead it's used to offset the animation counter. It's a random "animation offset". :)

 

As an example, say we have a cloud of smoke at the minimum density. It'll animate through smoke sprites 0-3. Now say we have another cloud of the same density - that'll animate through the exact same sprites.

 

In order to keep the two clouds from looking exactly alike, the first cloud might have an animation offset of 1, and the second cloud an offset of 3. Hence the first cloud will initially display sprite 1, and the second cloud sprite 3. They'll each still cycle through sprites 0-3, but from a different starting point. They'll never show the same sprite at the same time and hence the two clouds will always look different to the user.

 

It claims on the wiki smokref.dat page that there are 9 different densities produced in a smoke cloud. However, on a few occasions I witnessed a min of 5 and a max of 14 (on the initial cloud of the smoke grenade). This indicates 10 possible smoke densities, not 9. A check with your editor also confirms the range witnessed. Misworded wiki? :oh:

Took me a moment work this one out - I was scratching my head thinking "The maths is right, there's only nine, how did he get ten? That'd render rank badges!". :)

 

So I loaded up the game and threw a smoker... Yup, sure enough, I found your minimum and maximum values. But those refer to how long the cloud has to live - not the density!

 

Load up the viewer again and center your just-detonated smoke cloud. Tap "d" once. You're now looking at the density of each cloud - You should have values ranging from one to three. If you tap the button a second time, you'll get "time to live", and this will indeed range from about 5 to 14.

 

That is to say, density = time to live divided by six, rounded down.

 

(And hence the first sprite in the animation of that cloud will be TTL/6 + 8 (as the first smoke sprite in the "smoke.pck" archive is number 8).

 

With all this in mind, two notes:

 

The formula provided represents which graphics you see on the screen (I know it's correct in that regard). Whether it also determines the effective density (that is, how it affects LoS) I dunno. I'd like to think it does; but I've done no tests with LoS, let alone with smoke. The razor alone backs me up.

 

Another thing I've noticed: TTL can go up. Even a blaster bomb won't create a decent cloud right off the bat, but a couple of turns later the density will have gone right up. So not only can smoke spread to new areas but it can spread into already existing clouds and make them "stronger".

Link to comment
Share on other sites

You got my interest on this one, so I decided to sit down and see whether the displayed density matched the applied version. Turns out it doesn't, but it's the same type of formula -You just divide by 3 instead of 6.

 

I sat a sectoid in line with a trooper and walked my man towards the grey until he sighted it. I counted up the tiles, and it was 20 away.

 

I started with a single cloud between them, with a TTL of one turn. No effect. I slowly started raising this, and when it hit three, the target popped out of sight. I moved my man one tile forward and it was back again.

 

I nerfed that cloud and created three with a TTL of one turn each. No effect on visibility, a cloud has to have at least three turns under it's belt or it has no effect.

 

I created two clouds with a TTL of three turns each, and that lowered my visibility range by two tiles. I started raising the life of one cloud and when it hit six turns, I lost another tile.

 

So there you have it: Note each cloud between you and your target, divide their TTL by three and round each result down. Add up all the values you get and you know how many tiles of visibility you've lost. :oh:

 

Dunno if aliens get the same penalty, might be worth testing that as well. When I get around to it I'll tweak my editer to display the "effective" density (as opposed to the "cosmetic" density it displays now).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...