
Country InteractionChanged this version
Bribe Voter
Spend Prestige and offer Ducats to a member so they vote for the outcome we choose in the current law debate.
Monthly PrestigeModifier Typeai prerequisiteDefinitionin_game/common/country_interactions/bribe_vote.txt:1
2type = diplomacy
3category = CATEGORY_ECONOMY_ACTIONS
5ai_limit_per_check = 1
7ai_prerequisite = {
8monthly_balance > 5
9num_loans < 1
10prestige > 10
12any_international_organizations_member_of = {
13resolution_is_active = resolution:policy_vote
}
}
26potential = {
27hidden_trigger = {
28scope:actor = {
29any_international_organizations_member_of = {
30resolution_is_active = resolution:policy_vote
}
}
}
}
36allow = {
37scope:actor = {
38prestige >= 10
}
}
42price = price:bribe_voter_for_policy
43payee = scope:recipient
46select_trigger = {
47looking_for_a = country
48source = actor
49source_flags = same_international_organization
50target_flag = recipient
51name = "bribe_voter_for_policy_select_country" Who do we wish to bribe?
52none_available_msg_key = "bribe_voter_for_policy_no_countries"
53pre_evaluation_sort_value = {
54if = {
54limit = {
54is_during_bankruptcy = yes
}
54add = 100
}
55if = {
55limit = {
55monthly_balance < 0
}
55add = 20
}
}
57pre_evaluation_number_to_evaluate_fully = 3
58column = {
59data = name
}
61column = {
62data = population
}
64visible = {
}
66enabled = {
67scope:actor = {
68gold > root.monthly_income_total
}
}
}
73select_trigger = {
74looking_for_a = international_organization
75source = recipient
76target_flag = organization
77name = "choose_international_organization" Choose the International Organization:
78column = {
79data = name
}
81visible = {
82resolution_is_active = resolution:policy_vote
83has_member = scope:actor
}
85enabled = {
86not = {
87vote_is_locked = {
88voter = scope:recipient
89resolution = resolution:policy_vote
}
}
}
}
96select_trigger = {
97looking_for_a = law
98target_flag = law
99name = "bribe_voter_for_policy_select_law" Select Law:
100none_available_msg_key = "bribe_voter_for_policy_no_laws"
101column = {
102data = name
}
104visible = {
105is_available_for_international_organization = scope:organization
106scope:organization = {
107active_resolution(resolution:policy_vote) ?= {
108resolution_target(target) ?= root
}
}
}
}
115select_trigger = {
116looking_for_a = policy
117source = law
118target_flag = policy
120allow_null = {
121scope:law = {
122NOT = {
122has_tag = forbids_no_policy
}
}
}
125name = "bribe_voter_for_policy_select_policy" How do we wish them to vote?
126none_available_msg_key = "bribe_voter_for_policy_no_policies"
127column = {
128data = name
}
130visible = {
131is_visible_for_international_organization = scope:organization
}
133enabled = {
134is_allowed_for_international_organization = scope:organization
}
}
139select_trigger = {
140looking_for_a = value
141target_flag = target_value
142name = "bribe_voter_for_policy_select_gold_amount" How many Ducats do we want to spend?
143min = 1
144max = scope:actor.gold
145step = scope:recipient.monthly_income_total
146default = {
147value = scope:recipient.monthly_income_total
148multiply = 6
149min = 1
150max = scope:actor.gold
}
152ai_override_value = {
153value = scope:recipient.monthly_income_total
154multiply = 6
155min = 1
156max = scope:actor.gold
}
}
160effect = {
161if = {
162limit = {
162exists = scope:recipient
}
163if = {
164limit = {
164exists = scope:target_value
}
165scope:actor = {
166add_gold = {
167value = scope:target_value
168multiply = -1
}
}
171scope:recipient = {
172add_gold = scope:target_value
}
}
175if = {
176limit = {
177exists = scope:law
178exists = scope:organization
179is_set = scope:policy
}
181scope:organization = {
182set_vote = {
183voter = scope:recipient
184resolution = resolution:policy_vote
185vote = scope:policy
186lock_reason = {
187key = VOTE_LOCK_REASON_BRIBED
}
}
}
}
}
}
194reject_effect = {
195if = {
196limit = {
196exists = scope:recipient
}
197scope:actor = {
198add_opinion = {
199target = scope:recipient
200modifier = opinion_rejected_bribe_voter_for_policy
}
}
}
}
206ai_will_do = {
208add = {
209desc = "BRIBE_BIAS_PROXIMITY_TO_GOAL"
210value = 10
211scope:organization = {
212every_international_organization_member = {
213limit = {
213NOT = {
213this = scope:recipient
}
}
214if = {
215limit = {
216resolution_vote(this|scope:recipient|resolution:policy_vote) ?= scope:policy
}
218add = 11
}
220else = {
221subtract = 9
}
}
}
225divide = 10
}
228if = {
229limit = {
230scope:organization = {
231has_variable = io_law_proposer
232var:io_law_proposer = scope:actor
233has_variable = ai_io_law_target
234NOT = {
234var:ai_io_law_target = scope:policy
}
}
}
237subtract = {
238desc = "BRIBE_AGAINST_OWN_PROPOSAL"
239value = 1000
}
}
242if = {
243limit = {
244exists = scope:target_value
}
247add = {
248desc = "OFFERED_GOLD" Offered Ducats
249value = {
250value = scope:target_value
251divide = 4
252subtract = {
253value = scope:recipient.monthly_income_total
254multiply = 3
}
}
}
}
}
260diplo_chance = {
261base = -50
262in_debt = 5
}
264accept = {
265if = {
266limit = {
267scope:recipient = {
268monthly_balance < 0
}
}
271add = {
272desc = "IN_DEFICIT" Makes a deficit
273value = 10
}
}
276if = {
277limit = {
278scope:recipient = {
279is_during_bankruptcy = yes
}
}
282add = {
283desc = "IS_BANKRUPT_TOOLTIP" Is Bankrupt
284value = 50
}
}
287if = {
288limit = {
289exists = scope:law
290exists = scope:organization
}
292if = {
293limit = {
293is_set = scope:policy
}
294add = {
295desc = "OPINION_OF_TARGET_PROPOSAL" Opinion of Policy
296value = "scope:recipient.resolution_opinion(scope:organization|resolution:policy_vote|scope:policy)"
}
}
299else = {
300add = {
301desc = "OPINION_OF_CURRENT_RESOLUTION_PROPOSAL" Opinion of current Resolution proposal
302scope:organization = {
303active_resolution(resolution:policy_vote) = {
304vote_in_active_resolution(resolution_proposer) = {
305save_temporary_scope_as = proposal_vote
}
}
}
309value = "scope:recipient.resolution_opinion(scope:organization|resolution:policy_vote|scope:proposal_vote)"
}
}
}
313if = {
314limit = {
314exists = scope:target_value
}
315add = {
316desc = "OFFERED_GOLD" Offered Ducats
317value = {
318value = scope:target_value
319divide = 4
}
}
}
}