Duplicate Stellaris - [2.8.1] - AI cannot change ANY Federation laws

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Liggi

Lt. General
80 Badges
Mar 28, 2017
1.279
8.852
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Victoria 3 Sign Up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Stellaris: Nemesis
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Europa Universalis IV
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Distant Stars
  • Hearts of Iron IV: By Blood Alone
  • Crusader Kings II: Holy Fury
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Conclave
Description
[2.8.1] [28d1] - AI cannot change ANY Federation laws

Game Version
2.8.1

What version do you use?
Steam

What expansions do you have installed?


Do you have mods enabled?
Yes

Please explain your issue is in as much detail as possible.
I have reported this issue in the past and I know it's in your system, but I've done some additional investigation. I essentially created my own mod to remove all of the modifiers from the "Low" centralisation Federation law, and set its base to "1000" to rule out an issue with `ai_weight`.

Unfortunately, even in this circumstance, the AI will not change from Minimal to Low, and therefore they never have any access to any other Federation laws. I believe this is actually an issue that the AI just cannot (or will never) change any Federation law under any circumstance. Only the player can.

I know this is not intentional because there are so many rules defined for `ai_weight` for the various laws in the game files.

Steps to reproduce the issue.
Very simple. Start an AI only game as an Observer, and watch that no Federation will ever change a single law, no matter what situation. They will increase in Level, but no law will ever change.

Upload Attachment
(DID NOT ANSWER QUESTION)
 
  • 7
  • 3
Reactions:
This is the main reason why u will almost never see a fed fleet in full ai feds. Only hegemony and maybe military alliance will have a tiny one by default.

Yup, 100%. It's a shame, too, because the AI actually has behaviour to increase the Federation fleet during the Crisis, which would be cool to see... but none of this functionality works.
 
  • 1
  • 1
Reactions:
I've also just verified that even if you take over control and change Centralisation from "Minimal" to "Low", the `ai_weight` for all the laws is still being ignored, so no laws will change again. For example, if cohesion drops, the AI should try to decrease centralisation again to fix the issue, but they won't do that even in drastic circumstances.
 
A couple more findings:

In `/common/defines/00_defines.txt` there's two defines that seem relevant: `FEDERATION_LAW_SUPPORT_THRESHOLD` and `FEDERATION_PROPOSE_THRESHOLD`. The latter seems especially relevant. I tried setting this to 50, 100 and 1000, but it had no effect. If I were the devs, my first thought would be to check if this value is actually being used as expected.

Additionally, in `/common/diplomatic_actions/00_actions.txt`, there's `action_vote_for_federation_law` on line 1429. I also tried bumping up the `AI_acceptance_base_value` to 50 and 100, but again, it didn't cause the AI to do anything.
 
  • 4
Reactions:
A couple more findings:

In `/common/defines/00_defines.txt` there's two defines that seem relevant: `FEDERATION_LAW_SUPPORT_THRESHOLD` and `FEDERATION_PROPOSE_THRESHOLD`. The latter seems especially relevant. I tried setting this to 50, 100 and 1000, but it had no effect. If I were the devs, my first thought would be to check if this value is actually being used as expected.

Additionally, in `/common/diplomatic_actions/00_actions.txt`, there's `action_vote_for_federation_law` on line 1429. I also tried bumping up the `AI_acceptance_base_value` to 50 and 100, but again, it didn't cause the AI to do anything.
Considering it's a threshold, have you tried setting it to 0? Or something negative, even?
 
Considering it's a threshold, have you tried setting it to 0? Or something negative, even?

Yeah, so I've tried this from two directions.

Firstly, I've tried boosting the `ai_weight` on the decision to go from Minimal to Low centralisation to a base of 50, 100 and 1000.

Then, I tried setting the `FEDERATION_SUPPORT_THRESHOLD` to 50, 100 and 1000 (without the previous change).

I've also tried both together. And, as you suggested, I tried setting the `FEDERATION_SUPPORT_THRESHOLD` to 0 also. No luck.

My guess is that the logic that handles the AI actually proposing a vote just isn't working, so the weights are currently irrelevant.

EDIT: If you do have any other suggestions of things I might try, or want to try them yourselves and confirm / disprove my findings, please do! I'd love to find as much information as possible to help the devs fix this.
 
  • 1
Reactions:
But arent these threshholds more the likelyhood for the ai to propose another empire to create a federation? I dont believe this is for the fed laws.

No. So, in `/common/diplomatic_actions/00_actions.txt` on line 1313, you can find: `action_invite_to_federation`, which handles what you are talking about.

It even has a comment above that says "# Creates a federation between two empires or invites an empire to an existing federation."

This seems to work fine. The things I've discussed are definitely weights for whether or not the AI should propose changes to Federation laws, and these definitely do not work.
 
Alright, so, final investigation here (I think). All of this has been done on a fresh, totally unmodded game.

Some context:

`common/federation_laws/01_centralization.txt`
Line 103: `centralization_low`

`ai_weight` here has a number of modifiers, these are the ones that apply in this situation:

Base is 0

+ the “default support” modifier (26)
+ the “AI will try to increase centralization one step at a time” modifier (100)

This already puts us at 126 `ai_weight`, and in `common/defines/00_defines.txt`, line 1574, the `FEDERATION_PROPOSE_THRESHOLD` is `100`, so the AI should propose the law according to those rules

the only possible negative `ai_weight` modifiers here are:

- -50 if the AI is NOT the Federation leader, and the cohesion is under 90
- -50 if the AI IS the Federation leader, and the Federation already has Medium, High or Very High Centralization (as in, the AI is reluctant to decrease Centralization)

Neither of those apply in this situation, so the `ai_weight` is AT LEAST 126, more than enough for the AI to propose the Low Centralization law

I’ve attached three savegames here, with three separate examples where that situation is currently active where the AI should propose to change Centralization from Minimal to Low. One of a “natural” Federation, formed from independent AI empires during a game. Two others are a Common Ground Origin, and a Hegemony Origin.

Centralization1.sav - “Natural” Federation - Mirovandia Company is President of the Cosmic Partnership Federation. They’ve just reached Level 2, and have a Cohesion of 100. This fits all the rules for “Low” Centralization to be proposed, but if you load the save and watch them, that will never happen even if the Cohesion stays high.

Centralization2.sav - Common Ground Origin - Free Quenti Republic are President of the Confederated Interlinked Systems. Again, they’ve just reached Level 2, Cohesion of 100. No law will change if you watch them despite having all the necessary conditions.

Centralization3.sav - Hegemony Origin - Genoggian Empire is President of the Sildor Protection Sphere, a Hegemony. They’ve just reached Level 2, Cohesion is 100. Again, as above, all conditions for the AI to propose changing to Low Centralization are met, but it will not happen.

It’s worth noting that for all three, if you take over as the relevant empire, you can hover the option and see the other empires support it. And if you propose it yourself as the player, it will pass. It’s just that the AI won’t / can’t ever propose it.

If there’s anything else I can do here in terms of saves / investigation to help the devs, let me know (whether you are a dev or not and have any ideas).
 

Attachments

  • Centralization1.sav
    3,5 MB · Views: 0
  • Centralization2.sav
    1,9 MB · Views: 0
  • Centralization3.sav
    2 MB · Views: 0
  • 1
Reactions: