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

lucaluca

Exotic traveler
48 Badges
Dec 7, 2003
4.149
337
Visit site
  • Europa Universalis IV: Cossacks
  • Rome: Vae Victis
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Victoria 2: Heart of Darkness
  • Cities: Skylines - Mass Transit
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Sign Up
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Victoria 2
  • Victoria 2: A House Divided
I'm trying to create a few events for the mod Magna Terra. First i'd like to modify this event
Code:
country_event = {

	id = 1053

	trigger = {
		TAG = PAR
		ruler = {
			military = 0 
		}
		NOT = { has_country_flag = parthian_horde }
		any_neighbor_country = {
			has_country_flag = parthian_nation
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	title = "EVTNAME1053"
	desc = "EVTDESC1053"


	immediate = {
		set_country_flag = parthian_horde
	}

	option = {
		name = "EVTOPTA1053"
		ruler = {
			horse_archers = THIS
			horse_archers = THIS
			horse_archers = THIS
			horse_archers = THIS
			cavalry = THIS
			cavalry = THIS
			cavalry = THIS
			cavalry = THIS
			heavy_infantry = THIS
			heavy_infantry = THIS
			heavy_infantry = THIS
			heavy_infantry = THIS
			archers = THIS
			archers = THIS
			archers = THIS
			archers = THIS
		}
	}
}
so that it doesn't happen before the year 604. I was thinking of adding in the trigger 'year = 604'. Is this correct and will this make the event happen only in the year 604 or from 604 onward?

I was also wondering whether there is a list of all the event ids used and if there is a way to launch events from the keyboard during the game.

Thanks in advance;)
 
so that it doesn't happen before the year 604. I was thinking of adding in the trigger 'year = 604'. Is this correct and will this make the event happen only in the year 604 or from 604 onward?

Have a look in events/flavor.txt. For the Pyrhss event it has:

Code:
	trigger = {
		tag = EPI
		exists = MAG
		war_with = ROM
		[B]NOT = { year = 480 }[/B]
		NOT = { has_country_flag = pyrrhus_ftw }
	}

I was also wondering whether there is a list of all the event ids used and if there is a way to launch events from the keyboard during the game.

I dont think so regarding the events id listing. Try "alt+21" or "alt 21" to trigger a "console". Then I think you can just type "event = XXXXXX".
 
Have a look in events/flavor.txt. For the Pyrhss event it has:

Code:
	trigger = {
		tag = EPI
		exists = MAG
		war_with = ROM
		[B]NOT = { year = 480 }[/B]
		NOT = { has_country_flag = pyrrhus_ftw }
	}



I dont think so regarding the events id listing. Try "alt+21" or "alt 21" to trigger a "console". Then I think you can just type "event = XXXXXX".

fast response, thanks;)
 
so that it doesn't happen before the year 604. I was thinking of adding in the trigger 'year = 604'. Is this correct and will this make the event happen only in the year 604 or from 604 onward?
From 604 onward. If you want it to only trigger in 604 and no later, you'll have to use a combination of year = 604 and NOT = { year = 605 }.

There is no definitive list of events in the game, no. It would be good to have one...
 
Wow, my mod is spreading to other threads :D
Really guys, thanks for the help.

I'm thinking in some events for the chinese nations, like the wall of china (may increase defensiveness?), but I have too much to do :(
 
It's very easy to create a list of used event ids. But it is useless to do this for the vanilla events, since you already know, that Paradox uses the ids from 1 - 10.000.

Nonetheless I could post a list of used ids in Vanilla 2.2 ... (more correct: a link to a list).

edit: to be clear: a list of event ids is easy. A list of event ids with at least the titles of the events, would need a little bit programming, but is also easy. A list of event ids with a good summarization would be a lot of work.
 
It's very easy to create a list of used event ids. But it is useless to do this for the vanilla events, since you already know, that Paradox uses the ids from 1 - 10.000.

Nonetheless I could post a list of used ids in Vanilla 2.2 ... (more correct: a link to a list).

edit: to be clear: a list of event ids is easy. A list of event ids with at least the titles of the events, would need a little bit programming, but is also easy. A list of event ids with a good summarization would be a lot of work.

are the ids used 1 to 10,000 also in version 2.2? I just wanted to know which ids are used so to minimize the possibility of repeating them for new events
 
From 604 onward. If you want it to only trigger in 604 and no later, you'll have to use a combination of year = 604 and NOT = { year = 605 }.

There is no definitive list of events in the game, no. It would be good to have one...

ok thanks.;)

Wow, my mod is spreading to other threads :D
Really guys, thanks for the help.

I'm thinking in some events for the chinese nations, like the wall of china (may increase defensiveness?), but I have too much to do :(

I'm just modifiying slightly for now... I changed Maurya to buddhist, made south India a different culture group, reduced Maurya population, and make Maurya's province pop splits 10.10.80. Then i'll add splinter events for the small Indian nations (ala Sophene, Corduene etc. in the Seleucid empire), make the parthian and bactrian indipendence likely to happen from 515 and 504 onward, but the parthian horde event only from 577 onward (Parthia was defeated by the Seleucids at first). I'll also modify the province histories in Central Asia and Iran slightly;)
 
are the ids used 1 to 10,000 also in version 2.2? I just wanted to know which ids are used so to minimize the possibility of repeating them for new events

Simply consider the ids from 1 to 10.000 as reserved for Paradox - unless you want to override some of the events in your mod. There are 999.999 - 10.000 = 989.999 ids left for your events.
 
I'd like to know whether this event looks correct, doesn't seem to fire...
Code:
# Greco-Bactria
country_event = {

	id = 10199

	trigger = {
		not = { exists = GBK }
		not = { has_country_flag = bactrian_nation }
		owns = 279		# Bactriana
		owns = 280		# Oxiana
		owns = 281		# Transoxiana
		owns = 282		# Sogdiana
		owns = 283		# Paraetacene
		owns = 284		# Fergana
		owns = 285		# Drepsiani

		or = {
			or = {
				279 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				280 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				285 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
			}
		}
	}

	mean_time_to_happen = {
	
		months = 360

		modifier = {
			factor = 0.9
			ruler = { military = 4 }
		}
		modifier = {
			factor = 0.9
			ruler = { military = 3 }
		}
		modifier = {
			factor = 0.9
			ruler = { military = 2 }
		}
		modifier = {
			factor = 0.9
			ruler = { military = 1 }
		}
		modifier = {
			factor = 0.9
			not = { stability = -1 }
		}
		modifier = {
			factor = 0.9
			not = { stability = -2 }
		}
		modifier = {
			factor = 0.6
			year = 504
		}
		modifier = {
			factor = 0.6
			year = 654
		}
		modifier = {
			factor = 0.6
			year = 704
		}
		modifier = {
			factor = 1.2
			stability = 3
		}
		modifier = {
			factor = 1.2
			stability = 2
		}
		modifier = {
			factor = 0.9
			has_civil_war = yes
		}
	}

	title = "EVTNAME10199"
	desc = "EVTDESC10199"

	option = {
		name = "EVTOPTA10199"	# I should have seen this coming
		GBK = {
			add_core = 279
			add_core = 280
			add_core = 281
			add_core = 282
			add_core = 283
			add_core = 284
			add_core = 285
			add_core = 278
                        add_core = 359
		}
		279 = { secede_province = GBK }
		280 = { secede_province = GBK }
		281 = { secede_province = GBK }
		282 = { secede_province = GBK }
		283 = { secede_province = GBK }
		284 = { secede_province = GBK }
		285 = { secede_province = GBK }
                278 = { secede_province = GBK }
                359 = { secede_province = GBK }
		stability = -1
		set_country_flag = bactrian_nation
	}
}

The 'owns' triggers mean the nation needs to own all of the provinces listes or just one of them?

Also I tried to fire events from the console with the command 'event = xxxxxx' but it doesn't recognize the event id, it reads 'id #0 doesn't exist', does anyone know what might be the reason?

Thanks in advance;)
 
Code:
# Greco-Bactria
country_event = {

	id = 10199

	trigger = {
		not = { exists = GBK }
		not = { has_country_flag = bactrian_nation }
		owns = 279		# Bactriana
		owns = 280		# Oxiana
		owns = 281		# Transoxiana
		owns = 282		# Sogdiana
		owns = 283		# Paraetacene
		owns = 284		# Fergana
		owns = 285		# Drepsiani
This part is all fine.

Code:
		or = {
			or = {
				279 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				280 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				285 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
			}
		}
	}
Woah! Lots of OR's and AND's. I find that using such a heavy combination of OR and AND is really hard to get working properly. Here's how I'd code it:

Code:
		or = {
			279 = {
				has_governor = yes
					governor_scope = {
						or = {
							not = { military = 2 }
							traits = maniac
							traits = incapable
							traits = dumb
							traits = foolish
							traits = coward
						}
					}
				}
			}
			280 = {
				has_governor = yes
					governor_scope = {
						or = {
							not = { military = 2 }
							traits = maniac
							traits = incapable
							traits = dumb
							traits = foolish
							traits = coward
						}
					}
				}
			}
			285 = {
				has_governor = yes
					governor_scope = {
						or = {
							not = { military = 2 }
							traits = maniac
							traits = incapable
							traits = dumb
							traits = foolish
							traits = coward
						}
					}
				}
			}
			279 = { has_governor = no }
			280 = { has_governor = no }
			285 = { has_governor = no }
		}
It just feels a bit neater that way, and I'm pretty confident it would work.

Regarding potential vs allow: as already stated, achieving the potential triggers means the decision (or law) will be visible to that country, whereas allow are the triggers that you see when you look at the "?" tooltip. Whenever I make a law or decision, I always make all of the triggers part of the allow section at first, just to test that they're all working. Anything I don't want displayed (eg "tag = X" or "government = Y") can then go into the potential section.
 
Code:
# Greco-Bactria
country_event = {

	id = 10199

	trigger = {
		not = { exists = GBK }
		not = { has_country_flag = bactrian_nation }
		owns = 279		# Bactriana
		owns = 280		# Oxiana
		owns = 281		# Transoxiana
		owns = 282		# Sogdiana
		owns = 283		# Paraetacene
		owns = 284		# Fergana
		owns = 285		# Drepsiani
This part is all fine.

Code:
		or = {
			or = {
				279 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				280 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				285 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
			}
		}
	}
Woah! Lots of OR's and AND's. I find that using such a heavy combination of OR and AND is really hard to get working properly. Here's how I'd code it:

Code:
		or = {
			279 = {
				has_governor = yes
					governor_scope = {
						or = {
							not = { military = 2 }
							traits = maniac
							traits = incapable
							traits = dumb
							traits = foolish
							traits = coward
						}
					}
				}
			}
			280 = {
				has_governor = yes
					governor_scope = {
						or = {
							not = { military = 2 }
							traits = maniac
							traits = incapable
							traits = dumb
							traits = foolish
							traits = coward
						}
					}
				}
			}
			285 = {
				has_governor = yes
					governor_scope = {
						or = {
							not = { military = 2 }
							traits = maniac
							traits = incapable
							traits = dumb
							traits = foolish
							traits = coward
						}
					}
				}
			}
			279 = { has_governor = no }
			280 = { has_governor = no }
			285 = { has_governor = no }
		}
It just feels a bit neater that way, and I'm pretty confident it would work.

Regarding potential vs allow: as already stated, achieving the potential triggers means the decision (or law) will be visible to that country, whereas allow are the triggers that you see when you look at the "?" tooltip. Whenever I make a law or decision, I always make all of the triggers part of the allow section at first, just to test that they're all working. Anything I don't want displayed (eg "tag = X" or "government = Y") can then go into the potential section.

thanks Cheextsa, but I actually copied that event from vanilla (the Parthia event), so you are indirectly criticizing Johan or Doomdark:D:p
Actually my version works, i've seen it fire in 475 AUC (and was shocked).

I made another very similar event:
Code:
country_event = {

	id = 1050

	trigger = {
		not = { exists = QPT }
		not = { has_country_flag = parthian_nation }
		owns = 276		# Astauene
		owns = 207		# Hyrcania
		owns = 208		# Parthia
		owns = 209		# Tabae
		owns = 277		# Traxiane
		or = {
			or = {
				207 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				208 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
				209 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
                                276 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
                                277 = {
					or = {
						has_governor = no
						and = {
							has_governor = yes
							governor_scope = {
								or = {
									not = { military = 2 }
									traits = maniac
									traits = incapable
									traits = dumb
									traits = foolish
									traits = coward
								}
							}
						}
					}
				}
			}
		}
	}

	mean_time_to_happen = {
	
		months = 360

		modifier = {
			factor = 0.9
			ruler = { military = 4 }
		}
		modifier = {
			factor = 0.9
			ruler = { military = 3 }
		}
		modifier = {
			factor = 0.9
			ruler = { military = 2 }
		}
		modifier = {
			factor = 0.9
			ruler = { military = 1 }
		}
		modifier = {
			factor = 0.9
			not = { stability = -1 }
		}
		modifier = {
			factor = 0.9
			not = { stability = -2 }
		}
		modifier = {
			factor = 0.6
			year = 515
		}
		modifier = {
			factor = 0.6
			year = 654
		}
		modifier = {
			factor = 0.6
			year = 704
		}
		modifier = {
			factor = 1.2
			stability = 3
		}
		modifier = {
			factor = 1.2
			stability = 2
		}
		modifier = {
			factor = 0.9
			has_civil_war = yes
		}
		modifier = {
			factor = 0.9
			war = yes
                }
		modifier = {
			factor = 0.3
			not = { capital_scope = { controlled_by = this }
                        }
                }
	}

	title = "EVTNAME1050"
	desc = "EVTDESC1050"

	option = {
		name = "EVTOPTA1050"					# I should have seen this coming
		276 = { secede_province = QPT }
		277 = { secede_province = QPT }
		207 = { secede_province = QPT }
		208 = { secede_province = QPT }
		209 = { secede_province = QPT }
		stability = -1
		set_country_flag = parthian_nation
	}
}

It fires from the console (don't know in-game yet). Since it would create a "Parthia" with noculture and noreligion and make the game freeze, then I added QPT (the Parthia region) and its revolt to the history folder, and made them greek. It creates Greek Parthia then. However, it still looks like the game crashes after 3 months... Maybe some characters are still noculture/noreligion?
Also I'm not sure about this:
Code:
modifier = {
			factor = 0.3
			not = { capital_scope = { controlled_by = this }
                        }
I want to make it so if the capital of the owner is occupied, the event will likely fire (Egypt conquered Antioch in the third Syrian war). If it works, I will remove the years trigger (too deterministic IMO).
 
I wasn't criticising, just speaking out of experience :D If anything, I was criticising my own inability to use OR and AND tags together properly.

As for the noculture Parthia, have you tried using the PAR tag rather than QPT?
 
I wasn't criticising, just speaking out of experience :D If anything, I was criticising my own inability to use OR and AND tags together properly.

As for the noculture Parthia, have you tried using the PAR tag rather than QPT?

that's the vanilla event... but since the dahae/parni are now in game, the historical events can be better represented (the satrap Andragoras revolted and couldn't defend against the Parni/Parthians who invaded).