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

gigau

Imperare Orbis Universi
Moderator
218 Badges
May 4, 2005
43.560
8.243
47
www.twitch.tv
  • Imperator: Rome Deluxe Edition
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • Victoria 3 Sign Up
  • Hearts of Iron IV: Colonel
  • Stellaris: Galaxy Edition
  • 200k Club
  • 500k Club
  • Paradox Order
  • PDXCON 2017 Gold Ticket holder
  • PDXCON 2018 "The Emperor"
  • PDXCon 2019 "King"
  • PDXCon 2017 Awards Winner
Sorry for posting this help request here, but i seem not to get help is the "Event scripting threads"... eventhough i posted it several days ago. Please help me understand what's the problem.

When i load a game or a scenario with this.... it says he doesn't recongnize neither "has_improvement", nor "mean_tim_to_happen"... Therefore, the game has read the line in the "db\event.txt" document, and it has read into the "db\events\Fantasy.txt" file. So what is the problem ?
What must i change to make it work ?


Code:
province_event = {
	id = 23400

	picture = "Mythologie"

	trigger = {
		condition = { type = has_improvement value = { hill_fort = yes } }

		condition = { type = not value = { type = has_improvement value = { small_castle = yes } } }

		condition = { type = religion value = catholic }

		condition = { type = or
			condition = { type = culture value = irish }
			condition = { type = culture value = welsh }
			condition = { type = culture value = scottish }
		}
		condition = { type = owner
			condition = { type = not value = { type = or
				condition = { type = culture value = irish }
				condition = { type = culture value = welsh }
				condition = { type = culture value = scottish }
			}
		}
	}

	mean_time_to_happen = {
		months = 7500

		modifier = {
			condition = { type = has_advance value = { inquisition  = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = { university = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = {  templar_house = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = { school = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = { church = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = { large_church = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = { domed_church = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = {  cathedral = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = has_improvement value = {  monastery = yes } }
			factor = 1.2 }
		modifier = {
			condition = { type = not value = { type = clergy_power value = 0.25 } }
			factor = 1.5 }
		modifier = {
			condition = { type = not value = { type = clergy_power value = 0.15 } }
			factor = 1.3 }
		modifier = {
			condition = { type = not value = { type = clergy_power value = 0.05 } }
			factor = 1.1 }
	}

	action_a = {	# Use the prophecy of Mirddhyn : The red dragon wins... the celtic kingdom is long dead !
		ai_chance = 35
		effect = { type = remove_improvement value = hill_fort }
		effect = { type = set_to_realm_culture }
		effect = { type = ruler_prestige value = 100 } 
		effect = { type = noble_loyalty value = 0.5 }
		effect = { type = burgher_loyalty value = -0.2 }
		effect = { type = peasant_loyalty value = -0.6 } }

	action_b = {	# Use the prophecy of Mirddhyn : The white dragon wins... we will revive the celtic kingdom !
		ai_chance = 35
		effect = { type =  remove_improvement value = hill fort }
		effect = { type =  trigger for = ruler value = 23405 }
		effect = { type = ruler_prestige value = 100 } 
		effect = { type = noble_loyalty value = -0.5 }
		effect = { type = peasant_loyalty value = +0.6 } }

	action_c = {	# All that are just superstitions !
		ai_chance = 30
		effect = { type =  remove_improvement value = hill_fort }
		effect = { type = ruler_prestige value = 200 }
		effect = { type = add_province_effect value = looted } }
}

Thanks in advance

Best regards
 

gigau

Imperare Orbis Universi
Moderator
218 Badges
May 4, 2005
43.560
8.243
47
www.twitch.tv
  • Imperator: Rome Deluxe Edition
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • Victoria 3 Sign Up
  • Hearts of Iron IV: Colonel
  • Stellaris: Galaxy Edition
  • 200k Club
  • 500k Club
  • Paradox Order
  • PDXCON 2017 Gold Ticket holder
  • PDXCON 2018 "The Emperor"
  • PDXCon 2019 "King"
  • PDXCon 2017 Awards Winner
Thanks, i'll test the event with that :p

I have two new questions :

1/ Can i have an event where, for example, Count of Provence (or whoever owns it) gives County of Venaissain to Papal States ?

2/ Can an event make a vassal change his liege ? I know i can make a vassal become independant, but can i make him swear an oath to another liege ?

3/ What are al the files i need to update to create a new state (with a tag uXXX) ? All i remember is to think about the CoA.

Thanks in advance
Best regards
 

unmerged(21937)

Your Industrial Friend
Nov 15, 2003
9.557
1
1) Only if Papal States don't exist, when you can recreate them in Venaissin. You can see examples of Papal recreations in Papal_events

2) No.

3) It depends on how you want it to appear.

Two things are definite musts, adding a CoA and changing world_names.csv to have the country with name other than User Defined.

If you want it to appear as a creatable title, you need to alter province.csv and add the tag to correct places on kingdom column.

Adding the title to a scenario is more tricky process, but Havard's CK wiki has this page that helps in that: http://www.crusader-kings.com/wiki/index.php?title=Adding_a_ruler_to_a_new_title
 

ambrox62

Very hard level player
8 Badges
Mar 5, 2004
191
0
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Victoria: Revolutions
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
gigau said:
Please help me understand what's the problem.
province_event = {
id = 23400
action_b = { # Use the prophecy of Mirddhyn : The white dragon wins... we will revive the celtic kingdom !
ai_chance = 35
effect = { type = remove_improvement value = hill fort }
effect = { type = trigger for = ruler value = 23405 }

You can't use type = trigger in province_event
 

gigau

Imperare Orbis Universi
Moderator
218 Badges
May 4, 2005
43.560
8.243
47
www.twitch.tv
  • Imperator: Rome Deluxe Edition
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • Victoria 3 Sign Up
  • Hearts of Iron IV: Colonel
  • Stellaris: Galaxy Edition
  • 200k Club
  • 500k Club
  • Paradox Order
  • PDXCON 2017 Gold Ticket holder
  • PDXCON 2018 "The Emperor"
  • PDXCon 2019 "King"
  • PDXCon 2017 Awards Winner
ambrox62 said:
You can't use type = trigger in province_event


Thanks a lot... i had figured that yesterday evening while fighting with my event, just before reading your post. So you can only trigger a char-event from a char-event, and no cross-triggering between char-event and prov-event ?

Thanks again for your help
 

unmerged(21937)

Your Industrial Friend
Nov 15, 2003
9.557
1
Only character events can be triggered with trigger command. And only character events can use trigger command.

Trying to trigger province event will not give you error message on load, but will crash when it should execute.