-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Adds Resource Files #1
Adds Resource Files #1
Conversation
… with resource files
4246379
to
26cbe6d
Compare
First of all, thank you very much for the PR! I love having the characters as resources because it is so much more user friendly than just having a dictionary. I didn't know you could do that and it is a perfect fit for the add-on. As a goal I wanted to always have all the placeholders included so you don't have to create extra stuff, in this case we would have to create the three characters resources for the intro so it doesn't fails on a test run. Regarding the dialog, I'm not sure if having the need for external Json files is something I would like to have. Giving the possibility to set the dialog by code is a must for me. If having an external resource could give us the chance to create a visual editor (in a similar way to this https://github.com/EXPWorlds/Godot-Dialog-System) I would like to explore the idea of resources for dialogs, but for now I think it just makes you require using external editors to create the json files and it is less user friendly. If both systems can co-exists that could also work. So, I'll see if I edit a couple of things here and there and commit some extra changes. Overall I really like the direction! Thanks again! |
Hey Emilio, yeah I totally agree with regards to the external JSON. I had ported that functionality over from the existing |
…er to list items
…er to list items
Fix Android directory open error
This PR removes the requirement for the developer to create auto-loaded
global.gd
andcharacters.gd
scripts. The reason for doing so is that they are both very common names which may result in clashes in some projects, and also that creating extra auto-loaded singleton classes to fuel the dialog system does not seem like the best approach.This PR proposes a cleaner solution using custom Godot Resources.
Namely a
DialogResource
which contains a reference to an external Json file for the dialog, aDictionary
of key/value custom variables, and anArray
ofDialogCharacterResource
references.And a
DialogCharacterResource
which contains a Name, an Image and Color.Instead of creating a
global.gd
script that returns custom variables and acharacters.gd
script returning a dictionary of characters, developers can now create individual resource files for each character and dialog.Video demo here:
https://twitter.com/codewithtom/status/1274151135776051206