Open
Conversation
State of journal is global `dfhack-config/journal-context.json`, so user can use the journal even if he did not embark and did not save the world
wiktor-obrebski
commented
May 4, 2025
| if sc == SC_VIEWSCREEN_CHANGED then | ||
| local scr = dfhack.gui.getDFViewscreen(true) | ||
| local curr_viewscreen_focus = dfhack.gui.getFocusStrings(scr)[1] | ||
| if last_viewscreen_focus == SCREEN_SETUP_FORTRESS and |
Contributor
Author
There was a problem hiding this comment.
Let me know if u see a better way to detect that embark is finished
Member
There was a problem hiding this comment.
In gui/embark-anywhere and exportlegends, I mask the vanilla action buttons and intercept clicks on them to dismiss the window when the vanilla viewscreen is about to change state. Would that be possible here?
Contributor
Author
There was a problem hiding this comment.
I guess it would be possible, but I am afraid such solution is too volatile.
UX can easly change, which will break the behaviour. And we do not have a way to test such behaviour.
I think it's much more realistic risk that change in the focus string name.
If there is no content yet in fortress /adventurer journal, world journal will be loaded as default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add worldmap and legends modes support for
gui/journal.The journal is stored per ID of the worldmap.
Worldmap and legends share the journal.
Journal is saved in global dfhack config file, as it need to work even if the user do not embark and save the map.
Aftter use start the fortress or adventure mode game, the world journal will be copied to his current save journal on the start.
Related discussion: https://discord.com/channels/793331351645323264/1017471248567124049/1273019956983894077