Efficient Resource Creating/Maintaining?

I’m currently realising that creating and managing a lot of resources is a tedious task and very time consuming.

Let’s say I want to manage dozens of cards as single resources. The only way I see is to create a scene that uses the resource, and than creating the resource on the right sidebar and then save it to disk.

Because I use assets (sprites), they get unique IDs assigned to them by Godot, so I can’t just create the resource file in my IDE.

Is there a good way to create multiple Resources in a more convenient way, like having a separate view for it? And how do I manage it if I want to change the structure of the resource later? Do I have to load, edit and save each resource again or is there something like a bulk update?

Thanks for any hints!

You can create and duplicate resources in Godot’s Filesystem panel. Otherwise you may have to make a plugin for mass editing your resources.

Thanks, ah yeah I forgot that I can edit them through the files.

Still, I’m baffled that noone else seems to have this problem…

you can make resources externally. assign the paths and files without uids and then in godot editor top left menu → project → tools → upgrade project files .

For card data or a lot of data in general, especially if it’s predominantly of tabular nature, it’s much more convenient to keep it in csv files, edit those files in a spreadsheet program and parse them into actual resource objects at startup or in tool scripts if data is needed in the editor.

The resource editing layout in the inspector annoys me to no end. Nested arrays/dictionaries tend to look very confusing, eat up a lot of unnecessary screen estate and require many mouse clicks when editing. In many occasions I just replaced them with parsed strings. Let me give you an example.

Let’s say we need to store a list of numerical entries. Each entry can be either a number or a pair of numbers that signify a range. The demand is to maintain a bunch of properties with such a structure. It’s a no brainer to use an array, where elements can be numbers or two-element arrays. Sounds simple enough but looks so ugly in the inspector, painful to edit as well. So instead of having that exact structure, just store an intermediary string that conforms to some simple syntax. In this case, entries separated by semicolons and ranges specified by a minus character:

1; 2; 4-7; 10

Super simple to parse, easy to edit and read, and saves enormous amounts of inspector space.

1 Like