OpenXcom Forum

Modding => OXCE Suggestions NEW => OpenXcom Extended => OXCE Suggestions Y-script => Topic started by: The Martian on June 02, 2020, 10:31:07 pm

Title: [Suggestion] An items: variable to control chance of a unit catching fire.
Post by: The Martian on June 02, 2020, 10:31:07 pm
I think it would be useful if there was a way to have more control over the chance that a unit catches on fire when struck by an incendiary weapon.

Perhaps something like:
Code: [Select]
  - type: STR_EXAMPLE_WEAPON
    FireChance: 0.7

With FireChance: 0.0 meaning the unit would never catch on fire (But terrain tiles would) and FireChance: 1.0 being a 100% chance of a unit being set on fire with every hit.
Title: Re: [Suggestion] An items: variable to control chance of a unit catching fire.
Post by: Meridian on June 02, 2020, 10:43:11 pm
a/ not backwards-compatible
b/ and doesn't say for how long they should be on fire

also I guess since everything around unit damage is scripted these days, adding script commands for this instead of ruleset attributes would be more consistent... but not 100% sure on that, just a first thought
Title: Re: [Suggestion] An items: variable to control chance of a unit catching fire.
Post by: The Martian on June 02, 2020, 10:53:38 pm
How about something more like this?

Code: [Select]
  - type: STR_EXAMPLE_WEAPON
    UseFireChance: true # A True / False on if the below fire variables should be used. This allows it to be backwards-compatible so long as this variable defaults to false.
    FireUnitStartChance: 0.7 # 70% chance of a unit being set on fire by this weapon.
    FireUnitStopChance: 0.2 # After the value of FireMinDuration: turns pass this causes a 20% chance every turn for a burning unit to extinguish the fire.
    FireMinDuration: 3  # 3 turns until a unit has a chance to stop burning.
    FireMaxDuration: 10 # Max turns a unit can keep burning from fire produced from this source.