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

EmperorWillham

Secretary of General Affairs
18 Badges
Apr 20, 2011
1.040
3
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines
  • 500k Club
  • Victoria 2
The description is far too long to put it outside a config file, and the trigger is redundant. The name of the picture is weird... but irrelevant for making the event itself work.

I recommend adding the description (and the name while you are at it) to a .csv file (let's say config/mods.csv) in lines like this:
Code:
EVT4_NAME;Construction begins on the Golden Gate Bridge;;;Inicia construcción del Puente Golden Gate;;;;;;X
EVT4_DESC;On January 5, 1933, construction begins on the Golden Gate Bridge, as workers began excavating 3.25 million cubic feet of dirt for the structure’s huge anchorages.\nAlthough the idea for a Bridge went back as far as 1869, the proposal took root in 1916. A former engineering student, James Wilkins, working as a journalist with the San Francisco Bulletin, called for a suspension bridge with a center span of 3,000 feet, nearly twice the length of any in existence. Wilkins’ idea was estimated to cost an astounding 100 million dollers. So, San Francisco's city engineer, Michael M. O'Shaughnessy who was credited for coming up with the name Golden Gate Bridge, began asking bridge engineers whether they could do it for less.\nEngineer and poet Joseph Strauss, a 5-foot tall Cincinnati-born Chicagoan, said he could. Eventually, O'Shaughnessy and Strauss concluded they could build a pure suspension bridge within a practical range of 25-30 million dollers with a main span at least 4,000 feet. The construction plan still faced opposition, including litigation, from many sources. By the time most of the obstacles were cleared, the Great Depression of 1929 had begun, limiting financing options, so officials convinced voters to support 35 million dollers in bonded indebtedness, citing the jobs that would be created for the project. However, the bonds couldn’t be sold until 1932, when San-Francisco based Bank of America agreed to buy the entire project in order to help the local economy.;;;;;;;;;X
And then replace it in the event:
Code:
################################################## #######################
# Construction begins on the Golden Gate Bridge
#@ 1933-1-05
################################################## #######################
event = {
	id = 4
	random = no
	country = USA
	one_action = yes

	name = EVT4_NAME
	desc = EVT4_DESC
	style = 2
	picture = "Construction begins on the Golden Gate Bridge"

	date = { day = 5 month = January year = 1933 }

	action = {
		name = "This bridge well be built!"
		command = { type = dissent value = -3 }
		}
	}

If the picture doesn't work, change the name of the image to something like "Golden_Gate_Begins" (a single string without spaces in between".
Thanks for the fix, the event works great, but the the description is not showing up. I made it a MS note file, but where do i put it?
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
I made it a MS note file, but where do i put it?
I have no idea of what is a MS note file. Just open "mod.csv" in the config folder as a text file and add those lines (keep a empty line and the EOF lines at the end of the file. Otherwise it won't work.). If you already did that, put EVT4_NAME and EVT4_DESC between " " and see if that work.

Now that I see it again, Why did you add "one_action = yes" if the event just have 1 option? It's useless if the event doesn't have more than 1 option.
 

OneAussieMan777

Colonel
24 Badges
Apr 27, 2011
934
17
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Arsenal of Democracy
  • Hearts of Iron III
  • Iron Cross
  • Semper Fi
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings Complete
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Europa Universalis III: Collection
  • 500k Club
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Supreme Ruler: Cold War
  • Victoria: Revolutions
  • The Kings Crusade
  • Heir to the Throne
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III
trying to add oil to province 1709, (Geelong) game crashes every time... HELP!
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
Try this:
Code:
event = {
	id = 9000040
	random = no
	trigger = { } #Up to you. You didn't give any info.

	name = "Oil in Geelong"
	desc = "We discovered a new source of Oil in Geelong."
	style = 2

	date = { day = 5 month = January year = 1933 }
	offset = 30
	deathdate = { day = 5 month = January year = 1963 }

	action = {
		name = "Good news"
		command = { type = add_prov_resource which = 1709 value = 10 where = oil }
		}
	}
 

OneAussieMan777

Colonel
24 Badges
Apr 27, 2011
934
17
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Arsenal of Democracy
  • Hearts of Iron III
  • Iron Cross
  • Semper Fi
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings Complete
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Europa Universalis III: Collection
  • 500k Club
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Supreme Ruler: Cold War
  • Victoria: Revolutions
  • The Kings Crusade
  • Heir to the Throne
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III
try this:
Code:
event = {
	id = 9000040
	random = no
	trigger = { } #up to you. You didn't give any info.

	Name = "oil in geelong"
	desc = "we discovered a new source of oil in geelong."
	style = 2

	date = { day = 5 month = january year = 1933 }
	offset = 30
	deathdate = { day = 5 month = january year = 1963 }

	action = {
		name = "good news"
		command = { type = add_prov_resource which = 1709 value = 10 where = oil }
		}
	}

perfect!!!
 

Majorlee2000

Second Lieutenant
38 Badges
Oct 9, 2010
169
2
  • Darkest Hour
  • Victoria 2: A House Divided
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Victoria 3 Sign Up
  • 500k Club
  • Europa Universalis IV
  • Victoria 2
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
I modified the lend lease events for the UK to create a new chain where progressively more dissent is created as more convoys are killed. At the end of the chain is an event for Germany triggered by the UK event that should reduce German dissent to reflect good war news. Here are my two problems:

1) I added a 70001name in the eventtext.csv file as well as a 70001desc. The description works just fine, but the name header in the event box that displays simply says "70001name" and not "Convoy Raiding Effects" as I added to the text file.

2) Even though I have the trigger for the German event 7001003 as being at war with UK and the event 7001001 firing for the UK, the UK 7001001 and 7001002 is firing properly, the German one never does. The event is copied below. PLEASE HELP!!!!
########################
# Convoy Raiding Effects
########################
event = {
id = 7001001
random = no
country = ENG
persistent = yes

trigger = {
NOT = { convoypool = 160 }
NOT = { flag = Convoy_Raiding_UK1 }
}

name = 70001name
desc = 70001desc
style = 2
picture = "lend_lease"

date = { day = 1 month = january year = 1936 }
offset = 15 # Check for trigger conditions every 15 days
deathdate = { day = 30 month = june year = 1999 }
action_a = {
name = "evt_80026a"
command = { type = dissent value = 1 }
command = { type = setflag which = Convoy_Raiding_UK1 }
}
}

event = {
id = 7001002
random = no
country = ENG
persistent = yes

trigger = {
flag = Convoy_Raiding_UK1
convoypool = 160
}

name = 70002name
desc = 70002desc
style = 2
picture = "lend_lease"

date = { day = 1 month = january year = 1936 }
offset = 15 # Check for trigger conditions every 15 days
deathdate = { day = 30 month = june year = 1999 }
action_a = {
name = "ACTION_NAME_GREAT"
command = { type = dissent value = -1 }
command = { type = clrflag which = Convoy_Raiding_UK1 }
}
}

event = {
id = 7001003
random = no
country = GER

trigger = {
event = 7001001 # Convoy Raiding Effects
war = { country = ENG country = GER }
}

name = 80028name
desc = 80028desc
style = 2
picture = "lend_lease"

date = { day = 1 month = january year = 1936 }
offset = 15 # Check for trigger conditions every 15 days
deathdate = { day = 30 month = june year = 1999 }
action_a = {
name = ACTION_NAME_OK
command = { type = dissent value = -1 }
}
}


EDIT: I figured it all out except for some reason now the description for 70001 says "70001DESC" but the name is correct and both the name and description are perfect for the other two events??? I counted every single semicolon three times now and the 70002desc that works is the exact same syntax as the 70001desc that does not???
 
Last edited:

Majorlee2000

Second Lieutenant
38 Badges
Oct 9, 2010
169
2
  • Darkest Hour
  • Victoria 2: A House Divided
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Victoria 3 Sign Up
  • 500k Club
  • Europa Universalis IV
  • Victoria 2
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
Okay, so here is my event:
event = {
id = 7001013
random = no
country = JAP
persistent = yes

trigger = {
NOT = { convoypool = 300 }
NOT = { flag = Convoy_Raiding_JAP1 }
}

name = "But the Americans are against unrestricted submarine warfare??"
desc = "The American submarine campaign against Japan was one of the major factors leading to victory. Not only did it severely curtail Japan's industries, even more devastating was the effect it had on Japan's access to oil."
style = 2
picture = "lend_lease"

date = { day = 1 month = january year = 1936 }
offset = 15 # Check for trigger conditions every 15 days
deathdate = { day = 30 month = june year = 1999 }
action_a = {
name = "evt_80026a"
command = { type = wartime_ic_mod value = -3 }
command = { type = oilpool value = -400 }
command = { type = setflag which = Convoy_Raiding_JAP1 }
command = { type = trigger which = 7001015 }
}
}

My game did not load so I have learned enough to check the savedebug file and it said this:
ERROR : (Missing = in statement.) '= = wartime_ic_mod' Line = 2662 file = Mods\Darkest Hour Full\db\events\japan.txt

What does that mean? I figure it has something to do with the line above in BOLD, but for the life of me it looks correct? Please help.
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
That's weird. I just copy-pasted your event and worked flawlessly (called from console through, but the game loaded). Are you sure that you didn't correct it when you put it here? Anyway and just is case, this is how I put it:
Code:
event = {
	id = 7001013
	random = no
	country = JAP
	persistent = yes

	trigger = {
		NOT = { convoypool = 300 }
		NOT = { flag = Convoy_Raiding_JAP1 }
	}

	name = "But the Americans are against unrestricted submarine warfare??"
	desc = "The American submarine campaign against Japan was one of the major factors leading to victory. Not only did it severely curtail Japan's industries, even more devastating was the effect it had on Japan's access to oil."
	style = 2
	picture = "lend_lease"

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = june year = 1999 }

	action = {
		name = "evt_80026a"
		command = { type = wartime_ic_mod value = -3 }
		command = { type = oilpool value = -400 }
		command = { type = setflag which = Convoy_Raiding_JAP1 }
		command = { type = trigger which = 7001015 }
	}
}
Maybe a precedent event is not correctly closed.
 

Majorlee2000

Second Lieutenant
38 Badges
Oct 9, 2010
169
2
  • Darkest Hour
  • Victoria 2: A House Divided
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Victoria 3 Sign Up
  • 500k Club
  • Europa Universalis IV
  • Victoria 2
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
That's weird. I just copy-pasted your event and worked flawlessly (called from console through, but the game loaded). Are you sure that you didn't correct it when you put it here? Anyway and just is case, this is how I put it:

Maybe a precedent event is not correctly closed.

The preceding event looks fine. That is very strange that the savedebug files keyed in on that specific line, but it worked for you. in any event, I figured a better workaround...I did away with the wartime_ic_mod and instead removed IC from specific provinces in mainland Japan. If the Japanese manage to build enough convoys to get above the threshold the IC will return. I appreciate you trying:)
 

OneAussieMan777

Colonel
24 Badges
Apr 27, 2011
934
17
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Arsenal of Democracy
  • Hearts of Iron III
  • Iron Cross
  • Semper Fi
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings Complete
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Europa Universalis III: Collection
  • 500k Club
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Supreme Ruler: Cold War
  • Victoria: Revolutions
  • The Kings Crusade
  • Heir to the Throne
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III
I'm going to try and tinker with consumer_goods demand and dissent_growth commands and see how it goes, if this works it could change DH forever, then again probably not...
 

OneAussieMan777

Colonel
24 Badges
Apr 27, 2011
934
17
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Arsenal of Democracy
  • Hearts of Iron III
  • Iron Cross
  • Semper Fi
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings Complete
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Europa Universalis III: Collection
  • 500k Club
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Supreme Ruler: Cold War
  • Victoria: Revolutions
  • The Kings Crusade
  • Heir to the Throne
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III
What are you attempting to do?

Not going well is what I'm doing, attempting to do is

minister = {
trait = "Paranoid megalomaniac" # Hitler
id = 81
name = NPERSONALITY_HITLER
desc = DPERSONALITY_HITLER
position = headofstate
value = 0
### command = { type = dissent value = -0.1000 } #### Use this code in events along with

The policy sliders
MODIFIER_DISSENT_SPEED;-0.1;-0.08;-0.06;-0.04;-0.02;0.02;0.04;0.06;0.08;0.1;x

MODIFIER_PARTISAN_RISK;0.05;0.04;0.03;0.02;0.01;-0.01;-0.02;-0.03;-0.04;-0.05;x

I am trying to write events using these, if they're already in game then it's only a matter of time/getting the code right for it to work. I'm doing it for my Australia mod and I need to drop consumer goods demands on IC when people start buying iceboxes and refrigerators...
 

nymet260

Captain
80 Badges
Jan 30, 2008
435
165
  • Arsenal of Democracy
  • Pillars of Eternity
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sword of the Stars II
  • Sword of the Stars
  • Sengoku
  • Semper Fi
  • March of the Eagles
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Cities in Motion
  • Cities in Motion 2
  • For the Motherland
  • Crusader Kings II
  • Divine Wind
  • Darkest Hour
  • Europa Universalis III Complete
  • A Game of Dwarves
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • 500k Club
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Common Sense
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
I have a strange event issue. the event fires, but the command triggers do not allow the event to work properly the FIRST time around on its own. I put the event chain on a loop and on the 2nd time around it fires normally, but never on the first time. I can fire it via command console it works fine, just never on its own for some odd reason. Its imperative that it works the first time around as the off-set and randomness of the event will be much higher.

I know the first thing you might say is "put in a country tag" but as you can see I am trying to get this to fire for all nations and since it does -1 (aka your own country) by default when there is no tag I just leave it out. I have tried it with a straight rip from the tags of the decision event in DH full, the ones that have nearly every nation in it, but it still produces the same result oddly. When I use a single nation tag it works fine.

Code:
event = {
	id = 3001 # Economic Crisis
	persistent = yes
	random = no

	trigger = { government = democratic
			NOT = { local_flag = Eco1 }
			  }

	name = "3001name"
	desc = "3001desc"
	style = 2
	picture = "election_time"

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1964 }
	
	action = {
	ai_chance = 100
		name = "3001a" # Damn!
		command = { type = local_setflag which = Eco1 }
	}
}
event = {
	id = 3002 # Economic Crisis Failure
	persistent = yes
	random = no

	one_action = yes
	trigger = { 
			local_flag = Eco1				

				}
			

	name = "3002name"
	desc = "3002desc"
	style = 2
	picture = "election_time"

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1964 }
	
	action = {
	ai_chance = 35
		name = "3002a" # This is bad!
		command = { type = local_clrflag which = Eco1}
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
	}
	action = {
	ai_chance = 35
		name = "3002b" # Another Great Depression...
		command = { type = local_clrflag which = Eco1}
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }	
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -1 }	
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow2 }  type = construct which = ic where = -4 value = -2 }	
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }		
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }	
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
	}	
	action = {
	ai_chance = 30
		name = "3002c" # We will live
		command = { type = local_clrflag which = Eco1}
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
	}	
}

So any ideas? Or did I just found a bug :cool:
 

novapaddy

War-Father
103 Badges
Aug 26, 2009
8.904
1.314
  • The Kings Crusade
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis III Complete
  • Iron Cross
  • Lead and Gold
  • Legio
  • Arsenal of Democracy
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron Anthology
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • 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
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • East India Company
  • East India Company Collection
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
I have a strange event issue. the event fires, but the command triggers do not allow the event to work properly the FIRST time around on its own. I put the event chain on a loop and on the 2nd time around it fires normally, but never on the first time. I can fire it via command console it works fine, just never on its own for some odd reason. Its imperative that it works the first time around as the off-set and randomness of the event will be much higher.

I know the first thing you might say is "put in a country tag" but as you can see I am trying to get this to fire for all nations and since it does -1 (aka your own country) by default when there is no tag I just leave it out. I have tried it with a straight rip from the tags of the decision event in DH full, the ones that have nearly every nation in it, but it still produces the same result oddly. When I use a single nation tag it works fine.

Code:
event = {
	id = 3001 # Economic Crisis
	persistent = yes
	random = no

	trigger = { government = democratic
			NOT = { local_flag = Eco1 }
			  }

	name = "3001name"
	desc = "3001desc"
	style = 2
	picture = "election_time"

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1964 }
	
	action = {
	ai_chance = 100
		name = "3001a" # Damn!
		command = { type = local_setflag which = Eco1 }
	}
}
event = {
	id = 3002 # Economic Crisis Failure
	persistent = yes
	random = no

	one_action = yes
	trigger = { 
			local_flag = Eco1				

				}
			

	name = "3002name"
	desc = "3002desc"
	style = 2
	picture = "election_time"

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1964 }
	
	action = {
	ai_chance = 35
		name = "3002a" # This is bad!
		command = { type = local_clrflag which = Eco1}
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
	}
	action = {
	ai_chance = 35
		name = "3002b" # Another Great Depression...
		command = { type = local_clrflag which = Eco1}
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }	
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -1 }	
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = {local_flag = Pow2 }  type = construct which = ic where = -4 value = -2 }	
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }		
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }	
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
	}	
	action = {
	ai_chance = 30
		name = "3002c" # We will live
		command = { type = local_clrflag which = Eco1}
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 }  type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 }  type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 }  type = construct which = ic where = -4 value = -1 }
	}	
}

So any ideas? Or did I just found a bug :cool:

Well, just in passing, your action sets the flag, but your trigger says NOT = { local_flag = Eco1 }... but the flag hasn't been set yet...?
 

nymet260

Captain
80 Badges
Jan 30, 2008
435
165
  • Arsenal of Democracy
  • Pillars of Eternity
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sword of the Stars II
  • Sword of the Stars
  • Sengoku
  • Semper Fi
  • March of the Eagles
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Cities in Motion
  • Cities in Motion 2
  • For the Motherland
  • Crusader Kings II
  • Divine Wind
  • Darkest Hour
  • Europa Universalis III Complete
  • A Game of Dwarves
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • 500k Club
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Common Sense
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
Well, just in passing, your action sets the flag, but your trigger says NOT = { local_flag = Eco1 }... but the flag hasn't been set yet...?

Its to prevent it from repeating itself as its a persistent event. It will detect that the event has not fired, then fire it. It will then not fire it again till the Economic failure event fires to removes the flag. The economic failure event cannot fire unless the flag is on, while this one cannot fire unless the flag is off, thus you have an infinite loop.
 

Majorlee2000

Second Lieutenant
38 Badges
Oct 9, 2010
169
2
  • Darkest Hour
  • Victoria 2: A House Divided
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Victoria 3 Sign Up
  • 500k Club
  • Europa Universalis IV
  • Victoria 2
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
Not going well is what I'm doing, attempting to do is

minister = {
trait = "Paranoid megalomaniac" # Hitler
id = 81
name = NPERSONALITY_HITLER
desc = DPERSONALITY_HITLER
position = headofstate
value = 0
### command = { type = dissent value = -0.1000 } #### Use this code in events along with

The policy sliders
MODIFIER_DISSENT_SPEED;-0.1;-0.08;-0.06;-0.04;-0.02;0.02;0.04;0.06;0.08;0.1;x

MODIFIER_PARTISAN_RISK;0.05;0.04;0.03;0.02;0.01;-0.01;-0.02;-0.03;-0.04;-0.05;x

I am trying to write events using these, if they're already in game then it's only a matter of time/getting the code right for it to work. I'm doing it for my Australia mod and I need to drop consumer goods demands on IC when people start buying iceboxes and refrigerators...

I'm afraid I can be of no help. Good luck!!!
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
Its to prevent it from repeating itself as its a persistent event. It will detect that the event has not fired, then fire it. It will then not fire it again till the Economic failure event fires to removes the flag. The economic failure event cannot fire unless the flag is on, while this one cannot fire unless the flag is off, thus you have an infinite loop.
Until you get bored and go fascist :p (or leninist or paternal autocratic or...)
I'm not sure of what could be the problem, But maybe the engine get confused with so many command requiring a trigger. I'm too lazy to make an event that set those flags to test it myself but assuming that any country that is eligible for those events always has at least 1 of the Pow flags, this simplification could work:
Code:
event = {
	id = 3002 # Economic Crisis Failure
	persistent = yes
	one_action = yes
	trigger = { local_flag = Eco1 }

	name = "3002name"
	desc = "3002desc"
	style = 2
	picture = "election_time"

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1964 }

	action = {
		ai_chance = 35
		name = "3002a" # This is bad!
		command = { type = local_clrflag which = Eco1 }
		command = { type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow2 } type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow2 } type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 } type = construct which = ic where = -4 value = -1 }
	}
	action = {
		ai_chance = 35
		name = "3002b" # Another Great Depression...
		command = { type = local_clrflag which = Eco1 }
		command = { type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow2 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow2 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow1 } type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow1 } type = construct which = ic where = -4 value = -1 }
	}
	action = {
		ai_chance = 30
		name = "3002c" # We will live
		command = { type = local_clrflag which = Eco1 }
		command = { type = construct which = ic where = -4 value = -1 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow3 } type = construct which = ic where = -4 value = -2 }
		command = { trigger = { local_flag = Pow2 } type = construct which = ic where = -4 value = -1 }
	}
}
Other possibility would be add a blank command at the top (command = { } ) as a mean to be sure that the action is always valid.
 

nymet260

Captain
80 Badges
Jan 30, 2008
435
165
  • Arsenal of Democracy
  • Pillars of Eternity
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sword of the Stars II
  • Sword of the Stars
  • Sengoku
  • Semper Fi
  • March of the Eagles
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Cities in Motion
  • Cities in Motion 2
  • For the Motherland
  • Crusader Kings II
  • Divine Wind
  • Darkest Hour
  • Europa Universalis III Complete
  • A Game of Dwarves
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • 500k Club
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Common Sense
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
Hehe Arcangelus, yea triggers got a bit redefined since, and the super loop makes testing super easy :). Anyways I tried it and I was getting the same result, so I decided to skip it and work on another event when the same thing was happening this time with a free resource event, this time I tried your empty command trick the event fired and when I hover the options to see what it would do and ofc it said nothing, but when I clicked it, the event did exactly what it was suppose to do!

Code:
event = {
	id = 1004 # Defense Lobby

	persistent = yes
	random = no
	one_action = yes

	trigger = {
	NOT = {
	domestic = { type = defense_lobby value = 5 }
	}
	random = 25
	}
	
	name = "EVT_1004_NAME"
	desc = "EVT_1004_DESC"
	style = 2
	picture = "election_time"
	
	date = { day = 1 month = january year = 1936 }
	offset = 180
	deathdate = { day = 30 month = december year = 1964 }

	action = {
		ai_chance = 35
		name = "EVT_1004_A" #  Good
		command = { }
		command = { trigger = { local_flag = Pow3} type = metalpool value = 5000 }
		command = { trigger = { local_flag = Pow2} type = metalpool value = 3000 }
		command = { trigger = { local_flag = Pow1} type = metalpool value = 2000 }
		command = { trigger = { local_flag = Pow0} type = metalpool value = 1000 }	
		}
	action = {
		ai_chance = 35
		name = "EVT_1004_B" #  Good
		command = { }
		command = { trigger = { local_flag = Pow3} type = energypool value = 5000 }
		command = { trigger = { local_flag = Pow2} type = energypool value = 3000 }
		command = { trigger = { local_flag = Pow1} type = energypool value = 2000 }
		command = { trigger = { local_flag = Pow0} type = energypool value = 1000 }		
		}
	action = {
		ai_chance = 30
		name = "EVT_1004_C" #  Good
		command = { }
		command = { trigger = { local_flag = Pow3} type = rarematerialspool value = 3000 }
		command = { trigger = { local_flag = Pow2} type = rarematerialspool value = 2000 }
		command = { trigger = { local_flag = Pow1} type = rarematerialspool value = 1000 }
		command = { trigger = { local_flag = Pow0} type = rarematerialspool value = 500 }	
		}		
	}

I guess using the -1 tag by default causes wonky stuff to happen. I mean its working so im fine with it even if there is a display error. If you want I can PM you my event files which has the full blown working flag's so you dont have to make them yourself if you want to look into this issue further.