Temporal anomaly bug?

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Temporal anomaly bug?

#1 Post by Magnate »

Hi all, is this a bug? Brand new colony, 1.00 pop, on a temporal anomaly world, focus set to research:

Research focus +0.20
Temporal anomaly +5.00
Abbadoni bad research -1.35

That last term should be -0.10, right? Bad research is a 50% penalty to the research focus. All my other Abbadoni research colonies have it as -50% of the research focus figure. Only the temporal anomaly is different.

Is this WAD? Or a known bug? Or new?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Temporal anomaly bug?

#2 Post by Ophiuchus »

In the general case GOOD/BAD traits are not simply changing focus effect, it depends on the effect priority.
I would expect traits to be applied after (most) other effects.

Which build? Oberlus changed temporal anomaly in last week build. But I doubt he changed priority.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Temporal anomaly bug?

#3 Post by Oberlus »

Temporal Anomaly now (since a couple of weeks) applies after species traits and gives 3*pop instead of 5*pop.

Magnate wrote: Fri Feb 05, 2021 9:58 am Bad research is a 50% penalty to the research focus
Nopes. It is a -25% penalty, it multiplies by 0.75:
https://github.com/freeorion/freeorion/ ... macros#L52
https://github.com/freeorion/freeorion/ ... .macros#L4

That's been like that from before I discovered FO.


I have never checked this out, but I think the order in which you see the bonuses and penalties in the UI matches the priority order:
Magnate wrote: Fri Feb 05, 2021 9:58 am Research focus +0.20
Temporal anomaly +5.00
Abbadoni bad research -1.35
I assume you are playing an at least 2-weeks-old build.

5.2 * 0.75 = 5.2 - 1.3 = 3.9

Are you sure those figures are all correct and complete? If the bad research malus was -1.35, I would expect the total bonus to be 5.4.
If you can live in a Temporal Anomaly world, I bet you are not early game, so maybe you are not reporting some of the bonuses?

Current build should show it like this:
Research focus +0.20
Abaddoni bad research -0.05
Temporal anomaly +3.00

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Temporal anomaly bug?

#4 Post by Ophiuchus »

Oberlus wrote: Fri Feb 05, 2021 11:55 am I have never checked this out, but I think the order in which you see the bonuses and penalties in the UI matches the priority order:
Magnate wrote: Fri Feb 05, 2021 9:58 am Research focus +0.20
Temporal anomaly +5.00
Abbadoni bad research -1.35
yes, that is so. it helps figuring out how the effects apply. E.g. see the fuel efficiency effects.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Re: Temporal anomaly bug?

#5 Post by Magnate »

Sorry, I should have said, this is unmodified 0.4.10.1, and the Temporal Anomaly still says 5 RP per pop. The population is now 1.12 and the full list of bonuses is:

Abbadoni Research Focus +0.23
Special Temporal Anomaly +5.62
Algorithmic Elegance +0.06
Enclave of the Void +0.17
Abbadoni Bad Research -1.52
Computronium Moon +0.06
Quantum Networking +0.11
Stellar Tomography +0.06
Artificial Minds +1.00
Nascent AI +1.00

The Abbadoni Bad Research Malus should be -0.12 or -0.11, as it is on every other Abbadoni planet with the same pop, right? The Temporal Anomaly does not amplify a species trait does it?

wobbly
Cosmic Dragon
Posts: 1876
Joined: Thu Oct 10, 2013 6:48 pm

Re: Temporal anomaly bug?

#6 Post by wobbly »

Magnate wrote: Fri Feb 05, 2021 1:46 pm Sorry, I should have said, this is unmodified 0.4.10.1, and the Temporal Anomaly still says 5 RP per pop. The population is now 1.12 and the full list of bonuses is:

Abbadoni Research Focus +0.23
Special Temporal Anomaly +5.62
Algorithmic Elegance +0.06
Enclave of the Void +0.17
Abbadoni Bad Research -1.52
Computronium Moon +0.06
Quantum Networking +0.11
Stellar Tomography +0.06
Artificial Minds +1.00
Nascent AI +1.00

The Abbadoni Bad Research Malus should be -0.12 or -0.11, as it is on every other Abbadoni planet with the same pop, right? The Temporal Anomaly does not amplify a species trait does it?
The racial research modifier applies to everything above it, e.g. Research Focus, Tempral Anomaly, Algorithmic Elegance & Enclave of the Void.

(0.23 + 5.62 + 0.06 + 0.17) x 1/4 = 1.52

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Temporal anomaly bug?

#7 Post by Oberlus »

Magnate wrote: Fri Feb 05, 2021 1:46 pm The Abbadoni Bad Research Malus should be -0.12 or -0.11, as it is on every other Abbadoni planet with the same pop, right? The Temporal Anomaly does not amplify a species trait does it?
The numbers you see are correct for 0.4.10.
The TA doesn't amplify species trait, but the species trait modifies TA output. Let's see it with numbers:

With TA:
Abbadoni Research Focus 1.12 * 0.2 = 0.224
Special Temporal Anomaly 1.12 * 5 = 5.600
Algorithmic Elegance 1.12 * 0.05 = 0.056
Enclave of the Void 1.12 * 0.15 = 0.168
Subtotal 6.048
Abbadoni Bad Research -0.25 * 6.048 = -1.512

Without TA:
Abbadoni Research Focus 1.12 * 0.2 = 0.224
Algorithmic Elegance 1.12 * 0.05 = 0.056
Enclave of the Void 1.12 * 0.15 = 0.168
Subtotal 0.448
Abbadoni Bad Research -0.25 * 0.448 = -0.112

This is changed in 0.4.10+, where TA is applied after the species trait, and so it gives +3*pop PP to all species, bad or good research. It is arguably if this TA effect should be affected by the species trait, but in hands of great research species it is huge. Unaffected by species trait it's easier to keep it balanced to not be too much of an advantage in game.

Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Re: Temporal anomaly bug?

#8 Post by Magnate »

Wow, so bad research is much more of a malus than I thought, as it takes 25% off every tech advantage (except the flat ones). Does the same apply to bad production too? And to good research/production? Very interesting. I've never noticed that before, I thought the good/bad only affected the focus bonus. None of the other bonuses are multiplicative with each other, so why the racial one? Very unintuitive and not KISS.

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Temporal anomaly bug?

#9 Post by drkosy »

Does the same apply to bad production too?
Depends on the technology. Some of them came before mali and others after calculating them. Best example are industrial center and nuclear fusion. One is applied before mali the other after. Just watch the order in the planetary statistics list.
This is changed in 0.4.10+, where TA is applied after the species trait
Does that change for Ancient ruins as well?

For Influence I think it is somehow strange: First the planets need is subtracted and afterwards the bonus applied. Is this intended? That makes it uneffective to set homeworlds of natives to influence...
Want some fresh experience? Try Kosymod

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Temporal anomaly bug?

#10 Post by Oberlus »

Magnate wrote: Sun Feb 07, 2021 10:00 am Wow, so bad research is much more of a malus than I thought, as it takes 25% off every tech advantage (except the flat ones).
Several popbased research boosts from techs are unaffected by species. Example Quantum Computing.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Temporal anomaly bug?

#11 Post by Oberlus »

drkosy wrote: Sun Feb 07, 2021 12:13 pm
This is changed in 0.4.10+, where TA is applied after the species trait
Does that change for Ancient ruins as well?
Nopes (AFAIR).
drkosy wrote: Sun Feb 07, 2021 12:13 pmFor Influence I think it is somehow strange: First the planets need is subtracted and afterwards the bonus applied. Is this intended? That makes it uneffective to set homeworlds of natives to influence...
Bad traits should decrease regardless of sign, good traits should increase. If good influence turns a -1 into a -1.5 that's a bug.

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Temporal anomaly bug?

#12 Post by drkosy »

Nopes (AFAIR).
Ah, thanks for that information :)
Bad traits should decrease regardless of sign, good traits should increase. If good influence turns a -1 into a -1.5 that's a bug.
Maybe it wasn't really clear what I liked to know or maybe I just didn't get you answer right :? I'll try to explain on an example:
Native homeworld, species has good influence
Influence produced: 4
Indipendent homeworld: -2
Good influence: +1
Influence "produced" +3

The calculation is (4 - 2) * 1,5 = 3 (need of the planet is subtracted before the bonus is applied)
What I would expect is 4 * 1,5 -2 = 4 (need of the planet is subtracted after the bonus is applied)

P.S: Unfortunately I can't provide a sceenshot, because after updating my system to fedora 33 I needed to compile the game again and there occured several bugs (already posted on compiling-section)
Want some fresh experience? Try Kosymod

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Temporal anomaly bug?

#13 Post by Oberlus »

drkosy wrote: Sun Feb 07, 2021 2:57 pm
Bad traits should decrease regardless of sign, good traits should increase. If good influence turns a -1 into a -1.5 that's a bug.
Maybe it wasn't really clear what I liked to know or maybe I just didn't get you answer right :? I'll try to explain on an example:
Native homeworld, species has good influence
Influence produced: 4
Independent homeworld: -2
Good influence: +1
Influence "produced" +3

The calculation is (4 - 2) * 1,5 = 3 (need of the planet is subtracted before the bonus is applied)
What I would expect is 4 * 1,5 -2 = 4 (need of the planet is subtracted after the bonus is applied)
Hmm, I see:

Should the species trait apply independently to each affected effect, we would get:
4 (influence focus) + abs(4)*0.5 (good influence) = 6
-2 (native world) + abs(-2)*0.5 (good influence)= -1
So we'd get +5 from that world.
That's what I would expect.

But we are getting what you posted.


With bad influence I'd expect this:
4 (influence focus) - abs(4)*0.25 (bad influence) = 3
-2 (native world) - abs(-2)*0.25 (bad influence)= -2.5
So +0.5 from that world.

But we are getting
Influence focus: 4
Independent homeworld: -2
Bad influence: -0.5
Influence "produced" +1.5

As you pointed out, the good trait isn't as good as it should be when there are maluses but the sum is positive. And the bad trait isn't as bad as it should. I'll look into it, maybe we can do something.

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Temporal anomaly bug?

#14 Post by drkosy »

I just managed a quick check:
Reloaded an old savegame which shows the "great infuence" aktually gives a malus if the empire is to large and other around, the very bad influence gives boni :shock:
Attachments
Bad-Influence.png
Bad-Influence.png (732.24 KiB) Viewed 3360 times
Great-Influence.png
Great-Influence.png (1.19 MiB) Viewed 3360 times
Want some fresh experience? Try Kosymod

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Temporal anomaly bug?

#15 Post by Ophiuchus »

having a smaller fraction of a negative effect is higher in absolute terms (which you observe here).

for additive cases it would be easier if the effects of worst effects would be the neutral and the normal effects would add something (so the sum never becomes negative). this shifting of effects is not always possible (because we do not have a number for the worst effect, e.g. if influence malus depends on the number of planets) and sometimes not done yet for other reasons (e.g. it feels "natural" that AVERAGE traits are neutral). For trait effects, the supply effect is done the "correct" way (+1 for average supply).

for this multiplicative case i am not sure. VERY_BAD_MULTIPLIER is 0.5 - maybe it should double a negative cost (so instead of -1 make it -2) and a GREAT_MULTIPLIER half it (instead of -1 make it -0.5)? But this also leads to general strangeness around influence zero (at zero - when local influence is in balance - the multiplier has no effect at all).

the difference to our usual stuff is industry, research is never below zero or we have a fixed effective minimum (supply 0, max fuel 1).

probably influence trait should only be applied to influence production, not to the influence cost
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply