You are right, the AE is 7. I got 6 AE in my test because of the prestige and the rounding.
I think it is not 0.75*2/3, but the 0.75 for ceding a province is replaced by the 0.5 for returning a core to a vassal. The 0.5 is defined in defines.lua:
Yes this seems to be correct. I just did a short test and did not change defines.
Are you saying that this applies when I take a province for myself on which only the subject has a core? Then I can't reproduce it at all for the reconquest CB as I seem to get the normal AE for taking a province(dev*0.75*AEmod*AEimpact). Was the province maybe unoccupied in your test and went to your subject per default?
Sorry I formulated this somewhat imprecisely. I meant that you take a province for yourself or your vassal, for which the reconquest casus belli actually applies. I.e. if you take it you need to have a core on it.
I think this is actually 63 (dev) * 0.25 (CB) * 0.5 (returning a core to a vassal even though we are using the cede province tab in the peace deal) * 1.5 (AEimpact from same religion, but different culture group) * 0.9 (AE modifier)~10.63. To confirm that I did the following test:
- start as Castile in 1444
vassalize nav
add_core [prov_id] NAV to give Navarra cores on three provinces of Aragonese culture
set_base_tax [prov_id] [tax] to change the dev of the three provinces so that the sum is 63
prestige -8 to set the prestige to 0 so that there is no AEmod (not sure if it was exactly -8)
- declare a reconquest war against Aragon for one of these cores
- check the peace deal for ceding the provinces to Navarra. The AE is 15 which matches 63*0.25*0.5*2=15.75
tag mor to switch to Morocco and culture [prov_id] to change the culture of the provinces to Moroccan
tag cas to switch back
- check the peace deal for ceding the provinces to Navarra. The AE is now 11 which matches 63*0.25*0.5*1.5=11.8125
I just tested this and it seems to be correct, the problem with my test was that I did it with France as a country and Labourd as a Province. But France and Armagnac both have a core on Labourd and this seems to change things.
If I remove the core from Labourd then the AE for taking it is:
10*0.25(CB)*0.5(PO)*2(AEimpact from Navarra)=2.5
with the core it is:
1.875=10*0.25(CB)*0.5(PO)*1.5(AEimpact?).
There seems to be some impact of cores on AEimpact as also if one gets rid of the core of Armagnac but keeps the French core the AE is
2.8125=10*0.25(CB)*0.75(PO)*1.5(AEimpact?).
The precise numbers are from adjusting prestige and checking when the calculation rounds.
Note that this also might have some other prerequisites as I could not replicate this effect of cores when attacking Aragon as Castile in the example you proposed.
In the Livonian Order/Kazan/Muscovy peace deal the calculation 63 (dev) * 0.25 (CB) * 0.5 (returning a core to a vassal even though we are using the cede province tab in the peace deal) * 1.5 (AEimpact from same religion, but different culture group) * 0.9 (AE modifier)~10.63 should probably be correct as there seem to be no Livonian cores involved.
I can't reproduce that AE in my above test game. With a -10% AE modifier, I get 12 AE for 63 dev and without the modifier it is 13 AE. This is independent of the culture of the provinces. I also tested a bunch of 30 dev provinces (which is AFAIK the cap for AE) and I get 6 AE for one province, 13 for 2, 19 for 3 and 26 for 4(all with 0 AE modifier), so I think the AE for one 30 dev province is around 6.5. But with your formula the AE should be 30*0.25=7.5. But I have no idea how the actual formula could look like.
I tested this and I am certain that in you peace deal you get:
BaseAE=30 (dev) * 0.25 (CB) * 0.5 (PO) * 1.75 (AEimpact from Cores) = 6.5625
and in the other peace deal it should be
AE = 63 (dev) * 0.25 (CB) * 0.5 (PO) * 2.00 (AEimpact from Cores) * 0.9 (AEmod) = 14.175.
Therefore the AEimpact does get applied but it gets applied in a wrong way. (I am not sure if this is just an UI bug or the actual AE is affected by this as I only tested the UI). Which AEimpact modifier gets applied when seems quite obscure, but it seems to be related in some way to the primary culture of the nations getting the most AE/ participating in the peace deal. My current findings are the following:
As Castille returning a core form Aragon:
| Aragons Primary Culture | Province Culture | AEimpact |
| Aragonese | Aragonese | 1.75 |
| Aragonese | Catalan | 1.75 |
| Catalan | Aragonese | 2.0 |
| Catalan | Catalan | 2.0 |
| Greek | Aragonese | 1.5 |
| Greek | Greek | 1.5 |
Therefore the province culture does not seem to matter, but the primary culture does.
Returning Labourd from England also has an AEimpact of 2.0.
So the problems actually seem to be the following:
(i)The AE modifier for returning cores is wrongly applied if you take a province which only your vassal has a core on directly for yourself,
(ii)Having a core on a province seems to sometimes have an impact on the AEimpact modifier at least when using the reconquest cb. The exact conditions are unknown,
(iii)When using the return core peace option the AEimpact seems to be calculated differently. There seems to be a relation to a nations primary culture but not to the provinces culture. How this works exactly is unknown.
If you find out something about these unknown circumstances I would be very interested.