# Tileset Editor 1.0 (Proof of Concept)

**URL:** <https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029>\
**Category:** The Lab\
**Created:** [February 10, 2014, 11:40am UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029 "2014-02-10T11:40:20Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![Thuztor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thuztor/32/22_2.png) [@Thuztor](https://discourse.cataclysmdda.org/u/Thuztor)\
**Post date:** [March 14, 2014, 1:56pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/81 "2014-03-14T13:56:54Z")

</div>

Is it possible to select a -1 tile background for multiple tiles?

My problem is, that if I save my tileset with your program, all “bg”: -1 are gone.  
I used it for tiles with no background. If the line is gone, every multiple tile (e.g. blood) without a background has the standard grass tile as background.

---

<div class="post-metadata">

**Author:** ![Sean\_Mirrsen](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Sean\_Mirrsen](https://discourse.cataclysmdda.org/u/Sean_Mirrsen)\
**Post date:** [March 14, 2014, 2:50pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/82 "2014-03-14T14:50:33Z")

</div>

[quote=“Thuztor, post:81, topic:5029”]Is it possible to select a -1 tile background for multiple tiles?

My problem is, that if I save my tileset with your program, all “bg”: -1 are gone.  
I used it for tiles with no background. If the line is gone, every multiple tile (e.g. blood) without a background has the standard grass tile as background.[/quote]It should be possible to just have no background. I think. If you leave the “background” slot in the tile select window blank, the tile should remain transparent. Or is there something else? Blood on the ground is laid over the terrain tile, if that’s what you’re seeing, exactly because it has no background. You need a black background if you don’t want it to blend.

Mass editing however, is one of the features I was considering. But I have other problems.  
The first thing I did with my newfound independence is break the ASCII generator script so thoroughly it doesn’t work anymore. XD I’m trying to find what exactly I broke without resorting to restoring a backup. So that’ll be a while. 😛

---

<div class="post-metadata">

**Author:** ![Thuztor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thuztor/32/22_2.png) [@Thuztor](https://discourse.cataclysmdda.org/u/Thuztor)\
**Post date:** [March 14, 2014, 3:42pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/83 "2014-03-14T15:42:31Z")

</div>

A lot of my tiles have a blank background in your program.  
But when the program writes the tile\_config.json, all “bg”: -1 are deleted.  
If “bg”: -1 doesn’t exist for a tile without a background, the game shows always the grass tile as background.

---

<div class="post-metadata">

**Author:** ![Robik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/robik/32/1349_2.png) [@Robik](https://discourse.cataclysmdda.org/u/Robik)\
**Post date:** [March 14, 2014, 4:48pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/84 "2014-03-14T16:48:43Z")

</div>

> [@Thuztor](#):
>
> If “bg”: -1 doesn’t exist for a tile without a background, the game shows always the grass tile as background.

Really? That is crazy behavior… and undocumented at wiki. Oh well, if that’s the case, I have to change my editor as well.

---

<div class="post-metadata">

**Author:** ![Sean\_Mirrsen](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Sean\_Mirrsen](https://discourse.cataclysmdda.org/u/Sean_Mirrsen)\
**Post date:** [March 14, 2014, 6:09pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/85 "2014-03-14T18:09:20Z")

</div>

[quote=“Thuztor, post:83, topic:5029”]A lot of my tiles have a blank background in your program.  
But when the program writes the tile\_config.json, all “bg”: -1 are deleted.  
If “bg”: -1 doesn’t exist for a tile without a background, the game shows always the grass tile as background.[/quote]That does not make literally a single lick of sense. If that were the case, the problem that led to the creation of the “Generate ASCII Tiles (with background)” function would not exist. And transparent tiles would not be possible. Please post the tileset you get in output, or send it to my email (controllersean at mail dot ru) so I can test it and see what is actually going on.

edit: in other news, found that error of mine. Turns out some items’ flags fields aren’t set as an array but as a plain text field, and trying to read them as arrays halts the function. Java, why you fail quietly without any sort of information?

---

<div class="post-metadata">

**Author:** ![Thuztor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thuztor/32/22_2.png) [@Thuztor](https://discourse.cataclysmdda.org/u/Thuztor)\
**Post date:** [March 15, 2014, 3:27pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/86 "2014-03-15T15:27:24Z")

</div>

Here is an example of fd\_blood of my tileset.

First the output of the Tileset Editor:

{  
“rotates”: false,  
“multitile”: true,  
“additional\_tiles”: [  
{  
“id”: “center”,  
“fg”: 655  
},  
{  
“id”: “corner”,  
“fg”: 656  
},  
{  
“id”: “edge”,  
“fg”: 657  
},  
{  
“id”: “t\_connection”,  
“fg”: 658  
},  
{  
“id”: “end\_piece”,  
“fg”: 659  
},  
{  
“id”: “unconnected”,  
“fg”: 654  
}  
],  
“id”: “fd\_blood”,  
“fg”: 654  
},

And here is my original, handwriten code:

{  
“id”:“fd\_blood”,  
“fg”:476,  
“multitile”:true,  
“additional\_tiles”:  
[  
{  
“id”:“center”,  
“fg”:2289,  
“bg”:-1  
},  
{  
“id”:“corner”,  
“fg”:2290,  
“bg”:-1  
},  
{  
“id”:“edge”,  
“fg”:2291,  
“bg”:-1  
},  
{  
“id”:“t\_connection”,  
“fg”:2292,  
“bg”:-1  
},  
{  
“id”:“end\_piece”,  
“fg”:2293,  
“bg”:-1  
},  
{  
“id”:“unconnected”,  
“fg”:476,  
“bg”:-1  
}  
],  
“rotates”:false  
},

You can believe me, with the output file every tile without a background has a grass tile as background.

---

<div class="post-metadata">

**Author:** ![Sean\_Mirrsen](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Sean\_Mirrsen](https://discourse.cataclysmdda.org/u/Sean_Mirrsen)\
**Post date:** [March 15, 2014, 3:38pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/87 "2014-03-15T15:38:24Z")

</div>

I would like to believe you, but since I do not experience that problem myself I cannot debug it. Trust, but verify. For me, all tiles that simply omit the “bg” line have transparent backgrounds. The program works as intended.

Please post your tileset in an attachment or send it to my email. I cannot fix a problem I do not experience.

---

<div class="post-metadata">

**Author:** ![Thuztor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thuztor/32/22_2.png) [@Thuztor](https://discourse.cataclysmdda.org/u/Thuztor)\
**Post date:** [March 15, 2014, 4:32pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/88 "2014-03-15T16:32:11Z")

</div>

Okay, here is the output of my tileset with the Tileset Editor.  
If you compare the one in the current version, it’s not much different, except the sorting.

[https://dl.dropboxusercontent.com/u/69737873/Sonstiges/Cataclysm/ThuztorTilesetoutput%40.7z](https://dl.dropboxusercontent.com/u/69737873/Sonstiges/Cataclysm/ThuztorTilesetoutput%40.7z)

File was to big for the Attachments. 😉

---

<div class="post-metadata">

**Author:** ![Sean\_Mirrsen](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Sean\_Mirrsen](https://discourse.cataclysmdda.org/u/Sean_Mirrsen)\
**Post date:** [March 15, 2014, 5:30pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/89 "2014-03-15T17:30:10Z")

</div>

Okay, found it. It’s a bug in Cataclysm itself.

[code] JsonArray tiles = config.get\_array(“tiles”);  
while (tiles.has\_more()) {  
JsonObject entry = tiles.next\_object();

```
    tile_type *curr_tile = new tile_type();
    std::string t_id = entry.get_string("id");
    int t_fg = entry.get_int("fg", -1);
    int t_bg = entry.get_int("bg", -1);
    bool t_multi = entry.get_bool("multitile", false);
    bool t_rota = entry.get_bool("rotates", t_multi);
    if (t_multi) {
        // fetch additional tiles
        JsonArray subentries = entry.get_array("additional_tiles");
        while (subentries.has_more()) {
            JsonObject subentry = subentries.next_object();

            tile_type *curr_subtile = new tile_type();
            std::string s_id = subentry.get_string("id");
            int s_fg = subentry.get_int("fg", 0);
            int s_bg = subentry.get_int("bg", 0);[/code]

```

Or, well, more like an oversight. When loading tile data, the foreground and background both default to -1, as needed. But when loading subsequent subtiles in a multitile, it defaults to 0, which means multitiles with no background defined will use the zeroth tile. I guess one way to bypass this, at the moment, is make sure the zeroth tile is transparent. For instance, by adding a “00” tile definition, and force-selecting a transparent image as its foreground, then clicking Sort so it’s in the top. In the meantime, we should probably file a bugreport.

---

<div class="post-metadata">

**Author:** ![Ratha](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@Ratha](https://discourse.cataclysmdda.org/u/Ratha)\
**Post date:** [March 20, 2014, 5:00pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/90 "2014-03-20T17:00:55Z")

</div>

Does this program work with the 64 bit version of java on win7 64. I downloaded version 0.11 from the original post but when i launch the program i get a ‘busy’ cursor for about 1/10th of a second, and nothing else happens. No errors, no crashes.

---

<div class="post-metadata">

**Author:** ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)\
**Post date:** [March 20, 2014, 10:01pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/91 "2014-03-20T22:01:54Z")

</div>

Are you trying to launch using the .bat file or the .jar? The .bat might be outdated, so the .jar might work.

---

<div class="post-metadata">

**Author:** ![Ratha](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@Ratha](https://discourse.cataclysmdda.org/u/Ratha)\
**Post date:** [March 21, 2014, 8:59am UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/92 "2014-03-21T08:59:01Z")

</div>

Was trying to use the .exe in the root folder. Assumed it was the correct launch method. Will have to try the .jar in the bin folder later.

---

<div class="post-metadata">

**Author:** ![Sean\_Mirrsen](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Sean\_Mirrsen](https://discourse.cataclysmdda.org/u/Sean_Mirrsen)\
**Post date:** [March 21, 2014, 9:03am UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/93 "2014-03-21T09:03:35Z")

</div>

The exe is just a launcher for the .jar, but it is too simple to just fail. It’s more likely that the .jar itself is failing - Java tends to do that, just fails to work without telling you anything.

---

<div class="post-metadata">

**Author:** ![Ratha](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@Ratha](https://discourse.cataclysmdda.org/u/Ratha)\
**Post date:** [March 22, 2014, 6:54pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/94 "2014-03-22T18:54:43Z")

</div>

Turns out that i was able to successfully launch the .jar file manually with a right click. Not sure why the .exe fails but it does not appear to do anything for me on win7 64bit. Even launching the exe via command prompt yields no further information at all. Just gives me a new/empty command prompt line.

---

<div class="post-metadata">

**Author:** ![Chase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/chase/32/6463_2.png) [@Chase](https://discourse.cataclysmdda.org/u/Chase)\
**Post date:** [March 25, 2014, 2:37am UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/95 "2014-03-25T02:37:07Z")

</div>

It should run just fine on java 64, however the launcher does not attempt to ‘find’ javaw.exe, so if it isn’t on your path then the program will not be able to launch it. This is most likely the problem. If you add your java 64 bin directory to your path, the exe should work fine.

In other news, I am stopping work on this, since Sean Mirrsen wants to work on it, and Robik also released a tileset editor, the field seems a bit crowded. There is only about 40 or so people this program is of interest too, so I don’t see a need to maintain a 3rd editor.

(However if these people disappear, e-mail me and I will update this again.)

---

<div class="post-metadata">

**Author:** ![Chase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/chase/32/6463_2.png) [@Chase](https://discourse.cataclysmdda.org/u/Chase)\
**Post date:** [September 26, 2014, 6:58pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/96 "2014-09-26T18:58:29Z")

</div>

My offer still stands if anyone needs this updated. It seems work on other editors has petered out.

---

<div class="post-metadata">

**Author:** ![Robik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/robik/32/1349_2.png) [@Robik](https://discourse.cataclysmdda.org/u/Robik)\
**Post date:** [September 26, 2014, 7:04pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/97 "2014-09-26T19:04:49Z")

</div>

Cool, it is good to have an option for Linux folk too 🙂

---

<div class="post-metadata">

**Author:** ![stk2008](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@stk2008](https://discourse.cataclysmdda.org/u/stk2008)\
**Post date:** [October 8, 2014, 9:21am UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/98 "2014-10-08T09:21:36Z")

</div>

Im testing this but when i choose a tileset to edit it does nothing.

I open the file in the lets say Mshock folder and nothing happens I see no tiles or any thing just the blank editor windows etc ☹

---

<div class="post-metadata">

**Author:** ![Chase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/chase/32/6463_2.png) [@Chase](https://discourse.cataclysmdda.org/u/Chase)\
**Post date:** [October 10, 2014, 8:40pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/99 "2014-10-10T20:40:33Z")

</div>

It’s expected to have the right path. It’s not updated for the nightlies altered tile configuration file (NOT the .json, the other one).

---

<div class="post-metadata">

**Author:** ![stk2008](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@stk2008](https://discourse.cataclysmdda.org/u/stk2008)\
**Post date:** [December 9, 2014, 2:05pm UTC](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029/100 "2014-12-09T14:05:59Z")

</div>

Has any one else done an updated version of this please 🙂

[Previous page](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029.md?page=4)

[Next page](https://discourse.cataclysmdda.org/t/tileset-editor-1-0-proof-of-concept/5029.md?page=6)
