Want to make a neat tileset importer

Godot Version

Godot 4.2.2

Question

Hi everyone!
I want to make a plugin that helps me to create a tileset by texture and other several parameters. The problem is how to make it a usable tool without conventions like “Click this checkbox, it’s instead of a button”.

I found that the handy Tilesetter app has an export to Godot 3.x version. It creates a tileset with working autotile functionality. This is not compatible with Godot 4.x and its’ terrains with autotiles, so I decided to do a script that creates tilesets with initialized terrains so I’ll save myself from routine work with clicking all correct tile neighbors (peering bits) again and again.

And I already made a working version with node and export fields, where everything is created in _ready function.

I wanted to make an import plugin. However, from what I understand, importing changes the behavior of the original file, and I’m creating a separate new resource, so I need a different approach.

Is there any way I can make a plugin where I can also keep the original export fields (with hint for textures, vectors, enumerations)?
I realize I can make a separate Control node with a normal button, but can I replicate the style of the export-fields?

UPD: Now I need to open a separate scene with the tool-script, and there I’ll fill everything in and create the tilesets I need.

I want to make it a separate tab in the editor, which keeps the Godot editor style with export-groups and form fields for different types (texture, vector, folder path, etc.). And so far I don’t know how to do that.

You’ll want to read about how to make plugins and pretty much every section of the editor plugins page in the documentation.

To add a Button in the inspector you will want to read about inspector plugins to know how to add your own controls in the inspector or modify the inspector controls for some properties.

You can also check the documentation for EditorPlugin to see how you can add extra docks.

I didn’t even notice the Inspector plugins page somehow, I thought I had read everything. That’s what I needed, thank you very much!