OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: aquanaut on November 02, 2015, 05:16:34 am

Title: [DONE] [Suggestion] Fire Extinguisher/Suppressant
Post by: aquanaut on November 02, 2015, 05:16:34 am
Is it possible to mod in a fire extinguisher-type item? Trucking around cruise ships that are lit entirely on fire seems like something an ultra-elite global military organization should be able to deal with.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Hobbes on November 02, 2015, 06:49:50 am
Is it possible to mod in a fire extinguisher-type item? Trucking around cruise ships that are lit entirely on fire seems like something an ultra-elite global military organization should be able to deal with.

I don't think that's possible without changing the engine but it there is a hazmat suit mod.
Title: Re: Fire Extinguisher/Suppressant?
Post by: KingMob4313 on November 02, 2015, 01:57:08 pm
Is it possible to mod in a fire extinguisher-type item? Trucking around cruise ships that are lit entirely on fire seems like something an ultra-elite global military organization should be able to deal with.

Would require code changes, but if you ask nice enough, maybe Extended could do it.

I'm already looking into doing it on my personal EXE since I have incendiary actually worth a crap
Title: Re: Fire Extinguisher/Suppressant?
Post by: Boltgun on November 02, 2015, 05:01:14 pm
Doesn't smoke take out fire? A simple smoke weapon might be the thing you need.
Title: Re: Fire Extinguisher/Suppressant?
Post by: hellrazor on November 02, 2015, 05:24:19 pm
Doesn't smoke take out fire? A simple smoke weapon might be the thing you need.

Depends how strong the fire is. In my experience throwing a Smoke Grenade does sometimes put out the fire, sometimes not.
A normal grenade or Alien Grenade can also take out the fire, or some of it sometimes.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Arthanor on November 02, 2015, 06:16:09 pm
I have seen fire take away smoke, and I think it is possible to take out fire with smoke, but that's on terrain.

If you have a unit on fire, there's nothing to do :( A fire extinguisher would be good for that too..
Title: Re: Fire Extinguisher/Suppressant?
Post by: Hobbes on November 02, 2015, 08:21:01 pm
If you have a unit on fire, there's nothing to do

You can always shoot it to end its misery...
Title: Re: Fire Extinguisher/Suppressant?
Post by: yrizoud on November 02, 2015, 08:27:56 pm
Because of the way unconscious units are handled by the engine, I don't think they can be on fire. So, next time one of your soldiers is on fire, get the nearest cattle prod and BRRZZZZZZT.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Arthanor on November 02, 2015, 10:10:56 pm
Stop, drop and roll! Except you need another soldier to bludgeon them.. Interesting idea!
Title: Re: Fire Extinguisher/Suppressant?
Post by: Dioxine on November 03, 2015, 09:15:22 am
Because of the way unconscious units are handled by the engine, I don't think they can be on fire. So, next time one of your soldiers is on fire, get the nearest cattle prod and BRRZZZZZZT.

I once thought it's the case, but it's not, at least not in OXCom. Stunned units continue to burn although there is no way to tell this.
Title: Re: Fire Extinguisher/Suppressant?
Post by: aquanaut on November 04, 2015, 07:49:04 am
Doesn't smoke take out fire? A simple smoke weapon might be the thing you need.

Huh. That's an odd property for a smoke weapon to have; is it the smoke density variable that causes this effect? If so, I guess you could make like a smoke density 100% smoke grenade. Admittedly, the sudsy stuff that suppresses fires IS difficult to see through, so you have dual-use here.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Meridian on January 29, 2016, 12:19:13 am
Is it possible to mod in a fire extinguisher-type item? Trucking around cruise ships that are lit entirely on fire seems like something an ultra-elite global military organization should be able to deal with.

I've added support for fire extinguishers in my OXCE fork: https://github.com/MeridianOXC/OpenXcom/commit/2bd3a8b95972ecef69f1b634710b13f885392c57
Title: Re: Fire Extinguisher/Suppressant?
Post by: Dioxine on February 13, 2016, 03:55:23 pm
There's a strange behaviour to the extinguisher. It does put out fire on burning units all right, but it fails to put out fires on the ground, even if damage type is smoke & area blast.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Meridian on February 13, 2016, 05:49:54 pm
There's a strange behaviour to the extinguisher. It does put out fire on burning units all right, but it fails to put out fires on the ground, even if damage type is smoke & area blast.

Yes, it works only on units.
Should I add support for tiles as well?
Title: Re: Fire Extinguisher/Suppressant?
Post by: Dioxine on February 13, 2016, 06:41:54 pm
Normal smoke does extinguish tiles, eg. produced by a smoke grenade (a popular improvised way to put the fires out). It's kinda weird smoke emitted with fire extinguisher doesn't. So, yes.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Meridian on February 13, 2016, 07:09:11 pm
Normal smoke does extinguish tiles, eg. produced by a smoke grenade (a popular improvised way to put the fires out). It's kinda weird smoke emitted with fire extinguisher doesn't. So, yes.

Maybe you could give me a bit more details?
Do you want it only on explosives?
Or also on melee? (not sure how that should work, since melee doesn't hit any tiles)
Or also on ranged weapons? (extinguish fire on the tile hit by the bullet? if anything was hit in the first place)

In general, it is pretty strange... and as you said, we already have grenades, so why add this to swords and rifles?

My original idea was only to add fire extinguisher as range 1 weapon, similar to fusion torch... what kind of fire extinguishers are you planning to add?
Title: Re: Fire Extinguisher/Suppressant?
Post by: yrizoud on February 13, 2016, 08:53:49 pm
I guess that in addition to saving teammates/civilians (and smother opponents who don't resist smoke), it would be nice to "clear a path" in flaming tiles with it.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Dioxine on February 13, 2016, 10:16:03 pm
Code: [Select]
  - type: STR_FIRE_EXT
    size: 0.2
    costBuy: 700
    costSell: 420
    weight: 9
    bigSprite: 587
    floorSprite: 262
    handSprite: 100224
    bulletSprite: 1
    fireSound: 76
    explosionHitSound: 76
    hitAnimation: 96
    power: 50
    accuracyAimed: 100
    tuAimed: 75
    damageType: 9
    damageAlter:
      RandomType: 4
      FixRadius: 4
      ToHealth: 0.15
      ToStun: 0.4
      ToTime: 0.4
    battleType: 1
    clipSize: 3
    isFireExtinguisher: true
    arcingShot: true
    maxRange: 6
    invWidth: 2
    invHeight: 2
    bulletSpeed: 80
    listOrder: 4095

So, for smoke damage I think? And what swords and rifles ??? I said that since smoke always clears fire, it is strange that smoke launched from a fire extinguisher, of all things, doesn't.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Meridian on February 18, 2016, 06:52:39 pm
OK, I have looked at this and it is quite convoluted.

Adding (extra) support for this would require some bigger changes, which I don't want to do, so I will just describe the existing state as I understand it and propose how to possibly un-hardcode it.

There IS already support for extinguishing fire on tiles.
If the fire (resp. its associated smoke) is not "too big", you can extinguish it using smoke.

Step by step:
1. Flamethrower (or anything else) sets a tile on fire. Based on several things the fire value (which represents also turns to be on fire at the same time) will be set to something bigger than zero
2. Based on some other stuff (e.g. flammability of objects on the tile), the tile will ALSO be set on smoke (value between 1 and 12)
3. Now fire extinguisher hits the tile... some technical stuff will be checked, but most importantly it will also check how bad the tile is smoking already
--> if it is already smoking too much (value 10 or more) NOTHING will happen
--> if it is not smoking too much (value 9 or less), it will extinguish fire and also set tile on smoke

I guess you already noticed, that in case a flamethrower set the tile on big fire and big smoke (10, 11 or 12), then extinguishing it will not work for 3, 2 or 1 turn respectively.

And now the proposals:
a/ I can either move the fire extinguishing before the "am I smoking too much already?" check and make it all the time
b/ or un-hardcode the threshold so that you can mod it to something bigger than 10, so that the "do nothing" option will never trigger

I don't have any strong feelings about this, probably option B is better, because that way it won't break the vanilla behavior (until you mod it).

PS: some suggestions for the new threshold:
threshold=13... everything that was set on fire&smoke by fire can be extinguished
threshold=16... everything that was set on smoke by smoke and then on fire by fire can be extinguished... basically everything can be extinguished
Title: Re: Fire Extinguisher/Suppressant?
Post by: Solarius Scorch on February 18, 2016, 07:13:12 pm
Wait, so if there's a burning, unconscious person on the ground (which in itself isn't burning), and I threw a smoke grenade at them, will this extinguish the person? I hope so :)
Title: Re: Fire Extinguisher/Suppressant?
Post by: Meridian on February 21, 2016, 08:23:40 pm
Wait, so if there's a burning, unconscious person on the ground (which in itself isn't burning), and I threw a smoke grenade at them, will this extinguish the person? I hope so :)

@Solarius:
In vanilla, it won't.
In my fork, it should... but better test it.

@Dioxine:
I have added now a "too much smoke" threshold to my build, if you add a global setting "tooMuchSmokeThreshold: 13" you should be able to extinguish fire from all tiles. If it doesn't work, try "tooMuchSmokeThreshold: 16"... that should definitely work.

PS: vanilla value is tooMuchSmokeThreshold: 10
Title: Re: Fire Extinguisher/Suppressant?
Post by: Ethereal on July 29, 2018, 01:10:43 pm

The "isFireExtinguisher:" works correctly.
It is meant to work only on units.

For tiles, there is a different mechanism (based on smoke, not on "isFireExtinguisher:" flag) and different global settings for smoke effectiveness.

https://openxcom.org/forum/index.php/topic,4057.msg59352.html#msg59352

"tooMuchSmokeThreshold: 13" you should be able to extinguish fire from all tiles. If it doesn't work, try
"tooMuchSmokeThreshold: 16"... that should definitely work.

PS: vanilla value is tooMuchSmokeThreshold: 10

Thanks so much. It works. The truth is that fires can be extinguished with smoke grenades, and not only with special means, I do not think it is correct. On the other hand, this makes the smoke screen devices more versatile.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Meridian on July 29, 2018, 01:20:27 pm
Thanks so much. It works. The truth is that fires can be extinguished with smoke grenades, and not only with special means, I do not think it is correct.

I don't care if it's correct or not... it's in vanilla, it stays.

On the other hand, this makes the smoke screen devices more versatile.

Just what you need, no? More features to make the game easier Kappa.
Title: Re: Fire Extinguisher/Suppressant?
Post by: Ethereal on July 29, 2018, 01:37:22 pm
I don't care if it's correct or not... it's in vanilla, it stays.

Just what you need, no? More features to make the game easier Kappa.

No way, I would have preferred that the fire extinguishing tools and devices smokescreen was separately. But at the moment, "tooMuchSmokeThreshold:" it is impossible to set for a particular items separately. A pity...