• 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.
I tested your switch and it worked after 30 days. Which leads me to believe that ai switches are buffered for the first month of the game or for every initalization. Nothing necessarily wrong with your event.
 
hm, I'm pretty sureabout the path, yes. Neverthless I will check it twice. The Event fires on gamestart (which works), I've started a game, saved on january 2. In the savegame I chekced if the Event was in history (=true) and the ai Setup for UKR/ferocity (=false). This way I can tell that the Event has fired, but without any effect. I can try it with a "Switch", but I don't think this is the issue since lot of DH Full ai-files are loaded without the Switch line (and working).
Wouldn't it be better to make UKR load the file on scenario start? You can set the starting AI file in the .inc scenario files. Anyway, for the future, it's best if you can find why this is not working, so that you can use AI switches when you really need them. :)
 
I've absolute no idea why. But if you add a comment to the bottom of the .ai file, it works.

Code:
# UKR 1936 AI File


ferocity = yes
---> don't work, ai-file isn't loaded correctly

Code:
# UKR 1936 AI File


ferocity = yes

#End File
---> works as it should


Maybe some Kind of bug?!
 
Ok guys, this comes from Kaiserreich

# Italy KLOTW AI File edit Dr bob

switch = no # [yes/no]
max_front_ratio = 1.2
max_garrison_prop = 0.30
min_garrison_prop = 0.20
neutrality = 150.000
war = 0
upgrading = 0.25
reinforcement = 0.2
strat_redeploy_threshold = 25

exp_force_ratio = 0.0
exp_force_ratios = { }
no_exp_forces_to = { GER ROM HUN BUL FIN VIC JAP SIA MAN }

###################################
# Diplomacy
###################################
combat = {
RSI = 60
}

claim_acceptance = -150

demand_claims = {
YUG CRO
}
# Special resistance against "influence" by the listed nations. Value range = [0 - 10]
resistance = {
ENG = 10
FRA = 10
RSI = 8
AUS = 3
GER = 6
HUN = 3
}

befriend = {
CRO = 100
SPA = 70
EUS = 200
VIC = 120
AUS = 70
HUN = 70
BRA = 80
PHI = 40

}
protect = {
EUS = 10
VIC = 10
}
target = { }
trade = {
cancel_deal_threshold = 1.7

energy = -1
rare_materials = -1
metal = -1
oil = -1
supplies = -1
money = -1

favored = {
CRO = 100
SPA = 70
EUS = 200
VIC = 120
AUS = 70
HUN = 70
BRA = 80
PHI = 40
}
embargo = { FRA ENG RSI }
}
tech_sharing = {
favored = {
CRO = 100
SPA = 70
EUS = 200
VIC = 120
AUS = 70
HUN = 70
BRA = 80
PHI = 40
}
embargo = {
FRA ENG RSI
}
not = { }
prioritized = {
# Arcriculture
5020 = 100
5030 = 100
5040 = 100

# Inf support
1310 = 100
1320 = 100
1330 = 100
1340 = 100
1350 = 100
1360 = 100

# Production
5050 = 100
5060 = 100
5070 = 100
5080 = 100
5090 = 100
5100 = 100
5110 = 100
5120 = 100
5130 = 100
5150 = 100
5180 = 100

# Mountain Unit techs
1110 = 100
1120 = 100
1130 = 100
1140 = 100

# Naval Bomber
4190 = 100
4200 = 100
4210 = 100

# Motorized
1230 = 100
1240 = 100
1250 = 100
}
}
###################################
# Spying
###################################
spyprefs =
{
percentage_on_spies = 0.1
percentage_foreign_mission = 0.5

# Used for Homeland Defense Spying
spyprefsdata =
{
NumberOfSpies = 5
counter_espionage = 10
home_defence = yes
}
# Defaul Spy parms used for countries the AI is atwar with but has no specific entry
spyprefsdata = {
country_priorities = 3
NumberOfSpies = 3
min_number_of_spies = 1
steal_blueprint = 10
minister_assassination = 0
smear_campaign = 3
coup = 0
sabotage_industry = 5
nuclear_sabotage = 0
found_partisans = 0
massmedia = 3
counter_espionage = 5
disrupt_techteam = 5
country = RSI
}
}
###################################
# Construction and Tech Research
###################################
#Default values
construction = {
max_factor = 0.050


AA_batteries = yes
max_AA_level = 4
AA_provs = {
419 # Roma
411 # Bologna
407 # Milan
400 # Venezia
398 # Turin
421 # Naples
396 # Genoa
}

coastal_fort = no
max_coastal_level = 3
coastal_fort_provs = { }

radar_station = no
max_radar = 5
radar_provs = { }

air_base = no
max_air_base = 2
air_base_provs = { }

naval_base = no
max_naval_base = 3
naval_base_provs = { }

land_fort = no
max_land_level = 2
fort_borders = { }

ic_at_war = no
force_ic_until = 1935
ic_end_year = 1940
IC_provs = {
419 # Roma
411 # Bologna
407 # Milan
400 # Venezia
398 # Turin
421 # Naples
396 # Genoa
}
}

military = {
relative_build_scheme = no
max_batch_peace = 860
max_batch_war = 680
max_batch_home_front = 380

#### Divisions etc...
infantry = 31
cavalry = 7
motorized = 5
mechanized = 0
light_armor = 4
armor = 0
paratrooper = 0
marine = 0
bergsjaeger = 0
garrison = 5
hq = 4
militia = 0
# 55 %
interceptor = 4
multi_role = 0

cas = 0
strategic_bomber = 0
tactical_bomber = 4
naval_bomber = 4
transport_plane = 0
flying_bomb = 0
flying_rocket = 0
# 12 %
battleship = 3
carrier = 0
destroyer = 8
light_cruiser = 5
heavy_cruiser = 5
battlecruiser = 0
submarine = 1
transports = 10
# 32 %
# new units DH and KR
escort_carrier = 0
nuclear_submarine = 0
d_01 = 0 # Light Infantry

#### Brigades
artillery = 20
sp_artillery = 4
rocket_artillery = 0
sp_rct_artillery = 0
anti_tank = 5
tank_destroyer = 5
light_armor_brigade = 4
heavy_armor = 4
super_heavy_armor = 0
armored_car = 3
anti_air = 4
police = 2
engineer = 4

cag = 100.000
escort = 100.0000

naval_asw = 10.0000
naval_anti_air_s = 20.0000
naval_radar_s = 10.0000
naval_fire_controll_s = 20.0000
naval_improved_hull_s = 10.0000
naval_torpedoes_s = 10.0000
naval_anti_air_l = 10.0000
naval_radar_l = 0.0000
naval_fire_controll_l = 10.0000
naval_improved_hull_l = 0.0000
naval_torpedoes_l = 0.0000
}

technology = {
endgoal = { }
preference = {

6900
# Tools
5810 5820 5050 5830 5060 5070 5130 5110 5120 5840 5850 5860

# Engineering
5800 5080 5090 5100 5900 5910

#Assembly lines 5150 5160
5140 5180

# Computers
5310 54010 54020 54030 5320 5330 5340

# Electronic Computers
7140 7150 7160

#Infantry
1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 13000 13010 13020

# Inf support
1910 1920 1930 1940 1950 1960 1970 1980 1990 199100 199110 199120 199130 199140 199150 199160 199170 199180

# Mountain Unit techs
1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 13030 13040 13050

# Armored Cars
2860 2870 2880 2020 2150 2160 2890 11110

# Field Artillery Support
2290 2300 2310 2900 2910 2920 2930 2940 2320 2330 2340 2360 2950 2350

# Static Anti-Air
2800 2450 21180 21190 21200 2460 2470 2480 2490 2500 11080

# Anti-Tank Artillery
2400 2410 2420 2430

# Naval Bomber
4700 4710 4190 4200 4210 15140 15150

# Motorized
1396 1400 1410 1420 1430 1440 1450 1460

# Engagement Tactics - Fleet-in-Being colum
8900 8910 8920 8930 8940 8950 8960 8970 8980 81050 81060 81070 81080 81090 81100 81110 81120

# Land Doctrines
6110 6130 6140 6150 14070

# Air Doctrines
9040 9090 9100 9110 9120 9130 9190 9200 9210 9220 9230 9240 9250 9260 9290 9310 9320 9330 9340 9350 9360 9370 9380 9390 9400 9410 9420
}
ignore = {
#EQUIPMENT Winter / Jungle / Desert / Sturdy
5920 5930 5940 5950 5960 5970 5980 5990

# Rocket Assembly
5170

# Airborne
1080 1090 1100

# Marines
1560 1570 1580 1590 1600 1610 1620 1630 1640 1650 1660

# Air Transports
4290 4250 4260 4270 15180 15190

# Atomic Research
5470 5480 5490 5500 5510 5520 5530 5540

# Test and Research
5560 7550 7560 7570 7580 7590

# Bas Decimetric
5410 5420 5430 5440 5450 5460

# CAS
4400 4170 4280 4450 4180 15120 15130

# Strategic bombers
4220 4230 4240

# Heavy Tanks and Semi-Modern Tank
2620 2100 2110 2120

# SP guns
2220 2230 2240 2250 11030 11040 2960

# SP Rocket Artillery
2980 2260 2270 2280 11050 11060 2990

# Battle Cruiser
3310 3320 3330 3340 3350 12030

# Carrier
3510 3520 3530 3540 3550 12060 3560 3570

# Light Carrier
12100 12110 12120 12130 12140 12150

# Mechanized
1470 1480 1490 1510 1520

# Armoured Cars
2860 2870 2880 2020 2150 2160 2890 11110

# CAS & Strategic Air Doctrines
9050 9060 9080 9150 9160 9170 9180 9430 9440 9450 9460
}

armor = 3
infantry = 4
industry = 4
aircraft = 1
naval = 2
land_doctrines = 1
secret_weapons = 0
air_doctrines = 1
naval_doctrines = 1
}

###################################
# Ground Combat, Leaders and Garrisons
###################################
leader_ratio = {
land_field_marshal =0.02
land_general =0.031
land_lt_general =0.41

sea_grand_admiral =0.02
sea_admiral =0.061
sea_vice_admiral =0.401

air_marshal =0.02
air_general =0.091
air_lt_General =0.11
}
garrison = {
defend_overseas_beaches = yes
home_multiplier = 0.5
overseas_multiplier = 1.0
home_peace_cap = 120
war_zone_odds = 2.0
key_point_prio_mult = 1.0
revolt_risk_mult = 1.0

# PRIORITIES:
beach = 30 # Beach level 2
capital = 80 # Our capital
human_border = 0 # Ignored for allied human players
war_target = 50 # The next country targeted for attack by this AI

opposing_alliance = 50 # For neutrals, all alliances are "opposing"
claim_threat = 0 # If we are neutral, countries with claims on us get this
unstable_border = 0 # Bordering countries at war with someone else get this

# Borders with specific countries
country_priorities = {
RSI = 150
FRA = 120
ENG = 100
SOV = 100

CAN = 50
VIC = 25
SCH = -1

OTT = 50
YUG = 50
CRO = 50
HUN = 25
AUS = 25
CZE = 25
}
ignore = {
#Actual Beaches to Ignore
842
856
892
894
913
893

#Libya
750
761
765


#Egypt/East Africa
789
1004
1008
1019
1054
1077
1078
816
836
833
}
province_priorities = {
91 = 75 #Grenoble
398 = 75 #Nice
396 = 75
87 = 75

416 = 50 #Anzio
419 = 50 #Perugia
414 = 50 #Romino
412 = 50
}
area_multiplier = {
}
}
front = {
recklessness = 1 # 0-3
distrib_vs_ai = op_defensive
distrib_vs_human = op_defensive

enemy_reinf_days = 4
reserve_prop = 0.2
panic_ratio_vs_ai = 3.5
panic_ratio_vs_human = 3.5
base_attack_odds = 1.3
min_attack_odds = 1.1
max_attack_odds = 3.0
reinforce_odds = 1.2
withdraw_odds = 0.75

strength = 1.0
organisation = 1.0
soft_attack = 1.0
hard_attack = 1.0
ground_defense = 1.0
dig_in = 1.0 # Against defender

frozen_attack = 1.0
snow_attack = 1.0
blizzard_attack = 1.0
storm_attack = 1.0
muddy_attack = 1.0



occupied = 0.7
owned = 0.7

jungle_attack = 1.0
mountain_attack = 1.0
swamp_attack = 1.0
forest_attack = 1.0
hill_attack = 1.0
urban_attack = 1.0
river = 1.0

enemy_handicap = { }
passivity = { }
}
###################################
# Air bombardment and defense
###################################
# Air AI File For Ground Bombings as priority
# bomber is now obsolete and NOT USED AT ALL replace and use Air Marshal instead

air_marshal = {
icxdayscostfactor = 10.0 # How to value true industrial cost when calculating expect causalties
manpowercostfactor = 100.0 # How to value manpower cost when calculating expect causalties
destructionriskthreashold = 0.2 # when to fear a divisiopn might be destroyed

# desirability is a multiplier used when calcualting the mission desirability
airsuperioritydesirability = 10.0
groundattackdesirability = 40.0
inderdictiondesirability = 50.0
logisticalstrikedesirability = 30.0
runwaycrateringdesirability = 20.0
strategicstrikedesirability = 2.0
installationstrikedesirability = 2.0
navalstrikedesirability = 2.0
portstrikedesirability = 9.0

# tolerance is the required kill:loss ration expected to do
# mission, 2.0 accept twice the losses of your enemy, 0.5 accept half
airsuperioritylosstolerance = 1.0
groundattacklosstolerance = 1.0
interdictionlosstolerance = 2.0
logisticalstrikelosstolerance = 4.5
runwaycrateringlosstolerance = 1.5
strategicstriketolerance = 4.5
installationstriketolerance = 1.5
navalstriketolerance = 1.0
portstriketolerance = 1.0

# efficency is a tweakable param to adjust according to how
# much actual damage comes from doing this mission (not to be confused with desirability)
logisticalstrikeefficency = 0.01
runwaycrateringefficency = 0.01
strategicstrikeefficency = 0.01
installationstrikeefficency = 0.01

taskforcetype = { name = "Air Superiority" desiredratio = 0.400 rangeweight = 10.000 airkillpowerweight = 2000.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = 0000.000 airvulnurabilityweight = -1.000 surfacevulnurabilityweight = 0.000 idle = yes reorganize = yes air_superiority = no }
taskforcetype = { name = "Soft Bombing" desiredratio = 0.250 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 2000.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = 0000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes interdiction = yes ground_attack = yes }
taskforcetype = { name = "Hard Bombing" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 2000.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = 0000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes interdiction = yes ground_attack = yes }
taskforcetype = { name = "Strategic Bombing" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 2000.000 transportcapacityweight = 0000.000 airvulnurabilityweight = -0.500 surfacevulnurabilityweight = -0.500 idle = yes reorganize = yes logistical_strike = yes runway_cratering = yes strategic_bombardment = yes installation_strike = yes }
taskforcetype = { name = "Naval Bombing" desiredratio = 0.050 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 2000.000 strategickillpowerweight = 0.000 transportcapacityweight = 0000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes naval_strike = yes port_strike = yes convoy_air_raiding = yes }
taskforcetype = { name = "Airlift" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = -2000.000 softkillpowerweight = -2000.000 navalkillpowerweight = 0.000 strategickillpowerweight = -2000.000 transportcapacityweight = 1000000.000 airvulnurabilityweight = -1.000 surfacevulnurabilityweight = 0.000 idle = yes reorganize = yes airborne_assault = yes air_supply = yes }
}
###################################
# Invasions and Naval
###################################
invasion = {
base = 0.1 #Relative modifier. (lower = specific targets much more important.)
random = 0.1 #How big a random range. (1.0 = 1%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.1 #higher, avoid worst beaches.
distance = 0.1 #higher = avoid long distance.
max_distance = 20.0 #About the distance from Rostock to Narvik
pocket = 20.0 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.1 #prioritise taking pure islands.
enemy = 2.0 #higher = much more vary of troops in province.
adjacentenemy = 2.0 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 0.1
air_support = 3.0
redirect = priority
ignore = no

staging_province = {
422 # Taranto
}
target = {
# Med Island Yugoslavia and Greece
359 = 400 # Tirana
94 = 400 # Sardinia
434 = 400
429 = 400 # Malta
388 = 300 # Cyprus
382 = 300 # Crete
343 = 200 # Dubrovnik
347 = 200 # Split
379 = 100 # Cyclades
372 = 50 # more Beachheads in Greece
377 = 50 # more Beachheads in Greece

# Libya
765 = 220 # Tobruk
761 = 220 # Bardia
750 = 220 # Bengazi

# Egypt
900 = 200 # Suez
789 = 200 # Port Said

# Tunisia
747 = 200 # Sousse
748 = 200 # Tunis

# Algeria
727 = 200 # Oran
728 = 200 # Algiers

# Morocco
715 = 200 # Melilla
717 = 200 # Casablanca
718 = 200

# Spain
475 = 200 # Menorca
440 = 200 # Mallorca

# Middle East
1004 = 100 # Palestine
1008 = 100 #
1019 = 100 # Syria
1054 = 100 #

}
}
admiral = {
min_org = 100 # NEW: Percent of org gained back before the unit can leave port
min_dmg = 28 # NEW: Percent of dmg gained back before the unit can leave port
return_org = 60 # NEW: PERCENT OF ORG LOST BEFORE RETURNING TO PORT applies to all fleets/ships
return_dmg = 80 # NEW: PERCENT OF DMG LOST BEFORE RETURNING TO PORT for repairs applies to all fleets/ships

#Which provinces to use as bases..
base = {
396 # Venice
410 # Genoa
400 # Taranto
422
}
target = { }
core = {
2189
2182
2179
2192
2734
2184
}
}

It's the Italian Federation AI, and for some reason AI does not research infantry in the game
 
Industrial techs 5150 and 5160 look like they are accidentally commented out. All infantry models are listed as preference and infantry field research is given a high value. Problem is that techs 1080, 1090, and 1100 are within ignore. They are described as airborne techs but, actual airborne are given 16** numerals.
I've noticed other goofs in the ID lists in KR. Technology is one of the primary reasons to use yearly AI switching. So many preferences leads too chaotic differences between games.
 
Last edited:
If USA is allied with the UK they'll naturally send airforces to attack Germany. Modding a more involved bombing campaign would require changing several things in the appropriate AI file. ../Darkest Hour Full/ai/usa_1936.ai is what it starts but, you'd need to verify that various switches don't reverse your editing.
 
I have some issues with Fall Weserübung battlescenario AI. I would like to push Germany to invade only Norwegian coast and ignore at all British and French Coast. The map contains northern Germany, Denmark, Norway, Scapa Flow and Dunkirk (just for spawn points and bases for ENG and FRA units), as well as naval provinces between.

Scapa Flow is not a problem - it hasn't a beach and it's beyond transport plane's range, so GER doesn't bother. However GER tries to invade Dunkirk like crazy. German land and invasion targets are set like this:
Code:
target = {
    #Oslo & Narvik for marginal victory
    483 = 100
    495 = 100
    #Bergen & Trondheim for total victory
    488 = 80
    493 = 80   
}
On the other hand GER naval targets:
Code:
    base = {
        #Naval bases in northern Germany
        147
        148
        154
        153
    }
    target = { 
        #Naval provinces next to Norway where Kriegsmarine should attack
        2694
        2689
        2672
        2671   
    } 
    core = {
        #Naval provinces next to Germany and Denmark where Kriegsmarine should defend
        2692
        2693
        2694
        2695       
    } 
    ignore = {
        #British and French coast
        "english channel"   
        "west north sea"
    }
Any ideas how to fix this issue? GER invades NOR indeed, however loses too much time and too many units for Dunkirk, so GER AI can't win this scenario before time is up.
 
I have some issues with Fall Weserübung battlescenario AI. I would like to push Germany to invade only Norwegian coast and ignore at all British and French Coast. The map contains northern Germany, Denmark, Norway, Scapa Flow and Dunkirk (just for spawn points and bases for ENG and FRA units), as well as naval provinces between.

Scapa Flow is not a problem - it hasn't a beach and it's beyond transport plane's range, so GER doesn't bother. However GER tries to invade Dunkirk like crazy. German land and invasion targets are set like this:
Code:
target = {
    #Oslo & Narvik for marginal victory
    483 = 100
    495 = 100
    #Bergen & Trondheim for total victory
    488 = 80
    493 = 80  
}
On the other hand GER naval targets:
Code:
    base = {
        #Naval bases in northern Germany
        147
        148
        154
        153
    }
    target = {
        #Naval provinces next to Norway where Kriegsmarine should attack
        2694
        2689
        2672
        2671  
    }
    core = {
        #Naval provinces next to Germany and Denmark where Kriegsmarine should defend
        2692
        2693
        2694
        2695      
    }
    ignore = {
        #British and French coast
        "english channel"  
        "west north sea"
    }
Any ideas how to fix this issue? GER invades NOR indeed, however loses too much time and too many units for Dunkirk, so GER AI can't win this scenario before time is up.

Have a look at the file I'm attaching to this post.

SEE how you need to set up the ports from where your invasion leaves and where you want it to land.
Best to have marines already in place at the leaving ports, and transports.

ENSURE that you call your AI file from the switch AI folder, and by event. This ensures that your file is running and not some other file.

You need to tweak the settings, so a trial and error process is involved.

Change the .txt in the file name to .ai, and then change the ports etc to suit what you want.
 

Attachments

  • USA_invadeCHC.txt
    7,8 KB · Views: 36
Have a look at the file I'm attaching to this post.

SEE how you need to set up the ports from where your invasion leaves and where you want it to land.
Best to have marines already in place at the leaving ports, and transports.

ENSURE that you call your AI file from the switch AI folder, and by event. This ensures that your file is running and not some other file.

You need to tweak the settings, so a trial and error process is involved.

Change the .txt in the file name to .ai, and then change the ports etc to suit what you want.
I feel you miss my point a bit. Germany does carry out invasion in Norway and Kriegsmarine moves along Norwegian coast - and does it more or less properly. My issue is that Germany invades province which should be ignored and Kriegsmarine moves to forbidden areas. So, the question is: how to force AI to completely ignore given areas?
 
I feel you miss my point a bit. Germany does carry out invasion in Norway and Kriegsmarine moves along Norwegian coast - and does it more or less properly. My issue is that Germany invades province which should be ignored and Kriegsmarine moves to forbidden areas. So, the question is: how to force AI to completely ignore given areas?

Note what provinces they are going to and set them to -1 or 0. Use the ignore part of the code. If proving impossible, then remove beaches or add coastal forts so the AI will avoid those beaches. Sometimes it is a multitude of settings that is needed to take control.

And most of all, look in the dh ai files and you might come across something you can use.
 
Note what provinces they are going to and set them to -1 or 0. Use the ignore part of the code. If proving impossible, then remove beaches or add coastal forts so the AI will avoid those beaches. Sometimes it is a multitude of settings that is needed to take control.

And most of all, look in the dh ai files and you might come across something you can use.
Setting priority to -1 did the trick, thank you!
 
hi there hope this thread is still alive

I am trying to make some event chains for pol soviet war to make it a bit more complex and in some of my events poland allies with ukraine and belarus. the problem is after i secure the peace with soviets for the whole alliance (pol ukr and blr) the ukrainians or belarusians are declaring a new war on soviets again. i was trying to fix it by writing them a new ai file to make them go more neutral but that seems to not work

here is my ai file made from polish ai made by Lothos from grand campaign mod:
Code:
# Poland 1936 AI File by Lothos edited for UKR by XZV

switch = no # [yes/no]
max_front_ratio = 2
max_garrison_prop = 0.20
min_garrison_prop = 0.10
neutrality = 140
war = 0
upgrading = 0.2
reinforcement = 0.5
strat_redeploy_threshold = 25
exp_force_ratio = 0.750
exp_force_ratios = { }
no_exp_forces_to = { FRA ENG SOV UKR LIT }

###################################
# Diplomacy
###################################
combat = {
SOV = 0
}

claim_acceptance = -30

# Special resistance against "influence" by the listed nations. Value range = [0 - 10]
resistance = {
    GER = 6
    SOV = 8
}
befriend = {
    POL = 200
    BLR = 200
    LIT = 150
    SOV = 20
}
liberate = {
    POL
    BLR
}
protect = {
    POL = 100
    BLR = 100
    LIT = 50
}
target = {
    # ussr
    649 = 50 # kamensk shah
    648 = 50 # rossoh
    646 = 50 # ostrogozhsk
    603 = 50 # belogrod
    644 = 50 # rostov on don
}
trade = {
    cancel_deal_threshold = 2

    energy         = -1
    rare_materials     = -1
    metal         = -1
    oil         = -1
    supplies     = -1
    money         = -1

    favored = {
        ENG = 100
        USA = 50
        FRA = 100
        ITA = 50
        SOV = 50
        POL = 100
        CZE = 30
        BLR = 100
        ROM = 100
    }
    embargo = { }
}
tech_sharing = {
    favored = {
        ENG = 150
        USA = 50
        FRA = 100
        ITA = 50
        SOV = 50
        GER = 10
        CZE = 30
        POL = 100
        BLR = 100
    }
    embargo = { }
    not = { }
    prioritized = {
        # Agriculture
        5020 = 100
        5030 = 100
        5040 = 100

        # Inf support
        1310 = 100
        1320 = 100
        1330 = 100
        1340 = 100
        1350 = 100
        1360 = 100

        # Production
        5050 = 100
        5060 = 100
        5070 = 100
        5080 = 100
        5090 = 100
        5100 = 100
        5110 = 100
        5120 = 100
        5130 = 100
        5150 = 100
        5180 = 100
    }
}
###################################
# Spying
###################################
spyprefs =
{
    percentage_on_spies         = 0.2
    percentage_foreign_mission     = 0.6

    # Used for Intell efficiency and for setting minimum chance to succeed for the AI to do that particular type of mission
    spyprefsdata =
    {
        NumberOfSpies = 15
        min_number_of_spies = 3
        steal_blueprint = 10
        minister_assassination = 5
        smear_campaign     = 10
        coup = 3
        sabotage_industry = 10
        nuclear_sabotage = 5
        found_partisans    = 10
        massmedia = 10
        disrupt_techteam = 10
        country = BLR
    }
    spyprefsdata = {
        country_priorities    = 10
        steal_blueprint     = 10
        minister_assassination         = 0
        smear_campaign         = 2
        coup                 = 0
        sabotage_industry     = 1
        nuclear_sabotage     = 0
        found_partisans     = 0
        massmedia             = 1
        disrupt_techteam    = 1
        country             = GER
    }
    spyprefsdata = {
        country_priorities    = 5
        steal_blueprint     = 10
        minister_assassination         = 0
        smear_campaign         = 2
        coup                 = 0
        sabotage_industry     = 1
        nuclear_sabotage     = 0
        found_partisans     = 1
        massmedia             = 1
        disrupt_techteam    = 1
        country             = SOV
    }
    spyprefsdata = {
        country_priorities    = 2
        steal_blueprint     = 10
        minister_assassination         = 0
        smear_campaign         = 2
        coup                 = 0
        sabotage_industry     = 1
        nuclear_sabotage     = 0
        found_partisans     = 0
        massmedia             = 1
        disrupt_techteam    = 1
        country             = HUN
    }
}
###################################
# Construction and Tech Research
###################################
#Default values
construction = {
    max_factor = 0.5

    AA_batteries = no
    max_AA_level = 5
    AA_provs = {
        617 # kiev
        641 #sevastopol
        626 # odessa
        627 # kirovoy rog
    }

    coastal_fort = no
    max_coastal_level = 2
    coastal_fort_provs = { }

    radar_station = no
    max_radar = 5
    radar_provs = { }

    air_base = yes
    max_air_base = 10
    air_base_provs = {
        617 # kiev
        641 # sevastopol
        626 # odessa
        }

    naval_base = no
    max_naval_base = 2
    naval_base_provs = { }

    land_fort = no
    max_land_level = 2
    fort_borders = { }

       ic_at_war = no
    force_ic_until = 1933
    ic_end_year = 1936
    IC_provs = {
        617 # kiev
        641 # sevastopol
        626 # odessa
        627 # kirovoy rog
    }
}

military = {
    relative_build_scheme     = no
    max_batch_peace         = 880
    max_batch_war             = 320
    max_batch_home_front = 180
        extra_convoys_war = 0.0500
        extra_convoys_peace = 0.0500


    #### Divisions etc...
    infantry         = 35
    cavalry         = 13
    motorized         = 10
    mechanized         = 2
    light_armor     = 10
    armor             = 0
    paratrooper     = 0
    marine             = 0
    bergsjaeger     = 0
    garrison        = 0
    hq                 = 5
    militia         = 0
#                75 %
    interceptor     = 5
    multi_role         = 0
    cas             = 5
    strategic_bomber = 0
    tactical_bomber = 0
    naval_bomber     = 0
    transport_plane = 0
    flying_bomb     = 0
    flying_rocket     = 0
#                10 %
    battleship         = 2
    carrier         = 0
    escort_carrier    = 0
    destroyer         = 3
    light_cruiser     = 0
    heavy_cruiser     = 0
    battlecruiser     = 2
    submarine         = 5
    nuclear_submarine = 0
    transports         = 3
#                0 %

    #### Brigades
    artillery             = 15
    sp_artillery         = 5
    cavalry_brigade    = 0
    sp_anti_air     = 5
    medium_armor             = 15
    tank_destroyer         = 0
    light_armor_brigade = 5
    heavy_armor         = 0
    super_heavy_armor     = 0
    armored_car         = 10
    anti_air             = 0
    police                 = 0
       engineer               = 10

            cag = 100.000
        escort = 100.0000

            naval_asw = 20.0000
            naval_anti_air_s = 20.0000
            naval_radar_s = 20.0000
            naval_fire_controll_s = 20.0000
            naval_improved_hull_s = 10.0000
            naval_torpedoes_s = 10.0000
            naval_anti_air_l = 0.0000
            naval_radar_l = 0.0000
            naval_fire_controll_l = 0.0000
            naval_improved_hull_l = 0.0000
            floatplane = 0.0000
}

technology = {
    endgoal     = { }
        preference     = {
        # Manufacturing
        5810 5820 5050 5830 5060 5070 5130 5110 5120 5840 5850 5860

        # Construction Engineering
        5800 5080 5090 5100
      
        # Applied Assembly lines
        5180
      
        # Computers
        5310 54010 54020 54030 5320 5330 5340
      
        # Electronic Computers
        7140 7150 16000 16040 7160

        # Regular Infantry
        1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 13000 13010 13020
      
        # Field Artillery Support
        2290 2300 2310 2900 2910 2920 2930 2940 2320 2330 2340 2360 2950 2350

        # Interceptors
        4510 4520 4530 4540 4550 4010 4020 4030 4060 4090 15000 15010 15020 4560 4570 4580

        # Defensive Focus Grand Battleplan Path (FRA / UK)
        6560 6030 6110 6120 6130 6140 14070

        # Air Doctrines
        9030 9040 9100 9130 9190 9200 9210 9220 9230 9240 9250 9260 9290 9310 9320 9330 9340 9350 9360 9370 9380 9390 9400 9410 9420
    }
    ignore         = {
        # Applied Assembly lines
        5150 5160 5170

        # Airborne Infantry
        1670 1680 1690 1700 1710 1720 1730 1740

        # Marines
        1560 1570 1580 1590 1600 1610 1620 1630 1640 1650 1660

        # Light / Mountain
        1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 13030 13040 13050
      
        # Air Transports
        4290 4250 4260 4270 15180 15190

        # Multi-Role
        4300 4310 4320 4330 4340 4040 4070 4100 4350

        # Naval Bomber
        4700 4710 4190 4200 4210 15140 15150

        # Strategic Bomber
        4800 4810 4820 4220 4230 4240 4246 15160 15170 16030

        #SEAPLANES
        4770 4780 4790 4850 4860

        # Aircraft CarriersAir groups
        4900 4910 4920 4930 4940 4950 4960
      
        # Custom Equipment
        5920 5930 5940 5950 5960 5970 5980 5990

        # Rocketry
        5560 7550 7560 7570 7580 7590

        # Nuclear
        5470 5480 5490 5500 5510 5520 5530 5540

        # Radar Warning
        5410 5416 5417 5420 5426 5430 5440 5466 5450 5460 53030 5476 53070

        # Static Anti-Air
        2800 2450 21180 21190 21200 2460 2470 2480 2490 2500 11080
      
        # Anti Air Brigade
        2810 2820 2510 2520 2530 2540 11090

        # Amphibious Warfare
        82300 82310 82320 82330
      
        # Logistic Support
        82500 82510 82520 82530

        # Commerce Defense
        8150 8160 8170

        # Raider Patrols
        8550 8560 8570

        # Subsidiary Carrier Role
        81650

        # Aircraft CarriersStrike/Offensive column
        81700 81710 81720 81730 81740 81750 81760 82100 82110 82120

        # Strategic Destruction - Flying Armada
        9140 9150 9160 9170 9180 9430 9440 9450 9460
      
        # Battlefield Destruction branch.
        9050 9060 9070 9080
    }
 
    armor         = 3
    infantry     = 5
    industry     = 4
    aircraft     = 2
    naval         = 1
    land_doctrines     = 3
    secret_weapons     = 0
    air_doctrines     = 1
    naval_doctrines = 1
}

###################################
# Ground Combat, Leaders and Garrisons
###################################
leader_ratio = {
    land_field_marshal     =0.02
    land_general         =0.031
    land_lt_general     =0.41

    sea_grand_admiral     =0.02
    sea_admiral         =0.061
    sea_vice_admiral     =0.401

    air_marshal         =0.02
    air_general         =0.091
    air_lt_General         =0.11
}
garrison = {
    defend_overseas_beaches = no
    home_multiplier     = 1.0
    overseas_multiplier     = 0.5
    home_peace_cap         = 10
    war_zone_odds         = 2.0
    key_point_prio_mult    = 0
    revolt_risk_mult    = 1.0

    # PRIORITIES:
    beach            = 0    # Beach level 2
    capital            = 50    # Our capital
    human_border        = 0    # Ignored for allied human players
    war_target        = 100    # The next country targeted for attack by this AI
  
    opposing_alliance    = 0    # For neutrals, all alliances are "opposing"
    claim_threat        = 75    # If we are neutral, countries with claims on us get this
    unstable_border        = 100    # Bordering countries at war with someone else get this

    # Borders with specific countries
    country_priorities = {
        GER = 50
        ROM = 20
        BUL = 20
        HUN = 20
        SLO = 20
        SOV = 90
        LAT = -1
        LIT = -1
        EST = -1
        TAN = -1
    }
       province_priorities = { 599 = 100 }
    ignore = {
        303
        }
    area_multiplier = { 599 = 1.2 }
}
front = {
       recklessness         = 0 # 0-3
    distrib_vs_ai         = op_defensive
    distrib_vs_human     = op_defensive

    enemy_reinf_days    = 6
    reserve_prop        = 0.1
    panic_ratio_vs_ai    = 2.5
    panic_ratio_vs_human    = 2.5
    base_attack_odds    = 1.3
    min_attack_odds        = 1.1
    max_attack_odds        = 3.0
    reinforce_odds        = 1.2
    withdraw_odds        = 0.6

    strength     = 1.0
    organisation     = 1.0
    soft_attack     = 1.0
    hard_attack     = 1.0
    ground_defense     = 1.0
    dig_in         = 1.0 # Against defender

    frozen_attack     = 1.0
    snow_attack     = 1.0
    blizzard_attack = 1.0
    storm_attack     = 1.0
    muddy_attack     = 1.0

  
  
    occupied     = 0.7
    owned         = 0.7

    jungle_attack     = 1.0
    mountain_attack = 1.0
    swamp_attack     = 1.0
    forest_attack     = 1.0
    hill_attack     = 1.0
    urban_attack     = 1.0
    river         = 1.0

          enemy_handicap = { }
          passivity = { }
}
###################################
# Air bombardment and defense
###################################
# Air AI File For Ground Bombings as priority
# bomber is now obsolete and NOT USED AT ALL replace and use Air Marshal instead

air_marshal = {
    min_mission_strength_org    = 0.8
    icxdayscostfactor             = 10.0        # How to value true industrial cost when calculating expect causalties
    manpowercostfactor            = 100.0        # How to value manpower cost when calculating expect causalties
    destructionriskthreashold     = 0.2        # when to fear a divisiopn might be destroyed

    # desirability is a multiplier used when calcualting the mission desirability
    airsuperioritydesirability         = 30.0
    groundattackdesirability         = 40.0
    inderdictiondesirability         = 20.0
    logisticalstrikedesirability     = 2.0
    runwaycrateringdesirability     = 10.0
    strategicstrikedesirability     = 10.0
    installationstrikedesirability     = 5.0
    navalstrikedesirability         = 15.0
    portstrikedesirability             = 9.0
    convoyraiddesirability            = 9.0

    # tolerance is the required kill:loss ration expected to do
    #    mission, 2.0 accept twice the losses of your enemy, 0.5 accept half
    airsuperioritylosstolerance     = 1.0
    groundattacklosstolerance         = 1.0
    interdictionlosstolerance         = 2.0
    logisticalstrikelosstolerance     = 0.5
    runwaycrateringlosstolerance     = 1.5
    strategicstriketolerance         = 4.5
    installationstriketolerance     = 1.5
    navalstriketolerance             = 1.0
    portstriketolerance             = 1.0
    convoyraidtolerance                = 1.0

    # efficency is a tweakable param to adjust according to how
    #    much actual damage comes from doing this mission (not to be confused with desirability)
    logisticalstrikeefficency     = 0.01
    runwaycrateringefficency     = 0.01
    strategicstrikeefficency     = 0.01
    installationstrikeefficency = 0.01

    taskforcetype = { name = "Air Superiority" desiredratio = 0.400 rangeweight = 10.000 airkillpowerweight = 2000.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = -1.000 surfacevulnurabilityweight = 0.000 idle = yes reorganize = yes air_superiority = yes }
    taskforcetype = { name = "Soft Bombing" desiredratio = 0.250 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 2000.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes interdiction = yes ground_attack = yes }
    taskforcetype = { name = "Hard Bombing" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 2000.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes interdiction = yes ground_attack = yes }
    taskforcetype = { name = "Strategic Bombing" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 2000.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = -0.500 surfacevulnurabilityweight = -0.500 idle = yes reorganize = yes logistical_strike = yes runway_cratering = yes strategic_bombardment = yes installation_strike = yes }
    taskforcetype = { name = "Naval Bombing" desiredratio = 0.050 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 2000.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes naval_strike = yes port_strike = yes convoy_air_raiding = yes }
    taskforcetype = { name = "Airlift" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = -2000.000 softkillpowerweight = -2000.000 navalkillpowerweight = 0.000 strategickillpowerweight = -2000.000 transportcapacityweight = 1000000.000 airvulnurabilityweight = -1.000 surfacevulnurabilityweight = 0.000 idle = yes reorganize = yes airborne_assault = yes air_supply = yes }
}
###################################
# Invasions and Naval
###################################
invasion = {
     base        = 0.1    #Relative modifier. (lower = specific targets much more important.)
    random        = 8.0    #How big a random range.  (1.0 = 1%)
    coastal        = 0.1    #increase to avoid coastal forts more.
    beach        = 0.1    #higher, avoid worst beaches.
    distance    = 20.0    #higher = avoid long distance.
    pocket        = 20.0    #prioritise pockets, ie provinces with no adjacent controlled by same.
    island        = 0.1    #prioritise taking pure islands.
    enemy        = 2.0    #higher = much more vary of troops in province.
    adjacentenemy     = 2.0    #higher = much more vary of troops nearby
    air_base    = 1.5
          naval_base     = 0.1
          air_support     = 3.0
          redirect     = nearest
    ignore        = no
    
    target = { }
}
admiral = {
    min_org        = 100    # NEW: Percent of org gained back before the unit can leave port
    min_dmg        = 98    # NEW: Percent of dmg gained back before the unit can leave port
    return_org     = 60     # NEW: PERCENT OF ORG LOST BEFORE RETURNING TO PORT applies to all fleets/ships
    return_dmg     = 80     # NEW: PERCENT OF DMG LOST BEFORE RETURNING TO PORT for repairs applies to all fleets/ships

    ignore = {
        #Murmansk/Archangel
        "Barents Sea"
        "Arctic Ocean"
      
        #Norway Coast (Denmark Coast)
        "Norwegian Sea"
        "East North Sea"
        "Kattegat"
      
        #North Sea, East Coast of England
        "Central Northsea"
        "West Northsea"
        "Southeast Northsea"
      
        #England/France border Sea Areas
        "English Channel"
        "Bay of Biscay"
        "Cape Finisterre"
      
        #Iceland
        "Faroes Gap"
        "Denmark Strait"
      
        #Ireland/West Coast of England
        "Irish Sea"
        "The Hebreides"
        "Irish West Coast"
      
        #Greenland
        "Greenland Coast"
        "Northern Sea of Labrador"
        "Southern Sea of Labrador"
      
        #Canada East Coast
        "Hudson Bay"
        "Grand Banks"
        "Canadian Maritimes"
              
        #North Atlantic
        "North Atlantic"
        "Western Approaches"
        "The Seamounts"
        "Azores"
      
        #Central Atlantic
        "Central Atlantic"
        "Central Mid-Atlantic Ridge"
        "Bermuda Triangle"
        "Guiana Basin"
        "South-Central Mid-Atlantic Ridge"
        "Cap Verde"
      
        #South Atlantic
        "Pernambuco Plain"
        "Ascension Fracture Zone"
        "Argentine Plain"
        "Angola Plain"
      
        #Caribbean Sea and Guilf of Mexico
        "West Gulf of Mexico"
        "East Gulf of Mexico"
        "Florida Strait"
        "Yucatan Strait"
        "Windward Islands"
        "Central Carribean"
      
        #Brazil and Argentina Coast
        "Coast of Guyana"
        "Coast of Recife"
        "Coast of Uruguay"
        "Coast of Brazil"
        "Coast of Argentina"
      
        # West Africa
        "Coast of Africa"
        "Coast of Bissao"
      
        #Equitorial Africa
        "Gulf of Guinea"
        "Coast of Angola-Namibia"
      
        #South Africa
        "Coast of South Africa"
        "Atlantic-Indian Ridge"
      
        #East Africa
        "Red Sea"
        "Horn of Africa"
      
        #Madagascar Coast
        "South Mozambique Channel"
        "North Mozambique Channel"
        "Northeast Coast of Madagascar"
        "Southeast Coast of Madagascar"
      
        #North Indian Ocean (Persian Gulf)
        "Persian Gulf"
        "North Arabian Sea"
        "South Arabian Sea"
        "Coast of Ceylon"
      
        #Central/South Indian Ocean
        "Mascarene Plateau"
        "Mid-Indian Ridge"
        "Ninetyeast Ridge"
        "Southeast Indian Ocean"
        "Southwest Indian Ocean"
      
        #Bay of Bengal & West Indonesia
        "East Bay of Bengal"
        "West Bay of Bengal"
        "Malacca Strait"
        "Java Ridge"
        "Java Trench"
      
        #Indo-China, Borneo, Phillipenes
        "Gulf of Siam"
        "Coast of Indochina"
        "Spratly Sea"
        "Coast of Brunei"
        "Flores Sea"
        "Sulu Sea"
        "Celebes Sea"
        "Luzon Strait"
      
        #China Coast
        "Taiwan Strait"
        "Yellow Sea"
      
        #Japanese Coast
        "Sea of Japan"
        "Ryukyus"
        "Coast of Japan"
        "South Sea of Okhotsk"
        "West Sea of Okhotsk"
        "East Sea of Okhotsk"
      
        #Mariana Basin, Phillipenes
        "Philipine Trench"
        "Central Philippine Sea"
        "Mariana Trench"
        "East Mariana Basin"
        "Mid-Pacific Mountains"
        "North Bismarck Sea"
      
        #New Guinea, East/North Australia and New Zealan
        "Coast of New Guinea"
        "Molucca Sea"
        "Banda Sea"
        "Arafura Sea"
        "South Bismarck Sea"
        "Solomon Sea"
        "West Coral Sea"
        "East Coral Sea"
        "North Tasman Sea"
        "South Tasman Sea"
        "East Cost of New Zealand"
      
        # South and West Australia
        "Timor Sea"
        "West Coast of Australia"
        "East Great Australian Bight"
        "West Great Australian Bight"
      
        #North Pacific
        "Coast of Kamchatka"
        "East Bering Sea"
        "West Bering Sea"
        "Aleutians"
        "Northwest Pacific Basin"
        "North Northeast Pacific Basin"
      
        #Central Pacific
        "Hawaiian Rise"
        "North East Pacific Ocean"
        "Marshalls Sea"
        "South East Pacific Ocean"
        "Marianas"
        "Western Solomons"
        "Eastern Solomons"
        "US Maritimes"
        "Carolines"
      
        #South Pacific
        "Gilberts"
        "Line Islands"
        "Fiji Basin"
        "Southwest Pacific Basin"
      
        # South American West Coast
        "Southeast Pacific Basin"
        "West Coast of Chile"
        "West Coast of Peru"
        "South Southeast Pacific Ocean"
        "North Southeast Pacific Ocean"
      
        # USA West Coast
        "Gulf of Alaska"
        "West Coast of the United States"
      
        #West Coast of Mexico
        "West Coast of Mexico"
        "West Coast of Central America"
    }
    target = { }
    core = {
         2732 2733 2730 2729 2731
    }
}

after i read this thread i thought the ai file is not loading so i checked the switchai file but it is being loaded for both countries. i aslo tried adding sov to befiend but still not helping. what is wrong with it?


edit 1 ive tried removing target data - there was some soviet provinces there - but still no effect, tried even forcing a non agression pacts between sov and pol blr ukr alliance (for all of the countries of alliance) and they still are declaring war (now it is mostly ukraine)
 
Last edited:
Difficult to say.
First of all, check if another AI files is loaded after this one. Myabe you load this file and then after 3 days another file is loaded that overwrites this.
Another possibility is an AI event that forces war, check if there is one.
 
Difficult to say.
First of all, check if another AI files is loaded after this one. Myabe you load this file and then after 3 days another file is loaded that overwrites this.
Another possibility is an AI event that forces war, check if there is one.

yea thats what ive thought ive checked what all the ai files for both of the countries were loading and found nothing on war or alike just some production and building lines made for balancing the stuff in aar.
iv tried adding lines for non agressions and guaratee from SOV to both BLR and UKR and still there is a war a few days after there was a peace
maybe my peace event is not correct?

Code:
event = {
    id = 1856024         
    country = POL   
    
        trigger = {
        flag = XZVpip
        flag = POLSOV_fightingon
        war = { country = SOV country = POL }
        NOT = { control = { province = 567 data = SOV } }
        }
        
    name = "Soviets Humiliated"                           
    desc = "After the failed negotiations in Riga we had to keep on fighting the Soviets. Despite of White forces of Russia not recognising our claims on Byelorussia and Ukraine, keeping them as allied countries or a part of Polish territories we have approached Moscow - the capital of Soviet Union and the most important city for all of Russian states. Now we can put this war to end securing our eastern border for good."
    picture = "Peace_conference"
    style = 2

    date = { day = 0 month = 0 year = 1914 }
    deathdate = { day = 0 month = 0 year = 1931 }           
    offset = 7                 

    action = {   
        name = "They cannot refuse our claims now!"
        command = { type = dissent value = -25 }   
        command = { type = peace which = POL value = 0 }   
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = remove_division which = -1 }
        command = { type = manpowerpool value = 650 when = 0}
        command = { type = counterattack value = -75 }
        command = { type = assault value = -95 }
        command = { type = encirclement value = -90 }
        command = { type = ambush value = -80 }
        command = { type = delay value = -75 }
        command = { type = tactical_withdrawal value = -75 }
        command = { type = breakthrough value = -80 }
        command = { type = secederegion which = POL value = "Ukraine" when = 2 }
        command = { type = secederegion which = POL value = "Belarus" when = 2 }
        command = { type = remove_core_region which = "Poland" where = SOV }
        command = { type = remove_core_region which = "Ukraine" where = SOV }
        command = { type = remove_core_region which = "Belarus" where = SOV }
        command = { type = remove_claim_region which = "Poland" where = SOV }
        command = { type = peace which = SOV value = 0 }
        command = { trigger = { exists = UKR } type = secederegion which = UKR value = "Ukraine" when = 2 }
        command = { trigger = { exists = UKR } type = peace which = UKR value = 0 }
        command = { trigger = { exists = UKR } type = military_control which = POL where = UKR value = 0 }
        command = { trigger = { exists = UKR } type = secedeprovince which = UKR value = 249 when = 2 }
        command = { trigger = { exists = UKR } type = secedeprovince which = UKR value = 244 when = 2 }
        command = { trigger = { exists = BLR } type = secederegion which = BLR value = "Belarus" when = 2 }
        command = { trigger = { exists = BLR } type = peace which = BLR value = 0 }
        command = { trigger = { exists = BLR } type = military_control which = POL where = BLR value = 0 }
        command = { trigger = { exists = BLR } type = secedeprovince which = BLR value = 251 when = 2 }
        command = { trigger = { exists = BLR } type = secedeprovince which = BLR value = 248 when = 2 }
        command = { trigger = { exists = BLR } type = secedeprovince which = BLR value = 256 when = 2 }
        command = { trigger = { exists = BLR } type = secedeprovince which = BLR value = 257 when = 2 }
        command = { type = clrflag which = Polish_Soviet_War }
        command = { type = clrflag which = POLSOV_fightingon }
        command = { type = non_aggression which = SOV where = POL when = 7000 }
        command = { type = non_aggression which = SOV where = BLR when = 7000 }
        command = { type = non_aggression which = SOV where = UKR when = 7000 }
        command = { type = non_aggression which = SOV where = LIT when = 7000 }
        command = { type =     guarantee which = SOV where = UKR }         
        command = { type =     guarantee which = SOV where = BLR }       
        command = { type = sleepevent which = 1856001}
    }         
}

the events however that might be an option, but is there any way i could check in the game which events are occuring ? some list like switchai file? or maybe should it be displayed as a notification like all the events are when some other countries are making decisions? (in that case ive seen nothing alike just the notification about declaration of war by UKR or BLR)
 
ive found event like this:
Code:
event = {
    id = 13310111                    
    persistent = yes        
   
    date = { day = 1 month = january year = 1914 }
    deathdate = { day = 1 month = january year = 1925 }
    offset = 45                  
   
    trigger = {        
         exists = SOV
        atwar = no
        not = { ispuppet = yes }
        or = {
            country = AZB
            country = GEO
             country = UER
            country = UGS
            country = UPE
            country = UTC
            country = UKR
            country = BLR
           
           
        }
        not = {
            or = {
                ispuppet = yes
                participant = { value = 1 }
                participant = { value = 2 }
            }
        }
    }
    name = "EVT_13310111_NAME"                          
    Desc = "EVT_13310111_DESC"
    Picture = "assistance"
   
    action = {    
        name = "Down with the central government!"  
        command = { type =  belligerence value = -50 }
        command = { type = local_setflag which = armistice }
        command = { type =  war which = SOV }
        command = { type =  belligerence value = -50 }
    }          
}

but the problem i have with it is i dont actually know is it an AI event or what countries does it fire for.
its in file "TGC-ALL-Russian cicil war" so it might be it but now i dont want to disable it for countries that may have need it (like all the white russia tags)
as far as i see, it might help if i would make ukr and blr polish puppets am i correct on this?