Fire Manager --- The Fire Manager introduces fire mechanics into the game. This includes starting, spreading and extinguishing fires, and allowing blocks to explode. # Table of Contents 1. [Summary](#summary) 2. [Fire Manage Global Configuration](#fire-manager-global-configuration) 3. [Block-Specific Configuration](#block-specific-configuration) 4. [Examples](#examples) ## Summary A block may catch on fire through a variety of means, depending on the mod in question. For example, a thrown molotov would certainly catch blocks on fire, potentially triggering a cascading fire that may burn a building down. When a block is on fire, it will have damage dealt to it over time, using the CheckInterval time. When a block is checked during its CheckInterval time, neighboring blocks may catch on fire if they are flammable. A FireSpread property can disable this. When a block has taken more damage than its max damage, the block will downgrade itself to its defined Downgrade block. By default, this is an air block. When a block has an Explosion.ParticleIndex defined, the Fire Manage will use that data to trigger an explosion. When a block is extinguished, a smoke particle will be placed on it, showing the player that it has been extinguished. An extinguished block will not immediately catch fire again. To determine if a block is flammable or not, several checks are performed. The checks here are listed in the order they are checked in code. Once a block is determined to not be flammable, then the other checks are not performed. - Does the block have tag of "inflammable"? - Is the position a child of a block? ( think of multi-dim's here) - Not Flammable. - Is the position air? - Not Flammable. - is the position water? - Not Flammable. - Does The block have the tag of "flammable"? - Flammable - Does the Config block have the Property "MaterialID", and does it match our Block? - Flammable - Does the Config block have the Property "MaterialDamage", and does it match our Block? - Flammable - Does the Config block have the Property "MaterialSurface", and does it match our Block? - Flammable The block must return a "Flammable" check to be added to the Fire Manager's system, and be lit on fire. ## Fire Manager Global Configuration The blocks.xml contains configurations and settings to adjust the fire behaviour from its defaults. Note: Some of these properties may be defined on the block or material entry to over-ride the default. #### Logging ```xml ``` #### FireEnable ```xml ``` #### CheckInterval ```xml ``` #### FireDamage ```xml ``` #### SmokeTime ```xml ``` #### FireSound ```xml ``` #### BuffOnFire ```xml ``` #### MaterialID ```xml ``` #### MaterialDamage ```xml ``` #### MaterialSurface ```xml ``` #### SmokeParticle ```xml ``` #### FireParticle ```xml ``` #### FireSpread ```xml ``` #### ChanceToExtinguish ```xml ``` ## Block-specific Configuration In addition to the above settings in the Fire Manager's overall blocks.xml, further properties may be optionally added to blocks.xml to further define the behaviour. These per-block settings will over-ride the global value for that block in which they are defined on. #### FireDowngradeBlock ```xml ``` #### Explosion.ParticleIndex ```xml ``` #### ChanceToExtinguish ```xml ``` #### FireDamage ```xml ``` ## MinEvents A few MinEvents have been written to help modders interact with the fire system. These MinEvents may be added to buffs or item actions. The trigger may change depending on context and use. #### MinEventActionAddFireDamage This effect will set a block on fire, using the target's position, and the range. There is an optional delay time, which will delay the fire from starting. ```xml ``` #### MinEventActionAddFireDamageCascade This effect can allow fire to spread to to surrounding blocks. You can set up a filter based on the type of blocks you wanted affected. ```xml ``` #### MinEventActionCheckFireProximity Checks to see if there's any fire blocks within the specified range, using the player's position as center. ```xml ``` #### MinEventActionRemoveFire Remove Fire within the specified range, using the specified target. ```xml ``` ## Examples ### XPath Here are some examples on how to modify the ConfigFeatureBlock, which holds the Fire Management settings, from another modlet. ```xml true true wood, cloth, corn, grass, plastic, leaves, cactus, mushroom, hay, paper, trash, backpack, organic wood, cloth, corn, grass, plastic, leaves, cactus, mushroom, hay, paper, trash, backpack, organic ``` To adding Fire Damage to the flaming crossbow bolts ```xml ``` ### Triggers ```xml ```