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

unmerged(197405)

Recruit
1 Badges
Mar 1, 2010
7
0
  • Crusader Kings II
So i wanted to add building that will be only possible in province Poznanskie/with title Duchy of Greater Poland - my local patriotism
But AI 0 or -300 still build it some times. I have no idea about programing so help me plz!
No other mods in building files.
 
Last edited:

Arko

Red zone
45 Badges
Jul 1, 2009
7.087
1.123
  • Europa Universalis IV
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II
  • Crusader Kings III
  • Deus Vult
  • Cities: Skylines
  • Magicka
not sure you can tide a building to a title/province. valid for culture tough.
 

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
905
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
I'm pretty sure you can lock to a certain province/title. But I don't have the files at home so I can't check. Post the requirements of any of the other special buildings here and I can probably figure it out fro that.
 

zakzak

First Lieutenant
112 Badges
Nov 29, 2009
207
20
  • Sword of the Stars II
  • Europa Universalis III Complete
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Heir to the Throne
  • Crusader Kings II: Monks and Mystics
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Crusader Kings II: Reapers Due
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Knights of Honor
  • Europa Universalis IV: Mare Nostrum
  • Commander: Conquest of the Americas
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III
  • Divine Wind
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
Have you tried primary title = d_?
For the specific Provence i do not think things work that way. You could add a building that costs so much money no one will ever be able to build it and make it a upgrade from that. And give it to that Provence only.
 

GAGA Extrem

Per Ardua Ad Astra
External QA
121 Badges
Mar 19, 2004
11.469
4.988
  • Semper Fi
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Hearts of Iron III
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Hearts of Iron IV: No Step Back
  • Darkest Hour
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • A Game of Dwarves
  • Dungeonland
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
That might do the trick:
Code:
polish_propaganda = {

	potential = {
		or = {
			province = 429 #- Gnieznienskie
			province = 430 #- Lubusz
			province = 431 #- Poznanskie
			province = 432 #- Kaliskie
		}
		FROM = { title = d_greater_poland }
	}
	
	build_cost = 50
	build_time = 50
	
	tax_income = 3 #Replace by desired building effects
	
	ai_creation_factor = 100
		start = {
	}
}
 

GAGA Extrem

Per Ardua Ad Astra
External QA
121 Badges
Mar 19, 2004
11.469
4.988
  • Semper Fi
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Hearts of Iron III
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Hearts of Iron IV: No Step Back
  • Darkest Hour
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • A Game of Dwarves
  • Dungeonland
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
It seems that province checks are not allowed on building scope. :(

edit:
nope, can't get it to work. And time is short.
Someone else has to take over... >_<
 
Last edited:

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
905
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
That might do the trick:
Code:
polish_propaganda = {

	potential = {
		or = {
			province = 429 #- Gnieznienskie
			province = 430 #- Lubusz
			province = 431 #- Poznanskie
			province = 432 #- Kaliskie
		}
		FROM = { title = d_greater_poland }
	}
	
	build_cost = 50
	build_time = 50
	
	tax_income = 3 #Replace by desired building effects
	
	ai_creation_factor = 100
		start = {
	}
}

The buildings are not in a province scope but the barony title scope. So you need a location = {} around that or case. And instead of FROM = { title = d_greater_poland } try duchy = { title = d_greater_poland }.
 
Last edited:

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
905
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Code:
polish_propaganda = {

	potential = {
		location = {
			OR = {
				province = 429 #- Gnieznienskie
				province = 430 #- Lubusz
				province = 431 #- Poznanskie
				province = 432 #- Kaliskie
			}
		}
		duchy = { title = d_greater_poland }
	}
[...]