Is there an easy way to merge two tilesets?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CKO

Is there an easy way to merge two .tres files into one file?

What kind of resources are the .tres files?

Eric Ellingson | 2019-02-18 16:53

.tres files are tileset resources that are fed into TileMaps

I have recently realized that they are text-based, so I may have an answer to this question soon.

CKO | 2019-02-19 07:38

:bust_in_silhouette: Reply From: CKO

This can apparently be done by hand as the .tres resource files are text-based.

The final merged .tres resource file will have two or more ext_resource declarations as shown below:

[gd_resource type="TileSet" load_steps=2 format=2]

[ext_resource path="res://assets/my_tiles.png" type="Texture" id=1]
[ext_resource path="res://assets/her_tiles.png" type="Texture" id=2]

[resource]

0/name = ""
0/texture = ExtResource( 1 )
0/...
1/name = ""
1/texture = ExtResource( 1 )
1/...
2/name = ""
2/texture = ExtResource( 2 )
2/...
3/name = ""
3/texture = ExtResource( 2 )
3/...