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

Tormentor

Captain
78 Badges
Jun 6, 2004
463
1
www.danielepiergiovanni.com
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Tyranny - Bastards Wound
  • Tyranny - Tales from the Tiers
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron 4: Arms Against Tyranny
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • Europa Universalis IV: Rights of Man
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Crusader Kings II: Sword of Islam
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Darkest Hour
  • Hearts of Iron III Collection
I need some help with ai scripting. I read the Ai Files Modifiers.txt guide but there's something i don't understand.
I wrote this in FRA_Poland.ai (It's just a test)

Code:
garrison = {	
	province_priorities = {
		102  = -1   #Sedan
		96  = -1   #Longwy
}
         area_multiplier = {
		102  = 0   #Sedan
		96  = 0   #Longwy
	}
}

But when GER declare war against the Allies, France puts 9 divisions in Sedan and Longwy.

Province_priorities is set to -1... and area_multiplier to 0. In the Ai Files Modifiers.txt i read "If an area contains a specific province, multiply the basic need by value " This means that if Sedan needs 9 divisions in order to defend this province from enemy attacks, it will be multiplied by 0. So it should be 0 and I shouldn't see any division there. Am i wrong? Did I miss something? Can you tell me what should I write so that french ai doesn't deploy any divisions in Sedan and Longwy?
 
There's probably an AI file switch that overwrites your settings.

mmh i don't think so =\

the FRA_Poland.ai file is loaded in this ai event
Code:
################
# Poland Invasion AI
#############################################
event = {
	id = 3002001
	random = no 
	country = FRA
	
	trigger = {
		ai = yes
		event = 2003036 # Danzig or War AI
		war = { country = POL country = GER }
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = september year = 1939 }
	offset = 1

	action_a = {
		command = { type = ai which = "switch/FRA_Poland.ai" }
		command = { type = ai which = "Air_Strategic.ai" }
	}
}
###############

and the FRA_Poland.ai is

Code:
###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
	home_peace_cap 		= 100
	overseas_multiplier 	= 0.0

	province_priorities = {
		51  = 100  #Dunkerque
		52  = 100  #Lille
		102  = -1   #Sedan
		96  = -1   #Longwy
		103  = 50   #Hirson
		107  = 100  #Strassbourg
		104  = 100  #Metz
		105  = 50  #Colma
		90  = 50  #Grenoble
		87  = 50  #Nice

		# Africa
		747  = 5  #Tunis
		727  = -1  #Algiers
		729  = -1  #Oran
		717  = -1  #Casablanca
		978  = -1  #Dakar
		
		# Middle East
		1019  = -1  #Beirut
		
		# Asia
		1393  = -1 #Hanoi
		1399  = -1  #Saigon
	}
	area_multiplier = {
		51  = 5  #Dunkerque
		52  = 5  #Lille
		102  = 0   #Sedan
		96  = 0   #Longwy
		103  = 0   #Hirson
		107  = 5  #Strassbourg
		104  = 5  #Metz
		105  = 1  #Colma
		90  = 1  #Grenoble
		87  = 1  #Nice
	}
}
front = { 
	distrib_vs_ai 		= offensive
	distrib_vs_human 	= reactive

   	enemy_handicap = {
		GER = 120
	} 
   	passivity = {
		GER = 10
	}
	province_priorities = {
		#Maginot Line
		105  = 0.30  #Mulhouse
		107   = 0.30  #Metz
	}
} 
####

I think I didn't understand correctly how area_multiplier works... I'll make more tests...