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

Banksy

Corporal
58 Badges
Mar 31, 2010
31
0
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Iron Cross
  • Hearts of Iron III
  • For the Motherland
  • Darkest Hour
  • Arsenal of Democracy
  • Europa Universalis IV: Mandate of Heaven
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Expansion Pass
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Federations
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Stellaris: Apocalypse
  • Europa Universalis IV: El Dorado
  • Stellaris: Nemesis
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Call to arms event
  • Crusader Kings III: Royal Edition
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Crusader Kings III
  • Supreme Ruler: Cold War
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Naval War: Arctic Circle
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
I've been completely re-doing the economy and i came to a stump since i cant get the AI to build the new building placed in AoD (any ideas about this?). So i wanted to make an event that would put them in the AIs build list when they started to have economic troubles like say under 1000 energy. I cant get this to trigger so any help would be appreciated.

event = {
id = 19200021
random = no
style = 0
offset = 3
trigger = {
ai = yes
rare_materials >= 1000

}

date = { day = 25 month = may year = 1937 }
deathdate = { day = 30 month = december year = 1999 }

name = "AI_EVENT"

action_a = {
command = { type = construct which = synthetic_rares where = -1 value = 4 }
command = { type = construct which = synthetic_rares where = -1 value = 4 }


}

}

Also as a side note can the AI mange the new bars like nuclear power funding and military budget?
 
Ah i see well i have a lot of them to write then thanks for your help. Now to figure out how to stop my Germany form spending all its oil. Maybe something similar to this....
 
You could make the event a random event, which would affect all countries. Just dont know how to adjust the randomness.

event = {
id = 9991050
random = yes
trigger = {
ai = yes #will only trigger for ai
NOT = { rare_materials = 1000 }
technology = 5290 #Only countries with Synthetic rare tech can build it.
}
name = "Low Rares"
desc = "We got the synthetics"
picture = "comander_assasinated"
style = 0

action_a = {
name = "ACTIONNAME1050A"
command = { type = construct which = synthetic_rares where = -1 value = 4 }
command = { type = construct which = synthetic_rares where = -1 value = 4 }
}
}

These commands wont put it into the production screen, but will automatically build it onto the map.

Also I found a command below, but it might conflict with the rare_materials = 1000 trigger since both might need to be active. Havent played with it yet.

random = 50 # 50% chance every 30 days
 
Having a similar problem with the synthetics.

Following will not work. Only return 0% and no change.
Code:
command = { type = building_prod_mod which = synthetic_oil = 10 }

This is also happening with rares.

Any ideas?
 
You forgot to put ( value ) in the command line. If you use 50 like in the example below. You'll reduce the build time by 50%.


command = { type = building_prod_mod which = synthetic_oil value = 50 } # Bonus to production time. Additive. NOTE: Positive value = reduced time.
 
Might as well ask here.

Would the sleep event command prevent an event (which is triggered by command, ex. US Spanish Civil War - German Intervention) from being triggered?
 
You don't have to have a "country = XXX". Left how it is the event will fire for any country meeting the trigger conditions, but it will only fire once. You need to put a "persistent = yes" in there and it will fire for any country meeting the conditions. Maybe set a flag and have that flag in the trigger conditions so it only fires once per country. Works much better than random, since random events only fire for majors.

Here is an event I made out of a set for realeasing puppets as an example

Code:
event = { 
	id = 12000111
	trigger = { 
	NOT = { exists = AFG }
	NOT = { local_flag = AFGInd }
        ai = yes
        control = { province = 1486 data = -1 }
		NOT = {
			country = uA4
			country = UIR
			country = UPE
		}
	}
	random = no
        persistent = yes
	name = "AI_EVENT"
	desc = "AI_EVENT"
       picture = "Uprising"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 14
	deathdate = { day = 29 month = december year = 1999 }
	
	action_a = { 
		ai_chance = 75
		name = "Keep these lands" 
		command = { type = local_setflag which = AFGIND }
		command = { type = dissent value = 5 }
		command = { type = belligerence value = 10 }
	}
	action_b = { 
		ai_chance = 5
		name = "Make Independent" 
		command = { type = independence which = AFG value = 0 }
		command = { type = belligerence value = -5 }
		command = { type = set_relation which = AFG value = 180 }
		command = { type = vp value = 10 }
	}
	action_c = { 
		ai_chance = 20
		name = "Make Puppet" 
		command = { type = independence which = AFG }
		command = { type = dissent value = 2 }
		command = { type = alliance which = AFG }
		command = { type = local_setflag which = puppetAFG }
		command = { type = set_relation which = AFG value = 200 }
	}
}

They fire any time a new country takes the province...work great IMO.
 
Hey elryacko, I just did a test where I put part of a event chain to sleep. I can still manually trigger it from the command line. But it does prevent an event from being triggered by the command = { type = trigger which = 97701 }
 
elryacko, if you look in your Arsenal of Democracy/db/events folder. You'll find a file called "event commands.txt". Inside is a list and description of the event commands.