Author Topic: Research progress bug?  (Read 482 times)

Offline Martenzo

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Research progress bug?
« on: November 26, 2022, 05:56:38 pm »
Playing X-Piratez, I ran into the issue that Research progress displayed was not lining up with what the information entries of the 'pedia were saying they should be. Trying to very efficient with the early-game rush of key unlocks in that mod, I had opted to check my savefile for the true research costs, to not waste any precious research points in January. The 'pedia entry in the mod claims that the meanings of the research progress are as follows:

Unknown: less than 33% of the base cost has been researched;
Poor: over 2 weeks total at the current number of assigned Brainers;
Average: more than a week total research time;
Good: 4-7 days;
Excellent: 3 days or less.

But in reality, this base-cost 5 project in the save:
     - project: STR_INSPECT_MACHINERY
        assigned: 1
        spent: 4
        cost: 5

should be displaying progress as Excellent, on account of only needing one day to finish at the current number of Researchers assigned.
But when I load up the save, it shows a progress of Good. I would attach a picture, but it seems my account here is too fresh to attack it.
Further testing through editing the save and plugging in various values to various projects with different base and true costs showed that the research status always compares against base cost as if zero progress had been made. So the actual status labels mean the following in reality, despite the 'pedia entry claiming it checks against the true "time remaining":

Unknown: less than 1/3rd of the base cost has been researched
Poor: researchers assigned < 1/14th of base cost
Average: 1/14th of base cost =< researchers assigned < 1/7th of base cost
Good: 1/7th of base cost =< researchers assigned < 1/3rd of base cost
Excellent: researchers assigned >= 1/3rd of base cost

Current progress and true cost (which ranges anywhere from 50% to 150% of the base cost) seems to be irrelevant to all statuses except Unknown.
Having brought this up in X-Piratez chat, I was told to bring the report here, since the 'pedia entry was apparently made based on what OXC devs told Dioxine what the behavior ought to be.
Is this actually the intended behaviour and the 'pedia entry is wrong/outdated, or is this a bug in the OXC research check?

Offline Martenzo

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Research progress bug?
« Reply #1 on: November 26, 2022, 05:59:26 pm »
Also, it would seem that wrapping something in a [code\] block counts as an "external link" that new users aren't allowed to post.

Offline R1dO

  • Colonel
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Research progress bug?
« Reply #2 on: November 26, 2022, 07:45:25 pm »
Not sure if i understood your post correctly.

Reading your 'pedia' snippet and description of what you've observed ingame i would say there is nothing wrong/outdated with the pedia (or bug in engine).

Just to clarify. The way I interpret the description:
Code: [Select]
Unknown: less than 33% of the base cost has been researched;    - Entry depends on time invested, when 33% is reached show something else.
   - Taking the rest into account it will mean: after 33% choose one of the following 4
Code: [Select]
Poor: over 2 weeks total at the current number of assigned Brainers;    - States total, in other words: not depending on what has been invested.
Code: [Select]
Average: more than a week total research time;    - Again total
Code: [Select]
Good: 4-7 days;    - Missing any indication of being total vs running number. Based on previous entries I assume total.
Code: [Select]
Excellent: 3 days or less.    - Same as good.

The only minor improvements i could think of are:
- Mention 'total' in both Good and Excellent.
- Clarify if 1-4 uses 'total base' or 'total after RNG'.
  + Although that would only benefit users that do extreme number tracking, the average player is probably not even aware of the difference.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 7925
    • View Profile
Re: Research progress bug?
« Reply #3 on: November 27, 2022, 10:09:33 am »
Many xcom mechanics are unintuitive or hard to describe or both.

This happens when people try to describe them anyway.

Btw. I'm 99% sure that this mechanic is unintuitive by design.
But if you want to read the code and try a better description, here it is: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Savegame/ResearchProject.cpp#L139
And the constants: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Savegame/ResearchProject.cpp#L24

Offline Martenzo

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Research progress bug?
« Reply #4 on: November 27, 2022, 11:36:46 am »
I would say the place where I got confused was "total". I thought it to mean the post-RNG cost of the project, but both testing and the code (as far as I can tell) bear out that it compares to the base cost. The main thing that prompted me to try and optimise research in this regard was the wild variance in the cost of interrogation projects, which are somewhat urgent due to the frequent influx of more valuable interrogation targets in X-Piratez (as well as the frequent influx of prisoners who are worthless outside their "Get one for free" interrogation products). After trying to find a consistent and intuitive pattern in the status projections, I basically discovered the projections to be largely useless as a basis of strategy, and turned to looking at the data directly in the savefile to ensure fast and efficient turnaround on interrogations. Not to mention how difficult it was to track how much progress I had invested into projects without literally filling a notepad with the information, on account of frequent missions breaking up the flow of geoscape progress.

Offline yergnoor

  • Colonel
  • ****
  • Posts: 106
    • View Profile
    • Email
Re: Research progress bug?
« Reply #5 on: November 27, 2022, 01:06:12 pm »
There was a similar discussion about how research status is displayed before, though I wouldn't have been able to find it quickly.
As I recall (though I could be wrong) one of the main arguments for the way things work in the game right now was this. Estimating the state of an ongoing study cannot be completely accurate. Scientists can't measure how much of the work they've already done and how much remains to be done. All they have is a rough preliminary estimate. In the game, this is known as the cost of research and is specified in the game or mod code. That's why all further progress estimates are based on it. However, the actual progress of research can be both shortened by an unexpected breakthrough and, conversely, delayed due to unforeseen advance difficulties. This is modeled in the game by the randomization of research costs. But the scientists themselves cannot know about this deviation. Therefore, they are unable to take it into account in their assessment of the study's progress, which they report to management.
Therefore, knowing exactly how much is left until the end of the study, from the point of view of realistic gameplay, is cheating.
Maybe I'm wrong in some details, maybe I put my own understanding of the problem into this explanation, not the same as the others. But the fact is that this issue has already been discussed and most likely more than once.