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

General
Apr 5, 2001
1.848
0
Visit site
I have problems making triggered events work.

Ihave written a doomsday event that makes turns the HAB into the HEI (an iffy event based on the very historical possibility of a successful Imperial reform around 1520).

The HEI event works.

The event type needed to enforce the Eternal Peace (revocation of fief in case of a DoW) does not. In this case Brandenburg eschaest to the emperor for making war on Pommern.

It looks like this:
Code:
event = {
               id = 20001
               trigger = {
                                event = 20000   
                                AND = {  
                                             war = { country = BRA country = POM }     
                                             }
               random = no
               country = HEI
               name = "Revocation of fief"
               desc = "The margrave of Brandenburg has escheated his fief
               style = 1
               date = 1419
               deathdate = 1820
          
               action_a = { #OK "Ban the warmonger        
                                  command = { type = inherit which = BRA }
                                  }
               }
}
Is the syntax formally correct. I keep getting error messages about unknown lhs (} ?) in
comman = lines.

I have place the event in the HAB event file. Should it be placed in the HEI ? I get the error messages from the HAB file.

PS: Never through I would go intro programming when I skipped the Fortran-course back in 1975.
 
Last edited:

Havard

Dark Power
49 Badges
Jun 28, 2001
15.686
170
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Wealth of Nations
  • 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: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • 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
  • Cities: Skylines - After Dark
Code:
event = {
               id = 20001
               trigger = {
                                event = 20000   
                                AND = {  
                                             war = { country = BRA country = POM }     
                                             }
               [color=red]}[/color]
               random = no
               country = HEI
               name = "Revocation of fief"
               desc = "The margrave of Brandenburg has escheated his fief
               style = 1
               date = 1419
               deathdate = 1820
          
               action_a = { #OK "Ban the warmonger        
                                  command = { type = inherit which = BRA }
                                  }
               }
}

Try this. You was one } short.
 

unmerged(2695)

General
Apr 5, 2001
1.848
0
Visit site
Thx, Havard.
You're manual is a great help.

(In Norwegian, purely technical statement: For å stetta mi eiga nyfikne. Det er altså posisjonen til hakeparantesane på linja i høve til kvarandre som definerer det som står mellom dei som ei valid utsegn, utan omsyn til kva linje dei står på. Men, for ein lekmann, e-en i event fungerar som ein hakeparantes i høve til den som avsluttar den utsegna).


One question:

Is it possible to have recurring events ? The event triggered by the revocation of fief will be a two choice one: Add to core or grant independence as vassals.

As the AI has an extremely steep learning curve :) I assume that the members of the HRE will go to war again.

Will this event work a second time if I extend the time-frame ?

(In the HEI event I'm working the HAB becomes HEI, diploannexes most of the HRE members (as well as the Papacy and the Orders Militant) and vassalizes the rest.

My goal is basically to create a mechanism in the game that does not allow for the HRE to break up until mid-game (i.e. after a game "Westphalia").

Another question:

Can I place events in any db/events file ?
 
Last edited:

Havard

Dark Power
49 Badges
Jun 28, 2001
15.686
170
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Wealth of Nations
  • 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: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • 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
  • Cities: Skylines - After Dark
Originally posted by Hardu
Thx, Havard.
You'rre manual is a great help.

To see if I understand it correctly: The trigger statement must be enclosed in { } ?
Yep.

One question:

Is it possible to have recurring events ? The event triggered by the revocation of fief will be a two choice one: Add to core or grant independence as vassals.

As the AI has an extremely steep learning curve :) I assume the members of the HRE will go to war again. Will this event work a second time if I extend the time-frame ?
Nope. They will not, unfortunately. Recurring events are on the event wish-list...


(In the HEI event I'm working the HAB becomes HEI, diploannexes most of the HRE members (as well as the Papacy and the Orders Militant) and vassalizes the rest.

My goal is basically to create a mechanism in the game that does not allow for the HRE to break up until mid-game (i.e. after a game "Westphalia").

Another question:

Can I place events in any db/events file ?
Yep.
 

hilal

Captain
20 Badges
Jul 31, 2001
349
0
www.poderdapalavra.com.br
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Rome Gold
  • Hearts of Iron III Collection
  • Europa Universalis IV
  • Cities in Motion
  • East India Company
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
A related question:

If I have a event triggered by owning a province, it will happen only one time until expire date, or it will happen each time the province changes hands?

If the first is true, how I can produce one event the happens all time the province change hands?

My primary target is to produce an event - "The Two Holly Cities Guardian" that gives some advantages to a country that control Mekkah, if it is Muslim, off course.
 

unmerged(2695)

General
Apr 5, 2001
1.848
0
Visit site
I rewrote the event. As I have to play Branburg just to test the mechanism (DoW in Pommern) I have not yet seen it happen. It may have happened once playing off-hand because the game crashed at the date it should have hit in.

Must test triggered events using less fatal event type I guess.
 

hilal

Captain
20 Badges
Jul 31, 2001
349
0
www.poderdapalavra.com.br
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Rome Gold
  • Hearts of Iron III Collection
  • Europa Universalis IV
  • Cities in Motion
  • East India Company
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
I suppose the hei tag is reserved to some game purposes and could not be used, as MUS, ITA and some few others. I think the event will occur normally if you creat another country using a User_defined Tag.
People that try to use the ITA tag have problems too and i have experienced problems with the MUS tag.