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

DesertSnow

Colonel
52 Badges
Oct 10, 2007
1.108
16
  • Hearts of Iron II: Armageddon
  • Stellaris - Path to Destruction bundle
  • Pillars of Eternity
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • March of the Eagles
  • Magicka
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II
  • Arsenal of Democracy
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Shadowrun: Hong Kong
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Imperator: Rome
  • Tyranny - Bastards Wound
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • 500k Club
  • Warlock 2: The Exiled
  • Victoria 2
  • Europa Universalis III Complete
I want to make an event, where certain parameters determine which of the event options are available to a player. Is this possible?

Also, can i create an event where the possibility that the AI will choose the A or the B choice is dependent on certain factors (e.g. a "loot province" event, where the culture/religion of the occupied province determines the choice?
 
I want to make an event, where certain parameters determine which of the event options are available to a player. Is this possible?

Not really, you generally have to make separate events with different triggers - for example these ones for over/under a population mark:

Code:
province_event = 
          id = ####1

          trigger = {
          NOT = { population = 10 }
}
etc etc...

province_event = 
          id = ####2

          trigger = {
          population = 10
}
etc etc...

In general I would say just copy/paste the event, and change the id = #, trigger, maybe desc, and option to whatever you like.

Also, can i create an event where the possibility that the AI will choose the A or the B choice is dependent on certain factors (e.g. a "loot province" event, where the culture/religion of the occupied province determines the choice?

Yes, the same types of modifiers that are used for MTTH can be used for ai_chance, like this:

Code:
option = { [I][COLOR=Red]###option 1###[/COLOR][/I]

ai_chance = {
         factor = 50
                     modifier = {
                           factor = 1.5 [I][COLOR=Red]###150% - 150% of 50% = 75###[/COLOR][/I]
                           has_province_flag = looted_province [I][COLOR=Red]###or "has_province_modifier = looted" or whatnot###[/COLOR][/I]
                    }
}

option = { [I][COLOR=Red]###option 2###[/COLOR][/I]

ai_chance = {
         factor = 50
                     modifier = {
                           factor = 0.5 [I][COLOR=Red]###50% - 50% of 50% = 25###[/COLOR][/I]
                           NOT = { has_province_flag = looted_province } [I][COLOR=Red]###or "has_province_modifier = looted" or whatnot###[/COLOR][/I]
                    }

Hope this helps.
Regards,
Bc
 
Last edited:
DesertSnow said:
Thanks again, i really appreciate your help.
Not a problem, feel free to PM me anything you have questions on, and I'll answer as quickly as I can.
 
TheLand said:
@Battlecry: Do those modifiers also work on random and/or random_list?
It's not mentioned in any of the EU3 documentation, but I suppose it could be. Easy enough to test...just set an event with a simple trigger (ai = no, 1 day MTTH), set a modifier like tag = ___ (whatever country you choose) on the random_list and see if the percentages change. It'd be awfully useful if it did work.