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

Rudolf Hessbart

Second Lieutenant
5 Badges
Mar 3, 2015
153
114
  • Darkest Hour
  • For The Glory
  • Victoria: Revolutions
  • Victoria 2
  • Hearts of Iron IV Sign-up
Hello people, since in the Kaiserreich mod Britain always decleares war on Denmark I thought that I should make the British AI invade Denmark, but no matter what I do Britain always invaded Morocco with 20 divisions while completelly ignoring Denmark. I even made the British AI ignore the Moroccan coast and made invading Denmark a high priority, but guess what: Britain still ignores Denmark and invaded Morocco instead. It simply drives me nuts.
Here is a part of my British ai:
###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.1 #Relative modifier. (lower = specific targets much more important.)
random = 0.01 #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 = 1.0 #higher = avoid long distance.
max_distance = 100.0
max_staging_distance = 100 # How far should the staging area be from the target invasion point
pocket = 20.0 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.1 #prioritise taking pure islands.
enemy = 7.0 #higher = much more vary of troops in province.
adjacentenemy = 10.0 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 0.1
air_support = 3.0
redirect = priority
ignore = no
help_allies = no #[yes/no]

staging_province = {
27 # Portsmouth
23 # Plymouth
13 # Sheiffield
25 # Norwich
26 # Dover
17 # Liverpool
22 # Cardiff
2137 #Newfoundland
2132 #Halifax
2134 #Moncton
1783
1
5
488 #Bergen
483 #Oslo
2153 #Gothenburg
2153 #Malmö
}
target = {
#Denmark
217 = 9000 # Aarlborg
220 = 9000 # Arhus
219 = 9000 # Odense
294 = 9000 # Copenhagen

#Holland
#125 = 3000# Rotterdam
#122 = 3000# Amsterdam

#Flanders
#115 = 3000# Antwerpen
#114 = 3000# Brügge

#Iceland
#1 = 3000
#1783 = 3000

#Canada
#2137 = 6000 #Saint John
#2132 = 6000 #Halifax
#2134 = 6000 #Moncton
#2131 = 8000 #Newfoundland
#2126 = 7000 #Rivière-du-Loup

#Germany
152 = 3000# Kiel
147 = 3000# Kolding

#Ireland
34 = 3000 # Cork
30 = 3000 # Galway
36 = 3000 # Sligo
32 = 3000 # Letterkenny

# Middle East
1004 = -1 # El Arish
1005 = -1 # Sharm el Sheikh
1008 = -1 # Tel Aviv
1019 = -1 # Beirut
1032 = -1 # Basrah
1038 = -1 # Doha
1039 = -1 # Abu Dhabi
1040 = -1 # Dammam
1041 = -1 # Kuwait
1043 = -1 # Khasab
1048 = -1 # Medina
1051 = -1 # El Mukalla
1052 = -1 # Masqat

# MEDITERRANEAN SEA
# -----------------
# Italy
400 = -1 # Venice
409 = -1 # Istanbul
412 = -1 # Ancona
416 = -1 # Anzio
419 = -1 # Rome
422 = -1 # Taranto
427 = -1 # Salerno
429 = -1 # Malta
430 = -1 # Palermo
433 = -1 # Siracuse
434 = -1 # Cagliari

#Greece
370 = -1 # Alexandroupoli
372 = -1 # Patra
377 = -1 # Athens
378 = -1 # Kalymnos
379 = -1 # Rodos
381 = -1 # Ermoupoli
382 = -1 # Irakleio
383 = -1 # Mytilene
#yugoslavia Albania
343 = -1
359 = -1
#Spain Africa Newfoundland
717 = -1
718 = -1
715 = -1
441 = -1
449 = -1
472 = -1
473 = -1
991 = -1
990 = -1
988 = -1
978 = -1
963 = -1
964 = -1
3137 = -1
#Iceland
1 = -1
1783 = -1

#Canada
2137 = -1 #Saint John
2132 = -1 #Halifax
2134 = -1 #Moncton
2131 = -1 #Newfoundland
2126 = -1 #Rivière-du-Loup
}
}

and here is an AI switch which Britain gets if she is at war with Denmark:
# USA D-Day AI File for DH by DB

max_garrison_prop = 0.28
min_garrison_prop = 0.22

###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
home_multiplier = 0.5
overseas_multiplier = 0.5
home_peace_cap = 30
war_zone_odds = 5.0
key_point_prio_mult = 0.3
revolt_risk_mult = 0.3

# PRIORITIES:
beach = 30 # Beach level 2
capital = 50 # Our capital
human_border = 0 # Ignored for allied human players

opposing_alliance = 20 # 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

ignore = {
#218 #Arburg DB
#217 #Arhus
#216 #Kolding
#124 #Leeweden
#122 #Amsterdam
#125 #Rotterdam
#114 #Ghent
#51 #Dunkerque
#53 #Dieppe
#45 #Le Havre
#44 #Caen
#38 #Rennes
#37 #Brest
#39 #Lorient
#57 #Nantes
68 #Cholet
#67 #Mont-de-Marsan
#80 #Perpignan
# 82 #Montpellier
#89 #Marseille
#86 #Toulon
#87 #Nice
717
718
715
441
449
472
473
991
990
988
978
963
964
3137
}
}
###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.1 #Relative modifier. (lower = specific targets much more important.)
random = 0.01 #How big a random range. (1.0 = 1%) DB (0.1 is 10%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.01 #higher, avoid worst beaches.
max_distance = 200.0 #About the distance from Japan to Batavia
max_staging_distance = 200.0 # How far should the staging area be from the target invasion point
distance = 0.01 #higher = avoid long distance.
pocket = 0.02 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.01 #prioritise taking pure islands.
enemy = 0.4 #higher = much more vary of troops in province.
adjacentenemy = 0.2 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 1.5
#air_support = 3.0
redirect = nearest
ignore = no
help_allies = no #[yes/no]

staging_province = {

1795 #New York
23 #Plymouth
27 #Portsmouth
# 26 #Dover
# 25 #Norwich

348 #Gibraltar

1889 # San Francisco
1734 # Pearl harbour
}

target = {

#Denmark
217 = 8000 #Arborg
220 = 8000 #Arhus
219 = 8000 #Odense

#Norway
491 = 100 #Alesund
485 = 100 #Kristiansand
483 = 100 #Oslo
493 = 100 #Trondheim
495 = 100 #Narvik

#Germany
152 = 10 #Kiel
147 = 10 #Wilhelmshaven
153 = 10 #Rostock
158 = 10 #Stettin


#France
49 = 8000 #Calais
51 = 3000 #Dunkirk
53 = 8000 #Dieppe
44 = 8000 #Caen

46 = 8000 #Bayeux


37 = 800 #Brest
39 = 800 #Lorient
68 = 800 #Bordeaux
69 = 800 #La Rochelle


82 = 600 #Montpellier
86 = 600 #Marseille

# Belgium
114 = 200 #Bruges
115 = 200 #Antwerpen

#Holland
125 = 100 #Rotterdam
122 = 100 #Amsterdam

# Middle East
1004 = -1 # El Arish
1005 = -1 # Sharm el Sheikh
1008 = -1 # Tel Aviv
1019 = -1 # Beirut
1032 = -1 # Basrah
1038 = -1 # Doha
1039 = -1 # Abu Dhabi
1040 = -1 # Dammam
1041 = -1 # Kuwait
1043 = -1 # Khasab
1048 = -1 # Medina
1051 = -1 # El Mukalla
1052 = -1 # Masqat

# MEDITERRANEAN SEA
# -----------------
# Italy
400 = -1 # Venice
409 = -1 # Istanbul
412 = -1 # Ancona
416 = -1 # Anzio
419 = -1 # Rome
422 = -1 # Taranto
427 = -1 # Salerno
429 = 3000 # Malta
430 = -1 # Palermo
433 = -1 # Siracuse
434 = -1 # Cagliari

#Greece
370 = -1 # Alexandroupoli
372 = -1 # Patra
377 = -1 # Athens
378 = -1 # Kalymnos
379 = -1 # Rodos
381 = -1 # Ermoupoli
382 = -1 # Irakleio
383 = -1 # Mytilene
#yugoslavia Albania
343 = -1
359 = -1
717 = -1
718 = -1
715 = -1
441 = -1
449 = -1
472 = -1
473 = -1
991 = -1
990 = -1
988 = -1
978 = -1
963 = -1
964 = -1
3137 = -1

}
}

admiral = {

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



target = { 2636 = 250 2639 = 225 2631 = 200 2414 = 175 2424 = 175 2426 = 175

2195 = 200 2194 = 200 2193 = 175 2192 = 150 2181 = 150 2183 = 150 2185 = 100 2175 = 100

}

base = {
17 # ply

348 #Gibraltar

1734 # Pearl harbour
# 1889 # San Francisco

1886 # San Diego
1812 # Norfolk
1953 # Miami
1795 # New York
1789 # Boston

#1683 # Guam



}

}

Please help me
 
First thing to realise is that if you want to get the AI to do something, you need to keep it simple.

So in your invade denmark ai file, just invade denmark. Don't do anything else.
Ensure the target province(s) are an actual beach. SO, maybe just have 2 target beach provinces for your MARINES to invade, and maybe the capital city province.
Ensure you have MARINES in the province where you are invading from.
Have transports for the MARINES to travel in.

So now you have your invading-denmark ai file.
Put it into the ai/switch folder and call that file from an event. You could even go one better and give the game a choice either to invade Morocco or Denmark?

There are plenty of examples already in Darkest Hour events for this, if not, see if you can find an old MDS mod and you will certainly find examples there.

Hope this helps.
 
Thanks for the quick reply! I am also honoured to get help from one of the best modders on the Forum ^^
First of all: all provinces have beaches and, Britain always has 4 Marine divisions and 15 transports (and they keep most of them till the end). I also added an event where Britain recieves 3 extra marines and transports in Edinburgh (which I made a staging province)
Also, I did give Britain the option to either send expeditionary forces to France or invade Denmark (but I set the invade Denmark change to 100% for testing purposes). I also don't want Britain to invade Morocco since it's pointless. America should invade Morocco instead.

I will try one thing now: I will remove ALL targets and staging points for Britain. My invade Denmark file will then give Britain 2 staging points and 2 langing points. I will then do three test runs and tell you my results.
Thank you!
My 2 AI files:
Code:
# Invasion of Northern Germany and Denmark
# AI File for KLOTW by Kibbles    Dr bob  for KR


garrison = {
    ignore = {
        #Actual Beaches to Ignore
        842
        856
        892
        894
        913
        893

        #Libya
        750   
        761   
        765 
        
        
        #Egypt/East Africa
        789
                1004
                1008
                1019
                1054
                1077
                1079
                1078
                816
                836
                833
        717
        718
        715
        441
        449
        472
        473
        991
        990
        988
        978
        963
        964
        2137


        
    }
}
invasion = { #
    invasion            = yes
     base        = 0.1
    random        = 0.01
    coastal        = 0.1
    beach        = 0.1
    max_distance          = 90.0  #About the distance from Japan to Batavia
    max_staging_distance = 90.0 # How far should the staging area be from the target invasion point
    pocket        = 20.0
    island        = 0.1
    enemy        = 2.0
    adjacentenemy     = 2.0
    air_base        = 1.5
        naval_base     = 0.1
        air_support     = 3.0
       redirect         = nearest
    province_priorities = yes
    ignore        = no
      
    staging_province = {
        18    #Sheffield
        25    # Norwich
        26    # Dover
        15  #
        13 
        12
        11
        5   
        485
        483
        488
    }
    target = {
        #Denmark
        220  = 9000 # Aarlborg
        219 = 9000 # Odense
        294 = 9000 # Copenhagen

        #Germany
        152 = -1 # Kiel
        217 = -1 # Kolding
        
        #Ireland
        32 = -1 # Galway
        36 = -1 # Belfast
        34 = -1 # Dublin
        
        #Holland
        #125 = -1# Rotterdam
        #122 = -1# Amsterdam
        
        #Flanders
        #115 = -1# Antwerpen
        #114 = -1# Brügge
        
        #Iceland
        #1 = -1
        #1783 = -1
        
        #Canada
        #2137 = -1 #Saint John
        #2132 = -1 #Halifax
        #2134 = -1 #Moncton
        #2131 = -1 #Newfoundland
        #2126 = -1 #Rivière-du-Loup

        #Germany
        152 = -1# Kiel
        147 = -1# Kolding
        
        #Ireland
        34 = -1 # Cork
        30 = -1 # Galway
        36 = -1 # Sligo
        32 = -1 # Letterkenny
        
        # Middle East
        1004  = -1    #    El Arish
        1005  = -1    #    Sharm el Sheikh
        1008  = -1    #    Tel Aviv
        1019  = -1    #    Beirut
        1032  = -1    #    Basrah
        1038  = -1    #    Doha
        1039  = -1    #    Abu Dhabi
        1040  = -1    #    Dammam
        1041  = -1    #    Kuwait
        1043  = -1    #    Khasab
        1048  = -1    #    Medina
        1051  = -1    #    El Mukalla
        1052  = -1    #    Masqat

        # MEDITERRANEAN SEA
        # -----------------
        # Italy
        400  = -1    #    Venice
        409  = -1    #    Istanbul
        412  = -1    #    Ancona
        416  = -1    #    Anzio
        419  = -1    #    Rome
        422  = -1    #    Taranto
        427  = -1    #    Salerno
        429  = -1    #    Malta
        430  = -1    #    Palermo
        433  = -1    #    Siracuse
        434  = -1    #    Cagliari

        #Greece
        370  = -1    #    Alexandroupoli
        372  = -1    #    Patra
        377  = -1    #    Athens
        378  = -1    #    Kalymnos
        379  = -1    #    Rodos
        381  = -1    #    Ermoupoli
        382  = -1    #    Irakleio
        383  = -1    #    Mytilene
        #yugoslavia Albania
        343  = -1
        359  = -1
        #Spain Africa Newfoundland
        717  = -1
        718  = -1
        715  = -1
        441  = -1
        449  = -1
        472  = -1
        473  = -1
        991  = -1
        990  = -1
        988  = -1
        978  = -1
        963  = -1
        964  = -1
        3137  = -1
        #Iceland
        1 = -1
        1783 = -1
        
        #Canada
        2137 = -1 #Saint John
        2132 = -1 #Halifax
        2134 = -1 #Moncton
        2131 = -1 #Newfoundland
        2126 = -1 #Rivière-du-Loup

    }
}
Code:
# England 1936 AI File by Lothos     
# edited for Kaiserreich by Andromedos and others  edit Dr Bob

switch = no
max_front_ratio = 1.2
max_garrison_prop = 0.30
min_garrison_prop = 0.20
neutrality = 80.000
war = 0
upgrading = 0.25
reinforcement = 0.2
strat_redeploy_threshold = 25

exp_force_ratio = 0.05
exp_force_ratios = {
    FRA = 1.0
}
no_exp_forces_to = { NOR }

###################################
# Diplomacy
###################################
combat = { }
ferocity = yes

liberate = { CZE SLO UKR BLR U26 DEN ICL }

claim_acceptance = -20

befriend = {
    FRA = 50
    RSI = 10
    PRK = 20
    SPR = 20
    GEO = 10
    RUS = 10
    HOL = 10
    NOR = 50
    U28 = 50
}
protect = {
    FRA = 50
    RSI = 10
    U31 = 20
    SPR = 20
    GEO = 10
    RUS = 10
    HOL = 10
    NOR = 50
    U28 = 50
}
target = {

    #Denmark
    217  = 100
    220 = 100
    219 = 100
    294 = 100
    
    #Holland
    125 = 70
    122 = 70
        
    #Flanders
    115 = 70
    114 = 70
        
    #Germany
    
       152 = 100 # Kiel
       154 = 100 # Hamburg
       147 = 100 # Wilhelmshafen
      163 = 100 # Berlin
      34 = 100 # Dublin
      36 = 100 # Belfast
      
}
trade = {
    cancel_deal_threshold = 1.6

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

    favored = {
    FRA = 70
    RSI = 50
    U31 = 40
    SPR = 50
    GEO = 50
    RUS = 70
    HOL = 40
    NOR = 50
    U28 = 50
    }
    embargo = {  GER CAN AST SAF VIC }
}
tech_sharing = {
    favored = {
    FRA = 70
    RSI = 50
    U31 = 20
    SPR = 50
    GEO = 50
    RUS = 70
    HOL = 40
    NOR = 50
    U28 = 50
    }
    embargo = {
        GER ITA JAP SLO HUN CAN AST VIC     }
    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

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

        # motorized
        1230 = 100
        1240 = 100
        1250 = 100

        # Medium tanks
        2070 = 100
        2080 = 100
        2090 = 100

        # Light tanks
        2020 = 100
        2030 = 100
        2040 = 100
        2050 = 100
        2060 = 100

        # Strategic bombers
        4220 = 100
        4230 = 100
        4240 = 100
    }
}
###################################
# Spying
###################################
spyprefs =
{
    percentage_on_spies         = 0.2
    percentage_foreign_mission     = 0.5

    # Used for Homeland Defense Spying
    spyprefsdata =
    {
        NumberOfSpies = 10
        counter_espionage =  10
        country = ENG
    }
    # 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 = 1
        smear_campaign         = 3
        coup                 = 0
        sabotage_industry     = 5
        nuclear_sabotage     = 0
        found_partisans     = 0
        massmedia             = 3
        counter_espionage     = 5
        disrupt_techteam    = 5
        country             = GER
    }

        spyprefsdata = {
        country_priorities    = 3
        NumberOfSpies        = 3
        min_number_of_spies = 1
        steal_blueprint     = 10
        minister_assassination = 1
        smear_campaign         = 3
        coup                 = 0
        sabotage_industry     = 5
        nuclear_sabotage     = 0
        found_partisans     = 0
        massmedia             = 3
        counter_espionage     = 5
        disrupt_techteam    = 5
        country             = CAN
    }
}


###################################
# Construction and Tech Research
###################################
#Default values
construction = {
    max_factor = 0.150

    AA_batteries = yes
    max_AA_level = 10
    AA_provs = {
                29
                17
                19
                26
 }

    coastal_fort = atwar
    max_coastal_level = 5
    coastal_fort_provs = {
        # England Coast
        26 # Dover
        25 # Norwich
        27 # Portsmouth
        23 # Plymouth
        22 # Cardiff
        17 # Manchester
        12 # Edinburgh
        11 # Glasgow
        
    }

    radar_station = atwar
    max_radar = 3
    radar_provs = {
        26 # Dover
        25 # Norwich
        27 # Portsmouth
        23 # Plymouth
        20 # Exeter
        5  # Scapa Flow
                17 # Manchester
    }

    air_base = atwar
    max_air_base = 5
    air_base_provs = { }

    naval_base = no
    max_naval_base = 5
    naval_base_provs = { }

    land_fort = no
    max_land_level = 5
    fort_provs    = {
    }
    fort_borders = { }

    ic_at_war = no
    force_ic_until = 1938
    ic_end_year = 1940
    IC_provs = { 7 11 12 15 17 19 20 24    }
}
military = {
    relative_build_scheme     = no
    max_batch_peace     = 860
    max_batch_war         = 980
    max_batch_home_front     = 580
        extra_convoys_war = 0.0100
        extra_convoys_peace = 0.0500

    #### Divisions etc...
    infantry         = 10
    cavalry         = 0
    motorized         = 4
    mechanized         = 0
    light_armor         = 4
    armor             = 3
    paratrooper         = 0
    marine             = 3
    bergsjaeger         = 0
    garrison        = 2
          hq             = 3
    militia         = 5
#                    34 %
    interceptor         = 6
    multi_role         = 0

    cas             = 0
    strategic_bomber     = 0
    tactical_bomber     = 4
    naval_bomber         = 6
    transport_plane     = 0
    flying_bomb         = 0
    flying_rocket         = 0
#                    16 %
    battleship         = 4
    carrier         = 5
    destroyer         = 15
    light_cruiser         = 10
    heavy_cruiser         = 3
    battlecruiser         = 0
    submarine         = 4
    transports         = 7
#                    46 %
#       new units DH and KR
        escort_carrier    = 4
        nuclear_submarine = 0
        d_01        = 0        #  Light Infantry
#                    4 %

    #### Brigades
    artillery         = 15
    sp_artillery         = 9
    rocket_artillery    = 0
    sp_rct_artillery     = 0
    anti_tank         = 8
    tank_destroyer         = 8
    light_armor_brigade = 6
    heavy_armor         = 5
    super_heavy_armor     = 0
    armored_car         = 5
    anti_air         = 7
    police             = 2   
    engineer         = 6
    b_01            = 5   #  anti tank in KR  new brigades
    amph_armor         = 0   
    cavalry_brigade        = 5
    glider_armor        = 0
    glider_artillery    = 0
    sp_anti_air        = 0
    super_heavy_artillery    = 0

        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     = {
        #Infantry / Mot Inf.
        1100 1110 1120 1396 1400 1410 1420 1430 1440 1450 1460

        # Inf support
        #1970 1980 1990 199100 199110 199120 199130 199140 199150 199160 199170 199180

        # Light tanks
        2030 2040 2050
        
        # Medium tanks
        2070 2080 2090 2140 11000 2660 11010 2670
        
        # Intercepters
        4010 4020 4030 4060 4090 15000 15010 4560 4570
        
        # Tactical bombers
        4120 4130 4140 4150 4160 15100 15110 4640 4650

        # Naval Bomber
        # 4700 4710 4190 4200 4210 15140 15150

        # Strategic bombers
        # 4220 4230 4240 4246

        # Manufactoring
        5070 5130 5110 5120 5840 5850 5860

        # CONSTRUCTION
        5100 5900 5910
        
        #Assembly lines 5160 5180
        5140 5150
        
        # Computers
        5330 5340
        
        #EQUIPMENT Desert
        5960 5970
        
        # Computers
        5327 5350 5360 5370 5380 5390 5400 53060 53116
        
        # MEDICINE
        5640 5650 5660 5670
        
        # Electronic Computers
        7140 7150 7160 16000 16040
        
        # Rocket Test, Rocket & Turbojet engine, Practical Turbojet
        # 7550 7560 7570 15500

        # Land Doctrines / Armored Divisions
        6130 6140 6170 6200 6900 14070 6790 6800 6730 6750 6760 6880 6890 6850       
        
        # Naval Doctrines
        8310 8200 8250 8260
        
        # Commerce Defense
        8170
        
        # Air Doctrines
        9040 9090 9100 9110 9120 9130 9210 9220 9230 9240 9250 9350
        
        # Mechanized
        1470 1480 1490
        
        # Marines
        1560 1570 1580
        
        # Airborne
        # 1670 1680 1690
        

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

    }
    ignore         = {
        
        # Air Transports
        4250 4260

    # Nuclear
    5470 5480 5490 5500 5510 5520 5530 5540

    # Rocket Test & Research Facility
    7550 7560 7570 7580 7590

    # Rockets & missiles
    7100 7110 7120 7130



    }
 
    armor         = 3
    infantry     = 5
    industry     = 5
    aircraft     = 4
    naval         = 4
    land_doctrines     = 1
    secret_weapons     = 1
    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     = 1.3
    overseas_multiplier     = 0.3
    home_peace_cap         = 100
    war_zone_odds         = 2.0
    key_point_prio_mult    = 1.0
    revolt_risk_mult    = 1.0

    # PRIORITIES:
    beach            = 50    # 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    = 30    # 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 = {
        DEN = 150
        GER = 150
        CAN = 150
        VIC = 100
        AST = 100
        RUS = 50
        ITA = 50
        SPA = 50
        IRE = 50
        ICL = 50
        USA = 25
        SWE = 10
        SCH = -1
        NOR = -1
        FRA = -1
        SPR = -1
        RSI = -1
        GEO = -1
        PRK = -1
    }
    ignore = {
        #Actual Beaches to Ignore
        842
        856
        892
        894
        913
        893

        #Libya
        750   
        761   
        765 
        
        
        #Egypt/East Africa
        789
                1004
                1008
                1019
                1054
                1077
                1079
                1078
                816
                836
                833
        717
        718
        715
        441
        449
        472
        473
        991
        990
        988
        978
        963
        964
        2137


        
    }
    province_priorities = {
        348 = 30 # Gibraltar
        429  = 30 # Malta
        789 = 30 # Alexandria
        
        # England Coast
        26 = 30 # Dover
        25 = 30 # Norwich
        27 = 30 # Portsmouth
        23 = 30 # Plymouth
        22 = 30 # Cardiff
        17 = 30 # Manchester
        29 = 30 # Bristol
        16 = 30 # Lincoln
        11 = 30 # Edinburgh
        12 = 30 # Glasgow
                20 = 30
        5 = 30 # Scap Flow
                13 = 30 # Sunderland
    }
    area_multiplier = {
        348 = 2.0 # Gibraltar
        429  = 2.0 # Malta
        789 = 1.5 # Alexandria
    }
}
front = {
    recklessness         = 3 # 0-3
    distrib_vs_ai         = op_defensive
    distrib_vs_human         = op_defensive

    enemy_reinf_days    = 4
    reserve_prop        = 0.2
    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.3
    withdraw_odds        = 0.8

    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
###################################

###################################
# Invasions and Naval
###################################
invasion = {
    invasion    = yes
     base        = 0.1    #Relative modifier. (lower = specific targets much more important.)
    random        = 0.01    #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    = 1.0    #higher = avoid long distance.
    max_distance      = 100.0 
    max_staging_distance = 100    # How far should the staging area be from the target invasion point
    pocket        = 20.0    #prioritise pockets, ie provinces with no adjacent controlled by same.
    island        = 0.1    #prioritise taking pure islands.
    enemy        = 7.0    #higher = much more vary of troops in province.
    adjacentenemy     = 10.0    #higher = much more vary of troops nearby
    air_base        = 1.5
        naval_base         = 0.1
        air_support     = 3.0
        redirect         = priority
    ignore            = no
    help_allies     = no     #[yes/no]
      
    staging_province = {
        27 # Portsmouth
        23 # Plymouth
        13 # Sheiffield
        25  # Norwich
        26  # Dover
        17  # Liverpool
        22  # Cardiff
        2137 #Newfoundland
        2132 #Halifax
        2134 #Moncton
        1783
        1
        5
        488 #Bergen
        483 #Oslo
        2153 #Gothenburg
        2153 #Malmö
    }
    target = {
        #Denmark
        217  = 9000 # Aarlborg
        220 = 9000 # Arhus
        219 = 9000 # Odense
        294 = 9000 # Copenhagen
        
        #Holland
        #125 = 3000# Rotterdam
        #122 = 3000# Amsterdam
        
        #Flanders
        #115 = 3000# Antwerpen
        #114 = 3000# Brügge
        
        #Iceland
        #1 = 3000
        #1783 = 3000
        
        #Canada
        #2137 = 6000 #Saint John
        #2132 = 6000 #Halifax
        #2134 = 6000 #Moncton
        #2131 = 8000 #Newfoundland
        #2126 = 7000 #Rivière-du-Loup

        #Germany
        152 = 3000# Kiel
        147 = 3000# Kolding
        
        #Ireland
        34 = 3000 # Cork
        30 = 3000 # Galway
        36 = 3000 # Sligo
        32 = 3000 # Letterkenny

        # Middle East
        1004  = -1    #    El Arish
        1005  = -1    #    Sharm el Sheikh
        1008  = -1    #    Tel Aviv
        1019  = -1    #    Beirut
        1032  = -1    #    Basrah
        1038  = -1    #    Doha
        1039  = -1    #    Abu Dhabi
        1040  = -1    #    Dammam
        1041  = -1    #    Kuwait
        1043  = -1    #    Khasab
        1048  = -1    #    Medina
        1051  = -1    #    El Mukalla
        1052  = -1    #    Masqat

        # MEDITERRANEAN SEA
        # -----------------
        # Italy
        400  = -1    #    Venice
        409  = -1    #    Istanbul
        412  = -1    #    Ancona
        416  = -1    #    Anzio
        419  = -1    #    Rome
        422  = -1    #    Taranto
        427  = -1    #    Salerno
        429  = -1    #    Malta
        430  = -1    #    Palermo
        433  = -1    #    Siracuse
        434  = -1    #    Cagliari

        #Greece
        370  = -1    #    Alexandroupoli
        372  = -1    #    Patra
        377  = -1    #    Athens
        378  = -1    #    Kalymnos
        379  = -1    #    Rodos
        381  = -1    #    Ermoupoli
        382  = -1    #    Irakleio
        383  = -1    #    Mytilene
        #yugoslavia Albania
        343  = -1
        359  = -1
        #Spain Africa Newfoundland
        717  = -1
        718  = -1
        715  = -1
        441  = -1
        449  = -1
        472  = -1
        473  = -1
        991  = -1
        990  = -1
        988  = -1
        978  = -1
        963  = -1
        964  = -1
        3137  = -1
        #Iceland
        1 = -1
        1783 = -1
        
        #Canada
        2137 = -1 #Saint John
        2132 = -1 #Halifax
        2134 = -1 #Moncton
        2131 = -1 #Newfoundland
        2126 = -1 #Rivière-du-Loup
    }
}
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

    ignore = {
        #Murmansk/Archangel
        "Barents Sea"
        "Arctic Ocean"
        
        #Western Mediterranean
        "Costa del Sol"
        "Gulf of Lyon"
        "Algerian Coast"
        
        #Central Mediterranean
        "Tyrrhenian Sea"
        "Adriatic Sea"
        
        #Eastern Mediterranean
        "Black Sea"
        "Aegean Sea"
        "Egyptian Coast"
        
        #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"
    }
    #Which provinces to use as bases..
    base = {
        17    # Manchester
        5    # Scapa Flow
        13    # Sunderland
                1

    }
    target = { }
    core = {
        2682
        2683
        2685
        2684
        2716
        2708
        2709
        2710
        2698
        2700
        2688
    }
}
 
Last edited:
I think you still do not understand what I meant. My fault sorry.

Get rid of all the fluff in the file... befriend this, protect that, ..... it is already in the main AI file for the game. UNLESS you are needing to change it??

JUST HAVE the invasion part... invasion = yes, target beaches, target provinces, departing from province, marines, boats. Have nothing else in the file except what you need to invade.

Remember on the year ending, the main AI file will kick back in again, unless you have it do something else. The switch AI files are for temporary stuff, invasions etc.

Try to find an old MDS usinvadeiraq.ai file, copy that and change it to suit, OR a homeland mod jap invading usa file, copy that, change to suit.
 
Oh, I didn't know that. I thought switches are temporary. Thanks. Also, the first file is the main ai file for Britain. Unfortunatelly I don't have the Homeland mod anymore, but I do have the old Modern Day Scenario. I used the exact file you proposed and this is how my code now looks like:
Code:
#USA invasion of Iraq 2003 by novapaddy for MDS2 in 2012
#
max_garrison_prop = 0.1
min_garrison_prop = 0.05
combat = {
DEN = 300
}
reinforcement = 10.0
###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
    home_multiplier     = 0.5
    overseas_multiplier = 0.5
    home_peace_cap         = 0
    war_zone_odds         = 5.0
    key_point_prio_mult    = 0.3
    revolt_risk_mult    = 0.3

    # PRIORITIES:
    beach            = 50        # Beach level 2
    capital            = 1        # Our capital
    human_border    = 0        # Ignored for allied human players

       
    ignore = {
        }
       
        province_priorities = {
        220 = 9000 # Aarlborg
        219 = 9000 # Odense
        294 = 9000 # Copenhagen
        218 = 9000 Frederikshaven
        219 = 9000 Odense
        216 = 9000 Abenra
        150 = 9000 Flensburg
       
       
           
        }
    }  
###################################
# Invasions and Naval
###################################
invasion = {
    invasion            = yes
     base                = 0.1    #Relative modifier. (lower = specific targets much more important.)
    random                = 10.0    #How big a random range.  (1.0 = 1%)
    coastal                = 0.1    #increase to avoid coastal forts more.
    beach                = 0.01    #higher, avoid worst beaches.
    max_distance          = 100.0  #About the distance from Japan to Batavia
    max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
    distance            = 0.01    #higher = avoid long distance.
    pocket                = 20.0    #prioritise pockets, ie provinces with no adjacent controlled by same.
    island                = 0.01    #prioritise taking pure islands.
    enemy                = 1.0    #higher = much more vary of troops in province.
    adjacentenemy         = 0.2    #higher = much more vary of troops nearby
    air_base            = 1.5
    naval_base             = 1.5
    air_support         = 3.0
    #redirect             = priority
    #ignore                = no
    help_allies         = yes    #[yes/no]
     
    staging_province = {
        26 # Dover
        25 # Norwich
        15 # Hull
        13 # Sunderland
        12 # Edinburgh
        5 # Scapa Flow
        }
    target = {
   
                               
        }
    }



Edit: Thank you alot Novapaddy. It works!
 
Last edited:
I need your help again. Britain only invades northern Germany instead of Denmark -_-. This is a deathtrap since the German navy intercepts most of the transports before they reach the German coast.
 
I need your help again. Britain only invades northern Germany instead of Denmark -_-. This is a deathtrap since the German navy intercepts most of the transports before they reach the German coast.

Decide what 2 possible beaches you want to land in and just have them in the province priorities, remove the others.

combat = {

DEN = 300.... raise this to 3000.

EDIT... maybe try GER = 50 as well

invasion = {

try ... base = 0.01 to make it go for the target beach??
 
Still doesn't work. All beaches in Denmark are completelly undefended and there aren't even ships, yet still Britain tries to invade Wilhelmshaven and loses all her transports

Code:
#ENG invasion of DEN WW2 by Grantelbart for KR 1.9 in 2017
#
max_garrison_prop = 0.1
min_garrison_prop = 0.05
combat = {
DEN = 3000
GER = 60
}
reinforcement = 10.0
###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
    home_multiplier     = 0.5
    overseas_multiplier = 0.5
    home_peace_cap         = 0
    war_zone_odds         = 5.0
    key_point_prio_mult    = 0.3
    revolt_risk_mult    = 0.3

    # PRIORITIES:
    beach            = 50        # Beach level 2
    capital            = 1        # Our capital
    human_border    = 0        # Ignored for allied human players

       
    ignore = {
        }
       
        province_priorities = {
       
        220 = 9000 # Aarlborg
        217 = 9000 # Odense      
       
           
        }
    }  
###################################
# Invasions and Naval
###################################
invasion = {
    invasion            = yes
     base                = 0.01    #Relative modifier. (lower = specific targets much more important.)
    random                = 10.0    #How big a random range.  (1.0 = 1%)
    coastal                = 0.1    #increase to avoid coastal forts more.
    beach                = 0.01    #higher, avoid worst beaches.
    max_distance          = 100.0  #About the distance from Japan to Batavia
    max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
    distance            = 0.01    #higher = avoid long distance.
    pocket                = 20.0    #prioritise pockets, ie provinces with no adjacent controlled by same.
    island                = 0.01    #prioritise taking pure islands.
    enemy                = 1.0    #higher = much more vary of troops in province.
    adjacentenemy         = 0.2    #higher = much more vary of troops nearby
    air_base            = 1.5
    naval_base             = 1.5
    air_support         = 3.0
    #redirect             = priority
    #ignore                = no
    help_allies         = yes    #[yes/no]
     
    staging_province = {
        #26 # Dover
        #25 # Norwich
        #15 # Hull
        13 # Sunderland
        12 # Edinburgh
        5 # Scapa Flow
        }
    target = {
                               
        }
    }

Also, Britain is invading Indochina now :mad:
 
Last edited:
Before Britain always invaded Africa. Then I blocked Britain form invading any African seaprovince without an ai switch and now Britain is invading Germany's Asian colonies.
 
My guess is you are attempting this during a vanilla Kaiserreich game and a million different switches are firing while you're trying to gain a specific test result. If you really want to control the British AI than you should disable it's switch event data first. Which with Kaiserreich I imagine is easier said than done because, spaghetti scripting.

If the above script was running than it isn't any wonder that Britain is throwing stuff across the world with a distance of 10,000km. Wish we knew what the target values were. I think it is a multiplier at some decimal which allows the AI to ignore enemy forces and command an amphibious assault.

Code:
invasion = {
    base = .01 #focus on targets
    random = 0.0 #use base value only
    coastal = 0.1 #lower coast fort reluctance
    distance = 10.0 #avoid further distances
    max_distance = 20.0 #2000km max
    pocket = 0.0 #ignore pocket provinces
    island = 0.0 #ignore islands
    air_support = 1.0 #seek air support distance
    province_priorities = yes #i don't think this does anything
    redirect = home #RTB instead of running the coasts for another target
    target = {
        217 = 1000 #this should be sufficient. thousands more can't hurt.
        220 = 1000
        219 = 1000
        294 = 1000
    }
}
 
Last edited:
Thanks, but the other ai switches shouldn't really interfere with the Denmark invasion swith. Afterall the other swithes only have one specific function like for example sending expeditionary forces.
Also, yes: Vanilla Kaiserreich. I will now test the new ai file, thanks.

Code:
#ENG invasion of DEN WW2 by Grantelbart for KR 1.9 in 2017
#
max_garrison_prop = 0.1
min_garrison_prop = 0.05
combat = {
DEN = 3000
}
reinforcement = 10.0
###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
    home_multiplier     = 0.5
    overseas_multiplier = 0.5
    home_peace_cap         = 0
    war_zone_odds         = 5.0
    key_point_prio_mult    = 0.3
    revolt_risk_mult    = 0.3

    # PRIORITIES:
    beach            = 50        # Beach level 2
    capital            = 1        # Our capital
    human_border    = 0        # Ignored for allied human players

      
    ignore = {
        }
      
        province_priorities = {
      
        220 = 9000 # Aarlborg
        217 = 9000 # Odense     
      
          
        }
    } 
###################################
# Invasions and Naval
###################################
invasion = {
    base = .01
    random = 0.0
    coastal = 0.0
    beach = 1.0
    distance = 10.0
    max_distance = 20.0
    pocket = 0.0
    island = 0.0
    enemy = 1.0
    adjacentenemy = 1.0
    air_base = 0.1
    naval_base = 0.1
    air_support = 1.0
    province_priorities = yes
    redirect = home

    
    staging_province = {
        #26 # Dover
        #25 # Norwich
        #15 # Hull
        13 # Sunderland
        12 # Edinburgh
        5 # Scapa Flow
        }
    target = {
        217 = 1000
        220 = 1000
        219 = 1000
        294 = 1000                 
        }
    }

Also, I tried something new. I added the Danish coasts to the British core waters file.

Edit: Now Britain doesn't invade at all -_-
 
Last edited:
Nova, are you back?

No. I remain banned, all of my mods locked. I was only passing looking for something interesting to read.


Still doesn't work. All beaches in Denmark are completelly undefended and there aren't even ships, yet still Britain tries to invade Wilhelmshaven and loses all her transports

Code:
#ENG invasion of DEN WW2 by Grantelbart for KR 1.9 in 2017
#
max_garrison_prop = 0.1
min_garrison_prop = 0.05
combat = {
DEN = 3000
GER = 60
}
reinforcement = 10.0
###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
    home_multiplier     = 0.5
    overseas_multiplier = 0.5
    home_peace_cap         = 0
    war_zone_odds         = 5.0
    key_point_prio_mult    = 0.3
    revolt_risk_mult    = 0.3

    # PRIORITIES:
    beach            = 50        # Beach level 2
    capital            = 1        # Our capital
    human_border    = 0        # Ignored for allied human players

      
    ignore = {
        }
      
        province_priorities = {
      
        220 = 9000 # Aarlborg
        217 = 9000 # Odense     
      
          
        }
    } 
###################################
# Invasions and Naval
###################################
invasion = {
    invasion            = yes
     base                = 0.01    #Relative modifier. (lower = specific targets much more important.)
    random                = 10.0    #How big a random range.  (1.0 = 1%)
    coastal                = 0.1    #increase to avoid coastal forts more.
    beach                = 0.01    #higher, avoid worst beaches.
    max_distance          = 100.0  #About the distance from Japan to Batavia
    max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
    distance            = 0.01    #higher = avoid long distance.
    pocket                = 20.0    #prioritise pockets, ie provinces with no adjacent controlled by same.
    island                = 0.01    #prioritise taking pure islands.
    enemy                = 1.0    #higher = much more vary of troops in province.
    adjacentenemy         = 0.2    #higher = much more vary of troops nearby
    air_base            = 1.5
    naval_base             = 1.5
    air_support         = 3.0
    #redirect             = priority
    #ignore                = no
    help_allies         = yes    #[yes/no]
    
    staging_province = {
        #26 # Dover
        #25 # Norwich
        #15 # Hull
        13 # Sunderland
        12 # Edinburgh
        5 # Scapa Flow
        }
    target = {
                              
        }
    }

Also, Britain is invading Indochina now :mad:

SO, pity you do not have the jap invade usa ai file from homeland, as this was a much more refined ai file.

First, I understand that Denmark does actually exist as a country? Else you are attacking GER and not DEN....

If you are still using the file above, you do not need to add anything to this file, it is already working, but just not as you wish?

Please look at the immediate problem and not just add stuff in the hope that it will magically work. At the moment, the ai is attacking high level ports, germany, and provinces far far away?

SO, looking at the parameters:

###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.01 #Relative modifier. (lower = specific targets much more important.)
random = 10.0 #How big a random range. (1.0 = 1%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.01 #higher, avoid worst beaches.
max_distance = 100.0 #About the distance from Japan to Batavia
max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
distance = 0.01 #higher = avoid long distance.
pocket = 20.0 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.01 #prioritise taking pure islands.
enemy = 1.0 #higher = much more vary of troops in province.
adjacentenemy = 0.2 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 1.5
air_support = 3.0
#redirect = priority
#ignore = no
help_allies = yes #[yes/no]

max_distance, please change to 10.
pocket = 1.0
random = 1.0

AND tell it to ignore the GER ports like Kiel and Wilms....

I suggest you work on the ai file in progressive, logical steps. If the distance being attacked is far far away, shorten the distance. If the province being attacked is a port and not a beach, then change the parameters. Trial and error.
 
No. I remain banned, all of my mods locked. I was only passing looking for something interesting to read.




SO, pity you do not have the jap invade usa ai file from homeland, as this was a much more refined ai file.

First, I understand that Denmark does actually exist as a country? Else you are attacking GER and not DEN....

If you are still using the file above, you do not need to add anything to this file, it is already working, but just not as you wish?

Please look at the immediate problem and not just add stuff in the hope that it will magically work. At the moment, the ai is attacking high level ports, germany, and provinces far far away?

SO, looking at the parameters:

###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.01 #Relative modifier. (lower = specific targets much more important.)
random = 10.0 #How big a random range. (1.0 = 1%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.01 #higher, avoid worst beaches.
max_distance = 100.0 #About the distance from Japan to Batavia
max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
distance = 0.01 #higher = avoid long distance.
pocket = 20.0 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.01 #prioritise taking pure islands.
enemy = 1.0 #higher = much more vary of troops in province.
adjacentenemy = 0.2 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 1.5
air_support = 3.0
#redirect = priority
#ignore = no
help_allies = yes #[yes/no]

max_distance, please change to 10.
pocket = 1.0
random = 1.0

AND tell it to ignore the GER ports like Kiel and Wilms....

I suggest you work on the ai file in progressive, logical steps. If the distance being attacked is far far away, shorten the distance. If the province being attacked is a port and not a beach, then change the parameters. Trial and error.

kevin_there_is_no_hope.gif
 
Shame. I could really use some help. I am done with the map, but I could use some help with converting IDs to the new set. Anyone out here who is a crack with excel and VBA?
I know how to work spreadsheets. What do you need VBA for? I'm using LInux but can install/run up to VB 6.0. I imagine you need someone to just write a provinces.csv? Post the list and an example of product you want in mods general.
 
Last edited:
Great. Basically it looks like this:

I have a long list of numbers/IDs that I need to convert according to another long list, that has old and new IDs in lines A and B. I do not want to do it manually, as it would take hours. Anyone can help.

It looks like this:

I have a long list of numbers/IDs (c. 8000) that I need to convert according to another long list, that has old and new IDs in lines A and B. I do not want to do it manually, as it would take hours. Anyone can help.

It looks like this:

Id Old 0 1 2 3 4 5 6 7 8 9 10 11 12 13

ID New 0 1 2 23 3050 24 25 26 33 34 40 41 42 43

ID to be replcaced

6860 6860 6857 548 6871 6867 6865 549 6852 6852 550

I guess a VBA script or a VLOOKUP/ INDEX MATCH function would do it. Alas my Excel skills are limited.

In essence all province IDs now have new IDs, I can the Map to Map Converter for scenarios, but I still need to convert the Adjacencies file. That would take hours to do manually.

Any help would be greatly appreciated.
 
No. I remain banned, all of my mods locked. I was only passing looking for something interesting to read.




SO, pity you do not have the jap invade usa ai file from homeland, as this was a much more refined ai file.

First, I understand that Denmark does actually exist as a country? Else you are attacking GER and not DEN....

If you are still using the file above, you do not need to add anything to this file, it is already working, but just not as you wish?

Please look at the immediate problem and not just add stuff in the hope that it will magically work. At the moment, the ai is attacking high level ports, germany, and provinces far far away?

SO, looking at the parameters:

###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.01 #Relative modifier. (lower = specific targets much more important.)
random = 10.0 #How big a random range. (1.0 = 1%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.01 #higher, avoid worst beaches.
max_distance = 100.0 #About the distance from Japan to Batavia
max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
distance = 0.01 #higher = avoid long distance.
pocket = 20.0 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.01 #prioritise taking pure islands.
enemy = 1.0 #higher = much more vary of troops in province.
adjacentenemy = 0.2 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 1.5
air_support = 3.0
#redirect = priority
#ignore = no
help_allies = yes #[yes/no]

max_distance, please change to 10.
pocket = 1.0
random = 1.0

AND tell it to ignore the GER ports like Kiel and Wilms....

I suggest you work on the ai file in progressive, logical steps. If the distance being attacked is far far away, shorten the distance. If the province being attacked is a port and not a beach, then change the parameters. Trial and error.
Yes, Denmark does exist and all beaches are undefended. And yes, the file is working, but Britain never invaded Denmark. Britain simply invaded Wilhelmshaven all the time which basically is a deathtrap since Germany simply attacks Britain with here whole navy stationed in Wilhelmshaven if Britain attempts to invade.

Also, it sucks to hear that all your mods are all banned. Especially since mods are the only reason people buy this game.

Ps: I made the British AI ignore the ports and now Britain simply does nothing. Also: is max_distance 10 enough? the shortest distance between Britain and Denmark is still 700km