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

Still Alive
2 Badges
Oct 18, 2009
4.525
54
  • Crusader Kings II
  • Darkest Hour
I've noticed a proliferation of 'can someone check my events' threads of late. So in the interests of tidiness :)rofl:) I'm making a 'post your problems here and hope someone helps' thread, to save on the clutter. It'll also totally provide a backlog of problems and fixes, hopefully reducing the number of reposted issues!
derpina-75398932520.png

 
Need some help with an event i making (first one ever) where you can reform the byzantine empire as greece

this is what i got so far
event = {
id = 99999999
date = { day = 1 month = january year = 1914 }
offset = 30
deathdate = { day = 1 month = january year = 1945
country = GRE

trigger = {
atwar = no
not = {
exists = TUR
and = {

owned = { province = 409 data = -1
owned = { province = 1075 data = -1
owned = { province = 377 data = -1
owned = { province = 325 data = -1

}

name = " Reform the Empire"
Desc = " We have conquered and expanded our borders and prestige enought to proclaim the reformation of our once grand Byzantine Empire!
Picture = "german_marginal_victory2"


action_a = {
name = " Anamorfosi to!"
command = { type = dissent value = -2 }
command = { type = addcore which = 1076 }
command = { type = addcore which = 1079 }
command = { type = addcore which = 1078 }
command = { type = addcore which = 1071 }
command = { type = addcore which = 1057 }
command = { type = addcore which = 1068 }

type = capital which = { 409 }

command = { type = setflag which = Rome }
command = { type = clrflag which = Rome }

}

as soon as i pick the 1914 scenario the game crashes :wacko:
 
I thoroughly endorse this thread.
Code:
event = {
 id = 99999999
 [B][COLOR="#FF0000"]random = no[/COLOR][/B]
 country = GRE
 trigger = {
 atwar = no
 not = { 
 exists = TUR
 and = {

 owned = { province = 409 data = -1 [B][COLOR="#FF0000"]}[/COLOR][/B]
 owned = { province = 1075 data = -1 [B][COLOR="#FF0000"]}[/COLOR][/B]
 owned = { province = 377 data = -1 [B][COLOR="#FF0000"]}[/COLOR][/B]
 owned = { province = 325 data = -1 [B][COLOR="#FF0000"]}[/COLOR][/B]

        [B][COLOR="#FF0000"]}[/COLOR][/B]
     [B][COLOR="#FF0000"]}[/COLOR][/B]
 }

 name = " Reform the Empire"
 Desc = " We have conquered and expanded our borders and prestige enought to proclaim the reformation of our once grand Byzantine Empire![B][COLOR="#FF0000"]"[/COLOR][/B]
 Picture = "german_marginal_victory2"

 date = { day = 1 month = january year = 1914 }
 offset = 30
 deathdate = { day = 1 month = january year = 1945 [B][COLOR="#FF0000"]}[/COLOR][/B]

 action_a = {
 name = " Anamorfosi to!"
 command = { type = dissent value = -2 }
 command = { type = addcore which = 1076 }
 command = { type = addcore which = 1079 }
 command = { type = addcore which = 1078 }
 command = { type = addcore which = 1071 }
 command = { type = addcore which = 1057 }
 command = { type = addcore which = 1068 }
 [B][COLOR="#FF0000"]command = { type = capital which = 409 }[/COLOR][/B]
 command = { type = setflag which = Rome }
 command = { type = clrflag which = Rome }
         [B][COLOR="#FF0000"]}[/COLOR][/B]
}

Not familiar with flags myself but it seems you are setting and clearing the same flag which would just nullify it. Recommend removing the clrflag.

Protip, when posting event use
Code:
 tags to preserve their structure

Not sure it matters but I since all events are that way I put Id first, then Random, then country, then trigger, name/desc, date and then actions.
Protip 2: Always close brackets. { will always be followed by } sooner or later. What most likely caused the insta-crash was that you lacked the last bracket which resulted in the event not closing and pretty much half the game being included in your event.
 
Last edited:
still didint work -.- btw isnt that how you change the country's flag? lol i am so new to this modding stuff:wacko:

and how do you change a country's name.

can you change its color in game as well?
 
No, no and no. Flags in events are for AI.

To change name and color, you need to create an entirely new country and change the tag in event ( { command = type = country = [new TAG] } )
 
No, no and no. Flags in events are for AI.

To change name and color, you need to create an entirely new country and change the tag in event ( { command = type = country = [new TAG] } )

DH has the command to change both the shield and the name of a country. they are listed in the eventcommands.txt in the main db/events folder IIRC
for the color Lord Finnish is right, you have to create another country.

regards
Guy Montag
 
Last edited:
still didint work -.- btw isnt that how you change the country's flag? lol i am so new to this modding stuff:wacko:

and how do you change a country's name.

can you change its color in game as well?

To change flag and name, add this to your event commands...

command = { type = flag_ext where = GRE which = "_byz"}
command = { type = name where = GRE which = "Byzantine Empire"}

About color, I din't find a command to do this, I think it's impossible. The solution would be to create a brand new nation, and instead of changing flag/name you set the event to change the TAG of the country.
 
DH has the command to change both the shield and the name of a country. they are listed in the eventcommands.txt in the main db/events folder IIRC
for the color Lord Finnish is right, you have to create another country.

regards
Guy Montag
Didn't know that myself. The one I'm working on is my first mod for DH :(
 
Ok everyone the event...........still doesnt work.

It comes up as an option in the end of the great war event(historical)

instead of its own event. it does change the name but it doesnt change the flag correctly :(

thx for the help so far guys
 
Ok everyone the event...........still doesnt work.

It comes up as an option in the end of the great war event(historical)

instead of its own event. it does change the name but it doesnt change the flag correctly :(

thx for the help so far guys

I gave a look in the scrip again and I noticed that in:

Code:
not = { 
 exists = TUR
 and = {

 owned = { province = 409 data = -1 }
 owned = { province = 1075 data = -1 }
 owned = { province = 377 data = -1 }
 owned = { province = 325 data = -1 }

        }
[FONT=Arial Black][COLOR="#FF0000"]}[/COLOR][/FONT]
you're actually saying: if TUR doesn't exist and if NONE of these provinces are under your control.

I guess you would say: if TUR doesn't exist AND if ALL these provinces are under your control.

So...
Code:
not = { 
 exists = TUR
[FONT=Arial Black][COLOR="#FF0000"]}[/COLOR][/FONT]
 and = {

 owned = { province = 409 data = -1 }
 owned = { province = 1075 data = -1 }
 owned = { province = 377 data = -1 }
 owned = { province = 325 data = -1 }

        }

About the flag... check if you have the correct name. I.e.: if in your shields folder there is a flag named SHIELD_GRE_BYZ (or _BYZANTINE, wathever you will) and if in your script the name is exactly the same. If your shield is named SHIELD_GRE_WEIRD then it won't work if your code says: flag_ext where = GRE which = "_WOHAWOAH"

;)
 
Question

Arcanjo Zero
A question to you how did you make new countries in new nations mini mod (I mean Scandinavia born ,
Centro-America rise,Cran Colombia Restablishment,A-H reborn,Ottoman empire reborn)in bigones at events folder
 
Arcanjo Zero
A question to you how did you make new countries in new nations mini mod (I mean Scandinavia born ,
Centro-America rise,Cran Colombia Restablishment,A-H reborn,Ottoman empire reborn)in bigones at events folder
None of these are "new" nations, they're all ingame DH vanilla already. I've just make events that allow a country to decide, under some conditions, if it will turn itself in one of these "big ones". ;)
 
None of these are "new" nations, they're all ingame DH vanilla already. I've just make events that allow a country to decide, under some conditions, if it will turn itself in one of these "big ones". ;)
ok
 
I have one event that simply refuses to trigger:

#########################################################################
# Lisbon in enemy hands
#########################################################################
event = {
id = 20018
random = no
country = POR
persistent = yes

trigger = {
control = { province = 476 data = U15 } # Lisbon
war = { country = POR country = U15 }
event = { id = 20004 days = 300 }
}

name = "Lisbon in enemy hands"
desc = "Whoever controls Lisbon has the upper hand in the war."
style = 0
picture = "german_marginal_defeat3"

date = { day = 20 month = april year = 1936 }
offset = 60
deathdate = { day = 30 month = december year = 1963 }

action_a = {
name = "We'll have to retake it then"
command = { type = delete_unit which = -1 }
}
}

I can trigger it manually, but for the AI the events simply won't trigger, although all trigger conditions have been met. What am I doing wrong here?
 
I also seem to have a problem with these two events, same thing - they won't trigger despite the trigger conditions being met:

Code:
#############################################
# France decides strategy after Germany falls
#############################################
event = {
	id = 3002004
	random = no 
	country = FRA
	
	trigger = {
		ai = yes
		OR = {
			event = 23 # Armistice of Aachen
			event = 35
			NOT = {
				exists = GER
			}
		}
		war = { country = ENG country = FRA }
		NOT = { 
			ispuppet = FRA
			control = { province = 116 data = -2 }
			control = { province = 122 data = -2 }
			lost_national = { country = FRA value = 10 }
			war = { country = FRA country = SOV }
			war = { country = FRA country = ITA }
			war = { country = FRA country = POL }
			war = { country = FRA country = U35 }
			war = { country = FRA country = SPA }
	        }

	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 2
	deathdate = { day = 29 month = december year = 1963 }
	
	action = { #Russian Campaign
		ai_chance = 0
		command = { type = local_setflag which = FRAInvadeRussia }
		command = { type = ai which = "switch/FRA_After_Germany.ai" }
	}
	action = { #Invade England
		ai_chance = 100
		command = { type = local_setflag which = FRAInvadeSpain }
		command = { type = ai which = "switch/FRA_After_Germany.ai" }
	}
}

Code:
#########################################################################
#  The discord that follows
#########################################################################
event = {
	id = 95007
	random = no
	country = BUL

	trigger = {
		owned = { province = 363 data = GRE }
		event = 95006 # 1st Balkan War won
		NOT = { event = 720015 } # separate peace with the Ottomans in the 1st Balkan War
		NOT = { 
			ispuppet = GRE 
			alliance = { country = GRE country = OTT }
			alliance = { country = GRE country = ENG }
			alliance = { country = GRE country = ITA }
			alliance = { country = GRE country = FRA }
			alliance = { country = GRE country = GER }
			alliance = { country = GRE country = SOV }
		}
		atwar = no
		ispuppet = no
	}
   
	name = "The discord that follows"
	desc = "EVT_95007_DESC" 
	style = 0
	picture = "balkans"

	date = { day = 0 month = january year = 1936 }
	offset = 15
	deathdate = { day = 30 month = december year = 1945 }

	action = {
		name = "Western Thrace is rightfully ours!"
		ai_chance = 60
		command = { type = trigger which = 95008 }
		command = { type = relation which = GRE value = -30 }
		command = { type = relation which = SER value = -20 }
		command = { type = leave_alliance }
		command = { type = belligerence value = 5 }
		command = { type = addcore which = 364 } # Kavala
		command = { type = addcore which = 363 } # Xanthi
		command = { type = addclaim which = 365 } # Thessaloniki
		command = { type = domestic which = interventionism value = 1 }
	}
	action = {
		name = "The border with Greece is fine as it is"
		ai_chance = 40
		command = { type = dissent value = 5 }
		command = { type = removecore which = 364 } # Kavala
		command = { type = removecore which = 363 } # Xanthi
		command = { type = removeclaim which = 365 } # Thessaloniki
		command = { type = peacetime_ic_mod value = -30 }
	}
}