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

Allow clearing of history log between playthroughs #1741

Closed
SeaLiteral opened this issue Sep 19, 2023 · 2 comments
Closed

Allow clearing of history log between playthroughs #1741

SeaLiteral opened this issue Sep 19, 2023 · 2 comments
Milestone

Comments

@SeaLiteral
Copy link

Is your feature request related to a problem? Please describe.
Related to the dialogic-godot/documentation#40 about the history API not being documented, but I felt like this part might be an issue on its own: when you make a game with a main menu, use that main menu to start the game, then play it and there's some dialogue, then return to the main menu, start the game again, get to the dialogue again, and view the history screen, you can see dialogue that hasn't shown in the current playthrough but has in the previous one. This is a request to add an API function that clears the history log, intended to be used between playthroughs. (If such a function already exists but is undocumented, consider this a duplicate of the other bug, but also consider documenting that function: from a user's point of view, there's little difference between an unimplemented feature and an undocumented one.)

Describe the solution you'd like
Add (and document) some way of clearing the history log between playthroughs.

Describe alternatives you've considered
Alternatively, you could switch from a log-based history to a "reverse" based one, which essentially simulates playing a timeline in reverse in order to figure out what to add to the history screen. That's probably a lot of work though, especially if you want branching and returns to be undoable. But I think even Ren'Py uses a log-based history (which explains why in a long VN, even if kinetic, its rollback can only go so many steps back before it can't "remember" what came before, so while I'd consider reverse-based history screens as capable as log-based ones, both have their gotchas, and since you already have a log-based one I think replacing it might be overkill.

Additional context
I'm using Dialogic 2 on Godot 4.1. This issue might or might not exist in Dialogic 1, but I feel like I'd seen it in the documentation if that version supported clearing the history log.

@Jowan-Spooner
Copy link
Collaborator

Hey @SeaLiteral,
such a method can be implement, although it might not happen soon, as I'll have to test and expand the whole history system anyways at some point, so I'm not prioritizing improving it in it's current state.

What you want can be achieved with simple code like this I think:

Dialogic.History.simple_history_content.clear()

Let me know if this works, have not used history in some time.
Honestly if this works, then maybe we don't even need a dedicated method? We'll see.

@Jowan-Spooner Jowan-Spooner added this to the Version 2.X milestone Sep 19, 2023
@SeaLiteral
Copy link
Author

@Jowan-Spooner Thanks! It does seem to work. I guess I can close this issue then.

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