# Code to replace/repaint tiles

**URL:** <https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954>\
**Category:** The Lab\
**Created:** [May 29, 2016, 10:19pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954 "2016-05-29T22:19:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [May 29, 2016, 10:19pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954/1 "2016-05-29T22:19:59Z")

</div>

I want, more specifically, to repaint formerly fungally infected tiles into ‘normal’ versions.

Whether its an agent orange you use to scrub the land of all plant life or a formula that can distinguish between the various types of fauna and ‘revert’ them with some reliability, I want to make an item that can unfungify the land after you kill the queens. Or before, Im not being picky about the triggers here.

---

<div class="post-metadata">

**Author:** ![Kedryn](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kedryn](https://discourse.cataclysmdda.org/u/Kedryn)\
**Post date:** [May 31, 2016, 10:22pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954/2 "2016-05-31T22:22:04Z")

</div>

In my personal mod I don’t have a way to revert them to normal versions of themselves, but I have a fungal agent orange bomb that I use after destroying the ‘leader’ of a fungal area. To make it go through walls or (any) trees you’d have to use the ranged weapon version and hit them dead on (or make fungal walls and trees “PERMEABLE”). My ‘cheat’ items follow; while not quite what you’re looking for I hope they help in some way.

[code]

{  
“id”: “fungicidebomb”,  
“type”: “TOOL”,  
“symbol”: “_",  
“color”: “dark\_gray”,  
“name”: “Fungicide Bomb”,  
“description”: “This canister of fungicide gas kills fungus dead, guaranteed. Disclaimer: doesn’t work through walls or trees”,  
“price”: 2000,  
“material”: “steel”,  
“weight”: 1264,  
“volume”: 1,  
“bashing”: 6,  
“to\_hit”: -1,  
“flags”: [“BOMB”, “TRADER\_AVOID”],  
“category”: “weapons”,  
“use\_action”: {  
“type”: “transform”,  
“target”: ““fungicidebomb\_act””,  
“target\_charges”: 20,  
“active”: true,  
“msg”: “You pull the pin on the fungicide bomb.”  
}  
},  
{  
“id”: “fungicidebomb\_act”,  
“type”: “TOOL”,  
“symbol”: "_”,  
“color”: “dark\_gray”,  
“name”: “active fungicide grenade”,  
“description”: “This canister of fungicide gas kills fungus dead, guaranteed. Disclaimer: doesn’t work through walls or trees.”,  
“price”: 0,  
“material”: “steel”,  
“weight”: 1264,  
“volume”: 1,  
“bashing”: 6,  
“to\_hit”: -1,  
“max\_charges”: 5,  
“initial\_charges”: 5,  
“turns\_per\_charge”: 1,  
“revert\_to”: “fungicidebomb”,  
“category”: “weapons”,  
“flags”: [“TRADER\_AVOID”],   
“use\_action”: {  
“type”: “explosion”,  
“sound\_volume”: 0,  
“sound\_msg”: “Tick.”,  
“no\_deactivate\_msg”: “You’ve already pulled the %s’s pin, try throwing it instead.”,  
“fields\_radius”: 72,  
“fields\_type”: “fd\_fungicidal\_gas”,  
“fields\_min\_density”: 3,  
“fields\_max\_density”: 3  
}  
},  
{  
“id”: “rail\_laser\_sight”,  
“type”: “GUNMOD”,  
“name”: “rail laser sight”,  
“description”: “A small visible-light laser that mounts on a firearm’s accessory rail to enhance ease and speed of target acquisition. Aside from increased weight, there are no drawbacks.”,  
“weight”: 120,  
“volume”: 1,  
“integral\_volume”: 0,  
“price”: 12000,  
“material”: [“plastic”, “steel”],  
“symbol”: “:”,  
“color”: “dark\_gray”,  
“location”: “rail”,  
“mod\_targets”: [“smg”, “rifle”, “pistol”, “shotgun”, “crossbow”, “launcher”],  
“aim\_speed”: 2,  
“gun\_data”: {  
“skill”: “launcherl”,   
“range”: 15,  
“ranged\_damage”: -5,  
“dispersion”: 10,  
“sight\_dispersion”: 10,  
“aim\_speed”: 6,  
“durability”: 8,  
“burst”: 5,  
“reload”: 0,  
“ammo\_effects”: [“NEVER\_MISFIRES”, “GAS\_FUNGICIDAL”, “STREAM\_GAS\_FUNGICIDAL”, “JET”]   
},  
“sight\_dispersion”: 100  
}

[/code] {

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [June 1, 2016, 5:48pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954/3 "2016-06-01T17:48:28Z")

</div>

thats fairly neat, actually. Kills fungus well.

I looked and it is a vanilla code. Perfect for smiting fungaloids. If I would get triffid growth without the plants Id be happy.

So just dirt.

---

<div class="post-metadata">

**Author:** ![Kedryn](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kedryn](https://discourse.cataclysmdda.org/u/Kedryn)\
**Post date:** [June 2, 2016, 4:50pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954/4 "2016-06-02T16:50:10Z")

</div>

Unfortunately, yes, just dirt.

I can find any way to replace a tile with a specific tile unless I add a construction ‘recipe’ and then build it tile by individual tile.

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [June 2, 2016, 4:53pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954/5 "2016-06-02T16:53:49Z")

</div>

Truthfully, I wouldn’t expect a formerly fungaled tree to be still-living or in any shape to grow, after being covered in gray fungus and then having had that seered off by caustic chemicals.

---

<div class="post-metadata">

**Author:** ![Kedryn](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kedryn](https://discourse.cataclysmdda.org/u/Kedryn)\
**Post date:** [June 2, 2016, 5:05pm UTC](https://discourse.cataclysmdda.org/t/code-to-replace-repaint-tiles/11954/6 "2016-06-02T17:05:26Z")

</div>

This is true and the people who invented the fungicidal gas agree:

> There is no way to get the original terrain - it isn't really stored anywhere. Just changing it to dirt should be fine in most cases. Don't set to grass or tree - the fungus kills plant life.

From this thread: [http://smf.cataclysmdda.com/index.php?topic=10634.0](http://smf.cataclysmdda.com/index.php?topic=10634.0)
