# Location of fire code

**URL:** <https://discourse.cataclysmdda.org/t/location-of-fire-code/7118>\
**Category:** The Toolbox\
**Created:** [August 19, 2014, 12:35am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118 "2014-08-19T00:35:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HavingPhun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/havingphun/32/346_2.png) [@HavingPhun](https://discourse.cataclysmdda.org/u/HavingPhun)\
**Post date:** [August 19, 2014, 12:35am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118/1 "2014-08-19T00:35:53Z")

</div>

Hi, I am new to these forums, but have been playing Cataclysm DDA since around version 0.5. I have searched the code and the doxygen documentation for it, but cannot find the location for the code for fires. I want to make some changes to it if I can do it without slowing the game down to a crawl.

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [August 19, 2014, 12:54am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118/2 "2014-08-19T00:54:16Z")

</div>

Fire is a field, so it’s mostly handled in field.cpp. DDA’s code being what it is, there are probably other files handling aspects, but start in the field code.

(In future, a grep/find-in-files is usually pretty effective.)

---

<div class="post-metadata">

**Author:** ![HavingPhun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/havingphun/32/346_2.png) [@HavingPhun](https://discourse.cataclysmdda.org/u/HavingPhun)\
**Post date:** [August 19, 2014, 1:16am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118/3 "2014-08-19T01:16:33Z")

</div>

Thank you KA101. I still have to do more testing. But, the main problem I am looking at is that I can throw a gallon jug of milk in a fire and it will burn seemingly for eternity. What I want to try and set up is a heat output variable. Possibly based partially on material. Lets say wool had a heat output of 8 and the item you burning has a volume of 5, then the total heat output of that item would be 40 (8 \* 5). (Heat Output \* Item Volume) could be the default heat output of items. But, for items such as gasoline that that afaik don’t have a material they would have a number set in the JSON’s. I might also see about setting up melting, boiling, and freezing temperatures for items and constructions.

Though I will have to see how this works. It may cause lag, and or balance issues. At the least I could do something to stop the eternal milk fire. Which I still have to test to see exactly how long it burns for.

Edit: Actually, this is already somewhat implemented. There are if statements that check the material of the item and then determine how it burns.

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [August 19, 2014, 2:38am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118/4 "2014-08-19T02:38:54Z")

</div>

If you’re messing about with temperatures, check with Shoes and Efimero. Shoes handles body temperatures and Efimero is our weather-handler. They can probably use another hand with getting a unified temp model going, and in any event you should make sure all of you are on the same metaphoric page.

---

<div class="post-metadata">

**Author:** ![HavingPhun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/havingphun/32/346_2.png) [@HavingPhun](https://discourse.cataclysmdda.org/u/HavingPhun)\
**Post date:** [August 19, 2014, 2:45am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118/5 "2014-08-19T02:45:11Z")

</div>

Okay, right now I am just experimenting to a bit. But, before I do anything serious I will. As I don’t know entirely know what I can do with this yet. I still have some things to learn when it comes to C++.
