• 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.
Hello everyone. This is my first attempt at coding and everything is actually working brilliantly except for one issue. My only problem is that the set_domestic variables aren't firing and the domestic variables are the same as the UK. As a result, Ethiopia is an ahistorical market liberal government instead of a paternal autocratic government. Do I need to set up another event ID, or am I missing something?

I've provided the event string in the area concerned. The set_domestic variables are bolded and are in event 442701 & 442702.

I would greatly appreciate some help. Thanks in advance.

Code:
#########################################################################
#  Restore the Lion of Judah
#########################################################################
event = {
	id = 442700
	random = no
	country = ENG

	trigger = {
		random = 30 # 30% chance every month

		control = { province = 1046 data = ENG } # Addis Ababa

		NOT = {
			exists = ETH
			exists = U06
			control = { province = 1037 data = ITA } # Djibouti
			control = { province = 1042 data = ITA } # Gonder
			control = { province = 1043 data = ITA } # Dese
			control = { province = 1044 data = ITA } # Debre Markos
			control = { province = 1045 data = ITA } # Gambela
			control = { province = 1047 data = ITA } # Jima
			control = { province = 1048 data = ITA } # Adwa
			control = { province = 1049 data = ITA } # Denakil
			control = { province = 1050 data = ITA } # Dire Dawa
			control = { province = 1051 data = ITA } # Harar
			control = { province = 1052 data = ITA } # Ginir
			control = { province = 1053 data = ITA } # Moyale
			control = { province = 1054 data = ITA } # Ogaden
			control = { province = 1033 data = ITA } # Massaua
			control = { province = 1038 data = ITA } # Assab
			control = { province = 1039 data = ITA } # Asmara
		}
	}

	name = "EVT_442700_NAME"
	desc = "EVT_442700_DESC"
        picture = "Ethiopia_restore"
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		name = "Grant the Independence of Ethiopia" # Grant ETH
		ai_chance = 90
		command = { type = independence which = ETH value = 1 }
		command = { type = dissent value = -1 }
		command = { type = trigger which = 442701 }  # Emperor Restored and no Eritrea
		command = { type = trigger which = 442705 }  # Ethiopia Puppet
	}
	action_b = {
		name = "Grant the Independence of Ethiopia and Eritrea" # Grant ETH and U06
		ai_chance = 9
		command = { type = independence which = U06 value = 1 } 
		command = { type = independence which = ETH value = 1 }
		command = { type = dissent value = -2 }
		command = { type = trigger which = 442702 }  # Emperor Restored 
		command = { type = trigger which = 442703 }  # Independent Eritrea
		command = { type = trigger which = 442706 }  # Ethiopia and Eritrea Puppet
	}
	action_c = {
		name = "Maintain Control Until the End of the War" # Maintain Control 
		ai_chance = 1

		command = { type = dissent value = 5 }
	}
}

#########################################################################
#  Puppet Ethiopia
#########################################################################
event = { 
	id = 442705
	random = no
	country = ENG
	
	#Triggered by ENG442700
	
	name = "EVT_442705_NAME"
	desc = "EVT_442705_DESC"
	style = 0
	picture = "Ethiopia_restore2"

	action_a = {
		name = "OK" # Install a Puppet
		command = { type = make_puppet which = ETH } 
	}
}

#########################################################################
#  Puppet Ethiopia and Eritrea
#########################################################################
event = { 
	id = 442706
	random = no
	country = ENG
	
	#Triggered by ENG442700
	
	name = "EVT_442706_NAME"
	desc = "EVT_442706_DESC"
	style = 0
	picture = "horn_of_africa"

	action_a = {
		name = "OK" # Install a Puppet
		command = { type = make_puppet which = ETH }
		command = { type = make_puppet which = U06 } 
	}
}

#
# HoI - Ethiopia
#
#		written by TurnerBenton
#		

#########################################################################
#  Emperor Restored
#########################################################################
event = { 
	id = 442701
	random = no
	country = ETH

	name = "EVT_442701_NAME"
	desc = "EVT_442701_DESC"
        picture = "ethiopia_restore"
	style = 0

	# triggered by UK442700 

	action_a = {
		name = "OK" # Ethiopia formed and Eritrea British
		command = { type = headofstate which = 65001 }
		command = { type = secedeprovince which = ENG value = 1033 } # Massaua
		command = { type = secedeprovince which = ENG value = 1038 } # Assab
		command = { type = secedeprovince which = ENG value = 1039 } # Asmara
		command = { type = add_corps which = "Ethiopian Army" value = land where = 1046 }
		command = { type = add_division which = "Royal Militia" value = militia when = 1 }
		command = { type = money value = 10 } # money
		command = { type = manpowerpool value = 10 } # manpower
		c[B]ommand = { type = set_domestic which = democratic value = 5 }
		command = { type = set_domestic which = political_left value = 5 }[/B]

	}
}

#########################################################################
#  Emperor Restored and Independent Eritrea
#########################################################################
event = { 
	id = 442702
	random = no
	country = ETH

	name = "EVT_442702_NAME"
	desc = "EVT_442702_DESC"
        picture = "ethiopia_restore"
	style = 0

	# triggered by UK442700 

	action_a = {
		name = "OK" # Ethiopia formed and Eritrea Independent
		command = { type = set_domestic which = democratic value = 5 }
		command = { type = set_domestic which = political_left value = 5 }
		command = { type = headofstate which = 65001 }
		command = { type = add_corps which = "Ethiopian Army" value = land where = 1046 }
		command = { type = add_division which = "Royal Militia" value = militia when = 1 }
		command = { type = money value = 10 } # money
		command = { type = manpowerpool value = 10 } # manpower
		[B]command = { type = set_domestic which = democratic value = 5 }
		command = { type = set_domestic which = political_left value = 5 }[/B]

	}
}
 

unmerged(12544)

General
Dec 9, 2002
1.936
0
Visit site
Both sliders are connected to the ruling person. E.g. a Social Concervative ruler will only allow a certain reduced range for both.

Nice events. Make sure to remove Ethiopia's cores on Eritrea, otherwise they will claim them from UK.

Could you share the event pictures? HIP also has series for Ethiopia, but no pictures. :(
 
Panther G said:
Both sliders are connected to the ruling person. E.g. a Social Concervative ruler will only allow a certain reduced range for both.

Nice events. Make sure to remove Ethiopia's cores on Eritrea, otherwise they will claim them from UK.

Could you share the event pictures? HIP also has series for Ethiopia, but no pictures. :(

Hmmm. Haile Selassie is a Paternal Autocrat - so I'm trying to shift the set_domestic to reflect that. Is the ruling person considered the Head of Government instead of the Head of State?

Good catch on removing the cores. Ethiopia desperately wanted Eritrea (and still does :D ), but for purposes of gameplay I should remove those cores.

I've uploaded the Ethiopia event pics and skin. They're located here as ETH-events-pics.rar
 

Sarmatia1871

Field Marshal
56 Badges
Mar 22, 2004
3.889
352
  • Stellaris: Digital Anniversary Edition
  • 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
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: El Dorado
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • 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: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
It's actually more along the lines of your ministers (including HoS and HoG) being dependant on your government type - so, if you changed to LWR, for example, all your right-wing ministers would disappear at some point.

I'd say the problem is that the democratic and political_left values you've put in the event (5 for each) wouldn't make the government Paternal Autocrat, but Social Conservative. If you change the bolded code lines to...

command = { type = set_domestic which = democratic value = 3 }
command = { type = set_domestic which = political_left value = 4 }

... you should get your Paternal Autocrat government.

It also helps to put in extra command lines appointing the cabinet you want (particularly HoS and HoG) after the policy slider change, as these are often messed up with the ideology shift.

(You also have this command line repeating in your last event - this shouldn't cause any problems, but is a bit redundant!)

To check which 'democratic' and 'political_left' values lead to each different government type, look at the spreadsheet in the 'db/ideology_matrix.csv' file.
 
I finally got it to work after some extensive tweaking.

Here's my problem:

Event 442700-
Code:
action_a = {
		name = "Grant the Independence of Ethiopia" # Grant ETH
		ai_chance = 90
		command = { type = independence which = ETH value = 1 }
		command = { type = dissent value = -1 }
		command = { type = trigger which = 442701 }  # Emperor Restored and no Eritrea
		command = { type = trigger which = 442705 }  # Ethiopia Puppet
	}

It needs to be:

442700
Code:
	action_a = {
		name = "Grant the Independence of Ethiopia" # Grant ETH
		ai_chance = 90
		command = { type = independence which = ETH value = 1 }
		command = { type = dissent value = -1 }
		command = { type = trigger which = 442705 }  # Ethiopia Puppet
	}

442705
Code:
	action_a = {
		name = "OK" # Install a Puppet
		command = { type = make_puppet which = ETH } 
		command = { type = trigger which = 442701 }  # Emperor Restored and no Eritrea
	}

The policy slider was moving correctly, but the command to make it a puppet reset the policy slider values. I needed to make the puppet, then run the trigger which moves the policy slider values. It functions perfectly now for the British, French, Ethiopians, and Eritreans. :cool:
 
Last edited: