dialogic-godot / dialogic

💬 Create Dialogs, Visual Novels, RPGs, and manage Characters with Godot to create your Game!
https://dialogic.pro
MIT License
3.35k stars 206 forks source link

Invalid call register_character #2193

Closed doubleSheep66 closed 3 weeks ago

doubleSheep66 commented 1 month ago

The problem

Describe the bug Invalid call. Nonexistent function 'register_character' in base 'CanvasLayer (default_layout_base.gd)'.

To Reproduce Steps to reproduce the behavior: var layout = Dialogic.start("res://core/dialogic/timelines/timeline_unit.dtl") layout.register_character(character_unit,dialogic_marker)

Expected behavior I just use the example bubble style.

Screenshots image

System (please complete the following information):

Solutions

Workaround

What you tried to get the feature working

Possible fixes

Any idea to fix the issue or a link to the line of code that might be the cause for this problem

Jowan-Spooner commented 1 month ago

Is the textbubble layout your default style? You can make it the default by clicking the little Start button in the style editor.

doubleSheep66 commented 4 weeks ago

image image I don't understand why register_character define in text_bubble_base.gd,but jump in to default_layout_base.gd when calling

CakeVR commented 4 weeks ago

Hello, as Jowan said, please verify whether the Text Bubble Layout is your default style.

doubleSheep66 commented 4 weeks ago

Hello, as Jowan said, please verify whether the Text Bubble Layout is your default style.

Hello,when I setted the default style and clicked the play timeline button ,it always displays bubble style.

Jowan-Spooner commented 3 weeks ago

@doubleSheep66 If you think this is not a bug, but need help figuring out what step you might have missed, feel free to join emilios discord and we can help you there.

What I can see is that you are trying to call the register_character method on the default or fallback style. When calling Dialogic.start() it will instance the default style, so it is most likely that the textbubble style is NOT correctly setup as the default. If you can show that the textbubble style IS the default and it is still instancing something else, this might be a bug, but so far I've not seen that.

doubleSheep66 commented 3 weeks ago

It's strange that when I tried to restart a project to reproduce this issue, it ran normally. Through comparison, I found that the only difference is that the style in the failed project is all white, and I don't understand what this will affect, maybe it's due to it. I guess a certain style was accidentally damaged? image

doubleSheep66 commented 3 weeks ago

Perhaps this is just a foolish problem created by me, in short, it is now running normally. Thank you very much for your efforts

Jowan-Spooner commented 3 weeks ago

Glad you were able to fix it.

You can make a style default with the STAR button on top of the style list. The default style is indeed marked by being yellow. So stuff like this should be solveable by selecting the textbubble style and then clicking the STAR button.

doubleSheep66 commented 3 weeks ago

Glad you were able to fix it.

You can make a style default with the STAR button on top of the style list. The default style is indeed marked by being yellow. So stuff like this should be solveable by selecting the textbubble style and then clicking the STAR button.

If there is no default style, it will report this error.

Jowan-Spooner commented 3 weeks ago

Yes because how would it know that you want the textbubble style? It is using a fallback style, but it is the vn-style.