• 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(28537)

Captain
Apr 30, 2004
320
0
The opium trade event fires repeatedly on a fairly regular basis and despite using the persistant and random commands in my similar events they only ever seem to fire once :(
How do I get an event to fire say 2 or 3 times a year on average either randomly or otherwise without writing about a million events ?
edit : sorry this was supposed to be in the user made mods section :eek:o
 

Darkrenown

Star marshal
142 Badges
Jan 8, 2002
24.761
16.975
no
  • Leviathan: Warships
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Impire
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis IV: Wealth of Nations
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sunset Invasion
  • Ancient Space
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • East India Company
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
I'm not sure if anyone but Johan is sure about how persistent = yes works, but I believe a persistent event will only fire again if the trigger goes away and returns. So if the trigger is exists = eng it'll only fire once, but if it was war between UK and France, it's fire every time the UK and FRA went to war.

The opium trade even uses random = 2 to fire every once in a while, so you may want to use persistent = yes, offset = 30 and random = 25 to make it fire fairly often.
 

unmerged(19936)

Canadian Bacon
Sep 22, 2003
1.518
0
www.homestarrunner.com
Darkrenown said:
I'm not sure if anyone but Johan is sure about how persistent = yes works, but I believe a persistent event will only fire again if the trigger goes away and returns. So if the trigger is exists = eng it'll only fire once, but if it was war between UK and France, it's fire every time the UK and FRA went to war.

The opium trade even uses random = 2 to fire every once in a while, so you may want to use persistent = yes, offset = 30 and random = 25 to make it fire fairly often.

You sound like you know what you're doing.
 

unmerged(28537)

Captain
Apr 30, 2004
320
0
thanks Darkrenown for suggesting that - However I did try it and it only seems to work at the beggining still which is really odd because I practically copying the opium trade to the letter - any ideas on how often it should fire if I set it to what you suggested?
 

Darkrenown

Star marshal
142 Badges
Jan 8, 2002
24.761
16.975
no
  • Leviathan: Warships
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Impire
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis IV: Wealth of Nations
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sunset Invasion
  • Ancient Space
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • East India Company
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
Troggle said:
You sound like you know what you're doing.

I've never even played Victoria, I'm just a very persuasive liar" :D

Nah, sometimes persistent event just won't fire again and I have no idea why, they also don't like to be fired to often :confused:
 

unmerged(28537)

Captain
Apr 30, 2004
320
0
#Direct trade with India###############
event = {
Id = 167607
random = no
persistent = yes
country = Eng

picture = defualt

trigger = {
random = 25
exists = IND }
}
}

name = "Direct trade with india"
desc = "India often bought and sold goods direct with Britain"
style = 0

date = { day = 2 month = january year = 1836 }
offset = 31
deathdate = { day = 30 month = december year = 1920 }
action_a = {
Name = "Buy goods"
command = { type = resource which = tea value = 4 }
command = { type = resource which = dye value = 5 }
command = { type = resource which = steel value = -1 }
command = { type = resource which = iron value = -1 }
command = { type = resource which = regular_clothes value = -1 }
command = { type = trigger which = 957603 }
}
action_b = {
Name = "don't buy goods"
command = { }
}
}

####Direct trade with Britain
event = {
id = 957603
random = no
persistent = yes
country = IND


name = "Direct trade with Britain"
desc = "Britian often bought and sold goods direct with British India "
style = 0

#triggered by 157603

action_a = {
Name = "Trade with Britain"
command = { type = resource which = tea value = -4 }
command = { type = resource which = dye value = -5 }
command = { type = resource which = iron value = 1 }
command = { type = resource which = steel value = 1 }
command = { type = resource which = regular_clothes value = 1 }

}
}
I just wanted a fairly regular direct simulation of trade between Britian and british India - is that really too much to ask?
 

Nightcap

Colonel
41 Badges
Oct 6, 2003
849
190
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Naval War: Arctic Circle
  • BATTLETECH
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH: Flashpoint
  • Prison Architect
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Europa Universalis III
  • 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
  • Diplomacy
  • Crusader Kings II
  • Europa Universalis III: Chronicles
  • 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
  • Heir to the Throne
  • Magicka
Darkrenown said:
The opium trade even uses random = 2 to fire every once in a while, so you may want to use persistent = yes, offset = 30 and random = 25 to make it fire fairly often.

I've been studying the "Opium Trade" event in an attempt to see how persistent = yes works

One way for the event "Opium Trade" (12500) way for it to fire is by the random = 2 offset = 31 in the event itself.

Another way is a chain which fires it. This starts with event 6940 "Murder at Guangzhou". Assuming all the steps in the chain are triggered this results in command = { type=trigger which=12500 } in event "The Treaties of Beijing" (12516). That is the only explicit trigger for the "Opium Trade" event 12500

The final chain that effects event 12500 is the one started on 10th Dec 1838 by event 12501 "Lin Zexu". If you tell him to eliminate the trade then this starts a chain that ends with "China threatens British merchants in Guangzhou" (6939). This event contains command = { type = event_chance which = 12500 value = 100 } if option_a is chosen. This makes event 12500 fire automatically the next time it is checked.

If a different option is chosen, event for 12501, it results in an event similar to 12500 firing but actually isn't (event 12502 "High Commissioner Corrupted!" gives the same message to the UK though and has the same effects).

So there is one event chain that causes the event to fire once and only once. This means that any firings other than that must be because of the random trigger.

However if event 12500 is altered to random = 100 offest = 31 is fired once but never again in the next 12 months. Same for random = 50 and random = 25 and random = 12

Therefore if random > 12 then persistent = yes does not seem to fire an event several times.
 

unmerged(28537)

Captain
Apr 30, 2004
320
0
thanks a lot. :) that might explain why it never works how I intend it to - so have you tested with 11 to see if that fires more than once?
 

Nightcap

Colonel
41 Badges
Oct 6, 2003
849
190
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Naval War: Arctic Circle
  • BATTLETECH
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH: Flashpoint
  • Prison Architect
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Europa Universalis III
  • 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
  • Diplomacy
  • Crusader Kings II
  • Europa Universalis III: Chronicles
  • 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
  • Heir to the Throne
  • Magicka
Nope. I could keep halving the random = X but each run take a while. 12 is meant to fire on average 1.44 month a year if being tested every month so in multiple passes you can expect to get it twice a year on occasion, but I have never seen it.

I have also tested keeping random =2 and changed offset = 1. This should mean that it fires on average 7 times a year. But I have never seen it fire more than once.

Has anyone ever seen "Opium Trade" fire more than twice for China? I haven't.

My theory is that persistent = yes allows opium war to fire once for the triggered event and once due to random.
 

unmerged(28537)

Captain
Apr 30, 2004
320
0
I swear I have seen it(the opium trade) at least 4 times in a game but I havn't seriously tested it so i don't know. for my event(trade 1 above) I guess I will make it dependant upon both britian and india being at peace that time it should fire everytime either 1 of them finishes a war.....
 

Memnon

Czar of Texas
4 Badges
Jan 2, 2004
3.385
200
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Victoria 3 Sign Up
Nightcap said:
Has anyone ever seen "Opium Trade" fire more than twice for China? I haven't.

My theory is that persistent = yes allows opium war to fire once for the triggered event and once due to random.
Er..., sorry Nightcap, but I see the event fire an average of five times over the course of a GC, I'd wager.
 

Memnon

Czar of Texas
4 Badges
Jan 2, 2004
3.385
200
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Victoria 3 Sign Up
Nightcap said:
I've only played China twice which is why I was asking.
Well, that's the thing--I've only played China once, but i have my popups set to let me know of the events other countries have, so I get the popups for Opium Trade, and I see them several times a game.
 

Nightcap

Colonel
41 Badges
Oct 6, 2003
849
190
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Naval War: Arctic Circle
  • BATTLETECH
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH: Flashpoint
  • Prison Architect
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Europa Universalis III
  • 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
  • Diplomacy
  • Crusader Kings II
  • Europa Universalis III: Chronicles
  • 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
  • Heir to the Throne
  • Magicka
Memnon said:
Well, that's the thing--I've only played China once, but i have my popups set to let me know of the events other countries have, so I get the popups for Opium Trade, and I see them several times a game.

Fair enough, I recently clean installed Vicky and got rid of all my old games so I can't check in my save game logs.

My point really was that there does not seem to be a way to get a random event to fire several times at a frequency greater than that of "Opium Wars".
In fact China is the only country that has events triggered multiple times by random and altering them seems to break it.
 
Last edited:

unmerged(28537)

Captain
Apr 30, 2004
320
0
it's really wierd that it appears to be the only one that works maybe it's hard coded - I wonder if I could have my event triggered by the opium trade
 

Nightcap

Colonel
41 Badges
Oct 6, 2003
849
190
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Naval War: Arctic Circle
  • BATTLETECH
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH: Flashpoint
  • Prison Architect
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Europa Universalis III
  • 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
  • Diplomacy
  • Crusader Kings II
  • Europa Universalis III: Chronicles
  • 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
  • Heir to the Throne
  • Magicka
The great brit said:
it's really wierd that it appears to be the only one that works maybe it's hard coded - I wonder if I could have my event triggered by the opium trade

I've edited my post there is another random persistent event for "China Self-Strengthening Modernizations" (12526). No other country has one though.
 

unmerged(32382)

Sergeant
Jul 24, 2004
70
0
i think you may del the persistent line
event = {
id = 12500
random = no
persistent = yes country = CHI

picture = opiumwar

trigger = {
random = 2
NOT = { flag = { name = flg_Opium_Stop value = 1 } }
}

name = "EVT_6938_NAME"
desc = "EVT_12500_DESC"
style = 0

date = { day = 2 month = january year = 1836 }
offset = 31
deathdate = { day = 30 month = december year = 1920 }

action_a = {
name = "ACTIONNAME12500A" # The British are at Fault here
command = { type = gain_building which = -1 value = immoral_business }
command = { type = treasury value = -500 }
command = { type = relation which = ENG value = -50 }
command = { type = trigger which = 6938 } # ENG
}
}
 

unmerged(32382)

Sergeant
Jul 24, 2004
70
0
Darkrenown said:
If you remove persistent = yes the it'll only fire once.

And I did say persistent = yes acted weird :D
i notice that once you quit and save your game and load it again,the "random=2" will be calculated again.I mean if random=100,you may see it happens the monent you start the game,but will not happen the next several years.However once you quit, save and load it again,this will immediately happen.
I don't konw whether i made myself clear.