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

Scripted effect · All Under Heaven files

petition_change_movement_power_effect

petition_change_movement_power_effect = { VALUE = … }

game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 1523 (75 lines). Parameters: $VALUE$.

petition_change_movement_power_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 1523 of its file. A call passes 1 parameter: VALUE. The game's script calls it in 4 places, among them Shape the Dynastic Cycle (decision), grant_movement_petition_effect (scripted effect) and grant_movement_petition_tooltip_effect (scripted effect). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.

The comment above it in the file

use this in PETITION to temporarily increase or decrease movement power of a character or movement

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 (75 lines of game script)
petition_change_movement_power_effect = {
	save_scope_value_as = {
		name =  petition_modifies_movement_power_value
		value = $VALUE$
	}
	if = {
		limit = {
			NOT = {
				participant_group_type = undecided_movement
			}
		}
		if = {
			limit = {
				$VALUE$ >= 0
			}
			custom_tooltip = {
				text = petition_increase_movement_power_effect_tooltip
				if = {
					limit = {
						exists = var:movement_power_increased_petition
					}
					set_variable = {
						name = movement_power_increased_petition
						value = {
							value = var:movement_power_increased_petition
							add = $VALUE$
						}
					}
				}
				else = {
					set_variable = {
						name = movement_power_increased_petition
						value = $VALUE$
					}
				}
			}
		}
		else = {
			custom_tooltip = {
				text = petition_decrease_movement_power_effect_tooltip
				if = {
					limit = {
						exists = var:movement_power_decreased_petition
					}
					set_variable = {
						name = movement_power_decreased_petition
						value = {
							value = var:movement_power_decreased_petition
							add = $VALUE$
						}
					}
				}
				else = {
					set_variable = {
						name = movement_power_decreased_petition
						value = $VALUE$
					}
				}
			}
		}
		#force the update of variables to immediately show changes
		if = { #for characters
			limit = {
				exists = var:movement_power_individual
			}
			update_character_movement_power_effect = yes
			top_participant_group:dynastic_cycle ?= {
				update_movement_power_effect = yes
			}
		}
		else = { #for movements
			update_movement_power_effect = yes
		}
	}
}

As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.

Where it is used

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

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

Spotted a mistake on this page?