Pyromania 101 (burnable features)

Discussion in 'Mod Discussions' started by wondible, October 22, 2014.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Sometimes, you just want to watch the moon burn.

    Screen Shot 2014-10-22 at 00.31.44 .png

    It seems that the only features which are removed on commander landing are burnable ones, even though reclaimable will still slow down building. Since I don't want rock fires raging across the planet, I had to figure out how burnables work.

    Let's review base_burnable

    Code:
    {
      "base_spec": "/pa/terrain/generic/base_feature.json", 
      "burnable": {
        "burn_duration": 12, 
        "damage": 2.2, 
        "damage_radius": 20, 
        "resistance": 75, 
        "spread_chance": 0.3
      }, 
      "damageable": true, 
      "path_cost": 2.0, 
      "reclaimable": true
    }
    
    Here is how I believe it works (tests done in 73939)

    Every tick (10 ticks/sec) for burn_duration, there is a spread_chance that damage will be done to each feature in damage_radius. When a feature has received resistance burn damage, it lights up.

    From a single high-damage/low-chance test, it appears that the chance is calculated individually for each feature in range. Careful with that radius if you like your sim speed ;^)

    For the standard trees, I believe the math works like this:

    12 seconds * 10 ticks/s * 0.3 chance * 2.2 damage = 79.2 damage, average

    Trees have 75 resistance, so some low rolls on the chance allows the possibility of the fire not spreading, but it usually will. Of course, once several trees are burning, things near them are getting hit from multiple sides.

    Burn damage can also come from weapons; base_ammo does 15 and nukes/uber-cannons do 200. If resistance is 201, an uber cannon won't start a fire, but a second one will.
    proeleert, cola_colin and liquius like this.
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I've discovered that resistance:0 gets cleared by commander landing but doesn't burn.
  3. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    I don't know what, but I want to do something with this (burnables).
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I've been rolling around ideas to add effects to lava planets, but you'd need either server-script or a host mod with create unit to light them off.

Share This Page