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

set_debate_target_effect

set_debate_target_effect = yes

game/common/scripted_effects/tgp_debate_scripted_effects.txt, line 2 (98 lines). No parameters.

set_debate_target_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2 of its file. It takes no parameters: set_debate_target_effect = yes. The game's script calls it in 2 places, among them Debate (activity) and set_opponent_scope_effect (local effect). Patch 1.20.1.2, from game/common/scripted_effects/tgp_debate_scripted_effects.txt.

The comment above it in the file

Find debate target

What it does

  • If

    • scope:activity:
      • has_activity_option = { category = special_type option = debate_type_favor }

    Then

• 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 (98 lines of game script)
set_debate_target_effect = {
    save_scope_as = debate_contender
    if = {
        limit = {
            scope:activity = {
                has_activity_option = {
                    category = special_type
                    option = debate_type_favor
                }
            }
        }
        #Save current empowered movement.
        situation:dynastic_cycle ?= {
            random_participant_group = {
                limit = { exists = var:movement_favored }
                save_scope_as = current_empowered_movement
            }
        }
        if = { # Grab the movement leader if available
            limit = {
                scope:current_empowered_movement = {
                    var:movement_leader = { involved_activity = scope:activity }
                }
            }
            scope:current_empowered_movement = {
                var:movement_leader = { save_scope_as = challenged_movement_leader }
            }
        }
        else_if = { # Else grab a proxy
            limit = {
                scope:activity = {
                    any_attending_character = {
                        top_participant_group:dynastic_cycle ?= scope:current_empowered_movement
                    }                    
                }
            }
            scope:activity = {
                ordered_attending_character = {
                    order_by = movement_power_character_value
                    check_range_bounds = no
                    limit = {
                        top_participant_group:dynastic_cycle ?= scope:current_empowered_movement
                    }
                    save_scope_as = challenged_movement_leader
                }
            }
        }
        else_if = { # Else grab a character from _another_ movement
            limit = {
                scope:activity = {
                    any_attending_character = {
                        NOR = {
                            top_participant_group:dynastic_cycle ?= { participant_group_type = undecided_movement }
                            top_participant_group:dynastic_cycle ?= scope:host.top_participant_group:dynastic_cycle
                        }
                    }
                }
            }
            scope:activity = {
                ordered_attending_character = {
                    order_by = movement_power_character_value
                    check_range_bounds = no
                    limit = {
                        NOR = {
                            top_participant_group:dynastic_cycle ?= { participant_group_type = undecided_movement }
                            top_participant_group:dynastic_cycle ?= scope:host.top_participant_group:dynastic_cycle
                        }
                    }
                    save_scope_as = challenged_movement_leader
                }
            }
        }
        else = { # Invalidate activity
            trigger_event = activity_system.0552
        }
    }
    else_if = {
        limit = {
            scope:activity = {
                has_activity_option = {
                    category = special_type
                    option = debate_type_leadership
                }
            }
        }
        scope:activity.special_guest:movement_leader ?= { save_scope_as =  challenged_movement_leader }
    }
    scope:activity = {
        set_variable = {
            name = challenged_movement_leader
            value = scope:challenged_movement_leader
        }
        set_variable = {
            name = debate_contender
            value = scope:debate_contender
        }
    }
}

As written in game/common/scripted_effects/tgp_debate_scripted_effects.txt.

Where it is used

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

Activities (1)

Scripted effects inside an event file (1)

  • set_opponent_scope_effect

Source: game/common/scripted_effects/tgp_debate_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?