Could you add the ability to have arbitrary table layers? I'd like to be able to enter arbitrary text or numbers, etc, into any map tile, and export it as a CSV

Could you add the ability to have arbitrary table layers? Perhaps it could just be called a Data Layer.

I’d like to be able to enter arbitrary text or numbers, etc, into any map tile, and export it as a CSV.

Basically, I’m just looking for a way to edit a table like you would in Excel, but it’s overlaid over the top of the tiled map. And the layers can be exported as individual CSV tables.

For this layer, I’d like to be able to turn it on and off (visibility), and if it’s on, it simply renders the data for each cell over the top of the map. If it’s off, you can’t see the values (for when you’re just editing the map tiles).

Currently I use another table (in Excel) to trigger off readable events, and they dictate which line from another Readables Contents table the text is pulled from. These are exported as CSVs and brought into my game. But this takes a fair bit of cross referencing the actual locations from the map to the Excel table, and it takes time, and is a hassle.

Here is a little mockup of how it could look in the Tiled editor if one could simply edit Table Data Layers right there on top of the Tiled map…

The user could set a different text color for each layer, to make things a bit more readable, even if a few different data layers are currently set to being visible.

And when you select File > Export, you can select which layer to export as a CSV.
(I would want to export my layers individually, as CSV files, which I can name and save).

So at the end, I would be able to save out the Readables Data Layer as ReadablesLocations.csv,
and the Teleports Data Layer as TeleportLocations.csv. That would be awesome.

Q: Could this be added to Tiled with any amount of ease?
Q: Is it something others would find useful?

Cheers! All the best.

  • Murray

I would appreciate a way to edit “data per tile”.

Currently you can achieve this with a workaround by using a “dummy” (color-, symbol- or shape-coded) tileset where you give each tile properties, then place the tiles with the desired properties where you need them on a “data” tile layer. The problem with that is that you have to edit the data in the tileset as opposed to the layer, and if you have a tile on the layer whose data you want to modify you have to look up that tile in the tileset to edit its properties.

Depending on the amount of data this is more or less feasible. I’d say for anything less than one, maybe two, dozen values you can learn the colors/symbols/shapes of the tiles and associate them with specific values, but more than that and the mental load may become overwhelming.

Yep, agreed.

I think for every one of the cases I can think of wanting to use this for,
I’m just putting numbers in the cells, which relate to line numbers in
another table (specifying the row of a string of text to display, or
specifying the row of an event to trigger, or specifying some values to use
for a teleport).

Generally, I’ll only ever want to refer to each number once. And I might
have hundreds to choose from.

So to do it via a cheat-y dummy tile approach doesn’t make any sense for my
cases. I’d be better off just continuing to use a separate Excel table for
each different “purpose”, like I’m doing now.

But yeah, if I could enter that table data into Tiled, on a separate data layer for each “purpose”, that’d make things much easier. I could then edit the data there, and see it overlaid over my tiled map, and export the data out as separate CSVs.

Another thought…

Perhaps you wouldn’t really need to add functionality to the export thing, where you have to choose which layers to export. That could just be done by toggling layers on and off in the Layers window. And it could just export any visible layers. So the user could do the manual work of ticking which layer to export etc.

For me, the main benefit would just be the actual process of working on the map and those sets of data all at once, without having to be alt-tabbing and cross referencing everything back to the map positions manually.

The way it’s saved out could just be whatever is easiest to implement. :smile:

Is it really a problem to export a few more layers than necessary?

In general, this problem is solved by object layers, where you can place rectangle objects aligned to tiles that contain any custom properties like those numbers or texts on signposts. But yes, there is no generic way of turning that into a CSV file, unless you’d write a custom exporter for it.

That said, I could imagine adding generic “number” or “text” layers where each cell can contain one value of the associated type. I’m not sure how to deal with this at the low level though. Would you expect the tile layer tools to work on them, or would they have their own tools? What about copy/paste of regions? I think there are a lot of open questions and I also think it’s a somewhat rare use-case since for most people not limited to a CSV format, the object layers can do this.

I would really love to see a feature “data per tile”. I have taken TilemapKit and render an 3d Scene with the tiles as cubes. But i can’t add properties per tiles, only per tilemap. If you could add the properties to the tiles you add start times of animations etc to the map and so use it as full level editor.

Please consider this approach as an feature request. The CSV would be superseded by the fact that the data is IN GAME available at almost no costs.

Thanks Peter

Extruding tiles to 3D is also something I’m probably going to implement in TilemapKit too. There’s a votable roadmap item for it here.

I like the idea of using 2D tools and generating a 3D look and feel from it without needing to consider much of the complexities involving 3D rendering. Also it would make tilemap games stand out more.

@TilemapKit is there yet an way to delegate the creation of tiles in tilemapkit? Yet i iterate over all layers, but it creates unused objects :wink:

Yes. TilemapKit is split in model and view classes: TMX data (model) and the rendering classes (nodes aka view).

You can load a TMX file and have it in memory only as data. You can then modify the tilemap data and afterwards initialize a tilemap node with the modified (or runtime generated) map model for rendering. This would allow to throw away certain layers after processing so that rendering won’t create tile sprites (or tiled objects) for those layers.