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

gdp_trade_route_maturity_update_effect

gdp_trade_route_maturity_update_effect = yes

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 7867 (30 lines). No parameters.

gdp_trade_route_maturity_update_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 7867 of its file. It takes no parameters: gdp_trade_route_maturity_update_effect = yes. The game's script calls it in 1 place, among them gdp_trade_route_maturity_pulse (on action). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

The comment above it in the file

Trade route scope, adds one maturity stack for every milestone reached since the last update
A route with no stacks variable predates the system, so we start counting from its current milestone
Improved routes go into gdp_maturity_gained_routes, and the caller sends the message

What it does

  • Otherwise:
    • If

      • scope:maturity_new_stacks > 0

      Then

      • while = { count = scope:maturity_new_stacks add_trade_route_modifier = gdp_trade_route_maturity_modifier }

• 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 (30 lines of game script)
gdp_trade_route_maturity_update_effect = {
	if = {
		limit = { NOT = { has_variable = gdp_trade_route_maturity_stacks } }
		set_variable = {
			name = gdp_trade_route_maturity_stacks
			value = gdp_trade_route_maturity_milestones_value
		}
	}
	else = {
		save_temporary_scope_value_as = {
			name = maturity_new_stacks
			value = {
				value = gdp_trade_route_maturity_milestones_value
				subtract = var:gdp_trade_route_maturity_stacks
			}
		}
		if = {
			limit = { scope:maturity_new_stacks > 0 }
			while = {
				count = scope:maturity_new_stacks
				add_trade_route_modifier = gdp_trade_route_maturity_modifier
			}
			change_variable = {
				name = gdp_trade_route_maturity_stacks
				add = scope:maturity_new_stacks
			}
			add_to_temporary_list = gdp_maturity_gained_routes
		}
	}
}

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

On actions (the game's own hooks) (1)

  • gdp_trade_route_maturity_pulse

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?