• 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.
Regarding the 'lock_division' command.

Concern at its apparent defunctness appears unfounded. When I tested the event using the command, the game froze because of an unrelated error, but misleadingly, at the time that the event in question was supposed to fire, giving me the impression that the command had caused the game freeze.

The 'lock_division' command actually does appear to work, which could solve some of our problems. For example, we may find it useful to lock a number of Russian units in place until the outbreak of war so that the German AI does not feel it necessary to place an ahistorically large number of units on its eastern border with Poland, leaving them for deployment elsewhere.

The Ostasiengeschwader can be forced to stay in port by listing Tsingtao as one of the bases that the German AI should station naval units at:

Code:
	base = {
		80 # Wilhemshafen
		90 # Kiel
		1215 # Tsingtao
	}

Happily, as soon as Germany switches to a war AI without Tsingtao listed within the 'base' brackets, the Ostasiengeschwader begins its voyage home near to the time it historically did.
 
I did some work on the Western Front AI last night. The French no longer reinforce Belgium in the beginning days of the war. I'm thinking of creating an AI event to fire that will cause France to reinforce the Belgian front. I think the event should fire after the capture of Liege and one of the following: Brussels, Antwerp, Namur, Ghent. Ghent is included just in case an enterprising human player decides on an amphibious invasion.

I've also included an event that prevents the attack of Antwerp through Aachen.
 
Allenby said:
Regarding the 'lock_division' command.

Concern at its apparent defunctness appears unfounded. When I tested the event using the command, the game froze because of an unrelated error, but misleadingly, at the time that the event in question was supposed to fire, giving me the impression that the command had caused the game freeze.

The 'lock_division' command actually does appear to work, which could solve some of our problems. For example, we may find it useful to lock a number of Russian units in place until the outbreak of war so that the German AI does not feel it necessary to place an ahistorically large number of units on its eastern border with Poland, leaving them for deployment elsewhere.

The Ostasiengeschwader can be forced to stay in port by listing Tsingtao as one of the bases that the German AI should station naval units at:

Code:
	base = {
		80 # Wilhemshafen
		90 # Kiel
		1215 # Tsingtao
	}

Happily, as soon as Germany switches to a war AI without Tsingtao listed within the 'base' brackets, the Ostasiengeschwader begins its voyage home near to the time it historically did.

The enemy_handicap function works very well at preventing Russia from attacking Germany prematurely. I've increased it to 40 days or so for both Germany and Russia.

I don't have an issue with the use of the lock_division command, provided it is AI only. :)
 
Yes, the should have created the corridor of Maastricht. In WWI this was very important because it forced the Germans to launch a suprise attack against Lüttich (Liège).
But what with Besancon? It has a very small border with Mulhouse and this makes the AI station many divisions there and a Human also has to protect this small border. That's quite unrealistic.
 
I've worked with the August 1914 AI a bit last night. Everything is much better written now, with the only drawback being that Germany refuses to budge from its borders with Belgium. :mad: :mad: :mad: :mad: :mad: :mad:

Believe me when I say that, I also understand that's not real progress. I'm at a loss to understand why it refuses to move.

Edit: I've decided to include a working copy of the 1914 Western Front AI. This is NOT a game-ready AI - it's for those who have an interest and understanding of AI to review, edit, and test. Maybe you can find a way to get the Germans rolling through Belgium.

070525Working-AI.rar is located here: http://www.esnips.com/r/hmfl/doc/fd991273-22cd-407e-a9dc-069939b4eb82/070525Working-AI
 
Last edited:
TurnerBenton said:
I've worked with the August 1914 AI a bit last night. Everything is much better written now, with the only drawback being that Germany refuses to budge from its borders with Belgium. :mad: :mad: :mad: :mad: :mad: :mad:

Believe me when I say that, I also understand that's not real progress. I'm at a loss to understand why it refuses to move.

Edit: I've decided to include a working copy of the 1914 Western Front AI. This is NOT a game-ready AI - it's for those who have an interest and understanding of AI to review, edit, and test. Maybe you can find a way to get the Germans rolling through Belgium.

070525Working-AI.rar is located here: http://www.esnips.com/r/hmfl/doc/fd991273-22cd-407e-a9dc-069939b4eb82/070525Working-AI

protect = { # will guarantee independence
U11 = 90
SCH = 60
DEN = 60
BEL = 60
HOL = 60
}

I would 'remove' the bold line entirely.

Also lower this,
max_garrison_prop = 0.75 to like 0.45
and this
min_garrison_prop = 0.40 to like 0.30

That's my first look over. I would change these things and look again if needed.
 
TurnerBenton said:
you are looking at the GER_1914.ai, the war AI is in the switch folder. It is GER_war1914.ai. The garrison numbers are modified, although I'm not sure about the protect modifier.

Sorry, and that would be a great way to modify it. I will not have time again to look at it for a few hours, but such a problem is certainly fixable.
:)
 
Hi, I notice that in three of the four German ai's you have the 'switch = no' command. I would only load that once in first loaded ai.

I also notice the use of the 'max_front_ratios = {}' left blank following the 'max_front_ratio = x' if not thoroughly used or defined country by country then I would delete their use as post blank they do 'erase'.

Also where used in 'ger_war 1914':

max_front_ratio = 0.8 # GER will put maximum 80 percent the divisions on a front than the enemy have there
max_front_ratios = {
BEL = 10.0
LUX = 10.0
FRA = 0.9
}

Could not these ratios be thus interpreted?

BEL is 80% times 1000%?
Personnally I would use one protocol or the other either a. be satified with the first as a universal setting and then rely on the garrison settings which I will address next, or I would use the second choice, ratios (plural listing each country in detail) One or the other but not both and certainly never include the 'ratios' command line as a blank, rather eliminate it entirely.

Next lets look at the the 'garrison' ai commands to wit:

garrison = {
defend_overseas_beaches = no
home_multiplier = 0.5 # Garrison of one unit per two provinces in home territory
overseas_multiplier = 0.1 # Garrison of one unit per 10 provinces overseas
home_peace_cap = 20 # Garrison of up to 20 divisions in Berlin during peace
war_zone_odds = 2.0 # Will attempt to transport units to a warzone up to twice enemy strength
key_point_prio_mult = 0.1
revolt_risk_mult = 0.4

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

# Borders with specific countries
country_priorities = {
SCH = -1 # we will never garrison our border with Switzerland
U11 = -1 # or Austria-Hungary
FRA = 75 #was 50
HOL = 20
BEL = 20
DEN = -1 # Override "opposing_alliance", "claim_threat" and "unstable_border" values and set to 0.
LUX = -1
RUS = 20 #was 85
}
province_priorities = {
} # Specific provinces we will send troops to by preference
area_multiplier = { }
}

'human_border' should be lowered in repect to the others as posted. This command really affects ai behavior and really can tip historical behavior accordantly. It does not matter when following historcial or defined scenario behavior 'who' the human is. So I would lower it to '10'.

next, is 'war_target', I would raise from 20 to 200. This is the primary command and generally should be the highest, excepting of course the 'capitol' which has another opportunity elsewhere to cap it. (please note I know you are switching these later)

Lastly under the 'country_priorities' you have 'FRA = 75 and BEL = 20 yet else where in ai, 'ger_war 1915' you have under 'combat' FRA = 10 and BEL = 100' and you also switch up BEL = 100 and 'war_target' to 195.

In theory much this is all as should be excepting I have found 'proof' that a command 'does not switch'. How many more? Well who knows, except by carefully isolating each one and testing for weeks at a time. (that is how long it took me prove the 'accept_claims' command does not switch.)

I would try to be as long-term as possible and fully comprehensive with only 'one' german ai. Then by event only switch a 'single' ai command and test that. First though making sure, what one could expect to happen with the master german ai does in fact happen. A generic german ai that nicely attacks everyone you want and then carefully add 'inhibitors' to get to the historical behavior desired.

Some of these ai settings do not require so much switching and can easily muddle up. In other words put 'everything' in the first loaded ai. Then only 'switch' one ai command per event and at a specific time until confirmed and then add in another.

I hope my long-winded discourse will help.
 
OK, I've done some extensive revisions to the AI. Try this out.

http://www.esnips.com/doc/afe40e5d-5f9a-495b-b729-ef501ba91d36/070526-AI-Update

or go to http://www.esnips.com/web/HoI2-Province and select "070526 AI Update.rar"

The opening months AI is set up like this:

1) Pre-mobilization.

2) After the assassination of the Archduke, everyone goes to their 1914 war AI. Notably, Germany starts to mass along the Belgian border.

3) If Germany uses the Schlieffen plan, they receive a significant bonus in the opening days of the war and focus on Belgium. France will focus on Alcase-Lorraine and will NOT defend Belgium - the basic framework of Plan XVII. The Russo-German front will be inactive for 40 days.

4) After Germany takes Liege and two western or central Belgian provinces, or Liege and Reims, the French will abandon Plan XVII and will try to secure the Western Front.

5) If the Schlieffen plan fails, Germany will shift troops to the Eastern Front and will try to continue the offensive, albeit at a slower pace and with bonuses removed. This is also the AI the Germans will use if they decide to not use the Schlieffen plan and focus on Russia at the beginning of the war.

6) Winter AI will set in November, increasing passivity for all nations.

Only a few hangups.

- Sometimes the Germans take a lot of time securing the Belgian territories east of the Meuse and setting up an attack on Antwerp. Once they attack Antwerp, however, the floodgates open and they are storming into northern France.

- I'm not sure if the Western Front will be stable with a human-controlled Russian AI. The Germans probably won't have enough troops to quickly attack Belgium, or it will be too lightly defended to prevent a human player from rolling into Berlin. Someone might playtest this.

- South Africa is still a disaster. The British refuse to knockout the Sudwestafrika division. I really didn't focus on the British AI this time around.

- I might need to tweak the Russo-German front AI some more after October, 1914.

Otherwise, I'm quite happy with the AI. I had a revelation about garrison/front interface that solved most of my problems. :)

BTW, this .rar packet also removes the lock_division ships from the German event string. This should fix people's issues with savegames.
 
Excellent news.

Have we just laid the big bad AI bogeyman to rest?

Indeed, have we just bludgeoned him into the ground and left his blood-splattered remains strewn around us with this single, outstanding development?
 
Allenby said:
Excellent news.

Have we just laid the big bad AI bogeyman to rest?

Indeed, have we just bludgeoned him into the ground and left his blood-splattered remains strewn around us with this single, outstanding development?

I offer a resounding "perhaps". I think it mostly does work, but I need reports from people to fine-tune it all. :)

As mentioned, British AI is still not functioning properly. Also, no one's created an American Expeditionary Force AI.
 
Last edited:
The same crude methods of getting the BEF and AEF to appear in France ought to be used as in TGW - frequent events deploying divisions near the scene of battle. The only problem is that they often mysteriously become part of the French Army and not just expeditionary forces.

We could have an AI event that deletes the South African divisions at the outbreak of war and deploys identical ones in the Cape, so that they are immediately ready to invade Sudwestafrika (and deal with the Boer rebellion).