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.![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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: