Page 1 of 2

No combat on system with visible adversaries

Posted: Thu Jan 03, 2019 1:07 pm
by Oberlus
Scout Voltaire arrives at unexplored system Rai beta at turn 26. There is a Sentry in that system, but no combat ensues. There is an ion storm south of Rai beta but checking its borders in turns 25 and 26 it is well away from Rai beta. Why there is no combat at Rai beta?
why_no_combat.png
why_no_combat.png (297.82 KiB) Viewed 927 times
Reloading turn 25 and issuing the same orders give the same result, no combat.

Side note: to make the screenshot on turn 26 clearer, I double-clicked on two SitReps about combat and invasion of a native colony elsewhere in the map to remove/hide them. After reloading and replaying turn 25, the two removed SitReps remain hidden. Is that as intended? I'd say it should show up again.

Anything of this worth opening an issue on GitHub?

Re: No combat on system with visible adversaries

Posted: Thu Jan 03, 2019 2:07 pm
by Jaumito
Oberlus wrote:
Thu Jan 03, 2019 1:07 pm
There is an ion storm south of Rai beta but checking its borders in turns 25 and 26 it is well away from Rai beta.
Borders are always fuzzy. What you should check instead if it had any effect on the Sentry's detection meter on turn 25.
Side note: to make the screenshot on turn 26 clearer, I double-clicked on two SitReps about combat and invasion of a native colony elsewhere in the map to remove/hide them. After reloading and replaying turn 25, the two removed SitReps remain hidden. Is that as intended? I'd say it should show up again.
I don't know if it's intended, but I've always seen it work like this. I too would say it should show up again.

Re: No combat on system with visible adversaries

Posted: Thu Jan 03, 2019 3:00 pm
by Oberlus
Jaumito wrote:
Thu Jan 03, 2019 2:07 pm
Borders are always fuzzy. What you should check instead if it had any effect on the Sentry's detection meter on turn 25.
Working on that (must reload a previous save and enable supertesters to see the Sentry before scouting Rai beta.
But first I tried checking the storm borders with the mouse:
no_ion_storm_1.png
no_ion_storm_1.png (184.2 KiB) Viewed 921 times
no_ion_storm_2.png
no_ion_storm_2.png (184.28 KiB) Viewed 921 times
no_ion_storm_3.png
no_ion_storm_3.png (184.94 KiB) Viewed 921 times
The ion storm is affecting the deep space where the scout is before reaching Rai beta (the "?" system in this screenshots), but not the Rai beta itself, or that is what it seems from the screenshots: ion storm overlaps (and is in front of) the molecular cloud; when clicking on the storm it always shows the ion storm tooltip even if the cloud is behind. The third screenshot is to make sure that the molecular cloud isn't hiding the ion storm in the second screenshot: at that distance from the storm centre there is no tooltip available, no storm in there.

So... maybe the scout isn't attacked when arriving Rai beta because it is carrying with it the stealth bonus it had when in the deep space spot under the ion storm?

Re: No combat on system with visible adversaries

Posted: Thu Jan 03, 2019 3:47 pm
by Jaumito
Oberlus wrote:
Thu Jan 03, 2019 3:00 pm
So... maybe the scout isn't attacked when arriving Rai beta because it is carrying with it the stealth bonus it had when in the deep space spot under the ion storm?
That should be it. I've actually used ion storms this way to get scouts past sentries and other guardian ships.

Re: No combat on system with visible adversaries

Posted: Thu Jan 03, 2019 3:53 pm
by Oberlus
Hmmm... That seems a bit buggy (at least counter-intuitive) to me.

Re: No combat on system with visible adversaries

Posted: Thu Jan 03, 2019 6:03 pm
by Jaumito
Oberlus wrote:
Thu Jan 03, 2019 3:53 pm
Hmmm... That seems a bit buggy (at least counter-intuitive) to me.
I agree, but at least it's consistent. The stealth bonus from asteroid belts (for asteroid hulls), solar hulls, artificial moons and (I think) multi-spectral shields all work the same.

Re: No combat on system with visible adversaries

Posted: Sat Jan 05, 2019 6:12 pm
by Vezzra
Jaumito wrote:
Thu Jan 03, 2019 6:03 pm
Oberlus wrote:
Thu Jan 03, 2019 3:53 pm
Hmmm... That seems a bit buggy (at least counter-intuitive) to me.
I agree, but at least it's consistent. The stealth bonus from asteroid belts (for asteroid hulls), solar hulls, artificial moons and (I think) multi-spectral shields all work the same.
These are known issues, due to the way/order effects are applied during turn execution. We had a discussion about this in the past, but didn't reach a conclusion. Anyway, needs to be fixed, because I agree, it is buggy/counter-intuitive and confusing.

Re: No combat on system with visible adversaries

Posted: Tue Jan 08, 2019 5:50 am
by defaultuser
Some of the effects things can be non-intuitive. You get something similar with molecular clouds. You can get a free combat round with shields against unshielded foes depending on who moved from where.

Re: No combat on system with visible adversaries

Posted: Tue Jan 08, 2019 8:57 am
by Oberlus
Vezzra wrote:
Sat Jan 05, 2019 6:12 pm
These are known issues, due to the way/order effects are applied during turn execution. We had a discussion about this in the past, but didn't reach a conclusion. Anyway, needs to be fixed, because I agree, it is buggy/counter-intuitive and confusing.
defaultuser wrote:
Tue Jan 08, 2019 5:50 am
Some of the effects things can be non-intuitive. You get something similar with molecular clouds. You can get a free combat round with shields against unshielded foes depending on who moved from where.
I would expect that the effects of fields like ion storms and molecular clouds would be in place only within such fields. Having ships affected by them while they are out of such fields (even just for one turn), and ships within them that are not (yet) affected, seems plainly wrong.

Is the order of effects processing documented anywhere, or what are the source files that control it?

Re: No combat on system with visible adversaries

Posted: Tue Jan 08, 2019 9:12 am
by Ophiuchus
Oberlus wrote:
Tue Jan 08, 2019 8:57 am
Is the order of effects processing documented anywhere, or what are the source files that control it?
Best we have is in FOCS Scripting Details.

But it is only part of the picture. If you dive into the cpp code

In ./server/ServerFSM.cpp there is sc::result ProcessingTurn::react(const ProcessTurn& u) . Which calls to server/ServerApp.cpp:
  1. server.PreCombatProcessTurns();
  2. server.ProcessCombats();
  3. server.PostCombatProcessTurns();
There you'll find more details.

p.s.: I would actually like to simplify and base effect ordering on priority only.

Re: No combat on system with visible adversaries

Posted: Wed Jan 09, 2019 10:50 pm
by defaultuser
Oberlus wrote:
Tue Jan 08, 2019 8:57 am
I would expect that the effects of fields like ion storms and molecular clouds would be in place only within such fields. Having ships affected by them while they are out of such fields (even just for one turn), and ships within them that are not (yet) affected, seems plainly wrong.
If you want an in-game explanation for the way it is now, you could say that it takes time for these natural phenomena to affect the equipment and for the effect to dissipate, so that moving between systems involves a bit of hysteresis that is greater than the typical time it takes to engage in a combat round.

Re: No combat on system with visible adversaries

Posted: Thu Jan 10, 2019 10:38 am
by Oberlus
defaultuser wrote:
Wed Jan 09, 2019 10:50 pm
If you want an in-game explanation for the way it is now, you could say that it takes time for these natural phenomena to affect the equipment and for the effect to dissipate, so that moving between systems involves a bit of hysteresis that is greater than the typical time it takes to engage in a combat round.
Fair enough. I'd like to buy it, but I can't.
In the time that a ship goes from one system to another, generations of humans are born, nebulae collapse, colonies are invaded, but the effect of an Ion Storm last even when the ship is several light years away.

I'll have to stick to the out-game reason: it works and developers are busy doing more necessary/interesting stuff.

Re: No combat on system with visible adversaries

Posted: Fri Jan 11, 2019 5:09 pm
by em3
I think that freeorion could benefit from formalization of turn phases. Something like:
  • Growth phase. All natural meter growth takes place, ships are repaired and resupplied
  • Movement phase
  • Combat phase. All combat takes place
  • Construction phase. PP is spent on buildings. Build offers are completed and returned effects applied
  • Research phase. RPs are spent on research
  • Planning phase. UI is active and orders can be issued
Each phase has a Before and After events, that can be used to apply effects.
The order here is arbitrary, but should be shown in sitreps.

This would make situation more clear to the players: that stuff does not happen all at once, but instead in a predictable order.

Re: No combat on system with visible adversaries

Posted: Sat Jan 12, 2019 7:01 pm
by Vezzra
defaultuser wrote:
Wed Jan 09, 2019 10:50 pm
If you want an in-game explanation for the way it is now, you could say that it takes time for these natural phenomena to affect the equipment and for the effect to dissipate, so that moving between systems involves a bit of hysteresis that is greater than the typical time it takes to engage in a combat round.
While you can come up with fluff explanations for a lot of things, IMO there are still limits to how far you can stretch suspension of disbelieve. While that explanation might work to some degree in some scenarios, it will become just too silly in others.

That aside, even if you can find a sufficiently believable fluff explanation, it doesn't solve the actual problem, which is that the current behavior goes against natural expectation, and is counter-intuitive and confusing. As a player you intuitively expect the effects of a field to apply to objects within the field, anything else leads to confusion. Hence the correct solution for the issue is to fix the engine so that it matches what you naturally/intutively expect as a player.

Re: No combat on system with visible adversaries

Posted: Sat Jan 12, 2019 7:03 pm
by Vezzra
em3 wrote:
Fri Jan 11, 2019 5:09 pm
Each phase has a Before and After events, that can be used to apply effects.
The order here is arbitrary, but should be shown in sitreps.
That's more or less what I've suggested in one of the past discussions about this issue, and IMO the best/only way to fix the problem correctly.