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

add_merchant_competitive_pressure_effect

add_merchant_competitive_pressure_effect = { TOOLTIP = … VALUE = … }

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 6 (60 lines). Parameters: $TOOLTIP$, $VALUE$.

add_merchant_competitive_pressure_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 6 of its file. A call passes 2 parameters: TOOLTIP and VALUE. The game's script calls it in 5 places, among them Recruiting Informants (scheme), trade_opportunities_competitive_pressure_critical_success_effect (scripted effect) and trade_opportunities_competitive_pressure_failure_effect (scripted effect). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

The comment above it in the file

Overseer Martial Lifestyle Perk Effect

What it does

  • If

    Then

    • If

      Then

      • add_prestige = { value = scope:merchant_competitive_pressure_overflow_value multiply = merchant_dominant_position_prestige_per_pressure_value }

• 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 (60 lines of game script)
add_merchant_competitive_pressure_effect = {
	if = {
		limit = {
			government_has_flag = government_is_merchant
			has_perk = serve_the_crown_perk
		}
		custom_tooltip = $TOOLTIP$
		hidden_effect = {
			if = {
				limit = { NOT = { exists = var:merchant_competitive_pressure } }
				set_variable = {
					name = merchant_competitive_pressure
					value = $VALUE$
				}
			}
			else = {
				change_variable = {
					name = merchant_competitive_pressure
					add = $VALUE$
				}
			}
			if = {
				limit = {
					has_variable = merchant_competitive_pressure
				}
				save_scope_value_as = {
					name = merchant_competitive_pressure_overflow_value
					value = {
						value = var:merchant_competitive_pressure
						subtract = merchant_competitive_pressure_current_max_value
						min = 0
					}
				}
			}
			if = {
				limit = {
					OR = {
						NOT = { exists = var:merchant_competitive_pressure }
						var:merchant_competitive_pressure > merchant_competitive_pressure_current_max_value
					}
				}
				set_variable = {
					name = merchant_competitive_pressure
					value = merchant_competitive_pressure_current_max_value
				}
			}
		}
		if = {
			limit = {
				has_perk = absolute_control_perk
				exists = scope:merchant_competitive_pressure_overflow_value
				scope:merchant_competitive_pressure_overflow_value > 0
			}
			add_prestige = {
				value = scope:merchant_competitive_pressure_overflow_value
				multiply = merchant_dominant_position_prestige_per_pressure_value
			}
		}
	}
}

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

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?