
Country InteractionChanged this version
Demand Unlawful Territory
We will demand that they return Unlawful Territory within the Holy Roman Empire to its former owner. If they refuse, we will gain a Following Through On Threat Casus Belli against them.
Holy Roman EmpireInternational Organizationaccept, effect, reject effect, select trigger 1, select trigger 2
CityLocation Rankeffect
MegalopolisLocation Rankeffect
TownLocation Rankeffect
Imperial SanctionModifier Typeselect trigger 1
CatholicismReligioneffectUnlawful TerritoryStatic Modifierselect trigger 2Definitionin_game/common/country_interactions/hre.txt:1929
1930type = diplomacy
1931category = CATEGORY_HRE_ACTIONS
1935ai_prerequisite = {
1936NOT = {
1936has_cooldown = ai_spam_protection_demand_unlawful_territory
}
}
1945allow = {
}
1948select_trigger = {
1949looking_for_a = country
1950target_flag = recipient
1951name = "choose_country" Choose the Country:
1952column = {
1953data = name
}
1955visible = {
1956is_subject = no
1957is_rebel_country = no
1958this != scope:actor
1960NOT = {
1960at_war = yes
}
1962OR = {
1963any_province = {
1964any_location_in_province = {
1966integration_level = conquered
1967any_core_in_location = {
1968OR = {
1969AND = {
1970country_exists = this
}
1973NOT = {
1973country_exists = this
}
}
}
}
}
1978any_subject_or_below = {
1979any_province = {
1980any_location_in_province = {
1982integration_level = conquered
1983any_core_in_location = {
1984OR = {
1985AND = {
1986country_exists = this
}
1989NOT = {
1989country_exists = this
}
}
}
}
}
}
}
}
1997enabled = {
}
}
2001select_trigger = {
2002looking_for_a = province
2003none_available_msg_key = "demand_unlawful_territory_no_hre_province"
2004interaction_source_list = {
2005scope:recipient = {
2006every_province = {
2007limit = {
2008any_location_in_province = {
2010integration_level = conquered
2011any_core_in_location = {
2012OR = {
2013AND = {
2014country_exists = this
}
2017NOT = {
2017country_exists = this
}
}
}
}
}
2022add_to_list = source
}
2024every_subject_or_below = {
2025every_province = {
2026limit = {
2027any_location_in_province = {
2029integration_level = conquered
2030any_core_in_location = {
2031OR = {
2032AND = {
2033country_exists = this
}
2036NOT = {
2036country_exists = this
}
}
}
}
}
2041add_to_list = source
}
}
}
}
2046target_flag = target
2047name = "choose_province" Choose a Province
2048column = {
2049data = name
}
2051column = {
2052data = population
}
2054visible = {
2055any_location_in_province = {
2057integration_level = conquered
2058NOT = {
2058is_core_of = root.owner
}
}
}
2062enabled = {
}
}
2065effect = {
2066scope:recipient = {
2067add_opinion = {
2067target = scope:actor
2067modifier = opinion_demanded_unlawful_territory
}
}
2069if = {
2070limit = {
2070exists = scope:target
}
2071scope:target = {
2072every_location_in_province = {
2073limit = {
2074integration_level = conquered
}
2077if = {
2078limit = {
2079exists = previous_owner
2080is_core_of = previous_owner
2081previous_owner != scope:recipient
2082previous_owner != scope:actor
2083trigger_if = {
2084limit = {
2084country_exists = previous_owner
}
}
}
2090previous_owner = {
2091save_scope_as = target_country
}
2093change_location_owner = previous_owner
2094hidden_effect = {
2095if = {
2096limit = {
2096integration_level = conquered
}
2097change_integration_level = integrated
}
}
}
2101else_if = {
2102limit = {
2103any_core_in_location = {
2104this != scope:target.owner
2105this != scope:actor
2106trigger_if = {
2107limit = {
2107country_exists = this
}
}
}
}
2112random_core_in_location = {
2113limit = {
2114this != scope:target.owner
2115this != scope:actor
2116trigger_if = {
2117limit = {
2117country_exists = this
}
}
}
2121save_scope_as = target_country
}
2123change_location_owner = scope:target_country
2124hidden_effect = {
2125if = {
2126limit = {
2126integration_level = conquered
}
2127change_integration_level = integrated
}
}
}
2131else = {
2132hidden_effect = {
2133change_location_owner = scope:actor
2134add_to_list = hre_locations_to_give_away
}
}
}
}
2139if = {
2140limit = {
2140NOT = {
2140exists = scope:target_country
}
}
2141ordered_in_list = {
2142list = hre_locations_to_give_away
2143order_by = {
2144value = population
2145if = {
2146limit = {
}
2147multiply = 5
}
}
2154max = 1
2155check_range_bounds = no
2156save_scope_as = target_location
}
2158scope:target_location = {
2159create_country_from_location = {
2160save_scope_as = target_country
2161set_capital = scope:target_location
}
}
}
2165if = {
2166limit = {
2167exists = scope:target_country
2168scope:target_country = {
2169scope_type = country
}
}
2172if = {
2173limit = {
2173list_size = {
2173name = hre_locations_to_give_away
2173value > 0
}
}
2174every_in_list = {
2175limit = {
2175owner != scope:target_country
}
2176list = hre_locations_to_give_away
2177change_location_owner = scope:target_country
2178hidden_effect = {
2179if = {
2180limit = {
2180integration_level = conquered
}
2181change_integration_level = integrated
}
}
}
}
2186scope:target_country = {
2187add_opinion = {
2188modifier = opinion_released_from_unlawful_territory
2189target = scope:actor
}
2191if = {
2194add_country_to_international_organization = prev
}
}
}
}
}
2205hidden_effect = {
2206scope:actor = {
2207add_cooldown = {
2208type = ai_spam_protection_demand_unlawful_territory
2209months = 2
}
}
}
}
2214reject_effect = {
2215if = {
2216limit = {
2216exists = scope:target
}
2217scope:actor = {
2218add_casus_belli = {
2220target = scope:target.owner
2221province = scope:target
}
}
2224scope:target = {
2225every_location_in_province = {
2226limit = {
2227integration_level = conquered
}
2230add_location_modifier = {
}
}
}
}
2239key = demand_unlawful_territory
2240target = scope:recipient
}
}
2244ai_will_do = {
2247add = {
2248desc = "VOTE_BASE_VALUE" Base Value
2249value = 100
}
2252if = {
2253limit = {
2255key = demand_unlawful_territory
2256target = scope:recipient
}
}
2261subtract = {
2262desc = "DIPLOREASON_THEY_REJECTED_DEMAND_ALREADY"
2263value = 10000
}
}
2266else = {
2268subtract = {
2269desc = "OUR_OPINION_TOOLTIP"
2270value = "scope:actor.opinion(scope:recipient)"
}
2274add = {
2275value = "scope:actor.antagonism(scope:recipient)"
2276multiply = 2
}
2278if = {
2279limit = {
2280scope:actor = {
2280opinion = {
2280target = scope:recipient
2280value > 50
}
}
}
2283subtract = {
2284desc = "THEIR_OPINION_TOOLTIP"
2285value = "scope:recipient.opinion(scope:actor)"
}
}
2289if = {
2290limit = {
2291scope:actor = {
2292has_casus_belli_of_type_on = {
2294target = scope:target.owner
}
}
}
2298subtract = {
2299desc = "DIPLOREASON_NO_REASON_FOR_DIPLOMACY"
2300value = 1000
}
}
}
}
2306accept = {
2307subtract = {
2308desc = "VOTE_BASE_VALUE" Base Value
2309value = 50
}
2311if = {
2312limit = {
2313scope:recipient = {
}
}
2317subtract = {
2318desc = "IS_NON_MEMBER_OF_HRE" Is not a member of the Holy Roman Empire
2319value = 100
}
}
2324if = {
2325limit = {
2326scope:recipient = {
2327has_opinion = {
2327modifier = opinion_demanded_unlawful_territory
2327target = scope:actor
}
}
}
2330add = {
2331desc = "DIPLOREASON_HAS_COMPLIED_WITH_DEMAND_BEFORE" Has complied with this Demand before already
2332value = "scope:recipient.get_opinion(scope:actor|opinion_demanded_unlawful_territory)"
}
}
}