-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhmo_state_improvement.txt
110 lines (98 loc) · 2.4 KB
/
hmo_state_improvement.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
namespace = state_improvement
state_improvement.6 = { #Toggles City Status
type = province_event
picture = greek_city_market
title = "state_improvement.6.t"
desc = "state_improvement.6.desc"
left_portrait = root.governor_or_ruler
goto_location = root
trigger = {
exists = owner
has_city_status = no
}
immediate = {
set_city_status = city
if = {
limit = {
OR = {
trade_goods = grain
trade_goods = fish
trade_goods = cattle
trade_goods = vegetables
}
}
switch = { #Must not be cleared!
trigger = trade_goods
grain = { set_variable = had_grain }
fish = { set_variable = had_fish }
cattle = { set_variable = had_cattle }
vegetables = { set_variable = had_vegetables }
}
hidden_effect = {
replace_food_after_city_upgrade_effect = { VARIABLE_OR_SET_TRADE_GOODS = set_variable } #See comments in scripted effect before tampering with this
# remove border fortress and replace with a city fortress
if = {
limit = {
has_building = border_fortress_building
}
remove_building_level = border_fortress_building
add_building_level = fortress_building
}
}
}
}
option = {
name = "state_improvement.6.a"
replace_food_after_city_upgrade_finish_effect = yes
}
}
state_improvement.8 = { #Toggles Metropolis Status
type = country_event
hidden = yes
trigger = {
is_ai = yes
any_owned_province = {
has_city_status = yes
total_population >= 80
OR = {
is_state_capital = yes
any_neighbor_province = {
owner = ROOT
has_province_rank = city_metropolis
}
}
NOT = { has_province_rank = city_metropolis }
NOT = {
has_province_modifier = founding_metropolis_in_progress
}
}
}
immediate = {
pay_price = price_found_metropolis
random_owned_province = {
limit = {
has_city_status = yes
total_population >= 80
OR = {
is_state_capital = yes
any_neighbor_province = {
owner = ROOT
has_province_rank = city_metropolis
}
}
NOT = { has_province_rank = city_metropolis }
NOT = {
has_province_modifier = founding_metropolis_in_progress
}
}
add_province_modifier = {
name = founding_metropolis_in_progress
duration = 730
}
trigger_event = {
id = state_improvement.7
days = 730
}
}
}
}