Fire

From Cosmoteer Wiki
< ModdingModding/Fire
Jump to navigation Jump to search
.rules file/node location: Cosmoteer.Ships.Fires.FireRules

Stores the rules for fires that can break out on ships.

Fire in Cosmoteer has its own special .rules file, and source code definition.

Parameters (Complete list)
Name Type Required? Buffable? Default value Description
UpdateInterval Time Yes - - Tick interval in seconds. Lower values tick faster and use more CPU.

Can cause lag if set too low.

SpreadChancePerUpdate float Yes - - Percentage chance per tick to spawn new fires on neighbouring tiles.

Scales faster than it seems at first glance.

KillChancePerUpdate float Yes - - Percentage chance to kill crew instantly upon contact.

This approach is necessary because crew seemingly have just 1 health.

DamageType ID<Cosmoteer.DamageType> - - fire Type of damage to be applied.

Intuitively set to fire in this instance, but that's not a hardcoded damage type, and is different from the sun' heat damage.

Could be used to allow damage type-specific resistances to function, but there isn't one for fire in the base game.

DamagePerUpdate int Yes - - Damage per tick taken by parts per tile presently on fire.
DefaultFireExtinguishPriority int Yes - -
AssociateFireExtinguishJobWithPart ID<PartRules>? - - -
FireExtinguishResource ID<ResourceRules> Yes - -
ImmuneWhenCarryingExtinguisher bool Yes - true

(fire.rules)

Allows crew currently equipped with an extinguisher to put fires out without risk of death.
FireExtinguishTime Range<Time> Yes - -
NearbyFireSearchIterations int Yes - -
FireSprite AtlasSprite? - - -
FireSpriteLayer ID<ShipRenderLayerRules> - - -
IndicatorSprite AtlasSprite? - - -
IndicatorSpriteLayer ID<ShipRenderLayerRules> - - -
FireEffects MultiMediaEffectRules Yes - -
ExtinguisherEffects MultiMediaEffectRules Yes - -
ParticleCellSize Vector2 Yes - Vector2.One

Notes

  • Fire is currently the only way to kill crew inside a ship without necessarily destroying parts.[1]
  • It is currently unknown whether it's possible to add different types of fire in the game, but that's unlikely.

Example Mods

"Stronger fire", by Dj0z: A mod which greatly enhances the threat posed by fire by increasing damage, spread, and crew death chance.