Author Topic: [DONE] [Suggestion] Fire Extinguisher/Suppressant  (Read 15383 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #15 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?

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #16 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.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Fire Extinguisher/Suppressant?
« Reply #17 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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #18 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

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Fire Extinguisher/Suppressant?
« Reply #19 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 :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #20 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

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #21 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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #22 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.

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: Fire Extinguisher/Suppressant?
« Reply #23 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...