aliens

Author Topic: [Suggestion] Chronological Research History  (Read 875 times)

Online Delian

  • Commander
  • *****
  • Posts: 597
    • View Profile
[Suggestion] Chronological Research History
« on: November 30, 2024, 01:46:49 am »
I suggest adding a Research History feature.

This would be useful both for:
- players themselves, because they'd be able to check what path they took through the research tree in their current game or some other past game
- community, because they'd be able to check the path that some player took through the research tree and compare it to their own
- modders, because they'd be able to check what path the players of their mod took through the research tree, to get various insights, such as whether a certain topic was too easy or too difficult to reach

The suggestion would require creating a new window where the research history would be presented.
I'm not sure what would be the best place for the button to access this window and the history.
I'm also unsure about what features such a window should have (search / sort / filtering).


Technically, I suggest adding "discoveredHistory" sequence to a .sav file, where each element is a mapping containing information on how, when and where a discovery was made.
Code: [Select]
discoveredHistory:
  - { name: STR_BOWS_SUMMARY,   time: {second: 0, minute: 0, hour: 0, ...}, sourceType: 0, sourceName: "MyResearchBase" } //sourceType = Directly from a research project in a base
  - { name: DARK_TROOPER_ARMOR, time: {second: 0, minute: 0, hour: 0, ...}, sourceType: 1, sourceName: "Darktrooper" } //sourceType = Free after completing a different research topic
  - { name: STR_POLAR_OUTFIT,   time: {second: 0, minute: 0, hour: 0, ...}, sourceType: 4, sourceName: "Location: Arctic" } // sourceType = event reward
  - ...
« Last Edit: January 01, 2025, 05:33:23 pm by Delian »

Offline Tamren

  • Captain
  • ***
  • Posts: 81
    • View Profile
Re: Research History
« Reply #1 on: December 01, 2024, 05:47:58 am »
Another feature that would be very handy for players is being able to click on old techs they researched and see the xpedia articles that tech unlocks.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9303
    • View Profile
Re: [Suggestion] Chronological Research History
« Reply #2 on: January 19, 2025, 05:35:40 pm »
I suggest adding a Research History feature.

It's kinda useless for me personally, but I do understand your reasoning.
And you've earned it.

It may take a while until it gets high enough on my prio list.
If you want, you can also PR, but I don't guarantee a merge straight away (I will want to review and maybe make my own changes before merge).

Online Delian

  • Commander
  • *****
  • Posts: 597
    • View Profile
Re: [Suggestion] Chronological Research History
« Reply #3 on: January 20, 2025, 02:34:45 am »
Thanks. Well, I wouldn't want you to spend a bunch of time on a feature you deem useless, so I suppose I should be the one to implement it. I'd appreciate if you could provide some guidelines on how to do this. Which window would be similar enough to reference the code from, and which GUI features should be present and where.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9303
    • View Profile
Re: [Suggestion] Chronological Research History
« Reply #4 on: January 27, 2025, 12:15:31 pm »
1/ Entry point
- I would make the new GUI accessible from the "Global Research Overview" screen -- the one accessible from the geoscape using `C` hotkey
- that GUI has only 1 OK button taking whole screen width -> this can be changed to 2 buttons taking half width
- OK button on the right side
- new "History" button on the left side

2/ "History GUI"
- default title probably "Research History" ?
- GUI structure:
  - Title on the top
  - Table in the middle -- two columns (left column: Topic name; right column: Completion date/time), sortable by both columns using up/down arrows (same as e.g. Funding GUI) -- maybe even a third column with "sourceType number" if it still fits in the middle
  - Below the table a 3-line high "Detail text" -- showing info that is not available in the table (sourceName?) when the user hovers over a table line (similar to what is implemented in the Mods GUI or Options>Advanced GUI)
  - OK button on the bottom
  - Edit: maybe two buttons? OK button on the right and "Filter" combobox on the left? Filter would be able to filter by "sourceType"?
  - maybe a "quick filter" (hotkey Q) somewhere above the table on the left side?
« Last Edit: January 27, 2025, 12:19:10 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9303
    • View Profile
Re: [Suggestion] Chronological Research History
« Reply #5 on: January 27, 2025, 12:29:24 pm »
Btw. if you don't like making GUIs, I can probably do the GUI if you do the backend: tracking/saving/loading of the new data.

Online Delian

  • Commander
  • *****
  • Posts: 597
    • View Profile
Re: [Suggestion] Chronological Research History
« Reply #6 on: January 27, 2025, 06:53:13 pm »
I have plenty of experience with GUI design, but zero using C++ or the library OXC uses. If you can implement the GUI, then that would spare me from having to learn it (it would save me a lot of time) hehe. Sure, I can implement just the backend.

1/ Entry point
I would make it accessible from both the Global Research Overview, and from the base's Current Research screen. I'd imagine the most common use case would be where the player enters the base research and tries to decide which project to research next, but he forgot what research that base was focusing on, so he wants to check what were the last few items he researched in that base. Therefore, it would make sense if this window was accessible both from:
Global Research Overview - default filter = "Everything"
Base Research Overview - default filter = "Current Base"

2/ "History GUI"
Would "Research Diary" sound better? Or just "Diary"?

I think table should have 3 visible columns (Topic name, Source, Completion date).
Status bar (detail text) for cases where the topic or source don't fit the line. Alternatively, use word wrap and multiline rows (I know that's used in Manufacturing).

The Source column shows "{0}: {1}", where {0} is localized sourceType and {1} is localized sourceName:
sourceType=0:
Base: MyResearchBase1
sourceType=1:
Free from: ResearchTopicWhereGetOneFreeWasThisTopic
sourceType=2:
Free after: ResearchTopicThatUnlockedThisTopicOrWasLastRequiredTopic
sourceType=3
Mission: Bandit Caves
sourceType=4
Event: Location: Arctic

Completion Date should be formatted as YYYY-MM-DD

Filter combobox should be populated with:
- "Everything"
- Time periods: "Today", "Last 7 days", "Last 30 days", "Last 365 days"
- "Current base"
- Other bases: "Base: MyBase1", "Base: MyResearchBase", "Base: MyPrisonerBase" (only show bases that completed something)
- Other sourceType's: "From mission", "From event" (only show if any such types exist)

Quick Filter would also be useful, yeah. Have it search all the table cells. e.g. searching for "2601-06", would return all the rows with this date.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9303
    • View Profile
Re: [Suggestion] Chronological Research History
« Reply #7 on: January 27, 2025, 08:30:06 pm »
sounds good

I'm fine doing the GUI