CK3 DatabaseCrusader Kings III · 1.21.0 “Florin” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →Merch→

Scripted effect · Silk and Silver files

merchant_charter_benefit_counter_effect

merchant_charter_benefit_counter_effect = { MERCHANT = … PATRON = … }

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 4241 (119 lines). Parameters: $MERCHANT$, $PATRON$.

merchant_charter_benefit_counter_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 4241 of its file. A call passes 2 parameters: MERCHANT and PATRON. The game's script calls it in 2 places, among them Direct Local Investment (decision) and In the Name of the … (event gdp_decision.1220). Its body carries 10 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

What it does

  • If

    • scope:patron: Is played by a person

    Then

    Otherwise

    • If

      • One of these

        • Charter abuse patron is not scope:patron
        • or

          NOT = { exists = var:charter_abuse_stance }

      Then

      • Your Patron is indifferent and will not take any action

      Else if

      a check the game hides

      Then

      • Depending on charter abuse stance:
        • When charter abuse stance is grateful › 1 of 2 things will happen:
          • 60% (base chance; changed in play):
          • 40%: Your Patron will be grateful and will not take any action
        • When charter abuse stance is pleased › 1 of 2 things will happen:
          • 40% (base chance; changed in play):
          • 60%: Your Patron will be grateful and will not take any action
        • When charter abuse stance is indifferent › 1 of 2 things will happen:
          • 20% (base chance; changed in play):
          • 80%: Your Patron will be pleased and will not take any action
        • When charter abuse stance is annoyed: Your Patron is indifferent and will not take any action
        • When charter abuse stance is angry: Your Patron will be annoyed but will not take any action

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.

The script as written (119 lines of game script)
merchant_charter_benefit_counter_effect = {
	$PATRON$ = { save_scope_as = patron }
	$MERCHANT$ = { save_scope_as = merchant }
	if = {
		limit = {
			scope:patron = { is_ai = no }
		}
		custom_tooltip = merchant_charter_abuse_counter_random
		scope:patron = {
			trigger_event = {
				id = gdp_decision.1210
				days = { 1 4 }
			}
		}
	}
	else = {
		if = {
			limit = {
				OR = {
					NOT = { var:charter_abuse_patron ?= scope:patron }
					NOT = { exists = var:charter_abuse_stance }
				}
			}
			custom_tooltip = merchant_charter_benefit_counter_indifferent
			set_variable = {
				name = charter_abuse_patron
				value = scope:patron
			}
			set_variable = {
				name = charter_abuse_stance
				value = flag:indifferent
			}
		}
		else_if = {
			limit = { exists = var:charter_abuse_stance }
			switch = {
				trigger = var:charter_abuse_stance
				flag:grateful = {
					random_list = {
						60 = {
							modifier = { add = merchant_charter_benefit_patron_reaction_value }
							custom_tooltip = merchant_charter_benefit_counter_reaction_action
							trigger_event = {
								id = gdp_decision.1200
								days = { 21 37 }
							}
						}
						40 = {
							custom_tooltip = merchant_charter_benefit_counter_reaction_grateful
						}
					}
				}
				flag:pleased = {
					set_variable = {
						name = charter_abuse_stance
						value = flag:grateful
					}
					random_list = {
						40 = {
							modifier = { add = merchant_charter_benefit_patron_reaction_value }
							custom_tooltip = merchant_charter_benefit_counter_reaction_action
							trigger_event = {
								id = gdp_decision.1200
								days = { 21 37 }
							}
						}
						60 = { custom_tooltip = merchant_charter_benefit_counter_reaction_grateful }
					}
				}
				flag:indifferent = {
					set_variable = {
						name = charter_abuse_stance
						value = flag:pleased
					}
					random_list = {
						20 = {
							modifier = {
								add = {
									value = merchant_charter_benefit_patron_reaction_value
									divide = 2
								}
							}
							custom_tooltip = merchant_charter_benefit_counter_reaction_action
							trigger_event = {
								id = gdp_decision.1200
								days = { 21 37 }
							}
						}
						80 = { custom_tooltip = merchant_charter_benefit_counter_reaction_pleased }
					}
				}
				flag:annoyed = {
					set_variable = {
						name = charter_abuse_stance
						value = flag:indifferent
					}
					custom_tooltip = merchant_charter_benefit_counter_indifferent
				}
				flag:angry = {
					set_variable = {
						name = charter_abuse_stance
						value = flag:annoyed
					}
					custom_tooltip = merchant_charter_benefit_counter_reaction_annoyed
				}
			}
		}
		if = {
			limit = {
				var:charter_abused_patron ?= scope:patron
				OR = {
					var:charter_abuse_stance ?= flag:pleased
					var:charter_abuse_stance ?= flag:grateful
				}
			}
			remove_variable = charter_abused_patron
		}
	}
}

As written in game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls merchant_charter_benefit_counter_effect.

Events (1)

Source: game/common/scripted_effects/gdp_merchant_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.

Spotted a mistake on this page, or have an idea for the site?