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_trade_opportunity_contract_invalidated_message_effect

merchant_trade_opportunity_contract_invalidated_message_effect = yes

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 2307 (36 lines). No parameters.

merchant_trade_opportunity_contract_invalidated_message_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 2307 of its file. It takes no parameters: merchant_trade_opportunity_contract_invalidated_message_effect = yes. The game's script calls it in 16 places, among them alleviate_upheaval (contract), build_category_connections (contract) and challenge_competitor (contract). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

What it does

• 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 (36 lines of game script)
merchant_trade_opportunity_contract_invalidated_message_effect = {
	if = {
		limit = {
			NOT = { exists = var:suppress_invalidation_event }
			task_contract_taker = {
				any_character_active_contract = { this = root }
			}
		}
		save_scope_as = task_contract
		task_contract_location ?= { save_scope_as = trade_destination }
		merchant_trade_opportunity_save_lost_reason_effect = yes
		task_contract_taker ?= {
			save_scope_as = task_contract_character
			if = {
				limit = {
					exists = current_travel_plan
					current_travel_plan = { is_travel_with_domicile = no }
					NOR = {
						exists = scope:task_contract.var:contract_partner
						exists = scope:task_contract.var:accepted_while_traveling_elsewhere
					}
					NOR = {
						scope:task_contract.var:trade_opportunity_lost_reason ?= flag:merchant_imprisoned
						scope:task_contract.var:trade_opportunity_lost_reason ?= flag:merchant_incapable
						scope:task_contract.var:trade_opportunity_lost_reason ?= flag:merchant_government
						scope:task_contract.var:trade_opportunity_lost_reason ?= flag:charter_gone
					}
				}
				trigger_event = gdp_merchant_trade_opportunity.9050
			}
			else = {
				merchant_trade_opportunity_send_lost_toast_effect = yes
			}
		}
	}
}

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

Task contracts (16)

  • alleviate_upheaval
  • build_category_connections
  • challenge_competitor
  • disrupt_charter
  • entrepot_buy
  • entrepot_sell
10 more
  • exploit_upheaval
  • market_investment
  • negotiate_tolls
  • Promote Goods
  • sabotage_competition
  • seek_debtors
  • silk_road_caravan
  • silk_road_network
  • smuggle_goods
  • support_guilds

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?