Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support raw json format for item protoset #194

Open
Nordsoft91 opened this issue Apr 15, 2024 · 2 comments
Open

Support raw json format for item protoset #194

Nordsoft91 opened this issue Apr 15, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Nordsoft91
Copy link

Currently item protoset is defined as res file which can be edited only with embedded editor and has some header, which is not very convenient.
I suggest to support common .json file as item protoset so it can be easily edited with any tool

@kyle-wannacott
Copy link
Contributor

@Nordsoft91 You can save your item protoset as a .tres file (by renaming extension) which is human readable and editable in an external editor, there is a tradeoff however as .res is more performant because its binary.

@peter-kish
Copy link
Owner

Yeah, the idea is to store protosets as .tres resources and edit them in the protoset editor, which can be inconvenient compared to editing raw JSON ☹️

But the original idea was exactly how @Nordsoft91 described. The problem was that back in Godot 3 JSON files were not handled very well by the engine and you had to write an import plugin to work with them. According to one of the Godot maintainers supporting JSON wasn't even planned:

JSON files are not considered resources and will probably never be, since Godot has no use for them. Instead, a solution such as godotengine/godot-proposals#677 should be implemented.

so I decided to give up on it.

However, this changed in Godot 4 and JSON resources are supported now. I'm planning to replace protoset resources with JSON files in GLoot 3.x as I think it would simplify prototype management, but also maintenance of the plugin (no need for a custom editor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants