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

debate_determine_outcome_effect

debate_determine_outcome_effect = yes

game/common/scripted_effects/tgp_debate_scripted_effects.txt, line 103 (116 lines). No parameters.

debate_determine_outcome_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 103 of its file. It takes no parameters: debate_determine_outcome_effect = yes. The game's script calls it in 3 places, among them The … Leadership (event debate_event.5100), The Imperial Favor (event debate_event.5110) and The Imperial Favor (event debate_event.5111). Patch 1.20.1.2, from game/common/scripted_effects/tgp_debate_scripted_effects.txt.

The comment above it in the file

> 0 contender won and will become new leader
<= 0 movement leader won and defended position

What it does

  • 1 of 2 things will happen:
    • 50% (base chance; changed in play): Nothing else happens
    • 50% (base chance; changed in play): Nothing else happens

• 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 (116 lines of game script)
debate_determine_outcome_effect = {
    random_list = {
        10 = { # Contender is winner
            modifier = {
                add = 240
                scope:activity.debate_outcome_value = 3
            }
            modifier = {
                add = 70
                scope:activity.debate_outcome_value = 2
            }
            modifier = {
                add = 10
                scope:activity.debate_outcome_value = 1
            }
            modifier = { # If opponents score is TOO high, you cannot win
                factor = 0
                scope:activity.debate_outcome_value <= -3
            }
            scope:activity.var:debate_contender = {
                save_scope_as = debate_winner
            }
            scope:activity.var:challenged_movement_leader = {
                save_scope_as = debate_loser
            }
            if = {
                limit = {
                    scope:activity.debate_outcome_value < 0
                }
                save_scope_as = debate_unexpected_win
            }
        }
        10 = { # challenged leader is winner
            modifier = {
                add = 240
                scope:activity.debate_outcome_value = -3
            }
            modifier = {
                add = 70
                scope:activity.debate_outcome_value = -2
            }
            modifier = {
                add = 10
                scope:activity.debate_outcome_value = -1
            }
            modifier = { # If opponents score is TOO high, you cannot win
                factor = 0
                scope:activity.debate_outcome_value >= 3
            }
            
            scope:activity.var:debate_contender = {
                save_scope_as = debate_loser
            }
            scope:activity.var:challenged_movement_leader = {
                save_scope_as = debate_winner
            }
            if = {
                limit = {
                    scope:activity.debate_outcome_value > 0
                }
                save_scope_as = debate_unexpected_win
            }
        }
    }
    # Apply effects
    # Seize movement leadership success
    if = {
        limit = {
            scope:activity = {
                has_activity_option = {
                    category = special_type
                    option = debate_type_leadership
                }
            }
        }
        # Set variables for activity conclusion desc - note that for the favor special option, these are set in the hegemon's follow up event.
        scope:activity = {
            set_variable = {
                name = debate_winner
                value = scope:debate_winner
            }
        }
        scope:activity = {
            set_variable = {
                name = debate_loser
                value = scope:debate_loser
            }
        }
        # Record it
        involved_activity = {
            if = {
                limit = {
                    scope:debate_winner = {
                        is_any_movement_leader = no
                    }
                }
                add_activity_log_entry = {
                    key = debate_become_movement_leader_reward
                    score = 80
                    tags = { completed }
                    character = scope:debate_winner
                    location = scope:debate_winner.location
                }
            }
            else = {
                add_activity_log_entry = {
                    key = debate_remain_movement_leader_reward
                    score = 80
                    tags = { completed }
                    character = scope:debate_winner
                    location = scope:debate_winner.location
                }
            }
        }
    }
}

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

Events (3)

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?