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

Dialogic shows last the frame of the last timeline that has ended when loading a save with no current timeline #2170

Closed
Pheubel opened this issue Apr 8, 2024 · 1 comment
Labels
Bug 🐞 Something isn't working

Comments

@Pheubel
Copy link
Contributor

Pheubel commented Apr 8, 2024

The problem

Describe the bug
The layout for dialogic is visible when the state is loaded, even if there is no timeline to follow.

To Reproduce
Steps to reproduce the behavior:

  1. set up a scenario where the timeline would stop into a place where there would be no other timeline to follow it up, like a map.
  2. play through the timeline until you reached the scenario
  3. save the state game (including dialogic state)
  4. quit the game
  5. restart the game
  6. load the save
  7. see that the latest frame of the timeline is visible.

Expected behavior
Instead of seeing the last state of the timeline, i should not be visible and the scenario it's covering should be instead

System (please complete the following information):

  • OS: Windows
  • Godot Version: 4.2
  • Dialogic Version: 2.0 - Alpha 13

Solutions

Workaround

avoid calling Dialogic.Save.load() until after i load a slot's info and check if it is in dialog.

Possible fixes
When a timeline has been wrapped up, it is set to null in the state dictionary. if a load occurs, the layout could be made invisible in the else branch.

DialogicGameHandler.gd

func load_full_state(state_info:Dictionary) -> void:
	...
	if current_state_info.get('current_timeline', null):
		start_timeline(current_state_info.current_timeline, current_state_info.get('current_event_idx', 0))
	elif scene:
		scene.hide()

The downside with this approach is that it will still attempt to set up the layout node as if it was visible, which will cause dialogic to push an error to the console for the portrait subsystem.
[Dialogic] Failed to join character to position 1. Could not find position container.
because the layout node is now invisible, it will display that it can't join the character portrait. As this doesn't seem to be a big issue, it could possibly be ignored, but it is not clean.

@Jowan-Spooner
Copy link
Collaborator

This should be fixed by an addition to the documentation which I've made a PR for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants