tiled icon indicating copy to clipboard operation
tiled copied to clipboard

How to get the configuration table (怎么获取配置表)

Open 2642543078 opened this issue 8 months ago • 9 comments

I used a map of the town of Stamford. There are regional places in it. How do I get their configuration table?

(我使用了一个斯坦福小镇的地图 里面有区域场所 我怎末获取到他们的配置表)

2642543078 avatar Nov 07 '23 05:11 2642543078

Based on the automatic translation by Google, I'm afraid I have no idea what you mean. :-/

bjorn avatar Nov 07 '23 07:11 bjorn

This is the meaning of tiled map editor I converted its final map into json format. How are the numbers generated in it random? Can you customize the number or can you see the number when creating the map (就是这个意思 tiled地图编辑器 我把它最后做成的地图转换成json的格式 那他里面的数字是怎么生成的随机的么 可以自定义那个数字么 或者说在创建地图的时候可以看到那个数字)

2642543078 avatar Nov 07 '23 07:11 2642543078

the_ville_jan7.json 我就说这里面的数字可以在创建的地图的时候就可以看到他最后生成的数字是多少么 还是也可以自定义 那如果自定义或者看这个数字怎么看怎么知道 这个数字对应的是什么东西(I said can you create a map and you can see what the final number is or can you customize it so if you customize it or look at the number how do you know what the number corresponds to)

2642543078 avatar Nov 07 '23 07:11 2642543078

I'm not sure what number you are talking about. If you mean the numbers in the tile layer data, maybe the following page describing how they work might help?

https://doc.mapeditor.org/en/stable/reference/global-tile-ids/

bjorn avatar Nov 07 '23 11:11 bjorn

我不确定你在说什么数字。如果您指的是切片图层数据中的数字,也许以下描述它们工作原理的页面可能会有所帮助?

https://doc.mapeditor.org/en/stable/reference/global-tile-ids/ 你提供的很有帮助 非常感谢 但是还是没有解决我的问题 我再清晰的说一下 问题就是我们用tiled地图编辑器我们创建好地图要转化成TMX或者Json的形式 然后转化后的文件你打开以后会有数字 我想说那些数字是怎么生成的 那些数字是否在创建地图时可以自定义 (That was very helpful, thank you very much, but it still didn't solve my problem. Let me be clear. The problem is that we use the tiled map editor and we create the map and we convert it into TMX or Json and then the converted file you open will have numbers. I want to say how are those numbers generated Whether those numbers can be customized when creating the map)

2642543078 avatar Nov 07 '23 12:11 2642543078

There are many different "numbers" in Tiled maps. If you are talking about the tile GIDs: They are generated from the tile IDs you see in the tileset, which are assigned sequentially, but may have gaps if tiles are deleted from the tileset. The GIDs are created by assigning a "firstgid" number to each tileset, starting with 1 and increasing based on the previous tilesets' largest IDs, and adding these numbers to the tile IDs from each tileset. You cannot customise these IDs. You can sort of control which "firstgid" each tileset gets by controlling the order in which you add tilesets to your map, but this is not guaranteed and is not recommended.

If you need to associate custom numerical data with tiles, the best way to do this is through Custom Properties.

eishiya avatar Nov 07 '23 12:11 eishiya

平铺地图中有许多不同的“数字”。如果您谈论的是切片 GID:它们是根据您在图块集中看到的图块 ID 生成的,这些 ID 是按顺序分配的,但如果从图块集中删除图块,则可能会有间隙。GID 的创建方法是为每个图块集分配一个“firstgid”编号,从 1 开始,根据先前图块集的最大 ID 递增,然后将这些数字添加到每个图块集的图块 ID 中。您无法自定义这些 ID。您可以通过控制向地图添加图块集的顺序来控制每个图块集获得哪个“firstgid”,但这不能保证,也不建议这样做。

如果需要将自定义数值数据与磁贴相关联,则最佳方法是通过自定义属性。

I just want custom data to be associated with magnets. I don’t know what the generated tile numbers represent. I need to look at my own map to correspond one by one. This is very slow and eye-catching. How do you operate the custom attributes you just mentioned? Can this method solve my problem?

(对 我就是想要自定义数据与磁铁相关联 由于生成的磁贴数字我不清楚代表什么需要看自己的地图一个个去对应看这样非常慢并且费眼 你刚才说的自定义属性是怎么操作 这种方法是否可以解决我的问题)

2642543078 avatar Nov 07 '23 12:11 2642543078

The tile IDs and GIDs are not normally something you should care about, they're just a way to identify the tiles used in a map, and are normally handled entirely by code.

In your first post, you mentioned having a regional map of Stanford. Are you sure Tiled is the correct software for what you're trying to do? Tiled is mainly for tile-based video game maps, but you seem to be talking about map data for digital cartography, which is a completely different concept and requires different software.

eishiya avatar Nov 07 '23 12:11 eishiya

切片 ID 和 GID 通常不是您应该关心的,它们只是识别地图中使用的切片的一种方式,通常完全由代码处理。

在你的第一篇文章中,你提到有一张斯坦福大学的区域地图。您确定 Tiled 是适合您要做的事情的正确软件吗?平铺主要用于基于图块的视频游戏地图,但您似乎在谈论数字制图的地图数据,这是一个完全不同的概念,需要不同的软件。

The regional map of Stanford University they created used the tiled tool, so it was in the right direction. The slice ID and GID pair are usually processed by the code. I would like to ask whether it is finally converted into a JSON or TMX format file. The numbers will definitely correspond to the tile set on the map, so how can we find the corresponding location on the map based on the numbers?

(他们所创建的斯坦福大学的区域地图就是用的tiled工具 所以是适合的 方向说错了 切片 ID 和 GID对通常肯定都是代码所处理的 那我问一下最后转化成不论是JSON或者TMX格式文件的数字 肯定都会对应上地图的图块集的 那我们怎么就是可以根据数字查找到对应地图的哪里)

2642543078 avatar Nov 07 '23 12:11 2642543078