Annexation feedback

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.
Message
Author
BlueAward
Small Juggernaut
Posts: 714
Joined: Mon Aug 08, 2022 3:15 am

Re: Annexation feedback

#31 Post by BlueAward »

wobbly wrote: Wed Mar 27, 2024 12:01 pm You could you know, mouse over it and read the reason it's giving.
When I sub for drkosy I see it fails the fourth test, i.e. "that is resource connected for the source's owner empire to an object [ that is a Planet, and that belongs to source's owner empire ]". Meanwhile, for me, it passes that test. Seems fishy

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

Re: Annexation feedback

#32 Post by wobbly »

BlueAward wrote: Wed Mar 27, 2024 12:16 pm
wobbly wrote: Wed Mar 27, 2024 12:01 pm You could you know, mouse over it and read the reason it's giving.
When I sub for drkosy I see it fails the fourth test, i.e. "that is resource connected for the source's owner empire to an object [ that is a Planet, and that belongs to source's owner empire ]". Meanwhile, for me, it passes that test. Seems fishy
Maybe report it and get someone to check the saves. The only player who owned a supply connected planet on the turn you annexed was LienRag.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13612
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Annexation feedback

#33 Post by Geoff the Medio »

wobbly wrote: Sun Mar 17, 2024 5:05 am

Code: Select all

   auto DefaultAnnexationCost() {
        return std::make_unique<ValueRef::Operation<double>>(
            ValueRef::OpType::MAXIMUM,
            MinimumAnnexCost(),
            (ScaledPop() * ExpBaseSpeciesOpinion() * ExpBaseStability()) + (BuildingAnnexCostScaling() * BuildingCostsSum(SourceOwner()))
        );
    }
LienRag wrote: Sun Mar 17, 2024 8:36 am The annexation formula accounts for the Species' opinion towards only one player ?
Or did I miss something ?
Which one, BTW ? The annexing or the annexed ?
Both. Note that

Code: Select all

    auto ExpBaseSpeciesOpinion() // (base^(owner_opinion - annexer_opinion))
    { return AnnexCostOpinionBase() ^ (SpeciesOpinionOfOwnerOrZero() - SpeciesOpinion(SourceOwner())); }
So it's not just the opinion of the species to an empire, but rather the difference between the current owner (uses opinion = 0 if unowned) and the prospective annexer empire. This is a BIG effect, since it's in the exponent. The building cost scaling is multiplicative and is added to the population-opinion contribution, so building costs can be completely overwhelmed by pop-opinion costs on the high end. On the low end, whether building costs are of much importance probably depends on what an effective exchange rate between influence IP and production PP is. The stability effect is also exponential, and should give an effect that it takes several turns of blockading to cut off supply of a planet to its empire for the stability to drop enough to make annexation sufficiently cheaper, and defensive focus similarly takes a while to fully ramp up its protective effect.

User avatar
LienRag
Cosmic Dragon
Posts: 2243
Joined: Fri May 17, 2019 5:03 pm

Re: Annexation feedback

#34 Post by LienRag »

Thanks.
That's an interesting formula.

What about the exploit that Wobbly suggested earlier, though : sending chaff against the enemy so that by killing them he lowers the Species' opinion of the enemy's Empire ?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13612
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Annexation feedback

#35 Post by Geoff the Medio »

LienRag wrote: Thu Apr 11, 2024 10:30 amWhat about the exploit that Wobbly suggested earlier, though : sending chaff against the enemy so that by killing them he lowers the Species' opinion of the enemy's Empire ?
If that's an objectionable exploit, then it is so regardless of how annexation works.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13612
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Annexation feedback

#36 Post by Geoff the Medio »

LienRag wrote: Tue Mar 26, 2024 11:10 pmNote that I had all the planets marked at "not annexable"; I don't know why BlueAward was able to annex them.

This turn also they are all "not annexable" to me.
Seems to work in master: https://github.com/freeorion/freeorion/ ... 2053980683
Attachments
screenshot after annexing planet in problematic system of test game as LR empire
screenshot after annexing planet in problematic system of test game as LR empire
after annex as LR.png (876.18 KiB) Viewed 449 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13612
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Annexation feedback

#37 Post by Geoff the Medio »

LienRag wrote: Thu Apr 11, 2024 10:30 amThat's an interesting formula.
Should an empire (not just one of its allies) having fleet supply in a system affect the cost of annexation? This would make it a bit awkward to get the minimal cost possible if an ally's supply taking over a system can't be prevented.

Should distance / jumps to a planet that the annexer controls affect the cost of annexation? This might lead to some micromanagement with gifting planets around between allies to minimize the cost of annexing additional planets... Though maybe such gifting would already happen if one can annex more cheaply?

I'm also pondering making gifting cost IP, perhaps (partly) dependent on the costs for annexing a planet by the empires involved.

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

Re: Annexation feedback

#38 Post by Oberlus »

Geoff the Medio wrote: Sun Apr 14, 2024 9:37 am I'm also pondering making gifting cost IP, perhaps (partly) dependent on the costs for annexing a planet by the empires involved.
I find that much reasonable. Helps against micromanagement around planets and fleets, and makes sense fluff-wise (your population can't be happy if you gift away their belongings or their fate).

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

Re: Annexation feedback

#39 Post by wobbly »

Oberlus wrote: Sun Apr 14, 2024 10:13 am
Geoff the Medio wrote: Sun Apr 14, 2024 9:37 am I'm also pondering making gifting cost IP, perhaps (partly) dependent on the costs for annexing a planet by the empires involved.
I find that much reasonable. Helps against micromanagement around planets and fleets, and makes sense fluff-wise (your population can't be happy if you gift away their belongings or their fate).
Agree. At cheap cost. It should not be cheaper for allies to arrange a deal where they declare it independent then the ally invades.

BlueAward
Small Juggernaut
Posts: 714
Joined: Mon Aug 08, 2022 3:15 am

Re: Annexation feedback

#40 Post by BlueAward »

Geoff the Medio wrote: Sun Apr 14, 2024 9:26 am
LienRag wrote: Tue Mar 26, 2024 11:10 pmNote that I had all the planets marked at "not annexable"; I don't know why BlueAward was able to annex them.

This turn also they are all "not annexable" to me.
Seems to work in master: https://github.com/freeorion/freeorion/ ... 2053980683
I believe "the situation" was couple turns earlier, the screenshot shows turn 194 when wobbly's army was down already and I had other stuff annexed. I think at that point LR was able to cheaply annex the gysache planet etc

I am still on a trip and can't confirm exact turn but should be first annexation by me in Iszm system that was highly controversial and I think second as well

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

Re: Annexation feedback

#41 Post by wobbly »

It was turn 189 that I clicked invade and BA clicked annex.

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

Re: Annexation feedback

#42 Post by wobbly »

Today I noticed something that maybe isn't accounted for in opinion/annexation. Should Racial Purity and Xenophobia have an effect?

User avatar
LienRag
Cosmic Dragon
Posts: 2243
Joined: Fri May 17, 2019 5:03 pm

Re: Annexation feedback

#43 Post by LienRag »

Nice spotting.
They certainly should...

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

Re: Annexation feedback

#44 Post by drkosy »

In my recent SP game I spotted some issues with annexing in combination with low stability. As you see at the screenshots I wasn't able to annex the Eaxaw colony with negative stability while annexing worked great for Exobot with positive stability.

In MP 26 someone mentioned, that gifting doesn't work with negative stability. Maybe that is true for annexing as well.

P.S: I could provide a save game but it uses my kosymod. That mod does add some buildings but nothing that effects game mechanics like annexing.
Attachments
Annexing-bug2.jpg
Annexing-bug2.jpg (286.47 KiB) Viewed 163 times
Annexing-bug1.jpg
Annexing-bug1.jpg (294.26 KiB) Viewed 163 times
Want some fresh experience? Try Kosymod

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

Re: Annexation feedback

#45 Post by Ophiuchus »

drkosy wrote: Fri May 17, 2024 7:57 pm In my recent SP game I spotted some issues with annexing in combination with low stability. As you see at the screenshots I wasn't able to annex the Eaxaw colony with negative stability while annexing worked great for Exobot with positive stability.

In MP 26 someone mentioned, that gifting doesn't work with negative stability. Maybe that is true for annexing as well.

P.S: I could provide a save game but it uses my kosymod. That mod does add some buildings but nothing that effects game mechanics like annexing.
there is nothing in the code regarding stability as far as i can see in the annexation order. the most complicated part is in the Species DefaultAnnexationCondition. So with that knowledge, if one of the two annexations in your screenshot succeeds, i think the other should succeed as well.
and if you are able to press the button i think this sends an annexation order

save game would make sense. or even better, check first if there are any 'AnnexOrder' entries in the log file for that turn, the AnnexOrder execution / ::Check has quite thorough logging.

also which revision is your build on? maybe there were fixes since then?
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