# How to replace sprites with an already existing id?

**URL:** <https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080>\
**Category:** The Toolbox\
**Tags:** mod, tileset\
**Created:** [September 22, 2021, 6:37pm UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080 "2021-09-22T18:37:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bio](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bio/32/6690_2.png) [@Bio](https://discourse.cataclysmdda.org/u/Bio)\
**Post date:** [September 22, 2021, 6:37pm UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/1 "2021-09-22T18:37:18Z")

</div>

I’ve been trying to change the sprite of tiles that already have an existing id (for example “t\_open\_air” to “t\_sand”) and somebody suggested this fix, however I’m kind of drowning in text and don’t know how to get it to work or which parts are necessary (I only want to change terrain textures)

> <https://github.com/cataclysmbnteam/Cataclysm-BN/commit/f7127ad16b354bac1aa5d02b06da6262401abc96>

Are there any current-gen (experimental ver) mods out there that force the game to change pre-existing tiles to a new fg, that I could use as a reference?  
This is pretty much my one and only biggest roadblock in creating an overhaul mod, so it would be greatly appreciated if somebody could even just whip up a quick and simple example of how they changed a terrain tile (like if they changed the “t\_dirt” to “t\_sand” even) that already pre-exists as an id (e.g. its a unmodded terrain that already exists in game, not a new entity like secronom making “t\_flesh” tiles)

---

<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:** [September 22, 2021, 7:08pm UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/2 "2021-09-22T19:08:55Z")

</div>

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/a2c54aa20c00e9fb1fa4fab2d6c984a5f12606eb/data/mods/sees_player_retro/mod_tileset.json>

---

<div class="post-metadata">

**Author:** ![Bio](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bio/32/6690_2.png) [@Bio](https://discourse.cataclysmdda.org/u/Bio)\
**Post date:** [September 22, 2021, 8:13pm UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/3 "2021-09-22T20:13:25Z")

</div>

I tried that but “t\_open\_air” still refuses to change into anything else

```auto
[
  {
    "type": "mod_tileset",
    "compatibility": ["MSX++DeadPeopleEdition"],
    "tiles-new": [
      {
        "file": "1_tiles_32x32_0-5199",
        "tiles": [
          { "id": "t_open_air", "fg": 3215 }
        ]
      }
    ]
  }
]

```

Am I missing anything in the code? is there anyway to force the game to change?

---

<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:** [September 22, 2021, 8:55pm UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/4 "2021-09-22T20:55:20Z")

</div>

You are missing a sprite. Try using an image with a single sprite in it, not the file with thousand tiles in it.

---

<div class="post-metadata">

**Author:** ![Bio](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bio/32/6690_2.png) [@Bio](https://discourse.cataclysmdda.org/u/Bio)\
**Post date:** [September 22, 2021, 9:47pm UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/5 "2021-09-22T21:47:01Z")

</div>

still nothing.

```auto
[
  {
    "type": "mod_tileset",
    "compatibility": ["MSX++DeadPeopleEdition"],
    "tiles-new": [
      {
        "file": "changeair.png",
        "tiles": [
          { "id": "t_open_air", "fg": 2 }
        ]
      }
    ]
  }
]

```

This has baffled me for the past couple days. Would you or anybody else be able to see if you can do it on your end? it would mean the world to me for the mod i’m making

---

<div class="post-metadata">

**Author:** ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)\
**Post date:** [September 23, 2021, 12:38am UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/6 "2021-09-23T00:38:35Z")

</div>

> [@Bio](#):
>
> is there anyway to force the game to change?

There was a similar topic I’ve posted in… My information in there might be a bit dated and I can’t verify if this little trick still works right now, but you could give it a try and report back:

> [@How to change colour of cursor (ultica tileset)](https://discourse.cataclysmdda.org/t/how-to-change-colour-of-cursor-ultica-tileset/25146/13):
>
> To correct myself here after some testing; it’s not a problem of load order, but actually that a once defined tile cannot be redefined… Alright, I was really, really close to admit my failure here… nonetheless, I’ve managed to get it working. This isn’t the cleanest solution (and I’m pushing the boundaries), but it works. Here we go: Create a new folder inside the data/mods or mods folder, call it however you like (I suggest to name it so you’ll find it again later). Inside that folder, cr…

Or, in short:

> [@How to change colour of cursor (ultica tileset)](https://discourse.cataclysmdda.org/t/how-to-change-colour-of-cursor-ultica-tileset/25146/13):
>
> ```auto
> [...] 
> "tiles": [
> { "id": "[TILE_ID]_season_spring", "fg": 0 },
> { "id": "[TILE_ID]_season_summer", "fg": 0 },
> { "id": "[TILE_ID]_season_autumn", "fg": 0 },
> { "id": "[TILE_ID]_season_winter", "fg": 0 }
> ]
> [...]
> 
> ```
> 
> What this does is replacing the [TILE] with **one for every season**.  
> This would also allow you to just overwrite it for the winter (as an example) if you remove all entries save for `"[TILE_ID]_season_winter"` .

---

<div class="post-metadata">

**Author:** ![Bio](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bio/32/6690_2.png) [@Bio](https://discourse.cataclysmdda.org/u/Bio)\
**Post date:** [September 23, 2021, 3:08am UTC](https://discourse.cataclysmdda.org/t/how-to-replace-sprites-with-an-already-existing-id/27080/7 "2021-09-23T03:08:09Z")

</div>

nope, still doesn’t work. I don’t know if a new update “broke” being able to force overide of terrain sprites, or i’m missing something incredibly stupid, but this thing just doesn’t seem to want to cooperate.  
fortunately I have a backup plan to see if I can get what I want without trying to herd cats with the coding
