﻿on_game_start = {
    on_actions = {
		ce_byzantine_867_setup_effect_setup
		ce_byzantine_1066_setup_effect_setup
		ce_byzantine_1178_setup_effect_setup
    }
}

on_game_start_after_lobby = {
    on_actions = {
        # ce_byzantine_game_rule_effect
        ce_byzantine_name_game_rule_effect
    }
}

# on_title_gain = {
#     on_actions = {
#         ce_byzantine_emperor_effect
#     }
# }

ce_byzantine_867_setup_effect_setup = {
    trigger = {
        game_start_date = 867.1.1
    }
    effect = {
        ce_byzantine_867_setup_effect = yes
    }
}

ce_byzantine_1066_setup_effect_setup = {
    trigger = {
        game_start_date = 1066.9.15
    }
    effect = {
        ce_byzantine_1066_setup_effect = yes
    }
}

ce_byzantine_1178_setup_effect_setup = {
    trigger = {
        game_start_date = 1178.10.1
    }
    effect = {
        ce_byzantine_1178_setup_effect = yes
    }
}


# ce_byzantine_game_rule_effect = {
#     effect = {
#         # Byzantine to Eastern Roman Empire
#         if = {
#             limit = {
#                 has_game_rule = ce_eastern_roman_empire_rule	
#             }
#             title:e_byzantium = {
#                 set_title_name = e_eastern_roman_empire
#             }
#         }

#         # Byzantine to Romania
#         if = {
#             limit = {
#                 has_game_rule = ce_romania_roman_empire_rule		
#             }
#             title:e_byzantium = {
#                 set_title_name = e_ce_romania
#                 set_definitive_form = no
#             }
#         }

#         # Byzantine to The Roman Empire
#         if = {
#             limit = {
#                 has_game_rule = ce_true_roman_empire_rule		
#             }
#             title:e_byzantium = {
#                 set_title_name = e_ce_roman_empire
#             }
#         }
#     }
# }

ce_byzantine_name_game_rule_effect = {
    effect = {       
        #To satisfy all Roman haters and Greek enthusiasts
        if = {
            limit = {
                has_game_rule = ce_greek_culture_name_romaios_rule
            }
            culture:greek = {
                set_culture_name = {
                    noun = "ce_greek"
                    collective_noun = "ce_greek_collective_noun"
                    prefix = "ce_greek_prefix"
                }
            }
        }
    }
}


# ce_byzantine_emperor_867_effect = {
#     trigger = {
#         game_start_date = 867.1.1
#     }
#     effect = {
#         ce_byzantine_emperor_scripted_effect = yes
#     }
# }

# ce_byzantine_emperor_1066_effect = {
#     trigger = {
#         game_start_date = 1066.9.15
#     }
#     effect = {
#         ce_byzantine_emperor_scripted_effect = yes
#     }
# }

# ce_byzantine_emperor_effect = {
#     effect = {
#         ce_byzantine_emperor_scripted_effect = yes
#     }
# }
