• 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.

ConjurerDragon

Generalissimus
79 Badges
Apr 19, 2005
5.559
611
  • Rise of Prussia
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Humble Paradox Bundle
  • Pride of Nations
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • 500k Club
  • War of the Roses
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Victoria 2
  • Age of Wonders III
  • Crusader Kings Complete
  • Knights of Honor
  • Steel Division: Normandy 44 Deluxe Edition
  • Steel Division: Normandy 44
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • East India Company Collection
  • Deus Vult
  • Darkest Hour
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Magicka
  • Teleglitch: Die More Edition
  • Sword of the Stars
In my current game I noticed that to stabhit an enemy with a peace offer I have to demand 12% less than the warscore.

I understood the defines.txt settings:


Code:

_WARSCORE_STABHIT_THRESHOLD_ = 40 #Positive: warscore must be above this to allow stability hits on declined peace offers
_WARSCORE_STABHIT_OFFER_DIFFERENTIAL_ = 11 #Positive: peace offer must be at least this amount below warscore to stab hit


so that if I have more than 40% warscore that my peace offer with 11% less than warscore would mean the enemy would suffer a -1 to stability.

e.g. when I have a WS of 100% demanding 89%.

However nothing happened. Only when I demanded 12% less than warscore did the stabhit work.
 
Warscore question:

Defines.txt has

warscore = {
_WARSCORE_SIEGE_WON_ = 1 #Positive
_WARSCORE_MAJOR_SIEGE_WON_ = 2 #Positive
_WARSCORE_BATTLE_WON_ = 1 #Positive
_WARSCORE_MAJOR_BATTLE_WON_ = 3 #Positive
_WARSCORE_CONTROL_PROVINCE_ = 0 # Obsolete
_WARSCORE_PROVINCE_TAX_FACTOR_ = 0.5 # Warscore for controlling a province = tax*factor + mp*factor + fort*factor + cot bonus
_WARSCORE_PROVINCE_MANPOWER_FACTOR_ = 0.25
_WARSCORE_PROVINCE_COT_ = 10
_WARSCORE_PROVINCE_FORTRESS_FACTOR_ = 0.5
_WARSCORE_STABHIT_THRESHOLD_ = 40 #Positive: warscore must be above this to allow stability hits on declined peace offers
_WARSCORE_STABHIT_OFFER_DIFFERENTIAL_ = 11 #Positive: peace offer must be at least this amount below warscore to stab hit

In my current testgame the warscore given in the diplomacy screen when offering peace lists no "sieges won"/"major sieges won". Is that entry obsolete like the "control province" entry or are the won sieges included in the provinces controlled values?

One line in the screen reads "+10 We control Catalonia"
Base tax is 13 * 0,5 = 6,5 Manpower 2,33 * 0,25 = 0,5825 Forrt Minimal (1?) * 0,5 = 0,5 no cot would be 7,5825
Where does the difference to 10 come from? Siege? Is there any capital bonus for WS?

1647199214642.png
 
When the price of manufactories is defined in defines.txt

_BUILD_MANUFACTORY_BASE_PRICE_= 400 #Positive
_BUILD_MANUFACTORY_SAMETYPE_EXTRA_ = 100 #Positive: extra price for building the same manufactory type more than once (per factory)

then why is the starting price ingame completely differnt?
and
why do different manufactories cost different amounts?

e.g. vanilla game as Portugal year 1419 prices - even before the technology to actually build them is researched - are:

Fine Arts 750
Weapons, Naval and Refinery 600
Goods 550

Every year passed the price rises so I guess the prices is starting price + year + inflation?

And what is

_COUNTRY_SAFEMANUF_OFFSET_ = 101 #Positive
 
In my current game I noticed that to stabhit an enemy with a peace offer I have to demand 12% less than the warscore.

I understood the defines.txt settings:


Code:

_WARSCORE_STABHIT_THRESHOLD_ = 40 #Positive: warscore must be above this to allow stability hits on declined peace offers
_WARSCORE_STABHIT_OFFER_DIFFERENTIAL_ = 11 #Positive: peace offer must be at least this amount below warscore to stab hit


so that if I have more than 40% warscore that my peace offer with 11% less than warscore would mean the enemy would suffer a -1 to stability.

e.g. when I have a WS of 100% demanding 89%.

However nothing happened. Only when I demanded 12% less than warscore did the stabhit work.
Yes, the documentation doesn't quite match. The check in-game is whether (demands + _WARSCORE_STABHIT_OFFER_DIFFERENTIAL_) < warscore, when the text in defines.txt indicates that it should be <=. A better description would be "Peace offer must be more than this amount below warscore to stab hit."
 
  • 1
Reactions:
Warscore question:

Defines.txt has

warscore = {
_WARSCORE_SIEGE_WON_ = 1 #Positive
_WARSCORE_MAJOR_SIEGE_WON_ = 2 #Positive
_WARSCORE_BATTLE_WON_ = 1 #Positive
_WARSCORE_MAJOR_BATTLE_WON_ = 3 #Positive
_WARSCORE_CONTROL_PROVINCE_ = 0 # Obsolete
_WARSCORE_PROVINCE_TAX_FACTOR_ = 0.5 # Warscore for controlling a province = tax*factor + mp*factor + fort*factor + cot bonus
_WARSCORE_PROVINCE_MANPOWER_FACTOR_ = 0.25
_WARSCORE_PROVINCE_COT_ = 10
_WARSCORE_PROVINCE_FORTRESS_FACTOR_ = 0.5
_WARSCORE_STABHIT_THRESHOLD_ = 40 #Positive: warscore must be above this to allow stability hits on declined peace offers
_WARSCORE_STABHIT_OFFER_DIFFERENTIAL_ = 11 #Positive: peace offer must be at least this amount below warscore to stab hit

In my current testgame the warscore given in the diplomacy screen when offering peace lists no "sieges won"/"major sieges won". Is that entry obsolete like the "control province" entry or are the won sieges included in the provinces controlled values?

One line in the screen reads "+10 We control Catalonia"
Base tax is 13 * 0,5 = 6,5 Manpower 2,33 * 0,25 = 0,5825 Forrt Minimal (1?) * 0,5 = 0,5 no cot would be 7,5825
Where does the difference to 10 come from? Siege? Is there any capital bonus for WS?

View attachment 817964
The SIEGE_WON values are included in battle warscore. MAJOR_SIEGE_WON is for capturing a capital city, while MAJOR_BATTLE_WON is for battles involving at least 10k per side in which the loser lost at least 2/3 and the winner lost not more than half as many as the loser. I'll add these descriptions to defines.txt.

I'm not sure how to arrive at +10 for Catalonia; I suspect the manpower calculation is slightly different from the description. There is also a +1 flat base for controlling any city, which is in the defines in game but was never added to defines.txt for some reason. There are three missing lines:
Code:
    _WARSCORE_PROVINCE_TP_                =  1   # Flat rate for controlling a trading post
    _WARSCORE_PROVINCE_COLONY_            =  2   # Flat rate for controlling a colony regardless of value
    _WARSCORE_PROVINCE_CITY_              =  1   # Base value for controlling a non-colony city, plus the modifiers below

Can you give me a save that displays an "off" calculation for war score, that's compatible with vanilla or AGCEEP?
 
Yes, the documentation doesn't quite match. The check in-game is whether (demands + _WARSCORE_STABHIT_OFFER_DIFFERENTIAL_) < warscore, when the text in defines.txt indicates that it should be <=. A better description would be "Peace offer must be more than this amount below warscore to stab hit."

Ah, now I undertstand it.

Demands would have been 89 + WSOD 11 < WS 100 and that was not true,
and with 88 demands + 11 were < 100 and caused the stabhit

So the amount is 11 and must be more means at least 12 below Warscore to cause stabhit.

Suggested text for comment in defines.txt:

_WARSCORE_STABHIT_OFFER_DIFFERENTIAL_ = 11 #Positive: peace offer must be more than this amount below warscore to stab hit (hint: at least 12!)
 
The SIEGE_WON values are included in battle warscore. MAJOR_SIEGE_WON is for capturing a capital city, while MAJOR_BATTLE_WON is for battles involving at least 10k per side in which the loser lost at least 2/3 and the winner lost not more than half as many as the loser. I'll add these descriptions to defines.txt.

I'm not sure how to arrive at +10 for Catalonia; I suspect the manpower calculation is slightly different from the description. There is also a +1 flat base for controlling any city, which is in the defines in game but was never added to defines.txt for some reason. There are three missing lines:
Code:
    _WARSCORE_PROVINCE_TP_                =  1   # Flat rate for controlling a trading post
    _WARSCORE_PROVINCE_COLONY_            =  2   # Flat rate for controlling a colony regardless of value
    _WARSCORE_PROVINCE_CITY_              =  1   # Base value for controlling a non-colony city, plus the modifiers below

Can you give me a save that displays an "off" calculation for war score, that's compatible with vanilla or AGCEEP?
I would suggest to add those 3 lines right below the obsolete control of provinces line which it replaces.

Hypothesis for Catalonias 10:
Could it be that the game rounds up and truncates everything?

"Base tax is 13 * 0,5 = 6,5 Manpower 2,33 * 0,25 = 0,5825 Forrt Minimal (1?) * 0,5 = 0,5 no cot would be 7,5825"
so 6,5 = 7 0,5825 = 1 0,5 = 1 flat bonus for city = 1 = 10?
 
Last edited:
I would suggest to add those 3 lines right below the obsolete control of provinces line which it replaces.

Hypothesis for Catalonias 10:
Could it be that the game rounds up and truncates everything?

"Base tax is 13 * 0,5 = 6,5 Manpower 2,33 * 0,25 = 0,5825 Forrt Minimal (1?) * 0,5 = 0,5 no cot would be 7,5825"
so 6,5 = 7 0,5825 = 1 0,5 = 1 flat bonus for city = 1 = 10?
Good thought, but no, it doesn't get truncated till the end. There's nothing obviously wrong with the warscore calculation, but the manpower is the most complicated part of it, which is why I suspect it.
 
The SIEGE_WON values are included in battle warscore. MAJOR_SIEGE_WON is for capturing a capital city, while MAJOR_BATTLE_WON is for battles involving at least 10k per side in which the loser lost at least 2/3 and the winner lost not more than half as many as the loser. I'll add these descriptions to defines.txt.

I'm not sure how to arrive at +10 for Catalonia; I suspect the manpower calculation is slightly different from the description. There is also a +1 flat base for controlling any city, which is in the defines in game but was never added to defines.txt for some reason. There are three missing lines:
Code:
    _WARSCORE_PROVINCE_TP_                =  1   # Flat rate for controlling a trading post
    _WARSCORE_PROVINCE_COLONY_            =  2   # Flat rate for controlling a colony regardless of value
    _WARSCORE_PROVINCE_CITY_              =  1   # Base value for controlling a non-colony city, plus the modifiers below

Can you give me a save that displays an "off" calculation for war score, that's compatible with vanilla or AGCEEP?
I occupied Catalonia again, this time in vanilla FtG with Castille and there the warscore for Catalonia is not 10 but "we occupy Catalonia 12".

1647770820410.png


Flat +1 for controlling Catalonia
Base Tax 13 X 0,5 = 6,5
Major Siege won (as Catalonia is the capital) +2
7 Base Manpower X 0,25 = 1,75
Fort 2 X 0,5 = 1
==> 12,25 rounded down to 12?

I found an error in my calculation for my Fantasy Granada game - I used manpower (which is reduced due to the population modifier) instead of Base Manpower.
 
I occupied Catalonia again, this time in vanilla FtG with Castille and there the warscore for Catalonia is not 10 but "we occupy Catalonia 12".

View attachment 820645

Flat +1 for controlling Catalonia
Base Tax 13 X 0,5 = 6,5
Major Siege won (as Catalonia is the capital) +2
7 Base Manpower X 0,25 = 1,75
Fort 2 X 0,5 = 1
==> 12,25 rounded down to 12?

I found an error in my calculation for my Fantasy Granada game - I used manpower (which is reduced due to the population modifier) instead of Base Manpower.
Something's still off: the major siege won should go into battle warscore, not province. And Catalonia isn't the capital here!

I went through the code again and found the issue. The defines for tax and manpower warscore values are all multipliers. But someone (most likely me, since I did most of the defines) implemented the fortress define wrong. See if you can spot it:
Code:
            float value = gpDefine->Get(_WARSCORE_PROVINCE_CITY_);
            value += GetBaseProvinceTax() * gpDefine->Get(_WARSCORE_PROVINCE_TAX_FACTOR_); // was /2
            value += GetManPower() * gpDefine->Get(_WARSCORE_PROVINCE_MANPOWER_FACTOR_); // was /4
            if( GetCOT() && GetCOT()->GetLocation() == GetProvinceID() )
                value += gpDefine->Get(_WARSCORE_PROVINCE_COT_); // was +10
            value += GetFortressLevel()/gpDefine->Get(_WARSCORE_PROVINCE_FORTRESS_FACTOR_); // was /2
...

...

Yes, that define is a divisor, not a multiplier. So instead of multiplying the fort level by 0.5, it gets divided by 0.5, therefore multiplied by 2.

This is a tricky one to fix, since you could make the define 2 instead of 0.5 to fix it in AGCEEP 1.59b5, but then I could patch FTG to fix vanilla and break your changes.
 
  • 1
Reactions:
Something's still off: the major siege won should go into battle warscore, not province. And Catalonia isn't the capital here!

I went through the code again and found the issue. The defines for tax and manpower warscore values are all multipliers. But someone (most likely me, since I did most of the defines) implemented the fortress define wrong. See if you can spot it:
Code:
            float value = gpDefine->Get(_WARSCORE_PROVINCE_CITY_);
            value += GetBaseProvinceTax() * gpDefine->Get(_WARSCORE_PROVINCE_TAX_FACTOR_); // was /2
            value += GetManPower() * gpDefine->Get(_WARSCORE_PROVINCE_MANPOWER_FACTOR_); // was /4
            if( GetCOT() && GetCOT()->GetLocation() == GetProvinceID() )
                value += gpDefine->Get(_WARSCORE_PROVINCE_COT_); // was +10
            value += GetFortressLevel()/gpDefine->Get(_WARSCORE_PROVINCE_FORTRESS_FACTOR_); // was /2
...

...

Yes, that define is a divisor, not a multiplier. So instead of multiplying the fort level by 0.5, it gets divided by 0.5, therefore multiplied by 2.

This is a tricky one to fix, since you could make the define 2 instead of 0.5 to fix it in AGCEEP 1.59b5, but then I could patch FTG to fix vanilla and break your changes.
I see no problem amending AGCEEP defines.txt now and when you release the next beta patch, then again, so no problem.

I´ll just change the line to that for AGCEEP until the next FtG patch to slowly get used that fortresse are no longer worth twice their level and then half their level:

_WARSCORE_PROVINCE_FORTRESS_FACTOR_ = 1 # temporary in 1.59b5 due to programming error that did not multiply by 0,5 but divided by 0,5 effectively doubling it until next patch