Defines.lua actually has a value for AE_DISTANCE_BASE, but it's presently set too low. In my own play I've upped it from 0.75 to 1.2 (while actually increasing the AE at close distances), and found the results a lot better.
Isn't that the x0.75 multiplier per distance hop? In that case that would make far away countries get more AE. Did you compare AE generation form an identical peace deal between the 0.75 and 1.2 values? Best do it with a peace deal that generates AE around the world like in OP's case.Defines.lua actually has a value for AE_DISTANCE_BASE, but it's presently set too low. In my own play I've upped it from 0.75 to 1.2 (while actually increasing the AE at close distances), and found the results a lot better.
All the ingame tests that I did about that suggest that it is actually the spynetwork in country C that counts. Maybe it is a bug and the code intends it to be different?SN = The spy network of the conquering country in the country owning P in %,
Sorry, it seems I am a bit late to the conversation but it still seemed like a bit of clarification on the AE calculation could be helpful to some.
The formula presented on the Wiki and then discussed in the video is quite wrong and incomplete, probably an error in reasoning on behalf of the wiki editor just trying to fit
the numbers found in defines.lua on some model function very familiar to him, the exponential function.
For the correct formula the following variables are of importance:
D = The development of the conquered province ,
AEmod = The aggressive expansion modifier of the conquering country,
P = The conquered province,
SN = The spy network of the conquering country in the country owning P in %,
AEDist = The variable AE_DISTANCE_BASE in defines.lua normally set to 0.75,
C = The country which gets the calculated AE relation malus towards the conquering country,
CoBe = This is 1 for a co-belligerent country and 1.5 (resp. ALLY_AE_MULT from defines) if the country is not a co-belligerent,
d(P,C) = The in game distance from the province P to the nearest owned province of the country rounded down to the nearest multiple of 100, divided by 100 and then capped at 4.
For example if the distance is 347 we get 347 -> 300 -> 3 and for 879 we get 879 -> 800 -> 8 -> 4.
RC = This a factor depending on Religion and culture of P resp. C. We always compare the religion of P with the state religion of C and the culture of P with the primary culture of C.
0.5 if Rel(P) and Rel(C) are in a different religious group 0 if Cult(P) is in a different culture group than Cult(C)
We get RCrel = 1 if Rel(P) and Rel(C) are different but in the same religious group and RCcult = 0.25 if Cult(P) is in the same culture group as Cult(C)
1.5 if Rel(P) and Rel(C) are the same and Rel(C) is also the religion of the conquering country 0.5 if Cult(P) is the same as Cult(C)
2 if Rel(P) and Rel(C) are the same and Rel(C) is not the religion of the conquering country
Where Rel() and Cult() denote the obvious. The we get RC = RCrel + RCcult
Then the AE malus the conquering country gets with C upon conquering P is:
AE = D * (3/4) * (1-AEmod) * (1-SN/1000) * CoBe * RC * ( 1 / ( 1 + AEDist * d(P,C) ) ).
A interesting remark is that a couple of the quantities theorized by looking at the defines do not play a role at all:
(i) There is no continent reduction,
(ii) AE_ATTACKER_DEVELOPMENT and AE_DEFENDER_DEVELOPMENT do not work and only do sth. if set to zero or a value rounded to zero, i.e. < 0.0001,
(iii) It does not matter at all how big the conquering country is, only how close C is to P.
Regarding OP's specific problem here are a couple more remarks:
(i) As observed correctly before the distance function is capped. This leads to for example Egypt not being farther away from Tangiers than Indonesia for the purpose of AE,
(ii) The case where the conquering country is of a different religion than the province is maybe more extreme than intended or has been changed at some point:
There is a value AE_INFIDEL_CONQUEST = 0.25 which should increase AE by 25% in this case. This does not work at all, insted the extra AE from same religion is doubled,
leading to a 50% increase instead,
(iii) As the continent reduction does not work currently it may have been at some point intended to reduce this problem, but does not currently do so.
I hope this clarifies the topic a bit.
Have fun exactly calculating the AE you will get before conquering to min/max even more.
It used to work but by 1.16 they decided that world wide coallitions made more sense and therefore removed the AE reduction from different continents. For example in patch 1.13 the continent AE reduction was still a thing; the dudes in SEA could not care less with what happened in West Africa.(iii) As the continent reduction does not work currently it may have been at some point intended to reduce this problem, but does not currently do so.
Thank you very very much for this information!
Can you also tell us how the HRE plays into that formula? Is 0.5 added to RC if the province is in the empire or something like that?
I'm curious how you got that formula. Are you working for Paradox or do you have access to the source code in some way?
All the ingame tests that I did about that suggest that it is actually the spynetwork in country C that counts. Maybe it is a bug and the code intends it to be different?
To see whether the spynetwork in the country owning P or in the country C matters, I did the following test just now: I started the game version 1.29.3 as Austria in 1444. Then I did the following(quoted texts are console commands):
- "add_claim 65" (claim on München)
- On Dec 11, declare war on Bavaria with that claim
- On Jab 12, look at a peace deal in which I would annex all of Bavaria(58 dev). This would create 93 AE with Bavaria and 84 AE with many nearby princes(e.g. Augsburg or Brandenburg)
- "spynetwork bav 100" add 100 spynetwork in Bavaria
- look at the peace deal again. Now this would create 84 AE with Bavaria and still 84 AE with many nearby princes(e.g. Augsburg or Brandenburg)
- "spynetwork bra 100" add 100 spynetwork in Brandenburg
- look at the peace deal again. Now this would create 74 AE with Brandenburg.
I don't find it unreasonable at all that they take such high AE when there's a random colony nearby. They may not care much about the situation in Egypt specifically, but they would notice that Spain is potentially very dangerous. Then they start to worry about exactly why they got themselves a foothold in easy range of their own heartland and decide to team up against them to eliminate what certainly is a credible threat. AE is by and large a measure on how big a threat you are to them, but rather than looking at your military strength it accounts for how you use it.
I think you got something wrong in the example. The Indonesian nations do not get this much AE because Spain has a colony near them, this is in fact completely irrelevant for the calculation. They get this much AE as they get a lot of positive modifiers ( same religion + infidel conquest ) and the impact of distance is quite limited, i.e. they do not get less AE as say Morocco would, if they still existed, despite being much farther away. Refer to the formula for details.
Yup its awful for gameplay, there's no way its good or even indifferent. Realism is really no argument - if we go down that route everything falls apart.But I think there has been sufficient argumentation why some of the people do not like this from a gameplay perspective. ( just read through the thread keyword: Grand sunni coalition)
Regarding the continent reduction, I personally find it rather arbitrary as it leads to weird behavior at continent borders especially in Egypt at the Africa, Asia, Europe border.
If this has been removed at some point it would be worth considering to replace its effect somehow.
- Removed overseas impact on AE
This has been really bothering me lately. Can something be done about AE propagation on distance? Here nations like Sulu, Perak, Siak and Mallaca will for world coalition because they really hate situation in Egypt. They should not even know or care about the area -_-. I colonized there - Mamluks don't even have Exploration.
View attachment 531426
@Tempscire do you know if allies and subjects get less AE and how exactly the amount is calculated in these cases?