Author Topic: [Suggestion] An items: variable to control chance of a unit catching fire.  (Read 2579 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9113
    • View Profile
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

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
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.
« Last Edit: June 02, 2020, 11:22:27 pm by The Martian »