dialogic-godot / dialogic

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

A few bugs and glitches while using the Timeline and Character options [1.4.1] #855

Closed FermiBrudja closed 6 months ago

FermiBrudja commented 2 years ago

My desire to cooperate to polish the plugin increased today, surprisingly (yay!) I'm an expert at breaking everything I install. I might be useful for once!

I tried to follow the tutorial with a freshly installed 1.4.1 but I'm getting errors in the Debugger. Namely, after I changed the scale from 100% to 25% for the Character's portrait I started to get this error and the Timeline will not run beyond the first character join animation:

E 0:00:01.135   resume: Resumed function 'event_handler()' after yield, but script is gone. At script: res://addons/dialogic/Nodes/DialogNode.gd:636
  <C++ Error>   Method failed. Returning: Variant()
  <C++ Source>  modules/gdscript/gdscript_function.cpp:1795 @ resume()

And other glitches like, when you make a character join for the first time, if you don't toggle off the Wait for animation, the dialog box never appears and the Timeline stops. I get this debugger error:

E 0:00:02.648   resume: Resumed function 'event_handler()' after yield, but script is gone. At script: res://addons/dialogic/Nodes/DialogNode.gd:687
  <C++ Error>   Method failed. Returning: Variant()
  <C++ Source>  modules/gdscript/gdscript_function.cpp:1795 @ resume()
  <Stack Trace> DialogicAnimaTween.gd:82 @ finished_once()

As for some other oddities:

It would be good to add a fade-in for the box dialog instead of appearing in a split second (I know, it's a suggestion but I managed to break my Timeline again trying to get rid of the dialog box before the character appears on scene). To fulfill my desire, I tried to force a Wait the length of the join animation of the first character but it didn't work as intented I got this error without hope to trigger the dialog box after the character joins with his animation:

E 0:00:02.641   resume: Resumed function 'event_handler()' after yield, but script is gone. At script: res://addons/dialogic/Nodes/DialogNode.gd:884
  <C++ Error>   Method failed. Returning: Variant()
  <C++ Source>  modules/gdscript/gdscript_function.cpp:1795 @ resume()

I'm guessing that the most recent update of Godot might have broken a few things in the plugin because it is not working as intended. My version is this if it helps in anything: image

In a nutshell, the Timeline gets stuck upon the first character join and I'm forced to toggle off the Wait for Animation to make it to work. Changing the Scale of the portraits also stops the Timeline's flow after the first Character Join (only work-around I see is to scale the portraits manually in Photoshop to get the perfect fit) I forgot to say that the offset never manages to happen since the scale never gets applied. Positioning the characters' portraits is almost impossible from within the plugin's options 🤔

Hope it helps a bit because I really want this plugin to shine and use it extensively for my project which is massive in narrative and Dialogic would help tons to ease my workflow, if I just can make it beyond these odd happenings 😭

Thanks for reading /

qskousen commented 2 years ago

How are you adding the dialog? I am running the same Godot version as you and installed this plugin last night (also same version), have enlarged (rather than shrunk) a character portrait, and had no trouble adding a timeline via script and playing it when triggered.

FermiBrudja commented 2 years ago

Well, I followed the guide of Emilio (though a tad out-of-date but still useful regardless). Because I already have some experience with other visual novel apps, I went "a bit" out of the way and started by first adding a Background Image, then adding a Background Music and basically trying to copy the same layout as my other test project on a different app. From that just added the Join Character, but because in the original test the character came from the left of the screen, I added the Back In Left with a Length of 2... milliseconds? (I don't know which measure is used in that box) and left the box of "Wait for Animation" because I didn't want the text-box to appear before the character entered the cottage.

I added then his first Text (2 lines) then a different Text to change the expression of the face to follow the mood of the dialogue, after that an Audio Event for the apparition of the ghost which would Join the scene with a Join in a Fade In fashion and mirrored (because the ghost is on the right side of the screen). After that, Character Update to use a "fear" expression, followed by his Text expressing surprise, then the ghost starts to talk with his own text a bit and then the scene despawns as shown by Emilio in the video.

Thing is, after trying it out I saw the character started obviously way too big because the original file is a full body of 750x2248 px and both the knight and the ghost needed to be scaled down. Before that is when I started to try to troubleshoot why the scene wasn't advancing beyond the Join of the first character, that is when I noticed that box of "Wait for Animation" and after toggling it OFF, I tested the scene and the scene rand without interruptions, but with the dialog box already on the scene before the character entered the cottage (without the text yet). I checked the box again and ran the scene to record whatever error it gave the Debugger, as noted on my first post.

I left the checkbox off for the first character and proceeded to scale down the models and after doing that it again got stuck with the error I posted. I returned the scale of both portraits to their defaults and the scene ran as normal (but I could only see the feet of the characters talking because of the SIZE).

And I did nothing else because I found very odd that my Dialogic was working like this. As I said, I am an expert at breaking stuff when they fall in my hands. I followed the guide of drag'n'drop the contents of the plugin and all of that so I don't think it's an installation error which puzzles me because I did nothing offensive to the plugin nor the project itself but to activate the plugin from its settings and nothing else 🤔 I did indeed added a few folders to hold the portrait graphics, the sound and the music but that is the extend of all the stuff I did during this past weekend, just adding these few assets to try them out with Dialogic.

I'm yet stumpted because it's happening to me and nobody else. Today I'll make a new project and redo all the steps with the same 2 characters, the same background image, music and SFX. If I get again this error I'll update, and if everything goes right... then guess I'll need to ditch that project and carry on with the new one 🧠

qskousen commented 2 years ago

Sorry, I should have been more clear. When I asked how you are adding the dialog, I meant how are you adding it to the scene - are you doing it via script, or adding the dialog scene into your scene via the Godot UI?

FermiBrudja commented 2 years ago

Sorry, I should have been more clear. When I asked how you are adding the dialog, I meant how are you adding it to the scene - are you doing it via script, or adding the dialog scene into your scene via the Godot UI?

Ah no, like the video, everything from the Timeline panel. No single script was touched during the edition of the project, even after my curiosity drove me to the thought, I stayed my hand and steered away from opening any script because those things are too fragile.

qskousen commented 2 years ago

That is interesting. If you still have trouble after rebuilding it, a screenshot of the node tree on the left hand side might be helpful in debugging. Alternatively, if possible, you could upload the whole project somewhere so others can look at it and see if they have the same issue, and try to debug. So far I've been unable to reproduce your issue.

AnidemDex commented 2 years ago

For some reason, your dialog node dissappears after trying to handle the fade-in animation: https://github.com/coppolaemilio/dialogic/blob/239feb7d2b673ad99969c3e000070416f07178ae/addons/dialogic/Nodes/DialogNode.gd#L632-L636

That could explain why:

if you don't toggle off the Wait for animation, the dialog box never appears and the Timeline stops

I can't find on a direct solution

FermiBrudja commented 2 years ago

After testing on a new project with just the assets for the test, doing the same stuff I did for the previous one (skipping doing themes so it uses the default one), somehow it keeps again sending this bug with the "Wait for animation" disabled:

E 0:00:01.019   resume: Resumed function 'event_handler()' after yield, but script is gone. At script: res://addons/dialogic/Nodes/DialogNode.gd:636
  <C++ Error>   Method failed. Returning: Variant()
  <C++ Source>  modules/gdscript/gdscript_function.cpp:1795 @ resume()

And with that box enabled it's a different error:

E 0:00:03.623   resume: Resumed function 'event_handler()' after yield, but script is gone. At script: res://addons/dialogic/Nodes/DialogNode.gd:687
  <C++ Error>   Method failed. Returning: Variant()
  <C++ Source>  modules/gdscript/gdscript_function.cpp:1795 @ resume()
  <Stack Trace> DialogicAnimaTween.gd:82 @ finished_once()

The Timeline gets frozen without possibility to advance beyond the joining of the character when that box is enabled. I'm going to change the animation to something else... Nothing, with any of the animations and the box enabled I doesn't trigger the dialogue box at all. The only way to get pass the animation is to leave it disabled, which makes the black dialog box to appear on screen before the character enters in and you can click to activate the first message without the character in the room. Curiously enough, if I enable the "Wait for Animation" on subsequent updates for this character and the Join in of the Ghost, it doesn't freeze anything. It just happens with the first character animation added to the timeline it seems 🤔

Another thing I found curious is that the glitch for the Display Name of the character doesn't change to white when the dialog changes characters. I can hardly make a guess that probably the culprit is because in my past project the Knight and the Ghost had their own theme, and right now they are sharing both the Default Theme. I'm going to test that now...

. . .

Kind of curious. The dialog box that appears upon loading the game is default and then changes to the theme of the Knight after the first click. The Display Name color of the Knight appears briefly as white then changes to its intended blue color. However, when the Ghost starts to talk, the theme changes properly but starts with Display Name in white, and after the Knight talks back, the Display Name starts white again for him too. The same problem as the previous project.

What else... AH! I'm going to scale their portraits now. I tried before in the old project and I got funny results (like the character shrinking into non-existence after using 1% and then 50% and wouldn't recover the default size not even at 100%). I hope they don't appear on this new one though!

It seems the Scale changes are global for all the characters. This could be a little troublesome if not all the graphics are gigantic and are just fine with a fixed size (for example, a Pixie sprite in front of a Knight). If the Knight is reduced to a 10% of the scale, the Pixie would look too smol to even notice she's there! Just my two-cents on that.

. . .

And I got an error again, the same one as the first I posted here, DialogNode.gd:636, the same one as the animation with the check box enabled. It gets stuck after the character enters the scene. Thing is, the portrait didn't change sizes either. I tried closing and opening the project again for good measure and keeps being stuck if I don't return the scale to 100% Now, another strange thing is that after I change the scale, I don't see the preview changing sizes. I used 10% because the default window for all games in Godot is too small and it didn't reflect this. No matter if I use 1%, 50% nor anything. To add more to the oddity, after opening and closing again Godot, now the game runs as normal even if I change the scale, which doesn't get reflected at the preview of the portrait nor inside the game. image Apparently that is a 1% for that size...

Like, really, I'm not sure if the culprit are the huge portraits (I have replaced them with small pokémon sprites once and the problem is the same) or the Themes are to blame. Every graphic is PNG too. It's kind of ridiculous that only seems to happen to me. I want to share the project for others to test it out but I'm too noob and I don't know how and where to upload it. If you can tell me I'll oblige with a Godot project for you to butcher at your pleasure to reproduce my errors.

zaknafean commented 6 months ago

I think this ended up being fixed by some changes i made in 1.5 concerning the anima animation tweening, that would often break things if certain animation combinations were used. Going to call it closed for the time being.