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

Cannot quick load DialogicCharacter .dch custom resource file #2226

Open
hsandt opened this issue May 14, 2024 · 2 comments
Open

Cannot quick load DialogicCharacter .dch custom resource file #2226

hsandt opened this issue May 14, 2024 · 2 comments

Comments

@hsandt
Copy link

hsandt commented May 14, 2024

The problem

Describe the bug
I reference a DialogicCharacter from my own script:
@export var dialogic_character: DialogicCharacter

but using Quick Load in the inspector doesn't list it.

image

Load, however, works (but I must navigate to the file and select it).

image

Interestingly, *.dch seems automatically added to the list of recognized files in Godot (maybe it scans all files, or was it manually registered from the plugin?)

image

Anyway, using either All Recognized or .dch, I could select and assign the file properly.

image

I wonder if it's a limitation from Godot. According to this closed issue: godotengine/godot#67119

custom resources should now support Quick Load (since 4.0), however it says nothing of custom extensions like .dch. Is it the source of the issue?

I searched through the doc (https://docs.dialogic.pro/), but I found no page showing how to use register_character to pass a DialogicCharacter so the bubble shows this character's portrait. Only enough, only the sample bubble (text_bubble_base.tscn, shown when calling Dialogic.start('timeline') alone) mentions this method:

layout.register_character(load("res://path/to/my/character.dch"), $BubbleMarker)

The sample code gives a hardcoded path to simplify, so there is no such issue, but in production I would export such a variable. But then I cannot Quick Load the exported DialogicCharacter var. I also checked in code how the Dialogic Panel worked, but it does some custom scan of all .dch files (we could do the same to implement a custom Quick Load maybe?).

Otherwise I could export a String var to use as path to resource; but then again I wouldn't benefit from resource type filtering and I would have to navigate and select the file anyway.

In practice it's OK because all my characters are put in the same folder and I don't have many of them, so it would really matter for a bigger project.

To Reproduce
Steps to reproduce the behavior:

  1. Create a script with @export var dialogic_character: DialogicCharacter
  2. Create some character in Dialogic panel, saved as .dch file
  3. In Inspector, try to Quick Load dialogic_character with that file
  4. See that file doesn't show

Expected behavior
Character resource files should be shown

System (please complete the following information):

  • OS: Linux Ubuntu 22.04
  • Godot Version: v4.2.1.stable.official [b09f793f5]
  • Dialogic Version: 2.0-Alpha-13 (Godot 4.2+) (installed manually)

Solutions

Workaround

Do a classic Load and select file in popup

Possible fixes

It may only be possible on Godot side, waiting for diagnostic from dev

@hsandt
Copy link
Author

hsandt commented May 14, 2024

On a side note, it may be nice to add the corresponding page to the documentation "Register character to play timeline/dialogue". Then we could add all the caveats there, such as the need to classic Load the .dch file.

@Jowan-Spooner
Copy link
Collaborator

Hey, I've noticed this before, it's the same with timelines (.dtl) files. I assume that the godot QuickOpen simple lists .tres and .res files, so our custom file extension messes it up, but I'm not certain.

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

No branches or pull requests

2 participants