
ActionChanged this version
Spread a New World Good
We can spread one of the goods found in America to any of our Locations, but the locals will not like it, and we will need to restart the development of that location's R.G.O.
ArcticClimateselect trigger 4
Hot AridClimateselect trigger 4
Cold AridClimateselect trigger 4
ContinentalClimateselect trigger 4
MediterraneanClimateselect trigger 4
OceanicClimateselect trigger 4
SubtropicalClimateselect trigger 4
TropicalClimateselect trigger 4
ChiliGoodsselect trigger 4
CocoaGoodsselect trigger 4
MaizeGoodsselect trigger 4
PotatoesGoodsselect trigger 4Definitionin_game/common/generic_actions/columbian_exchange.txt:7
8type = situation
10ai_tick = monthly
11ai_tick_frequency = 60
12automation_tick = never
13automation_tick_frequency = 12
15maximum_targets_in_one_tick = 20
16disallowed_duplicates_of_targets_for_ai = {
target_location
}
18potential = {
}
21allow = {
22scope:actor ?= {
23any_market_present_in_country = {
24has_new_world_goods_in_market = yes
}
}
}
29price = price:move_good_to_new_location
31select_trigger = {
32looking_for_a = situation
33target_flag = recipient
34name = "choose_situation" Choose the Situation:
35column = {
35data = name
}
}
44select_trigger = {
45looking_for_a = goods
46target_flag = target_good
47ai_interaction_source_list = {
48every_goods = {
49limit = {
50has_origin_in_new_world = yes
}
52save_temporary_scope_as = temp_good
54scope:actor = {
55random_market_present_in_country = {
56limit = {
57goods_demand_in_market(scope:temp_good) > "goods_supply_in_market(scope:temp_good)"
}
59scope:temp_good = {
60add_to_list = source
62if = {
63limit = {
64is_food = yes
}
66add_to_list = source
}
}
}
}
}
}
73name = "spread_select_goods" Select the Goods to spread
74none_available_msg_key = "move_nw_good_to_new_location_no_available_good"
75column = {
75data = name
}
76visible = {
77has_origin_in_new_world = yes
78scope:actor ?= {
79any_market_present_in_country = {
80OR = {
81is_produced_in_market = root
82is_traded_in_market = root
}
}
}
}
}
90select_trigger = {
91looking_for_a = region
92source = actor
93target_flag = target_region
94name = "choose_a_region" Choose a Region
95none_available_msg_key = "no_regions_available"
96column = {
96data = name
}
97visible = {
98scope:actor = {
99owns_or_has_subject_in = prev
}
}
}
105select_trigger = {
106looking_for_a = location
107source = target_region
108source_flags = only_actual_locations
109target_flag = target_location
110ai_interaction_source_list = {
111scope:target_region = {
112every_area_in_region = {
113limit = {
114scope:actor = {
114owns_or_has_subject_in = prev
}
}
116every_province_definition_in_area = {
117limit = {
118scope:actor = {
118owns_or_has_subject_in = prev
}
120raw_material_amount(scope:target_good) < 2
}
122every_ownable_location_in_province_definition = {
123limit = {
124owner ?= {
125is_subject_or_below_of = scope:actor
}
128NOT = {
128raw_material ?= scope:target_good
}
}
130add_to_list = source
}
}
}
}
}
136map_mode = raw_material
137name = "choose_location" Choose a Location
138none_available_msg_key = "move_nw_good_to_new_location_no_available_location"
139column = {
139data = rank
}
140column = {
140data = name
}
141column = {
141data = raw_material
}
142column = {
142data = population
}
143visible = {
144is_ownable = yes
145has_owner = yes
146OR = {
147owner ?= scope:actor
148top_owner ?= scope:actor
}
151trigger_if = {
161OR = {
}
168NOR = {}
}
211trigger_if = {
221area = {
222is_area_sea = no
}
229NOR = {}
}
253trigger_if = {
258OR = {
}
264area = {
265is_area_sea = no
}
271OR = {
}
}
280trigger_if = {
285OR = {
}
292area = {
293is_area_sea = no
}
295OR = {
}
301OR = {
}
}
310trigger_if = {
318area = {
319is_area_sea = no
}
}
}
}
331effect = {
332scope:target_location ?= {
333change_max_raw_material_workers = {
334value = rgo_workers
335subtract = 1
336min = 0
337multiply = -1
}
340change_raw_material = scope:target_good
}
}
344ai_will_do = {
345value = -1
347if = {
348limit = {
349exists = scope:target_good
350exists = scope:target_location
}
352scope:target_good = {
354add = "price_in_market(scope:target_location.market)"
355scope:target_location.raw_material = {
356subtract = "price_in_market(scope:target_location.market)"
}
359multiply = 10
361if = {
362limit = {
363is_in_surplus_in_market = {
363market = scope:target_location.market
363country = scope:actor
363value > 0
}
}
365subtract = 100
}
368if = {
369limit = {
370is_food = yes
}
372subtract = scope:target_good.food_value
373add = scope:target_location.raw_material.food_value
}
}
}
}