# So what tells the game that lava can be used as an alternative to fire?

**URL:** <https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848>\
**Category:** The Toolbox\
**Created:** [February 19, 2019, 5:02am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848 "2019-02-19T05:02:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeWolf](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@DeWolf](https://discourse.cataclysmdda.org/u/DeWolf)\
**Post date:** [February 19, 2019, 5:02am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/1 "2019-02-19T05:02:03Z")

</div>

I want to know because I want to edit it to also act as a replacement for a charcoal forge.

---

<div class="post-metadata">

**Author:** ![kuros](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kuros/32/1788_2.png) [@kuros](https://discourse.cataclysmdda.org/u/kuros)\
**Post date:** [February 19, 2019, 5:30am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/2 "2019-02-19T05:30:42Z")

</div>

If you’re close enough to use it as fire, you’re also taking heat damage from it, so you wouldn’t be able to use it as a forge. You’d died before finishing any project.

---

<div class="post-metadata">

**Author:** ![DeWolf](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@DeWolf](https://discourse.cataclysmdda.org/u/DeWolf)\
**Post date:** [February 19, 2019, 5:48am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/3 "2019-02-19T05:48:25Z")

</div>

I can and have and event stayed at comfortable while cooking some wild vegetables. But I want to know if what allows it to be used as such is in the json or if it is hardcoded.

---

<div class="post-metadata">

**Author:** ![Esther](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/esther/32/5743_2.png) [@Esther](https://discourse.cataclysmdda.org/u/Esther)\
**Post date:** [February 19, 2019, 8:34am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/4 "2019-02-19T08:34:09Z")

</div>

It’s hardcoded. The code was a little too dense to wrap my head around, but it seems that for fire, the game checks for an abnormally high amount of heat within nearby tiles; in this case, a fire would count as very hot, but so would lava, so it works for both of them.

This is only done specifically for the `nearby fire` component of crafting. Adding it to serve as a forge is probably doable through modding, but it would apply to _all_ fires, not just lava.

---

<div class="post-metadata">

**Author:** ![TheMurderUnicorn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/themurderunicorn/32/5706_2.png) [@TheMurderUnicorn](https://discourse.cataclysmdda.org/u/TheMurderUnicorn)\
**Post date:** [February 19, 2019, 10:59am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/5 "2019-02-19T10:59:05Z")

</div>

Recipes look for specific items or furniture for crafting recipes. Lava is terrain.

You could create a furniture tile that looks like lava and qualifies as a forge, but you can’t assign the “trap”: “tr\_lava”, line which makes it act like lava. So it’d be a forge but wouldn’t blister you or immolate you and all that.

You also can’t assign the lava tile as a crafting object. I don’t think there’s any terrain that functions as usable in a recipe beyond fire, light, and water sources. So, yeah. Would be an exercise in coding.

---

<div class="post-metadata">

**Author:** ![DeWolf](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@DeWolf](https://discourse.cataclysmdda.org/u/DeWolf)\
**Post date:** [February 19, 2019, 11:58pm UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/6 "2019-02-19T23:58:23Z")

</div>

Eh oh well. At least I can still build my base around a lava thing to have infinite fire, light and heat (need to figure out how to cool though).

---

<div class="post-metadata">

**Author:** ![kuros](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kuros/32/1788_2.png) [@kuros](https://discourse.cataclysmdda.org/u/kuros)\
**Post date:** [February 20, 2019, 1:49am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/7 "2019-02-20T01:49:46Z")

</div>

> [@DeWolf](#):
>
> I can and have and event stayed at comfortable while cooking some wild vegetables.

I was saying that most forge-related tasks take so long that the damage accumulation over that time would be lethal. The first time I encountered lava in the game, I had just been playing Wayward, and so it didn’t occur to me that there might be damage from being too close to it, so long as I wasn’t directly on the lava square. I don’t think I experimented with seeing how far from it I could be to still use it and not take damage, so there might be some distance. I think this was back before I even knew that you could access items 5 squares away while using the craft menu.

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [February 20, 2019, 1:51pm UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/8 "2019-02-20T13:51:44Z")

</div>

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/a2fc42c51838f5c143c4eabac45525e4c4b60a34/src/map.cpp#L2709>

---

<div class="post-metadata">

**Author:** ![int\_ua](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/int_ua/32/4402_2.png) [@int\_ua](https://discourse.cataclysmdda.org/u/int_ua)\
**Post date:** [February 21, 2019, 10:59am UTC](https://discourse.cataclysmdda.org/t/so-what-tells-the-game-that-lava-can-be-used-as-an-alternative-to-fire/18848/9 "2019-02-21T10:59:24Z")

</div>

No, just a month ago I had a base between lava and river. On the first tiles you have `nearby fire` it’s only a couple degrees hotter and perfectly safe.
