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

...or the ruins of himself
Feb 19, 2003
1.269
0
Code:
### the papacy is moving
province_event = {
   id = xyz

   picture = "event_claim"

   name = "The Exiled Holy See needs Land!"

   trigger = {
         condition = {
               type = not
               value = { type = title_exists value = PAPA }
         }
			   condition = { type = owner
                             condition = { type = age value = 16 } }
         condition = { type = not
               value = { type = has_law value = { regal_supremacy = yes } } }
         condition = { type = and
         			condition = { type = not
               					   value = { type = has_province_effect value = { revolt = yes } } }
         			condition = { type = not
               				     value = { type = has_province_effect value = { heretic = yes } } }
         }
         condition = { type = ruler_religion value = catholic }
         condition = { type = religion value = catholic }
         condition = { type = clergy_loyalty value = 0.500 }
			   condition = { type = and
			   			condition = { type = owner
									condition = { type = piety value = 0 } }
			   			condition = { type = owner
									condition = { type = prestige value = 0 } }
			   			condition = { type = owner
			                                                 condition = { type = not
									value = { type = trait value = kinslayer } } }
			   			condition = { type = owner
			                                                 condition = { type = not
									value = { type = trait value = excommunicated } } }
			   			condition = { type = owner
			                                                 condition = { type = not
									value = { type = atwar } } }
				 }
         condition = { type = or
               condition = { type = area value = 228 } # Alpes Martimes
               condition = { type = area value = 456 } # Alpi Carniche
               condition = { type = area value = 239 } # Alps
               condition = { type = area value = 254 } # Baden
               condition = { type = area value = 314 } # Danube
               condition = { type = area value = 448 } # Donau
               condition = { type = area value = 149 } # Garonne
               condition = { type = area value = 205 } # Massif Central
               condition = { type = area value = 235 } # Po
               condition = { type = area value = 124 } # Rhein
               condition = { type = area value = 227 } # Rhone
               }
   }

   mean_time_to_happen = { months = 120
   
#		modifier = {
#			condition = { type = owner
#					condition = { type = liege
#						  condition = { type = or
#						      condition = { trait value = excommunicated }
#						      condition = { trait value = heretic } } } }
#		 factor = 1.6 }
#		modifier = {
#			condition = { type = owner
#					condition = { type = realm_ruler
#						  condition = { trait value = excommunicated }
#						  condition = { trait value = heretic } } }
#		 factor = 1.6 }
#		modifier = {
#			condition = { type = owner
#					condition = { type = realm_ruler
#					    condition = { type = or
#						  		condition = { type = title value = GERM }
#						  		condition = { type = title value = FRAN }
#						  		condition = { type = title value = ITAL } } } }
#		 factor = 1.3 }
   	modifier = {
			condition = { type = owner
					condition = { type = county } }
		 factor = 1.9 }
		modifier = {
			condition = { type = owner
					condition = { type = kingdom } }
		 factor = 0.7 }
		modifier = {
			condition = { type = owner
					condition = { type = piety value = 200 } }
		 factor = 0.9 }
		modifier = {
			condition = { type = owner
					condition = { type = piety value = 600 } }
		 factor = 0.8 }
		modifier = {
			condition = { type = owner
					condition = { type = piety value = 1000 } }
		 factor = 0.7 }
		modifier = {
			condition = { type = owner
					condition = { type = prestige value = 500 } }
		 factor = 0.9 }
		modifier = {
			condition = { type = owner
					condition = { type = prestige value = 1000 } }
		 factor = 0.7 }
		modifier = {
			condition = { type = has_improvement value = { moneylenders = yes } }
		 factor = 3.0 }
		modifier = {
			condition = { type = or 
					condition = { type = has_improvement value = { highway_robber_band = yes } }
					condition = { type = has_improvement value = { smugglers_ring = yes } } }
		 factor = 2.5 }
		modifier = {
			condition = { type = has_improvement value = { thieves_guild = yes } }
		 factor = 2.0 }
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
		 factor = 3.0 }
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
		 factor = 1.5 }
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
		 factor = 0.9 }
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
		 factor = 0.7 }
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
		 factor = 2.5 }
		modifier = {
			 condition = { type = or
			     condition = { type = has_improvement value = { library = yes } }
			     condition = { type = has_improvement value = { school = yes } }
			     condition = { type = has_improvement value = { templar_house = yes } }
			     condition = { type = has_improvement value = { university = yes } }
			     condition = { type = has_improvement value = { large_church = yes } }
			     condition = { type = has_improvement value = { domed_church = yes } }
			     condition = { type = has_improvement value = { cathedral = yes } }
			     condition = { type = has_improvement value = { extensive_roadnet = yes } }
			     condition = { type = has_improvement value = { monastery = yes } }
			     condition = { type = has_improvement value = { monastery = yes } } }
			factor = 1.4
		}
		modifier = {
			condition = { type = or
					condition = { type = has_province_effect value = { malaria = yes } }
					condition = { type = has_province_effect value = { dysentery = yes } }
 			    condition = { type = has_province_effect value = { small_pox = yes } }
			    condition = { type = has_province_effect value = { typhoid_fever = yes } } }
		 factor = 100.0
	  }
		modifier = { 
		   condition = { type = or
			    condition = { type = advance_focus value = ascetism }
			 		condition = { type = advance_focus value = clerical_celibacy }
			 		condition = { type = advance_focus value = relics }
			 		condition = { type = advance_focus value = monastic_schools }
			 		condition = { type = advance_focus value = the_seven_liberal_arts }
			 		condition = { type = advance_focus value = cathedral_schools }
			 		condition = { type = advance_focus value = universities }
			 		condition = { type = advance_focus value = academic_disciplines }
			 		condition = { type = advance_focus value = basilican_structures }
			 		condition = { type = advance_focus value = brickwork_structures }
			 		condition = { type = advance_focus value = romanesque_vaulting } }
				factor = 0.9
			}
		modifier = { 
		   condition = { type = or
			 		condition = { type = advance_focus value = apostolic_poverty }
			 		condition = { type = advance_focus value = letters_of_indulgence }
			 		condition = { type = advance_focus value = music_notation_system }
			 		condition = { type = advance_focus value = aristotelian_logics }
			 		condition = { type = advance_focus value = cylindrical_structures }
			 		condition = { type = advance_focus value = gothic_buttresses }
			 		condition = { type = advance_focus value = scholastics } }
				factor = 0.8
			}
		modifier = { 
		   condition = { type = or
			 		condition = { type = advance_focus value = critical_bible_interpretations }
			 		condition = { type = advance_focus value = inquisition }
			 		condition = { type = advance_focus value = choir_song } }
				factor = 0.7
			}
		modifier = { 
		   condition = { type = or
			 		condition = { type = advance_focus value = bible_translations }
			 		condition = { type = advance_focus value = formalized_lithurgy }
			 		condition = { type = advance_focus value = tapestries } }
				factor = 0.6
			}
		modifier = { 
		   condition = { type = or
			 		condition = { type = advance_focus value = critical_thinking }
			 		condition = { type = advance_focus value = jubilee }
			 		condition = { type = advance_focus value = extravagant_decoration } }
				factor = 0.5
			}
		modifier = {
			 condition = { type = advance_focus value = fashion_clothes }
				factor = 1.4
			}
		modifier = {
			 condition = { type = advance_focus value = vernacular_literature }
				factor = 1.2
			}
		modifier = {
			 condition = { type = advance_focus value = natural_philosophy }
				factor = 1.8
			}
		modifier = {
			 condition = { type = advance_focus value = science }
				factor = 2.0
			}
		modifier = {
				condition = { type = or
						condition = { type = province value = 235 } # Milan
			 			condition = { type = demesne value = 233 } # Genoa
			 		  condition = { type = demesne value = 356] } # Venice
			 			condition = { type = province value = 221 } # Marseille
			 			condition = { type = province value = 214 } # Toulouse
			 			condition = { type = province value = 314 } # Nurnberg
						}
				factor = 1000000.0 } # I tried to place the condition to not create PAPA in this lands at the trigger, but do not worked
	 }
	 
   action_a = { # yes
    ai_chance = 50
    
			modifier = {
			 condition = { type = ruler_diplomacy value = 15 }
				factor = 0.5
			}
			modifier = {
			 condition = { type = ruler_diplomacy value = 12 }
				factor = 0.8
			}
			modifier = {
			 condition = { type = ruler_diplomacy value = 9 }
				factor = 1.2
			}
			modifier = {
			 condition = { type = ruler_diplomacy value = 6 }
				factor = 1.5
			}
			modifier = {
			 condition = { type = has_law value = { popular_law = yes } }
				factor = 0.9
			}
			modifier = {
			 condition = { type = clergy_power value = 0.100 }
				factor = 0.8
			}
			modifier = {
			 condition = { type = clergy_power value = 0.300 }
				factor = 1.2
			}
        
      effect = { type = ruler_prestige value = 50 }
      effect = { type = ruler_piety value = 150 }
      effect = { type = create_tag value = PAPA }
      effect = { type = add_improvement value = forestry }
      effect = { type = add_improvement value = library }
      effect = { type = add_improvement value = school }
      effect = { type = add_improvement value = church }
      effect = { type = add_improvement value = small_castle }
      effect = { type = add_advance value = two_field_system }
      effect = { type = add_advance value = three_field_system }
      effect = { type = add_advance value = wood_plows }
      effect = { type = add_advance value = chickens }
      effect = { type = add_advance value = goats }
      effect = { type = add_advance value = basilican_structures }
      effect = { type = add_advance value = minor_merchant_houses }
      effect = { type = add_advance value = road_building }
      effect = { type = add_advance value = divine_rights }
      effect = { type = add_advance value = divine_duty }
      effect = { type = add_advance value = the_seven_liberal_arts }
      effect = { type = add_advance value = monastic_schools }
      effect = { type = add_advance value = aristotelian_logics }
      effect = { type = add_advance value = scholastics }
      effect = { type = add_advance value = relics }
      effect = { type = add_advance value = clerical_celibacy }
      effect = { type = add_advance value = letters_of_indulgence }
      effect = { type = clergy_loyalty value = 0.3 }
      effect = { type = peasant_loyalty value = 0.1 }
   }
   action_b = { # no
    ai_chance = 50
      
      effect = { type = ruler_prestige value = -5 }
      effect = { type = ruler_piety value = -25 }
      effect = { type = clergy_loyalty value = -0.3 }
   }
}

Code:
ACTIONNAMExyzA;Our land is Your land!;;;;;;;;;;X
ACTIONNAMExyzB;Wait, let me think...;;;;;;;;;;X
 
Last edited:
This is the thread with Bismark's papacy events.
 
The effects of choosing not to grant land (b) are way too harsh. An exiled Pope had no authority to claim land from other Christian rulers, but he could be properly grateful to the one who helped him out. A minor piety hit of 25, perhaps, if you really feel like it, but -100 prestige and -300 piety? And why on earth should the local populace lose loyalty to you and revolt (not to mention destroy province improvements) because you chose not to give the land to another ruler?

As such, I think that option b) should, in practise, carry no penalties whatsoever - you should get rewarded for letting the Papacy set up business somewhere else (actually, the REAL reward ought to be to become Papal Controller, but that is 1) impossible to mod, and 2) a pain in the ass with 1.03b if it did work), not penalised for not giving a landless Pope land.

One major concern with the event is that it would appear to be a suicide-event for 1 province minors in the area - but I have not tested it, so I might be mistaken.

For AI modifiers, might I suggest that a skeptical ruler would be more likely to choose b)? You have set it such that a skeptical ruler is LESS likely to choose b) currently. Another thing, the AI modifiers appear to be mainly based on the ruler's father's traits rather than the ruler's own. Is this intentional?

To make a church a prerequisite, it is cleaner to check that a church exists, than to check the negation of a church not existing. If nothing else, I do not know whether the "X = no" is currently working. (That might have been fixed)

Just curious. :)


EDIT: The reason that your AI-block does not work is probably because you are checking father-traits for a province, rather than for a person. You need to use a csc: owner -> father, or something like that.
 
Last edited:
Thanks for feedback... :)

Peter Ebbesen said:
The effects of choosing not to grant land (b) are way too harsh. An exiled Pope had no authority to claim land from other Christian rulers, but he could be properly grateful to the one who helped him out. A minor piety hit of 25, perhaps, if you really feel like it, but -100 prestige and -300 piety? And why on earth should the local populace lose loyalty to you and revolt (not to mention destroy province improvements) because you chose not to give the land to another ruler?
As such, I think that option b) should, in practise, carry no penalties whatsoever - you should get rewarded for letting the Papacy set up business somewhere else (actually, the REAL reward ought to be to become Papal Controller, but that is 1) impossible to mod, and 2) a pain in the ass with 1.03b if it did work), not penalised for not giving a landless Pope land.

I have chosen those effects for action_b (refuse) to "force" the human player to really consider to accept the "deal", not thinking "go away, damn landstealer" under any circumstance... :D By the way, yours are good points, so... a lil rework is needed.


To make a church a prerequisite, it is cleaner to check that a church exists, than to check the negation of a church not existing. If nothing else, I do not know whether the "X = no" is currently working. (That might have been fixed)

I'm basing on a Mr.T phrase... this one in the "Events Scripting 1.03 style" thread. :)

For AI modifiers, might I suggest that a skeptical ruler would be more likely to choose b)? You have set it such that a skeptical ruler is LESS likely to choose b) currently. Another thing, the AI modifiers appear to be mainly based on the ruler's father's traits rather than the ruler's own. Is this intentional?

mmm, for the truth, now I realize the whole action_b modifier block got wrong factors. I have to put values over 1.0 there, right?
BTW, the ai_chance modifier blocks are not fully completed.

The reason that your AI-block does not work is probably because you are checking father-traits for a province, rather than for a person. You need to use a csc: owner -> father, or something like that.

Yes, thanks. I was thinking the modifiers for ai_chance directly tied to the one who have to choose...

Anyway, I have a doubt about csc... the scripters say some csc checks can be very CPU consuming. OK, but... when this happens? What give the "stressed" trait to my processor? :rolleyes:
 
Mikon Orod said:
Thanks for feedback... :)
My pleasure.

I have chosen those effects for action_b (refuse) to "force" the human player to really consider to accept the "deal", not thinking "go away, damn landstealer" under any circumstance...
The intention is obvious - it is just that I hate all events of the type "a) something a bit good and a bit bad b) something excruciatingly bad, because I do not want you to choose a, but you'll avoid the 'a bit bad' part of a". It is usually only used when the author knows that he has a weak case for the player choosing the option that he would prefer (a) given a free choice, but realising that he needs an alternative option to a). I have seen such "forced" event options in too many event projects to mention. :D

(*)

I'm basing on a Mr.T phrase... this one in the "Events Scripting 1.03 style" thread. :)
MrT has made a typo in that thread. He is being asked whether "cathedral = no" works, and suggests using the negation instead, which would be "not cathedral = yes". (Because "X = yes" works). Unfortunately, he has mistakenly typed "not cathedral = no", which (if it worked) would equate to "cathedral = yes" - the opposite of what he is asked. In other words, use "X = yes" to check for existence and "not X = yes" to check for absence. Do not use "X = no" unless you have verified that it works.

Anyway, I have a doubt about csc... the scripters say some csc checks can be very CPU consuming. OK, but... when this happens? What give the "stressed" trait to my processor? :rolleyes:
That is fairly simple. csc conditions can link one->one (e.g. owner, father, steward) or one->many (e.g. any_courtier). one->one links are generally inexpensive, one->many links are generally expensive.

If you avoid using any one->many links, you should be home safe on all but the crankiest old systems. (one->one links do impose a bit of overhead, but it is miniscule compared to performing multiple condition checks as one->many do)
 
It seems csc on the ai_chance modifiers do not work at all. I was forced too put just some province conditions in it.

BTW, if someone is interested, I have posted in the first message of the trhead a revisited "papal moving" event...

One note: the "realm_ruler" csc... it works? In the event code there are some strings that use it (commented out), but they give me an error at loading.