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

grand_campaign_contribution_effect

grand_campaign_contribution_effect = { TITLE = … }

game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 2578 (97 lines). Parameters: $TITLE$.

grand_campaign_contribution_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2578 of its file. A call passes 1 parameter: TITLE. The game's script calls it in 1 place, among them grand_campaign_project (great project). 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.

What it does

  • scope:great_project:
    • Every in list › Every in de jure hierarchy:
      • Where:
        • Title tier exactly County
        • Their holder:
          • top_overlord != scope:war_leader.top_liege
          • Not all of these

      • continue = { tier <= tier_duchy tier >= tier_county }
    • If

      a check the game hides

      Then

      • Every in list › Every in de jure hierarchy:
        • Where:
          • Title tier exactly County
          • Their holder:
            • top_overlord != scope:war_leader.top_liege
            • Is an Independent Ruler
            • Government allows: redirects wars to overlord
        • continue = { tier <= tier_duchy tier >= tier_county }
        • Gains the … Title (owner)

      Else if

      a check the game hides

      Then

    • Contributor gains access to the … China's Grand Campaign Casus Belli until the Great Project is completed (10 years)

• 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 (97 lines of game script)
grand_campaign_contribution_effect = {
	save_scope_as = contributor
	scope:great_project.var:$TITLE$ ?= {
		save_scope_as = target_title
	}
	# the grand marshal should always be the war leader
	title:e_minister_grand_marshal.holder = {
		save_scope_as = war_leader
	}

	scope:great_project ?= {
		add_to_variable_list = {
			name = grand_campaign_titles
			target = scope:target_title
		}
	}
	scope:great_project ?= {
        every_in_list = {
            variable = grand_campaign_titles
            every_in_de_jure_hierarchy = {
				continue = {
					tier <= tier_duchy
					tier >= tier_county
				}
                limit = {
               		tier = tier_county
                    holder ?= {
                        top_overlord != scope:war_leader.top_liege
                        NAND = {
                            is_independent_ruler = yes
                            government_allows = redirects_wars_to_overlord
                        }
                    }
                }
                holder.top_overlord = {
                    add_to_list = potential_primary_defender
                }
            }
        }
        ordered_in_list = {
            list = potential_primary_defender
            order_by = highest_held_title_tier
            save_scope_as = defender
    	}
        if = {
            limit = {
                NOT = { exists = scope:defender }
            }
            create_title_and_vassal_change = {
                type = conquest
                save_scope_as = change_herders
                add_claim_on_loss = no
            }
            every_in_list = {
                variable = grand_campaign_titles
                every_in_de_jure_hierarchy = {
					continue = {
						tier <= tier_duchy
						tier >= tier_county
					}
                    limit = {
                   		tier = tier_county
                        holder ?= {
                            top_overlord != scope:war_leader.top_liege
                            is_independent_ruler = yes
                            government_allows = redirects_wars_to_overlord
                        }
                    }
                    change_title_holder = {
                        holder = scope:owner
                        change = scope:change_herders
                        take_baronies = no
                    }
                }
            }
            resolve_title_and_vassal_change = scope:change_herders
        }
        # if war does not exist yet, declare it
        else_if = {
            limit = {
            	NOT = { exists = scope:great_project.var:grand_campaign_war }
            }
            scope:war_leader = {
            	trigger_event = tgp_china_ministry.0001
            }
            custom_tooltip = grand_campaign_start_tt
        }
        # if war exists, pull everyone in
        else = {
			grand_campaign_update_war_participants_effect = yes
            scope:contributor = {
                trigger_event = tgp_china_ministry.0004
        	}
        }
        custom_tooltip = great_project_type_grand_campaign_project_contribution_tt
	}
}

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

Great projects (1)

  • grand_campaign_project

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?