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

‘Legends Viewer lite’ #4550

Open
AverageJo222 opened this issue May 3, 2024 · 2 comments
Open

‘Legends Viewer lite’ #4550

AverageJo222 opened this issue May 3, 2024 · 2 comments

Comments

@AverageJo222
Copy link

Hello! I’ve been really, really missing ‘Legends Viewer’ since the launch of DF’s steam branch. Would there be anyone, at all, willing to utilize the Legend Viewer’s open source data to reverse engineer a ‘Legends Viewer lite’. Hopefully having it be as simple as taking the work already present and just cull the needless features:))
This all being said, I’d imagine it’d be similar to the current state of ‘Legends Browser’, which is to say, the map features are disabled, given the limited export data currently retrieved from legends, but it is still overall functional.
If someone could do this, not only would the whole community appreciate it immensely, but I’d be more than happy to contribute money to the cause(a reasonable amount of course)

Also, I have a very very limited grasp on how this all works, so sorry if my terminology is all wack:p

@myk002
Copy link
Member

myk002 commented May 3, 2024

From a technical perspective, there are a few things to keep in mind for the design:

  • It will be impractical to implement the business logic in Lua. Loading, searching, and sorting that much data will be too slow. This will need a C++ core for data processing and a Lua frontend for UI interactions. A good example of this architecture is buildingplan where the item scanning is done in C++ and the results are presented to the player in Lua.
  • Making an in-fort interface will be very desirable, but if the game is allowed to run while legends data is being viewed, there may be data consistency issues. You will have to be aware of which structures are append-only (and therefore safe to be stale on) and which structures can be dynamically deleted, where usages of stale references may crash. It may not be practical to show full legends data while the fort runs. However, you can enter a "pseudo-legends mode" where the game is frozen in time while the legends data is being browsed, similar to how gui/gm-editor --freeze functions.
  • an asynchronous architecture may be required to promote UI responsiveness, populating the UI as data is discovered
  • There are many "smaller" use cases that a tool like this can fulfill. Additional data can be rendered onto (or linked from) the unit info sheets (e.g. "explore relationship tree"). It might be fruitful to query the community for "I wish I knew" requests. These may be valuable stepping stones towards a more fully featured in-game legends browser.

@plule
Copy link
Contributor

plule commented May 6, 2024

I often wished it existed too. Making it in-game opens a whole lot of opportunities to make it more accessible, I often imagined some kind of additional "book" button inserted at many places that act as an hyperlink to an in-game "legend viewer lite":

  • In each unit panel to open their page
  • In the units' relations, near each historical figure listed here
  • In the units' group, to go to the history of their past, civilizations, …
  • In the units' kills
  • In artifacts panel
  • When selecting a site in the map
  • In the list of artifacts in the map
  • In the list of civilizations in the map
  • In memorials and coffins

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

3 participants