Initial commit

This commit is contained in:
Ваше имя
2026-10-17 14:54:36 +03:00
commit f80644285e
526 changed files with 99561 additions and 0 deletions
@@ -0,0 +1,17 @@
# International Organization Payments
#
# A regular monthly payment that [optionally] goes from some members of the organization [optionally] to others.
#
# ATTRIBUTES
#
# - get_payer_list: effect to populate a list with the payers. Payers can be anything that has an account - that means countries or estates. Use add_to_local_variable_list = payers in the scope of the objects you want to add. (root = international organization)
# - get_payee_list: effect to populate a list with the payees. Payees can be anything that has an account - that means countries or estates. Use add_to_local_variable_list = payees in the scope of the objects you want to add. (root = international organization)
# - price: base price of the total payment
# - price_multiplier: <script value> how much to multiply the price by to arrive at the total amount to be transferred (root = international organization)
# - uses_maintenance: (yes/no) does this payment add a maintenance slider?
# - maintenance_modifier: modifier that affects the country according to the amount of payment maintenance they're doing - use this to penalise countries that don't pay their full share
# - proportion_for_payer: <script value> how much of the price will the country pay (root = potential country, scope:recipient = international organization)
# - proportion_for_payee: <script value> how much of the price will the country receive (root = potential country, scope:recipient = international organization)
# - min_slider_value: <float> 0..1 how much a payment slider will affect the total payment. Between this value and 100%. Default is 0.5 (50%).
# - ai_maintenance_value: <script value> should be between 0 and 1. Sets the slider value for Ai, root - country, recipient - IO, if left empty will use the AI_DEFAULT_IO_MAINETANCE_VALUE define.
# - ai_maintenance_ignore_saving: <yes/no> should the ai_maintenance_value even when in saving mode. AI in saving mode tries to limit all expenses and stabilize their country. Default is no.
@@ -0,0 +1,156 @@
tithe = {
get_payer_list = {
every_international_organization_member = {
limit = {
country_can_pay_tithe = yes
}
#it's the estates that pay
every_estate = {
add_to_local_variable_list = {
name = payers
target = this
}
}
}
}
get_payee_list = {
#paying either the leader (c:PAP) or whichever of the two popes you prefer during the western schism
if = {
limit = {
has_global_variable_list = western_schism_possible_votes
}
every_in_global_list = {
variable = western_schism_possible_votes
add_to_local_variable_list = {
name = payees
target = this
}
}
}
else_if = {
limit = {
exists = leader_country
leader_country = { is_subject = no }
}
leader_country = {
add_to_local_variable_list = {
name = payees
target = this
}
}
}
else_if = {
limit = { has_enabled_currency = gold }
add_to_local_variable_list = {
name = payees
target = this
}
}
}
price = tithe_price
uses_maintenance = no
price_multiplier = {
every_international_organization_member = {
limit = {
country_can_pay_tithe = yes
}
add = {
desc = "TITHE_PAYMENT_MULTIPLIER"
every_estate = {
add = estate_taxable_income
}
multiply = {
value = 0.1
add = modifier:tithe_cost_modifier
min = 0.1
}
}
}
if = {
limit = {
has_variable = religion
}
var:religion = {
multiply = {
desc = "TITHE_RELIGION_MULTIPLIER"
value = tithe
}
}
}
}
proportion_for_payer = {
#estate scope here as we're adding estates to the payer list
add = {
desc = "tithe"
value = estate_taxable_income
}
multiply = {
desc = "MODIFIER_TYPE_NAME_tithe_cost_modifier"
value = 0.1
add = "owner.modifier:tithe_cost_modifier"
min = 0.1
}
}
proportion_for_payee = {
if = {
limit = {
has_global_variable_list = western_schism_possible_votes
}
#complicated western schism stuff
#find who the "other" pope is
situation:western_schism = {
if = {
limit = {
prev = var:schism_opponent_country
}
c:PAP = {
save_temporary_scope_as = opponent
}
}
else = {
var:schism_opponent_country = {
save_temporary_scope_as = opponent
}
}
}
#find every country that likes us more than they like the opponent
scope:recipient = {
every_international_organization_member = {
limit = {
country_can_pay_tithe = yes
trigger_if = {
limit = {
root = c:PAP
}
#pope gets the tiebreaker
"opinion(root)" >= "opinion(scope:opponent)"
}
trigger_else = {
"opinion(root)" > "opinion(scope:opponent)"
}
}
add = {
every_estate = {
add = estate_taxable_income
}
multiply = {
value = 0.1
add = modifier:tithe_cost_modifier
min = 0.1
}
}
}
}
}
else = {
#simple, just pay the pope
add = {
desc = "tithe"
value = 0.1
}
}
}
}