‘Legends Viewer lite’
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
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
buildingplanwhere 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 --freezefunctions. - 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.
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