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

Scippio

Major
13 Badges
Jun 27, 2006
534
0
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Deus Vult
  • Diplomacy
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • 500k Club
I am for the first time, trying to write my own event. I was inspired to do this by the scandanvian events posted on this forums, so the idea is very similar.

I want to write an event to form the Ottoman empire.

Im sure there are plenty of user written events already for such a thing, but i want to do it on my own as a learning experience.

I want to take it slow. I tried to write a simple event in which turkey inherits the territory of Greece, and then becomes the Ottoman empire. Heres what i have so far.

##### Ottoman Empire is Formed

event = {
id = 124562
random = no
country = TUR

trigger = {
exists = TUR
exists = GRE
}

name = "The Ottoman Empire Rises Again"
ai_chance = 100
desc = "The Greeks have ceded there territory to our superior nation. The Ottoman Empire will soon attain its former glory!"
style = 0
picture = "anschluss"

date = { day = 01 month = january year = 1936 }
offset = 1

action_a = {
name = "Carve the empire anew!"
command = { type = country which = OTT }
command = { type = inherit which = GRE }
}
action_b = {
ai_chance = 0
name = "We must not return to the imperialism of the past."
command = { type = dissent value = 1 }
}
}

I know it doesnt work because i tried a game as Turkey and the game gave me an error and crashed when the event was supposed to fire.

What text file would an event for Turkey go in? I just wrote it in at the bottom of the hoi2 text file in the events folder.

Also, does it matter what number you give your event for an ID as long as that number isnt already taken?

If someone could point out why my event isnt working i'd be very grateful, and maybe from there i can make the event more and more complicated. Thank you guys. :)
 
Last edited:
i actually did just get it to work, but i still got the error mesage that asks me to abort, retry, or ignore, by clicking ignore the event fires fine, but i'd still like to get rid of this error mesage, anyone know how?
 
Also I don't know if this has any real effect, but why does the code read "day = 01" instead of 0 or 1?
 
Moved to scenarios and modifications.

Also, I suspect the ai_chance in between the "name" and "desc" might cause the problem.
ai_chance is ONLY for separate event options, not for the general header of the event.