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

Enemy fleet details not updating to new tech #2572

Open
magnate opened this issue Sep 27, 2019 · 21 comments
Open

Enemy fleet details not updating to new tech #2572

magnate opened this issue Sep 27, 2019 · 21 comments
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:game mechanic The Issue/PR deals with the currently used or planned game mechanics. component:UI The Issue/PR deals with the game user interface, graphical or other.

Comments

@magnate
Copy link

magnate commented Sep 27, 2019

Environment

  • FreeOrion Version: f39038e
  • Operating System: Win7
  • Graphic card used: RadeOn 5750
  • Fetched as
    • Binary release
    • Weekly development build

Description

In the recently-finished fourth slow MP game (https://freeorion.org/forum/viewtopic.php?f=2&t=11274), I was at war with Oberlus (Eaxaw). I watched his fleets like a hawk, every turn, waiting to see them upgrade from plasma cannon I, which he had very early on. On turn 92 or so (I will confirm when I have access to save games) they suddenly jumped from 15 per cannon to 21 per cannon - i.e. from plasma I to plasma III.

He tells me he had upgraded to plasma III some turns earlier (88 or 89), and to plasma II some time before that. But my client did not show me the first upgrade at all, and showed me the second one some turns late.

Expected Result

His fleets were in my scan range, and in his supply, the whole time, so the upgrades should have been visible immediately, the turn after he got them.

Steps to reproduce

I'm not sure if it will be possible to reproduce. I will load up the relevant save games as me and then as him, to check that they still give the same behaviour, and if so I will upload them.

@geoffthemedio geoffthemedio added category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:game mechanic The Issue/PR deals with the currently used or planned game mechanics. component:UI The Issue/PR deals with the game user interface, graphical or other. labels Sep 27, 2019
@Vezzra
Copy link
Member

Vezzra commented Oct 2, 2019

As this can be a quite serious issue, I'm assigning this to the 0.4.9 milestone for now. This isn't the kind of bug I want as a known issue in a release.

@Vezzra Vezzra added this to the v0.4.9 milestone Oct 2, 2019
@geoffthemedio
Copy link
Member

@magnate Have you looked at the saves to reproduce this yet?

@magnate
Copy link
Author

magnate commented Oct 13, 2019

FreeOrion_0089_20190920_224811.gz

Ok, here is the save from turn 89. Oberlus (yellow, Eaxaw) researched Plasma Cannon 3 on turn 88 (and Plasma Cannon 2 on turn 79), but his ships are all showing to me (blue, Abbadoni) as Plasma Cannon 1, which they have been showing in every previous turn.

(Note that because he is Eaxaw with +2 pilots, plasma 1 is 15 and plasma 3 is 21...)

Incidentally I have not zipped the file, just renamed it from .mps to .gz to bypass github's pointless and irritating refusal to accept it as is.

@magnate
Copy link
Author

magnate commented Oct 13, 2019

(If you'd like any earlier saves I can upload them - or I can just upload the whole set?)

@magnate
Copy link
Author

magnate commented Oct 26, 2019

Still happening in 4f372cb - to devastating effect in the fifth MP game!

@magnate
Copy link
Author

magnate commented Oct 26, 2019

In the fifth game, we have determined that this bug affects all allied players. So everyone on my team sees swaq's ships as having plasma 1, but he and his team mates all see them having plasma 3 (which they do).

Incidentally this bug does not seem to affect mass drivers or lasers, only plasma cannons. We have all seen each other's mass driver and laser upgrades on time. Nobody has researched death rays yet.

@magnate
Copy link
Author

magnate commented Oct 26, 2019

Oberlus has just suggested that this may not be a bug, and may be related to the setting that prevents you seeing techs you don't have. So a couple of questions:

  1. What is the rule or setting for this? I will try toggling it off and seeing if it changes what I see in the savefiles of these games.

  2. If it is intended to work in this way, the display of other techs need reworking - when you look at an enemy planet and look at the troops (or shields, or defences etc.), you see "unknown +32" or whatever, that gives away quite clearly that your enemy has an improved tech that you don't.

  3. I saw that he had diamond armour aeons before I researched diamond armour ... I assume this is simply because it's not possible to just show "unknown", and anyway I would know what it was if it said "unknown +18"...

@magnate
Copy link
Author

magnate commented Oct 26, 2019

I assume it's RULE_SHOW_DETAILED_EMPIRES_DATA. Will try that (I thought that was just to turn off the graphs, but maybe it's the techs too).

@magnate
Copy link
Author

magnate commented Oct 26, 2019

Are these rules read from savefiles, or from persistent_config.xml? If they're in the savefile then I can't test this by changing the rule...

@magnate
Copy link
Author

magnate commented Oct 26, 2019

Ok, I now think Oberlus is right, that this is an undesirable outcome of the RULE_SHOW_DETAILED_EMPIRES_DATA. Turn 92 was the turn I researched plasma cannon 1, and my client then immediately showed me the accurate status of Oberlus's cannons. Before that turn I had seen that they were plasma cannons, but not what level. I cannot test this conclusively until I can change that RULE and reload the savefile from an earlier turn (and if the rules are in the savefile then I can't do that).

This explains a couple of other oddities too. I've noticed my enemies' ground troops and hull points regenerating faster than the tooltips said they would - obviously they have techs that I don't.

The rest of this comment became a forum post about what should be done (assuming this diagnosis is correct).

@magnate
Copy link
Author

magnate commented Oct 26, 2019

@alleryn
Copy link
Contributor

alleryn commented Oct 26, 2019

this is an undesirable outcome

Is it consensus opinion that this is undesirable? It makes some sense that if your ships' scanners didn't recognize the tech the enemy had used to improve their ships, that your empire isn't aware of their damage potential.

@magnate
Copy link
Author

magnate commented Oct 26, 2019

I agree with that, but stating incorrect numbers is undesirable. It should just say "unknown".

EDIT: I don't mind if the game is played with all numbers being dubious, but to play with every other number being reliable except this one is surely undesirable. More detail in the linked thread.

@geoffthemedio
Copy link
Member

I don't think there is anything unique about ship weapon meters in this regard. Any meter altering effect will have similar inconsistency between what the client expects and what really happens. That said I'm unsure why the client is showing what it expect and not the state of the object, with the difference not visible without a meter accounting breakdown. Perhaps ship part meters are treated differently than normal meters at less than full visibility?

@magnate
Copy link
Author

magnate commented Oct 26, 2019

I don't think there is anything unique about ship weapon meters in this regard. Any meter altering effect will have similar inconsistency between what the client expects and what really happens.

What's different is that for planetary meters you see "Unknown +X" shown in the tooltip. For ship weapons you don't.

@geoffthemedio
Copy link
Member

The total after the unknown contribution is the value the server sent. If it didn't have the accounting breakdown, like the ship part meters don't, then all you'd see would be the server value.

@magnate
Copy link
Author

magnate commented Oct 26, 2019

Sorry, I don't think I understand that. The ship part meters don't have the accounting breakdown, yet I see the wrong value for the plasma cannon. I don't mind whether it's broken down or not, but I do think it's odd seeing the wrong value in a game where every other number is the right value...

@geoffthemedio
Copy link
Member

My point was that I don't know why the wrong value would be shown for a weapon part strength when the player doesn't know another empire has a tech researched that increases that part's capacity meter. I would have expect it to show the value from the server, which doesn't care what the player's empire knows or doesn't know, as long as the ship is at least partially visible.

Looking at the code a bit, I think that it could be related to part meters not having a discrepancy calculated and store the way that non-part meters do, so there's no discrepancy to add back after updating meter estimates client-side, so it just ends up using the values from the clinet-side meter estimate update, disregarding what the server sent.

Regardless, the RULE_SHOW_DETAILED_EMPIRES_DATA rule defaults to on, and based on the above discussion, this issue only appears when it is off, the non-default setting. So I don't consider this to be a very major issue that necessarily needs to hold up v0.4.9.

@Vezzra Vezzra removed this from the v0.4.9 milestone Nov 15, 2019
@magnate
Copy link
Author

magnate commented Jan 25, 2020

Out of interest it seems to have been fixed in the latest builds. I went organic again and stopped at lasers + solar concentrators, and I saw my AI enemies upgrade their plasma cannons...

@Oberlus
Copy link
Contributor

Oberlus commented Aug 22, 2020

My point was that I don't know why the wrong value would be shown for a weapon part strength when the player doesn't know another empire has a tech researched that increases that part's capacity meter. I would have expect it to show the value from the server, which doesn't care what the player's empire knows or doesn't know, as long as the ship is at least partially visible.

Looking at the code a bit, I think that it could be related to part meters not having a discrepancy calculated and store the way that non-part meters do, so there's no discrepancy to add back after updating meter estimates client-side, so it just ends up using the values from the clinet-side meter estimate update, disregarding what the server sent.

@geoffthemedio So would it be an easy fix (code-wise) for the issue when the rule is set to off (i.e. wrong damage values when behind in weapon techs) to store the discrepancies for part meters the same way than non-part meters?

@geoffthemedio
Copy link
Member

It should be doable, but it's not trivial. To start with, the storage of accounting info is index by object ID and meter type, which doesn't work immediately for ship part meters, which also need to be further indexed by part name. That probably needs a separate container, which needs to be passed around and used when setting ship part meters. Then various bits of UI code probably need adjusting as well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:game mechanic The Issue/PR deals with the currently used or planned game mechanics. component:UI The Issue/PR deals with the game user interface, graphical or other.
Projects
None yet
Development

No branches or pull requests

5 participants