Regarding how it works, hereās a rough explanation.
Spoilered to preserve sanity
Fields have an age stat, which is intended to be set to the birthday of the field, and then checked against a field half life for dispersal of the field.
Well fire eats that and craps it back out again, because a fire field freely manipulates its own age and then uses the (frequently negative?!?) age to decide what its intensity, spread, smoke production, etc should be.
If a fireās age goes positive, itās ādyingā, in other words itās out of fuel.
If itās highly negative, it increases its own density (turns itself into a bigger fire).
If itās dense AND the age is still very negative, it starts spending down age by producing adjacent fire fields and emitting smoke.
Fire reduces its age by consuming items, which is its own little brand of hell.
The density of a fire field determines how many items it can burn at once, a small fire will only burn the first two flammable items in its square. (first? measured how? I donāt know.), With two more items being burned per density level.
How fire interacts with an item is roughly dependent on item material, volume, damage, and āburnā (yep, items have a special stat just for fire interaction)
Different materials contribute more or less age to a fire when burned, and are consumed at different rates.
The product of volume and material, minus āburnā determines a threshold for how large the fire has to be to burn the item, logs just get charred because this threshold is too high, but the threshold is ignored for raging fires, yep, ignored.
If a fire canāt surpass this threshold, it instead adds āburnā to the item, to represent heating it up/smoldering, this brings the threshold down, but still not enough to e.g. burn logs.
If a fire CAN surpass this threshold, it damages the item and increases its own age as it consumes it, how much age it gets depends on the material.
Another output of consuming items is smoke, different item types produce differnt amounts of smoke, but in general fire puts out so much smoke that this is pointless.
The burn rate/age reduction for wood is hand tweaked to make a pile of heavy sticks stay small pretty much indefinitely (well, as long as the wood lasts) to make crafting easier.
This neglects the details of the really hairy parts of the code, like spread, density increases, and smoke production.
tl;dr I, and pretty much every other dev thatās looked at this code, want to nuke it from orbit and start over, but no one has stepped up to do so yet. The problem is itās a nasty combination of essential for survival, dangerous, thematic, complicated, and performance sensitive. Oh, and the existing code kinda sorta works. The only really GOOD news is that thereās just one (big :P) chunk of code that needs to be replaced.