# Variables:
#  is_listed, boolean, decides if this diplomactic action type is listed in diplomatic view.
#  prerequisites, list, the technologies required to enable the player to send this diplomatic action.
#  requires_actor_peace, boolean, false by default, will require the actor to be at peace for this action to pass the possible check.
#  requires_alliance_vote, boolean, false by default, will require the alliance of the actor to vote for this action before passing it on to the recipient.
#  requires_actor_independence, boolean, true by default, will require the actor to be independent.
#  requires_recipient_independence, boolean, true by default, will require the recipient to be independent.
#  requires_actor_federation_leader, boolean, false by default, if the actor is in a federation, he has to be the leader of it.
#  requires_recipient_federation_leader, boolean, true by default, if the recipient is in a federation, he has to be the leader of it.
#  show_decline_to_alliance_members, boolean, false by default, will show your alliance members when you decline a proposal of this type.
#  should_show_auto_accept_message_recipient, boolean, decides if the recipient gets a message showing the diplomatic action.
#  should_open_auto_accept_message_recipient, boolean, decides if the recipient automatically opens this message.
#  should_show_auto_accept_message_actor, boolean, decides if the actor gets a reply showing the diplomatic action.
#  should_notify_all_communications, boolean, decides if a message notification is sent to all countries who have communications with actor or recipient
#  AI_acceptance_base_value, default = 0

action_declare_war = {
	requires_actor_independence = no # You are able to declare war only on your overlord when being a vassal, this special case is handled in code instead.
	requires_recipient_independence = no
	requires_alliance_vote = yes
	auto_accepted = yes
	requires_actor_federation_leader = yes
	should_show_auto_accept_message_actor = yes
	should_show_auto_accept_message_recipient = yes
	should_open_auto_accept_message_recipient = yes
	should_notify_all_communications = yes
}

action_offer_peace = {
	is_listed = no # Peace offers are handled through the war overview.
	requires_actor_independence = no
	requires_recipient_independence = no
	should_notify_all_communications = yes
}

action_invite_to_alliance = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	requires_alliance_vote = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50

	prerequisites = {
		"tech_xeno_relations"
	}
}

action_ask_to_join_alliance = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	requires_recipient_alliance_vote = yes
	diplo_view_acceptance_icon = yes
	AI_acceptance_base_value = -50

	prerequisites = {
		"tech_xeno_relations"
	}
}

action_leave_alliance = {
	auto_accepted = yes
	requires_actor_peace = yes
	show_to_alliance_members = yes
	should_notify_all_communications = yes
}

action_demand_vassalization = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50

	prerequisites = {
		"tech_xeno_supremacy"
	}
}

action_demand_protectorate = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50

	prerequisites = {
		"tech_xeno_supremacy"
	}
}

action_ask_to_become_vassalized = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50

	prerequisites = {
		"tech_xeno_supremacy"
	}
}

action_ask_to_become_protectorate = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50

	prerequisites = {
		"tech_xeno_supremacy"
	}
}

action_form_federation = {
	requires_alliance_vote = yes
	requires_actor_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50
	auto_accepted = yes

	prerequisites = {
		"tech_xeno_diplomacy"
	}
}

action_invite_to_federation = {
	requires_actor_peace = yes
	requires_recipient_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50
	requires_actor_federation_leader = yes

	prerequisites = {
		"tech_xeno_diplomacy"
	}
}

action_ask_to_join_federation = {
	requires_recipient_federation_leader = yes
	requires_actor_peace = yes
	requires_recipient_peace = yes
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50
	show_decline_to_alliance_members = yes

	prerequisites = {
		"tech_xeno_diplomacy"
	}
}

action_leave_federation = {
	auto_accepted = yes
	should_notify_all_communications = yes
}

action_release_subject = {
	requires_recipient_independence = no
	auto_accepted = yes
	should_notify_all_communications = yes
}

action_ask_to_be_released_subject = {
	requires_actor_independence = no
	diplo_view_acceptance_icon = yes
	should_notify_all_communications = yes
	AI_acceptance_base_value = -50
}

warning_not_active_in_war = {
	requires_recipient_independence = no
	requires_actor_independence = no
	is_listed = no
	auto_accepted = yes
}

action_not_active_in_war = {
	requires_recipient_independence = no
	requires_actor_independence = no
	is_listed = no
	auto_accepted = yes
}

action_propose_invite = {
	is_listed = no
}

action_offer_trade_deal = {
	requires_recipient_independence = no
	requires_actor_independence = no

	prerequisites = { "tech_xeno_outreach" }
}

action_cancel_trade_deal = {
	requires_recipient_independence = no
	requires_actor_independence = no
	is_listed = no
	auto_accepted = yes
}

action_embassy = {
	auto_accepted = yes
	requires_actor_independence = no
	requires_recipient_independence = no
	requires_recipient_federation_leader = no
	should_show_auto_accept_message_recipient = yes
}

action_recall_embassy = {
	auto_accepted = yes
	requires_actor_independence = no
	requires_recipient_independence = no
	requires_recipient_federation_leader = no
	should_show_auto_accept_message_recipient = yes
}

action_make_rival = {
	auto_accepted = yes
	requires_actor_independence = no
	requires_recipient_independence = no
	requires_recipient_federation_leader = no
	should_show_auto_accept_message_recipient = yes
	should_notify_all_communications = yes
}

action_end_rivalry = {
	auto_accepted = yes
	requires_actor_independence = no
	requires_recipient_independence = no
	requires_recipient_federation_leader = no
	should_show_auto_accept_message_recipient = yes
	should_notify_all_communications = yes
}

action_insult = {
	requires_recipient_independence = no
	requires_actor_independence = no
	auto_accepted = yes
	should_show_auto_accept_message_recipient = yes
}

action_integrate_subject = {
	auto_accepted = yes
	requires_recipient_independence = no
	should_notify_all_communications = yes
}

action_cancel_subject_integration = {
	auto_accepted = yes
	requires_recipient_independence = no
	should_notify_all_communications = yes
}