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_disburse_activity_ai_guest_rewards

debate_disburse_activity_ai_guest_rewards = yes

game/common/scripted_effects/tgp_debate_scripted_effects.txt, line 220 (119 lines). No parameters.

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

What it does

  • If

    • has_activity_intent = debate_increase_movement_power_intent

    Then

    Otherwise

    • If

      • None of these

        • Any relation: Is played by a person

      Then

      • 25% chance of › scope:activity › One random attending character:
        • Where:
          • Is played by the AI
          • merit > scope:ai_guest.merit
          • num_of_relation_disciple < disciples_limit_value
          • NOT = { has_relation_elder = scope:ai_guest }
          • NOT = { has_relation_disciple = scope:ai_guest }
        • set_elder_relation_effect = { ELDER = scope:elder DISCIPLE = scope:ai_guest MERIT = minor_merit_gain }

• 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 (119 lines of game script)
debate_disburse_activity_ai_guest_rewards = {
    if = {
        limit = {
            NOT = { exists = var:tgp_debate_success_score }
        }
        set_variable = {
            name = tgp_debate_success_score
            value = tgp_debate_success_score_value
        }
    }
    if = {
        limit = {
            has_activity_intent = debate_increase_movement_power_intent
            exists = top_participant_group:dynastic_cycle
        }
        top_participant_group:dynastic_cycle ?= { 
            save_scope_as = my_movement
        }
        random = {
            chance = {
                value = 25
                if = {
                    limit = { var:tgp_debate_success_score >= 100 }
                    add = 75
                }
                else_if = {
                    limit = { var:tgp_debate_success_score >= 75 }
                    add = 50
                }
                else_if = {
                    limit = { var:tgp_debate_success_score >= 50 }
                    add = 25
                }
            }
            if = {
                limit = { var:tgp_debate_success_score >= 100 }
                change_influence = major_influence_gain
                scope:my_movement = {
                    event_change_movement_power_effect = {
                        VALUE = event_increase_movement_power_major_value
                    }
                }
            }
            else_if = {
                limit = { var:tgp_debate_success_score >= 75 }
                change_influence = medium_influence_gain
                scope:my_movement = {
                    event_change_movement_power_effect = {
                        VALUE = event_increase_movement_power_medium_value
                    }
                }
            }
            else = {
                change_influence = minor_influence_gain
                scope:my_movement = {
                    event_change_movement_power_effect = {
                        VALUE = event_increase_movement_power_minor_value
                    }
                }
            }
        }
    }
    else = {
        save_scope_as = ai_guest
        if = {
            limit = {
                NOT = {
                    any_relation = {
                        type = elder
                        is_ai = no
                    }
                }
            }
            random = {
                chance = {
                    value = 25
                }
                scope:activity = {
                    random_attending_character = {
                        limit = {
                            is_ai = yes
                            merit > scope:ai_guest.merit
                            num_of_relation_disciple < disciples_limit_value
                            NOR = {
                                has_relation_elder = scope:ai_guest
                                has_relation_disciple = scope:ai_guest
                            }
                            # Not busy with their own things.
                            this != scope:host
                            this != scope:activity.var:challenged_movement_leader
                        }
                        weight = {
                            base = 100
                            modifier = {
                                any_relation = {
                                    type = disciple
                                    count > 0
                                }
                                # even out the distribution of disciples
                                add = {
                                    every_relation = {
                                        type = disciple
                                        add = -5
                                    }
                                }
                            }
                        }
                        save_scope_as = elder
                        set_elder_relation_effect = {
                            ELDER = scope:elder
                            DISCIPLE = scope:ai_guest
                            MERIT = minor_merit_gain
                        }
                    }            
                }
            }
        }
    }
}

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

Activities (1)

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?