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.
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.)
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.
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.
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++.