• 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.
Mar 11, 2004
603
0
This event is more to test whether I understand how to script CK events. AI Chance to come when I get around it. I id-ed them to the first free block, 'd be nice if it was reserved...
Code:
###Crusading Courtier###

character_event = {
	id = 21400

	picture = "event_crusades"

	name = "One of Your Courtiers wishes to go on Crusade"

	trigger = {
		condition = { type = religion value = catholic }
		condition = { type = gender value = male }
		condition = { type = not value = { type = ruler } }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = not value = { type = trait value = sceptical } }
		condition = {
			type = ruler_csc
			condition = { type = not value = { type = trait value = crusader } }
			}
		}

	mean_time_to_happen = {
		years = 40

		modifier = {
			condition = {
			type = or
			value = { type = trait value = misguided_warrior }
			value = { type = trait value = tough_soldier }
			value = { type = trait value = knowledged_tactician }
			value = { type = trait value = brilliant_strategist }
			value = { type = trait value = martial_cleric }
			}
			factor = 0.7
		}
		modifier = {
			condition = { type = trait value = zealous }
			factor = 0.5
		}

		modifier = {
			condition = {
				type = ruler_csc
				condition = { type = trait value = zealous } }
			factor = 1.3
		}

		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}

		modifier = {
			condition = {type = trait value = lazy }
			factor = 1.2
		}

		modifier = {
			condition = {
				type = ruler_csc
				condition = { type = trait value = lazy } }
			factor = 0.8

		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}

		modifier = {
			condition = { type = trait value = valorous }
			factor = 0.8
		}

		modifier = {
			condition = { type = trait value = coward }
			factor = 1.3
		}

		modifier = {
			condition = { type = trait value = wise }
			factor = 1.4
		}

		modifier = {
			condition = {
				type = ruler_csc
				condition = { type = trait value = sceptical } }
			factor = 0.5
		}

		modifier = {
			condition = {
				type = ruler_csc
				condition = { type = trait value = heretic } }
			factor = 0.2
		}
	}

	action_a = { #Let him go
		effect = { type = courtier_defect }
		effect = { type = ruler_prestige scale = 0.2 }
		effect = { type = ruler_piety scale = 0.5 }
	}

	action_b = { #Let him go with a stipend
		effect = { type = courtier_defect }
		effect = { type = ruler_gold scale = -0.4 }
	}

	action_c = { #Refuse
		effect = { type = loyalty value = -0.5 }
		effect = { type = ruler_prestige scale = 0.7 }
		effect = { type = ruler_piety scale = 0.8 }
	}

	action_d = { #Take up the cross yourself
		effect = { type = trigger for = ruler value = 214001}
	}

character_event = {
	id = 214001

	picture = "event_crusades"

	action_a = {
		effect = { type = add_trait value = crusader }
 
Last edited:
You ought to put in additional trigger conditions restricting it to male catholics. Either use martial final education types and martial cleric as additional trigger conditions (ORed together) or use them to modify the MTTH.

ID block 21400-21499 assigned to you. You need to renumber the secondary event from 214001 to 21401 to fit in your range.

I think the way you coded the action a and c effects will add prestige and piety to the courtier's liege rather than subtracting them, which I think you intended.
 
Byakhiam: because IE sucks :p .

Stupid omissions corrected, thanks richvh. Though I wonder whether I should increase MTTH now? I'm not sure as it seemed to trigger rather rarely...