on_actions = {
    on_civil_war_end = {
        effect = {
            if = {
                limit = { 
                    ROOT = {
                        OR = {
                            has_government = totalist
                            has_government = syndicalist
                            has_government = radical_socialist
                        }  
                        NOT = { has_country_flag = has_win_cw }
                        OR = {
                            AND = {
                                original_tag = CHI
                                LEP = { exists = no }
                                ANQ = { exists = no }
                                SQI ={
                                    OR = {
                                        exists = No
                                        NOT = { has_war_with = CHI }
                                    }                               
                                }
                            } 
                            AND = {
                                original_tag = HND
                                RAJ = { exists = no }
                                PRF = { exists = no }
                            }
                            AND = {
                                original_tag = CSA
                                USA = { exists = no }
                                NEE = { exists = no }
                                TEX = { exists = no }
                                PSA = { exists = no }
                            }
                        }                  
                    }
                }
                FRA = {          
                    country_event = internvene.999 
                }
                ROOT = {
                    set_country_flag = has_win_cw
                }
            }
        }
    }
    on_daily_IMP = {
        effect = {
            if = {
                limit = {          
                    has_socialist_government = no
                    has_idea = CAN_quebec_in_flames_idea 
                    NOT = { has_global_flag = FRA_que_revo_CAN_in_flame }
                    FRA = {
                        has_country_flag = que_revo_start
                    }
                }
                FRA = {
                    country_event = internvene.2
                }
            }
            if = {
                limit = {          
                    has_socialist_government = no
                    has_completed_focus = CAN_suppress_quebecois         
                    NOT = { has_global_flag = FRA_que_revo_CAN_in_flame_more }
                    FRA = {
                        has_country_flag = que_revo_start
                    }
                }
                FRA = {
                    country_event = internvene.21
                }
            }
            if = {
                limit = {
                    has_war_with = QUE
                    QUE = {
                        has_full_control_of_state = 739
                    }
                }
                IMP = {
                    country_event = internvene.211
                }
            }
        }
    }
    on_daily_QUE = {
        effect = {
            if = {
                limit = {
                    is_puppet = no
                    NOT = { 
                        OR = {
                            has_war_with = CAN 
                            has_war_with = IMP
                        }
                    }
                    is_in_faction = no 
                }
                FRA = {
                    add_to_faction = QUE
                }
            }        
        }
    }
    on_daily_JAP = {
        effect = {
            if = {
                limit = {
                    has_socialist_government = no
                    has_stability < -0.25
                    KOR = {
                        exists = yes
                        has_war_with = JAP
                    }
                    524 = {
                        NOT = {
                            is_controlled_by = JAP
                        }
                    }
                }
                add_ideas = FRA_jap_collapse
                add_political_power = -500
				add_popularity = {
					ideology = syndicalist
					popularity = 0.05
				}
				add_popularity = {
					ideology = radical_socialist
					popularity = 0.1
				}
				add_popularity = {
					ideology = totalist
					popularity = 0.05
				}
                FRA = {
                    set_temp_variable = {
                        FRA_infulence_change = 100
                    }
                    add_to_variable = { FRA_infulence_asia = var:FRA_infulence_change }
                }
                every_other_country = {
                    limit = { has_war_with = JAP }
                    white_peace = JAP
                    set_truce = {
                        tag = JAP
                        days = 730
                    }
                }
                every_other_country = {
					limit = {
						owns_state = 716
					}
					transfer_state = 745
				}
            }        
        }
    }
    on_startup = {
        effect = {
            FRA = {
                country_event = frapoc.1
                country_event = frapoc.10
                add_dynamic_modifier = {
                    modifier = FRA_social_politic_situation
                }
                add_dynamic_modifier = {
                    modifier = FRA_politics_bill_effects
                }

                activate_mission = FRA_govern_buff_change
                
                set_variable = { govern_central_control = 48 }
                set_variable = { govern_bureaucrats_member = 65 }
                set_variable = { govern_bureaucrats_efficiency = 35 }
                set_variable = { govern_bureaucrats_corruption = 37 }
                set_variable = { govern_bureaucrats_stance = 50 }

                set_country_flag = show_the_bill_buff

                set_variable = { frasoc_workers = 52 }
                set_variable = { frasoc_peasants = 34 }
                set_variable = { frasoc_merchants = 39 }
                set_variable = { frasoc_scholoars = 57 }
                set_variable = { frasoc_forces = 49 }
                set_variable = { frasoc_bureaucrats = 61 }
                set_variable = { frasoc_synd = 62 }
                set_variable = { frasoc_anar = 45 }
                set_variable = { frasoc_jaco = 42 }
                set_variable = { frasoc_sore = 49 }
                activate_mission = FRA_politics_change
                FRA_social_politic_situation_buff_change = yes

                set_variable = { seat_synd_trav = 147 }
                set_variable = { seat_synd_radi = 126 }
                set_variable = { seat_synd = 273 }
                set_variable = { seat_anar_parl = 93 }
                set_variable = { seat_anar_anar = 48 }
                set_variable = { seat_anar = 141 }
                set_variable = { seat_jaco_neos = 75 }
                set_variable = { seat_jaco_leni = 58 }
                set_variable = { seat_jaco = 133 }
                set_variable = { seat_sore_oldl = 47 }
                set_variable = { seat_sore_yout = 42 }
                set_variable = { seat_sore = 89 }
                set_variable = { seat_indenpent = 14 }              

                set_country_flag = original_CBGT_leader
                set_country_flag = original_CCSP_leader
                set_country_flag = original_DFA_leader
                set_country_flag = original_DED_leader
                set_country_flag = original_DIS_leader
                set_country_flag = original_DSRG_leader
                set_country_flag = original_CGSC_leader

                set_country_flag = original_FRA_soc_bill_CGT
                set_country_flag = original_FRA_soc_bill_DSE
                set_country_flag = original_FRA_soc_bill_DA
                set_country_flag = original_FRA_soc_bill_DSP
                set_country_flag = original_FRA_soc_bill_WR

                set_variable = { dominant_faction_synd = 4 }
                set_variable = { dominant_faction_anar = 3 }
                set_variable = { dominant_faction_jaco = 0 }
                set_variable = { dominant_faction_sore = 0 }

                set_country_flag = voting_time
                activate_mission = FRA_impeach_startup

                set_variable = { FRA_politics_points = 50 }

                set_variable = { agree_synd_trav = 112 }
              	set_variable = { agree_synd_radi = 100 }
            	set_variable = { agree_anar_parl = 38 }
              	set_variable = { agree_anar_anar = 15 }
               	set_variable = { agree_jaco_neos = 72 }
            	set_variable = { agree_jaco_leni = 58 }
	            set_variable = { agree_sore_oldl = 44 }
	            set_variable = { agree_sore_yout = 39 }
	            set_variable = { agree_indent = 10 }
                FRA_vote_base = yes
               
                random_list = {
                    1 = { set_country_flag = politic_mission_w1_enable }
                    1 = { set_country_flag = politic_mission_w2_enable }
                    1 = { set_country_flag = politic_mission_w3_enable }
                    1 = { set_country_flag = politic_mission_p1_enable }
                    1 = { set_country_flag = politic_mission_p2_enable }
                    1 = { set_country_flag = politic_mission_p3_enable }
                    1 = { set_country_flag = politic_mission_m1_enable }
                    1 = { set_country_flag = politic_mission_m2_enable }
                    1 = { set_country_flag = politic_mission_m3_enable }
                    1 = { set_country_flag = politic_mission_s1_enable }
                    1 = { set_country_flag = politic_mission_s2_enable }
                    1 = { set_country_flag = politic_mission_s3_enable }
                    1 = { set_country_flag = politic_mission_f1_enable }
                    1 = { set_country_flag = politic_mission_f2_enable }
                    1 = { set_country_flag = politic_mission_f3_enable }
                    1 = { set_country_flag = politic_mission_b1_enable }
                    1 = { set_country_flag = politic_mission_b2_enable }
                    1 = { set_country_flag = politic_mission_b3_enable }
                }
                
                779 = { add_manpower = 80000 }
                984 = { add_manpower = 210000 }
                817 = { add_manpower = 120000 }
                19 = { add_manpower = 360000 }
                31 = { add_manpower = 230000 }
                22 = { add_manpower = 290000 }
                762 = { add_manpower = 110000 }
                763 = { add_manpower = 70000 }
                32 = { add_manpower = 90000  }
                26 = { add_manpower = 290000 }
                25 = { add_manpower = 220000 }
                23 = { add_manpower = 250000 }
                20 = { add_manpower = 410000 }
                27 = { add_manpower = 270000 }
                785 = { add_manpower = 420000 }
                18 = { add_manpower = 220000 }
                33 = { add_manpower = 260000 }
                30 = {  add_manpower = 210000  }
                14 = {  add_manpower = 360000 }
                983 = { add_manpower = 370000 }
                15 = { add_manpower = 220000  }
                16 = { add_manpower = 550000  }
                24 = { add_manpower = 330000  }
                17 = { add_manpower = 330000  }
                980 = { add_manpower = 240000 }
            }
        }
    }
    on_daily_FRA = {
        effect = {
            if = {
                limit = {          
                    FRA = {
                        has_country_flag = voting_time
                    }
                    OR = {
                        check_variable = { agree_synd_trav > var:FRA.seat_synd_trav }
                        check_variable = { agree_synd_radi > var:FRA.seat_synd_radi }
                        check_variable = { agree_anar_parl > var:FRA.seat_anar_parl }
                        check_variable = { agree_anar_anar > var:FRA.seat_anar_anar }
                        check_variable = { agree_jaco_neos > var:FRA.seat_jaco_neos }
                        check_variable = { agree_jaco_leni > var:FRA.seat_jaco_leni }
                        check_variable = { agree_sore_oldl > var:FRA.seat_sore_oldl }
                        check_variable = { agree_sore_yout > var:FRA.seat_sore_yout }
                        check_variable = { agree_indent > var:FRA.seat_indenpent }
                    }
                }
                clamp_variable = {
                    var = agree_synd_trav
                    max = var:FRA.seat_synd_trav
                    min = 0
                }
                clamp_variable = {
                    var = agree_synd_radi
                    max = var:FRA.seat_synd_radi
                    min = 0
                }
                clamp_variable = {
                    var = agree_anar_parl
                    max = var:FRA.seat_anar_parl
                    min = 0
                }
                clamp_variable = {
                    var = agree_anar_anar
                    max = var:FRA.seat_anar_anar
                    min = 0
                }
                clamp_variable = {
                    var = agree_jaco_neos
                    max = var:FRA.seat_jaco_neos
                    min = 0
                }
                clamp_variable = {
                    var = agree_jaco_leni
                    max = var:FRA.seat_jaco_leni
                    min = 0
                }
                clamp_variable = {
                    var = agree_sore_oldl
                    max = var:FRA.seat_sore_oldl
                    min = 0
                }
                clamp_variable = {
                    var = agree_sore_yout
                    max = var:FRA.seat_sore_yout
                    min = 0
                }
                clamp_variable = {
                    var = agree_indent
                    max = var:FRA.seat_indenpent
                    min = 0
                }
                set_variable = {
                    FRA_vote_agree = 0
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_synd_trav
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_synd_radi
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_anar_parl
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_anar_anar
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_jaco_neos
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_jaco_leni
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_sore_oldl
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_sore_yout
                }
                add_to_variable = {
                    FRA_vote_agree = var:FRA.agree_indent
                }
            }
            if = {
                limit = {
                    has_completed_focus = FRA_independent_states
                }
                add_to_array = {
                    array = global.europe_member
                    value = THIS  
                }
                add_to_array = {
                    array = global.europe_member_econ
                    value = THIS.num_of_factories
                }
                add_to_array = { 
                    array = global.temp_rank
                    value = THIS.num_of_factories
                } 
                every_allied_country = {
                    limit = { capital_scope = { is_on_continent = europe } }
                    add_to_array = {
                        array = global.europe_member    
                        value = THIS
                    }   
                    add_to_array = {   
                        array = global.europe_member_econ
                        value = THIS.num_of_factories
                    } 
                    add_to_array = { 
                        array = global.temp_rank
                        value = THIS.num_of_factories
                    } 
                    if = {
                        limit = { NOT = { has_country_flag = europe_member } }
                        set_country_flag = europe_member
			        	add_dynamic_modifier = { modifier = EUP_member_buff }
                    }
                    if = {
                        limit = { FRA = { has_completed_focus = FRA_european_economic_community } }
                        set_variable = { EU_consumer_goods_factor = FRA.EU_consumer_goods_factor }
                        set_variable = { EU_global_building_slots_factor = FRA.EU_global_building_slots_factor }
                        set_variable = { EU_production_speed_buildings_factor = FRA.EU_production_speed_buildings_factor }
                        set_variable = { EU_production_speed_arms_factory_factor = FRA.EU_production_speed_arms_factory_factor }
                        set_variable = { EU_production_speed_industrial_complex_factor = FRA.EU_production_speed_industrial_complex_factor }
                        set_variable = { EU_production_factory_start_efficiency_factor = FRA.EU_production_factory_start_efficiency_factor }
                        set_variable = { EU_production_factory_max_efficiency_factor = FRA.EU_production_factory_max_efficiency_factor }
                        set_variable = { EU_line_change_production_efficiency_factor = FRA.EU_line_change_production_efficiency_factor }
                        set_variable = { EU_production_factory_efficiency_gain_factor = FRA.EU_production_factory_efficiency_gain_factor }
                        set_variable = { EU_industrial_capacity_factory = FRA.EU_industrial_capacity_factory }
                        set_variable = { EU_industrial_capacity_dockyard = FRA.EU_industrial_capacity_dockyard }
                        set_variable = { EU_local_resources_factor = FRA.EU_local_resources_factor }
                        if = {
                            limit = { NOT = { has_dynamic_modifier = { modifier = EUP_economic_community } } }
                            add_dynamic_modifier = { modifier = EUP_economic_community }
                        }
                    }
                }
                EUP_member_numbers = yes
            }
        }
    }
    on_daily_EGY = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    FRA = {
                        OR = {
                            has_country_flag = FRA_bills_france_egypt_trade_agreement_show
                            has_country_flag = FRA_bills_france_egypt_cooperation_show
                        }
                    }
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_VEN = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    FRA = {
                       has_country_flag = FRA_bills_oil_partnership_show    
                    }
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    OR = {
                        has_completed_focus = VEN_preventive_coup
                        has_completed_focus = VEN_eagle_screech
                        has_dictatorship_government = yes
                    }
                    FRA = {
                       has_country_flag = FRA_bills_oil_partnership_show    
                    }
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 2 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_BRM = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    has_country_flag = FRA_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    OR = {
                        has_dictatorship_government = yes
				    	AND = {
                            is_in_faction_with = IMP
                            IMP = {
                                has_socialist_government = no
                            }
                        }
                        AND = {
                            is_in_faction_with = JAP
                            JAP = {
                                has_socialist_government = no
                            }
                        }
                    }
                    has_country_flag = FRA_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 2 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                    has_country_flag = FRA_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_SIA = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    has_country_flag = FRA_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    OR = {
                        has_dictatorship_government = yes
				    	AND = {
                            is_in_faction_with = IMP
                            IMP = {
                                has_socialist_government = no
                            }
                        }
                        AND = {
                            is_in_faction_with = JAP
                            JAP = {
                                has_socialist_government = no
                            }
                        }
                    }
                    has_country_flag = FRA_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 2 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                    has_country_flag = FRA_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_SER = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    OR = {
                        has_dictatorship_government = yes
				    	AND = {
                            is_in_faction_with = RUS
                            RUS = {
                                has_government = national_populist
                            }
                        }
                    }
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 2 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_GRE = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    OR = {
                        has_dictatorship_government = yes
				    	AND = {
                            is_in_faction_with = RUS
                            RUS = {
                                has_government = national_populist
                            }
                        }
                    }
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 2 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_ROM = {
        effect =  {
            if = {
                limit = { 
                    has_war_with = FRA
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 1 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    OR = {       
				    	AND = {
                            is_in_faction_with = RUS
                            RUS = {
                                has_government = national_populist
                            }
                        }
                    }
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 2 }
                    country_event = internvene.9990
                }
            }
            if = {
                limit = { 
                    exists = no
                    has_country_flag = FRA_balkan_accepted
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
    on_daily_CHI = {
        effect =  {
            if = {
                limit = { 
                    exists = no
                    
                }
                FRA = {
                    set_variable = { cancel_protocols_reason = 3 }
                    country_event = internvene.9990
                }
            }
        }
    }
}