@px-lsp/server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +334 -0
  3. package/THIRD-PARTY-NOTICES.md +83 -0
  4. package/data/ck3/dataTypes.json +2195 -0
  5. package/data/ck3/data_types/data_types_common.txt +2040 -0
  6. package/data/ck3/data_types/data_types_gui.txt +5264 -0
  7. package/data/ck3/data_types/data_types_internalclausewitzgui.txt +14843 -0
  8. package/data/ck3/data_types/data_types_script.txt +4251 -0
  9. package/data/ck3/data_types/data_types_uncategorized.txt +109984 -0
  10. package/data/ck3/freqs.json +1 -0
  11. package/data/ck3/guiSchema.json +6344 -0
  12. package/data/ck3/script_docs/effects.log +16059 -0
  13. package/data/ck3/script_docs/event_targets.log +2098 -0
  14. package/data/ck3/script_docs/modifiers.log +2228 -0
  15. package/data/ck3/script_docs/on_actions.log +5275 -0
  16. package/data/ck3/script_docs/triggers.log +11991 -0
  17. package/data/ck3/structures.json +9743 -0
  18. package/data/ck3/wikidocs/ATTRIBUTION.md +18 -0
  19. package/data/ck3/wikidocs/Data_types.md +2568 -0
  20. package/data/ck3/wikidocs/Effects_list.md +1176 -0
  21. package/data/ck3/wikidocs/Scopes_list.md +341 -0
  22. package/data/ck3/wikidocs/Triggers_list.md +1097 -0
  23. package/data/eu5/data_types/data_types_common.txt +2087 -0
  24. package/data/eu5/data_types/data_types_gui.txt +6732 -0
  25. package/data/eu5/data_types/data_types_internalclausewitzgui.txt +19276 -0
  26. package/data/eu5/data_types/data_types_script.txt +5688 -0
  27. package/data/eu5/data_types/data_types_uncategorized.txt +135569 -0
  28. package/data/vic3/data_types/data_types_common.txt +2021 -0
  29. package/data/vic3/data_types/data_types_gui.txt +5592 -0
  30. package/data/vic3/data_types/data_types_internalclausewitzgui.txt +17304 -0
  31. package/data/vic3/data_types/data_types_script.txt +2817 -0
  32. package/data/vic3/data_types/data_types_uncategorized.txt +84354 -0
  33. package/data/vic3/freqs.json +1 -0
  34. package/data/vic3/guiSchema.json +5578 -0
  35. package/data/vic3/script_docs/effects.log +38135 -0
  36. package/data/vic3/script_docs/event_targets.log +2028 -0
  37. package/data/vic3/script_docs/modifiers.log +18954 -0
  38. package/data/vic3/script_docs/on_actions.log +1561 -0
  39. package/data/vic3/script_docs/triggers.log +15738 -0
  40. package/data/vic3/structures.json +10189 -0
  41. package/dist/server.js +63668 -0
  42. package/media/px-lsp.svg +12 -0
  43. package/package.json +50 -0
  44. package/src/clientMode.ts +60 -0
  45. package/src/coa/coa.ts +184 -0
  46. package/src/coa/coaParse.ts +267 -0
  47. package/src/context.ts +78 -0
  48. package/src/contextKeywords.ts +224 -0
  49. package/src/data/dataBindingMacros.ts +82 -0
  50. package/src/data/dataFnDocs.ts +152 -0
  51. package/src/data/dataFnUsage.ts +431 -0
  52. package/src/data/dataTypes.ts +279 -0
  53. package/src/data/defines.ts +123 -0
  54. package/src/data/docsParser.ts +453 -0
  55. package/src/data/keywordDocs.ts +98 -0
  56. package/src/data/modifierTemplates.ts +143 -0
  57. package/src/data/textFormatting.ts +165 -0
  58. package/src/data/wikiDocs.ts +187 -0
  59. package/src/dds/decoder.ts +1007 -0
  60. package/src/dds/encode.ts +235 -0
  61. package/src/dds/index.ts +58 -0
  62. package/src/dds/png.ts +96 -0
  63. package/src/dds/tga.ts +62 -0
  64. package/src/documents.ts +35 -0
  65. package/src/features/assetPaths.ts +169 -0
  66. package/src/features/codeActions.ts +148 -0
  67. package/src/features/colors.ts +244 -0
  68. package/src/features/completion.ts +961 -0
  69. package/src/features/datafunction.ts +729 -0
  70. package/src/features/definition.ts +84 -0
  71. package/src/features/diagnostics.ts +244 -0
  72. package/src/features/folding.ts +106 -0
  73. package/src/features/formatting.ts +60 -0
  74. package/src/features/guiLanguage.ts +366 -0
  75. package/src/features/guiNavigation.ts +140 -0
  76. package/src/features/guiTree.ts +97 -0
  77. package/src/features/hover.ts +817 -0
  78. package/src/features/hoverRender.ts +222 -0
  79. package/src/features/inlayHints.ts +147 -0
  80. package/src/features/locFormatting.ts +127 -0
  81. package/src/features/references.ts +70 -0
  82. package/src/features/rename.ts +135 -0
  83. package/src/features/scopeAt.ts +65 -0
  84. package/src/features/semanticTokens.ts +188 -0
  85. package/src/features/signatureHelp.ts +72 -0
  86. package/src/features/symbols.ts +241 -0
  87. package/src/features/textureHover.ts +143 -0
  88. package/src/features/workspaceSymbols.ts +69 -0
  89. package/src/games/active.ts +19 -0
  90. package/src/games/ck3/ambientScopes.ts +273 -0
  91. package/src/games/ck3/index.ts +38 -0
  92. package/src/games/ck3/meta.ts +28 -0
  93. package/src/games/ck3/modifierPlaceholders.ts +61 -0
  94. package/src/games/ck3/saveSchema.ts +134 -0
  95. package/src/games/ck3/scaffolds.ts +197 -0
  96. package/src/games/ck3/schema.ts +422 -0
  97. package/src/games/ck3/structures.ts +887 -0
  98. package/src/games/eu5/index.ts +75 -0
  99. package/src/games/eu5/meta.ts +44 -0
  100. package/src/games/eu5/scaffolds.ts +49 -0
  101. package/src/games/eu5/schema.generated.ts +1043 -0
  102. package/src/games/jomini/variables.ts +134 -0
  103. package/src/games/profile.ts +205 -0
  104. package/src/games/registry.ts +27 -0
  105. package/src/games/vic3/index.ts +52 -0
  106. package/src/games/vic3/meta.ts +55 -0
  107. package/src/games/vic3/saveSchema.ts +77 -0
  108. package/src/games/vic3/scaffolds.ts +135 -0
  109. package/src/games/vic3/schema.ts +650 -0
  110. package/src/games/vic3/structures.ts +33 -0
  111. package/src/gui/anchorSpec.ts +66 -0
  112. package/src/gui/declMarkers.ts +30 -0
  113. package/src/gui/fillGeometry.ts +101 -0
  114. package/src/gui/guiDefs.ts +386 -0
  115. package/src/gui/guiDependencies.ts +352 -0
  116. package/src/gui/guiLinks.ts +64 -0
  117. package/src/gui/layoutEngine.ts +1998 -0
  118. package/src/gui/layoutService.ts +221 -0
  119. package/src/gui/measuredMetrics.ts +21 -0
  120. package/src/gui/previewService.ts +89 -0
  121. package/src/gui/saveSchema.ts +220 -0
  122. package/src/gui/saveValues.ts +399 -0
  123. package/src/gui/saveZip.ts +60 -0
  124. package/src/gui/sourceEdit.ts +535 -0
  125. package/src/gui/sourceEditService.ts +439 -0
  126. package/src/gui/sourceModel.ts +603 -0
  127. package/src/gui/textResolve.ts +145 -0
  128. package/src/gui/textureInfo.ts +106 -0
  129. package/src/gui/vocabulary.ts +149 -0
  130. package/src/gui/widgetEdit.ts +52 -0
  131. package/src/gui/widgetInfo.ts +245 -0
  132. package/src/index/docComments.ts +103 -0
  133. package/src/index/extract.ts +252 -0
  134. package/src/index/indexer.ts +369 -0
  135. package/src/index/intern.ts +101 -0
  136. package/src/index/lazyRefs.ts +145 -0
  137. package/src/index/modOrigin.ts +69 -0
  138. package/src/index/references.ts +534 -0
  139. package/src/overview/dependencies.ts +240 -0
  140. package/src/overview/eventBanner.ts +95 -0
  141. package/src/overview/eventDetail.ts +482 -0
  142. package/src/overview/eventGraph.ts +617 -0
  143. package/src/overview/eventVocabulary.ts +214 -0
  144. package/src/overview/locCoverage.ts +138 -0
  145. package/src/overview/modOverview.ts +29 -0
  146. package/src/overview/overrides.ts +89 -0
  147. package/src/parseCache.ts +81 -0
  148. package/src/parser/cst.ts +257 -0
  149. package/src/parser/encoding.ts +106 -0
  150. package/src/parser/index.ts +7 -0
  151. package/src/parser/lexer.ts +245 -0
  152. package/src/parser/locParser.ts +276 -0
  153. package/src/parser/parser.ts +360 -0
  154. package/src/schema/freqs.ts +70 -0
  155. package/src/schema/loader.ts +113 -0
  156. package/src/schema/types.ts +142 -0
  157. package/src/scopes/inference.ts +478 -0
  158. package/src/scopes/model.ts +148 -0
  159. package/src/scopes/varTypes.ts +290 -0
  160. package/src/server.ts +1894 -0
  161. package/src/serverData.ts +98 -0
  162. package/src/structure.ts +56 -0
  163. package/src/wordAt.ts +49 -0
@@ -0,0 +1,2028 @@
1
+ # Event Target Documentation
2
+ ### combat_width
3
+ Scope to combat width multiplier of scope province
4
+ Input Scopes: province
5
+ Output Scopes: value
6
+
7
+ ### naval_controller_hq
8
+ Returns the province or state controller navy HQ
9
+ Input Scopes: province
10
+ Output Scopes: hq
11
+
12
+ ### naval_hq
13
+ Returns the province or state owner local navy HQ
14
+ Input Scopes: province
15
+ Output Scopes: hq
16
+
17
+ ### num_active_ships
18
+ Get the number of active ships for military formations in the province that are allied to the specified country
19
+ Requires Data: yes
20
+ Input Scopes: province
21
+ Output Scopes: value
22
+
23
+ ### num_active_ships_in_battle
24
+ Get the number of active ships in battle for military formations in the province that are allied to the specified country
25
+ Requires Data: yes
26
+ Input Scopes: province
27
+ Output Scopes: value
28
+
29
+ ### num_active_ships_not_in_battle
30
+ Get the number of active ships not in battle for military formations in the province that are allied to the specified country
31
+ Requires Data: yes
32
+ Input Scopes: province
33
+ Output Scopes: value
34
+
35
+ ### num_non_destroyed_ships
36
+ Get the number of non-destroyed ships for military formations in the province that are allied to the specified country
37
+ Requires Data: yes
38
+ Input Scopes: province
39
+ Output Scopes: value
40
+
41
+ ### num_non_destroyed_ships_in_battle
42
+ Get the number of non-destroyed ships in battle for military formations in the province that are allied to the specified country
43
+ Requires Data: yes
44
+ Input Scopes: province
45
+ Output Scopes: value
46
+
47
+ ### num_non_destroyed_ships_not_in_battle
48
+ Get the number of non-destroyed ships not in battle for military formations in the province that are allied to the specified country
49
+ Requires Data: yes
50
+ Input Scopes: province
51
+ Output Scopes: value
52
+
53
+ ### num_ships
54
+ Get the number of ships for military formations in the province that are allied to the specified country
55
+ Requires Data: yes
56
+ Input Scopes: province
57
+ Output Scopes: value
58
+
59
+ ### num_ships_in_battle
60
+ Get the number of ships in battle for military formations in the province that are allied to the specified country
61
+ Requires Data: yes
62
+ Input Scopes: province
63
+ Output Scopes: value
64
+
65
+ ### num_ships_not_in_battle
66
+ Get the number of ships not in battle for military formations in the province that are allied to the specified country
67
+ Requires Data: yes
68
+ Input Scopes: province
69
+ Output Scopes: value
70
+
71
+ ### num_units
72
+ Get the number of active units for military formations in the province that are allied to the specified country
73
+ Requires Data: yes
74
+ Input Scopes: province
75
+ Output Scopes: value
76
+
77
+ ### num_units_in_battle
78
+ Get the number of active units in battle for military formations in the province that are allied to the specified country
79
+ Requires Data: yes
80
+ Input Scopes: province
81
+ Output Scopes: value
82
+
83
+ ### num_units_not_in_battle
84
+ Get the number of active units not in battle for military formations in the province that are allied to the specified country
85
+ Requires Data: yes
86
+ Input Scopes: province
87
+ Output Scopes: value
88
+
89
+ ### invasion_attacker
90
+ If used in an invasion scope, scope to the country executing the invasion.
91
+ Input Scopes: invasion
92
+ Output Scopes: country
93
+
94
+ ### invasion_defender
95
+ If used in an invasion scope, scope to the country the attacked state is controlled by.
96
+ Input Scopes: invasion
97
+ Output Scopes: country
98
+
99
+ ### initiator
100
+ Scope to the initiator of the object
101
+ Input Scopes: diplomatic_play
102
+ Output Scopes: country
103
+
104
+ ### war
105
+ Scope from a diplomatic play to its war
106
+ Input Scopes: diplomatic_play
107
+ Output Scopes: war
108
+
109
+ ### controller
110
+ Scope to the controller of the object
111
+ Input Scopes: province, state
112
+ Output Scopes: country
113
+
114
+ ### land_controller_hq
115
+ Returns the province or state controller land HQ
116
+ Input Scopes: province, state
117
+ Output Scopes: hq
118
+
119
+ ### land_hq
120
+ Returns the province or state owner local land HQ
121
+ Input Scopes: province, state
122
+ Output Scopes: hq
123
+
124
+ ### num_active_ships
125
+ Get the number of active ships for a country, commander or military formation
126
+ Input Scopes: country, character, military_formation
127
+ Output Scopes: value
128
+
129
+ ### num_active_ships_in_battle
130
+ Get the number of active ships in battle for a country, commander or military formation
131
+ Input Scopes: country, character, military_formation
132
+ Output Scopes: value
133
+
134
+ ### num_active_ships_not_in_battle
135
+ Get the number of active ships not in battle for a country, commander or military formation
136
+ Input Scopes: country, character, military_formation
137
+ Output Scopes: value
138
+
139
+ ### num_non_destroyed_ships
140
+ Get the number of non-destroyed ships for a country, commander or military formation
141
+ Input Scopes: country, character, military_formation
142
+ Output Scopes: value
143
+
144
+ ### num_non_destroyed_ships_in_battle
145
+ Get the number of non-destroyed ships in battle for a country, commander or military formation
146
+ Input Scopes: country, character, military_formation
147
+ Output Scopes: value
148
+
149
+ ### num_non_destroyed_ships_not_in_battle
150
+ Get the number of non-destroyed ships not in battle for a country, commander or military formation
151
+ Input Scopes: country, character, military_formation
152
+ Output Scopes: value
153
+
154
+ ### num_ships
155
+ Get the number of ships for a country, commander or military formation
156
+ Input Scopes: country, character, military_formation
157
+ Output Scopes: value
158
+
159
+ ### num_ships_in_battle
160
+ Get the number of ships in battle for a country, commander or military formation
161
+ Input Scopes: country, character, military_formation
162
+ Output Scopes: value
163
+
164
+ ### num_ships_not_in_battle
165
+ Get the number of ships not in battle for a country, commander or military formation
166
+ Input Scopes: country, character, military_formation
167
+ Output Scopes: value
168
+
169
+ ### average_progressiveness
170
+ Get the average progressiveness of the scoped character or interest group
171
+ Input Scopes: character, interest_group
172
+ Output Scopes: value
173
+
174
+ ### building
175
+ Scope to the related building
176
+ Input Scopes: new_combat_unit
177
+ Output Scopes: building
178
+
179
+ ### defense
180
+ Returns the unit's defense rating (including impact from their commander)
181
+ Input Scopes: new_combat_unit
182
+ Output Scopes: value
183
+
184
+ ### demoralized
185
+ Returns the unit's number of demoralized manpower
186
+ Input Scopes: new_combat_unit
187
+ Output Scopes: value
188
+
189
+ ### manpower
190
+ Returns the unit's manpower
191
+ Input Scopes: new_combat_unit
192
+ Output Scopes: value
193
+
194
+ ### mobilization
195
+ Returns the unit's mobilization value between 0 and 1
196
+ Input Scopes: new_combat_unit
197
+ Output Scopes: value
198
+
199
+ ### morale
200
+ Returns the unit's morale
201
+ Input Scopes: new_combat_unit
202
+ Output Scopes: value
203
+
204
+ ### offense
205
+ Returns the unit's offense rating (including impact from their commander)
206
+ Input Scopes: new_combat_unit
207
+ Output Scopes: value
208
+
209
+ ### owner
210
+ Scope to the owner country of object
211
+ Input Scopes: country, building, character, new_combat_unit, company, decree, institution, interest_marker, interest_group, journal_entry, law, market, market_goods, military_formation, political_movement, pop, province, ship, state
212
+ Output Scopes: country
213
+
214
+ ### commander
215
+ Scope from a military formation to its commander character
216
+ Input Scopes: military_formation
217
+ Output Scopes: character
218
+
219
+ ### current_hq
220
+ Returns the current HQ of the scoped military formation (may not be valid if the formation is not currently stationed in an HQ)
221
+ Input Scopes: military_formation
222
+ Output Scopes: hq
223
+
224
+ ### detection
225
+ Links from a fleet scope to the total detection of the ships in the fleet
226
+ Input Scopes: military_formation
227
+ Output Scopes: value
228
+
229
+ ### home_hq
230
+ Returns the home HQ of the scoped military formation
231
+ Input Scopes: military_formation
232
+ Output Scopes: hq
233
+
234
+ ### num_assigned_supply_ships
235
+ Get the number of assigned supply ships for a military formation
236
+ Input Scopes: military_formation
237
+ Output Scopes: value
238
+
239
+ ### num_commanderless_units
240
+ Number of units in a MilitaryFormation which currently don't have a commander due to commanders Command Limit. Obs: defeated commanders do not command units, i.e., the more defeated commanders, the more commanderless units.
241
+ Input Scopes: military_formation
242
+ Output Scopes: value
243
+
244
+ ### screening
245
+ Links from a fleet scope to the total screening of the ships in the fleet
246
+ Input Scopes: military_formation
247
+ Output Scopes: value
248
+
249
+ ### visibility
250
+ Links from a fleet scope to the total visibility of the ships in the fleet
251
+ Input Scopes: military_formation
252
+ Output Scopes: value
253
+
254
+ ### vulnerability
255
+ Links from a fleet scope to the total vulnerability of the ships in the fleet
256
+ Input Scopes: military_formation
257
+ Output Scopes: value
258
+
259
+ ### region
260
+ Scope to the strategic region of the object!
261
+ Input Scopes: building, diplomatic_play, hq, interest_marker, province, state, state_region
262
+ Output Scopes: strategic_region
263
+
264
+ ### diplomatic_pact_other_country
265
+ Scope to the other country of the diplomatic pact in scope
266
+ Requires Data: yes
267
+ Input Scopes: diplomatic_pact
268
+ Output Scopes: country
269
+
270
+ ### currently_active_law_in_group
271
+ Scope from a law to the currently active law in that group
272
+ Input Scopes: law
273
+ Output Scopes: law
274
+
275
+ ### law_type
276
+ Scope from an object to its law type
277
+ Input Scopes: law
278
+ Output Scopes: law_type
279
+
280
+ ### level
281
+ Scope to the level of a building
282
+ Input Scopes: building
283
+ Output Scopes: value
284
+
285
+ ### level_after_queued_constructions
286
+ Scope to the level of a building after all queued constructions finish
287
+ Input Scopes: building
288
+ Output Scopes: value
289
+
290
+ ### training_rate
291
+ Scope to the current maximum weekly training rate of a building
292
+ Input Scopes: building
293
+ Output Scopes: value
294
+
295
+ ### goal_value
296
+ Scope to the journal entry's goal value
297
+ Input Scopes: journal_entry
298
+ Output Scopes: value
299
+
300
+ ### attached_law
301
+ Links from an amendment scope to the law the amendment is attached to
302
+ Input Scopes: amendment
303
+ Output Scopes: law
304
+
305
+ ### parent_law_type
306
+ Links from an amendment scope to the law type that is considered the amendment's parent
307
+ Input Scopes: amendment
308
+ Output Scopes: law_type
309
+
310
+ ### sponsor
311
+ Links from an amendment scope to the interest group that sponsored the amendment
312
+ Input Scopes: amendment
313
+ Output Scopes: interest_group
314
+
315
+ ### imposer_of_law
316
+ Scope from a country to the country currrently imposing a law on them
317
+ Input Scopes: country, law
318
+ Output Scopes: country
319
+
320
+ ### goods
321
+ Scope to the goods traded by a trade route
322
+ Input Scopes: market_goods, state_goods
323
+ Output Scopes: goods
324
+
325
+ ### country
326
+ Scope to the country of a military formation or ship
327
+ Input Scopes: military_formation, ship
328
+ Output Scopes: country
329
+
330
+ ### type
331
+ Scope from an object to its type
332
+ Input Scopes: building, company, diplomatic_play, diplomatic_catalyst, political_lobby, institution, interest_group, law, political_movement, ship, strait, harvest_condition_area, amendment
333
+ Output Scopes: building_type, company_type, diplomatic_play_type, institution_type, interest_group_type, law_type, political_movement_type, ship_type, strait_type, harvest_condition_type, amendment_type
334
+
335
+ ### civil_war
336
+ Scope to the civil war started by the scoped (revolutionary) political movement.
337
+ Input Scopes: political_movement
338
+ Output Scopes: civil_war
339
+
340
+ ### most_desired_law
341
+ Scope to the law type that political movement most desires to be enacted (if any).
342
+ Input Scopes: political_movement
343
+ Output Scopes: law_type
344
+
345
+ ### player_owed_obligation_days_left
346
+ Scope to number of days left on an obligation in diplomatic relations scope (example: obligation_days_left >= 2)
347
+ Input Scopes: diplomatic_relations
348
+ Output Scopes: value
349
+
350
+ ### scope_relations
351
+ Scope to relations value in diplomatic relations scope (example: scope_relations >= 2)
352
+ Input Scopes: diplomatic_relations
353
+ Output Scopes: value
354
+
355
+ ### scope_tension
356
+ Scope to tension value in diplomatic relations scope (example: scope_tension >= 2)
357
+ Input Scopes: diplomatic_relations
358
+ Output Scopes: value
359
+
360
+ ### total_pirated_trade_value
361
+ Scope to the total average weekly base value of goods pilfered via piracy between two countries in a diplomatic relations scope (example: total_pirated_trade_value >= 100)
362
+ Input Scopes: diplomatic_relations
363
+ Output Scopes: value
364
+
365
+ ### modifier
366
+ Scope to the value of the modifier type of specified key belonging to the current object
367
+ Requires Data: yes
368
+ Input Scopes: country, battle_side, building, character, interest_group, market, power_bloc, state
369
+ Output Scopes: value, boolean
370
+
371
+ ### state
372
+ Scope to the state of the object
373
+ Input Scopes: building, market, pop, province
374
+ Output Scopes: state
375
+
376
+ ### ig
377
+ Scope to the interest group of specified key belonging to the country
378
+ Requires Data: yes
379
+ Input Scopes: country, political_movement
380
+ Output Scopes: interest_group
381
+
382
+ ### ai_treaty_export_value
383
+ Scope to target country AI desire to export scoped market good (example: value = ai_market_export_value:root)
384
+ Requires Data: yes
385
+ Input Scopes: market_goods
386
+ Output Scopes: value
387
+
388
+ ### ai_treaty_import_value
389
+ Scope to target country AI desire to import scoped market good through treaties (example: value = ai_market_import_value:root)
390
+ Requires Data: yes
391
+ Input Scopes: market_goods
392
+ Output Scopes: value
393
+
394
+ ### ai_treaty_trade_value
395
+ Scope to target country AI desire to import and export scoped market good (example: value = ai_market_trade_value:root)
396
+ Requires Data: yes
397
+ Input Scopes: market_goods
398
+ Output Scopes: value
399
+
400
+ ### largest_exporting_market
401
+ Scope to the largest exporting market for the scope market good to the local market
402
+ Input Scopes: market_goods
403
+ Output Scopes: market
404
+
405
+ ### largest_importing_market
406
+ Scope to the largest importing market for the scope market good from the local market
407
+ Input Scopes: market_goods
408
+ Output Scopes: market
409
+
410
+ ### market_export_cap
411
+ Get the maximum amount of goods the market can export based on it's production of the scoped MarketGoods
412
+ Input Scopes: market_goods
413
+ Output Scopes: value
414
+
415
+ ### market_import_cap
416
+ Get the maximum amount of goods the market can import based on it's consumption of the scoped MarketGoods
417
+ Input Scopes: market_goods
418
+ Output Scopes: value
419
+
420
+ ### treaty_exports
421
+ Get the current number of treaty (NOT world market) exports of the good to the market of the scoped MarketGoods
422
+ Input Scopes: market_goods
423
+ Output Scopes: value
424
+
425
+ ### treaty_imports
426
+ Get the current number of treaty (NOT world market) imports of the good to the market of the scoped MarketGoods
427
+ Input Scopes: market_goods
428
+ Output Scopes: value
429
+
430
+ ### battle
431
+ Scope from a battle side to the battle itself
432
+ Input Scopes: battle_side
433
+ Output Scopes: battle
434
+
435
+ ### opposite_battle_side
436
+ Scope from a battle side to its opposite
437
+ Input Scopes: battle_side
438
+ Output Scopes: battle_side
439
+
440
+ ### province
441
+ Scope from a battle side to the province in which the battle is being fought
442
+ Input Scopes: battle_side
443
+ Output Scopes: province
444
+
445
+ ### national_awakening_state_region
446
+ Links from a culture scope to the state region with an active national awakening for that culture
447
+ Input Scopes: culture
448
+ Output Scopes: state_region
449
+
450
+ ### home_country
451
+ Scopes to the home country of an exile
452
+ Input Scopes: character, pop
453
+ Output Scopes: country
454
+
455
+ ### theater
456
+ Scope from a BattleSide or State to its theater
457
+ Input Scopes: battle_side, state
458
+ Output Scopes: theater
459
+
460
+ ### mg
461
+ Scope from a market to the MarketGoods with the specified key
462
+ Requires Data: yes
463
+ Input Scopes: market
464
+ Output Scopes: market_goods
465
+
466
+ ### participants
467
+ Get the total number of participating countries in the scoped market
468
+ Input Scopes: market
469
+ Output Scopes: value
470
+
471
+ ### trade_center
472
+ Scope to the trade center state of the market!
473
+ Input Scopes: market
474
+ Output Scopes: state
475
+
476
+ ### gdp
477
+ Get the scoped country's yearly predicted GDP
478
+ Input Scopes: country, market, state, strategic_region
479
+ Output Scopes: value
480
+
481
+ ### ship_fleet
482
+ Links from a ship scope to the ship fleet
483
+ Input Scopes: ship
484
+ Output Scopes: military_formation
485
+
486
+ ### ship_group
487
+ Scope from a ship to its group
488
+ Input Scopes: ship
489
+ Output Scopes: ship_group
490
+
491
+ ### executive
492
+ Scope from a company to its executive character
493
+ Input Scopes: company
494
+ Output Scopes: character
495
+
496
+ ### prosperity
497
+ Scope to the amount of prosperity for scope company (example: prosperity >= 2)
498
+ Input Scopes: company
499
+ Output Scopes: value
500
+
501
+ ### weekly_prosperity_change
502
+ Scope to the weekly prosperity change for scope company (example: weekly_prosperity_change >= 2)
503
+ Input Scopes: company
504
+ Output Scopes: value
505
+
506
+ ### amendment_type
507
+ Scope to an amendment type from its name (amendment_type:key)
508
+ Requires Data: yes
509
+ Global Link: yes
510
+ Output Scopes: amendment_type
511
+
512
+ ### array_define
513
+ Reference the value of a numeric value in an array define: array_define:Namespace|Name|Index. Index is 0-based.
514
+ Requires Data: yes
515
+ Global Link: yes
516
+ Output Scopes: value
517
+
518
+ ### bg
519
+ Scope to a building group from its name (bg:bg_logging)
520
+ Requires Data: yes
521
+ Global Link: yes
522
+ Output Scopes: building_group
523
+
524
+ ### bt
525
+ Scope to a building type
526
+ Requires Data: yes
527
+ Global Link: yes
528
+ Output Scopes: building_type
529
+
530
+ ### c
531
+ Scope to the country with specified tag
532
+ Requires Data: yes
533
+ Global Link: yes
534
+ Output Scopes: country
535
+
536
+ ### catalyst_type
537
+ Scope to a diplomatic catalyst type from its name (catalyst_type:catalyst_relations_level_improved)
538
+ Requires Data: yes
539
+ Global Link: yes
540
+ Output Scopes: diplomatic_catalyst_type
541
+
542
+ ### cd
543
+ Scope to the country definition with specified tag
544
+ Requires Data: yes
545
+ Global Link: yes
546
+ Output Scopes: country_definition
547
+
548
+ ### company_type
549
+ Scope to a company type from its name (company_type:company_rheinmetall)
550
+ Requires Data: yes
551
+ Global Link: yes
552
+ Output Scopes: company_type
553
+
554
+ ### compare_complex_value
555
+ A comparison trigger that needs a parsable string parameter that will return its value in the context it is used eg: scope:root.number_of(armies)
556
+ Wild Card: yes
557
+ Requires Data: yes
558
+ Output Scopes: value
559
+
560
+ ### compare_value
561
+ A comparison trigger that will return its value in the context it is used eg: root.gold
562
+ Wild Card: yes
563
+ Output Scopes: value
564
+
565
+ ### cu
566
+ Scope to the culture with specified key
567
+ Requires Data: yes
568
+ Global Link: yes
569
+ Output Scopes: culture
570
+
571
+ ### define
572
+ Reference the value of a numeric or color define: define:Namespace|Name
573
+ Requires Data: yes
574
+ Global Link: yes
575
+ Output Scopes: value
576
+
577
+ ### flag
578
+ Flag literals eg: flag:the_boss
579
+ Requires Data: yes
580
+ Global Link: yes
581
+ Output Scopes: flag
582
+
583
+ ### g
584
+ Scope to the goods with specified key
585
+ Requires Data: yes
586
+ Global Link: yes
587
+ Output Scopes: goods
588
+
589
+ ### global_gdp
590
+ Get the global yearly predicted GDP
591
+ Output Scopes: value
592
+
593
+ ### global_productivity
594
+ Scope to global productivity values (example: global_productivity:high_threshold)
595
+ Requires Data: yes
596
+ Output Scopes: value
597
+
598
+ ### global_var
599
+ Reference a previous set global variable via its name eg: global_var:important_thing
600
+ Requires Data: yes
601
+ Global Link: yes
602
+
603
+ ### global_variable_map
604
+ Reference a previous set variable via its name eg: "global_variable_map(average_relation_map|c:FRA)"
605
+ Requires Data: yes
606
+ Global Link: yes
607
+
608
+ ### harvest_condition_type
609
+ Scope to a harvest condition type from its name (harvest_condition_type:drought)
610
+ Requires Data: yes
611
+ Global Link: yes
612
+ Output Scopes: harvest_condition_type
613
+
614
+ ### i
615
+ Scope to ideology specified by key
616
+ Requires Data: yes
617
+ Global Link: yes
618
+ Output Scopes: ideology
619
+
620
+ ### identity
621
+ Scope to the power bloc identity from its name (identity:key)
622
+ Requires Data: yes
623
+ Global Link: yes
624
+ Output Scopes: power_bloc_identity
625
+
626
+ ### ideology
627
+ Scope to a ideology from its name (ideology:ideology_anarchist)
628
+ Requires Data: yes
629
+ Global Link: yes
630
+ Output Scopes: ideology
631
+
632
+ ### ig_trait
633
+ Scope to the Interest Group trait with specified key
634
+ Requires Data: yes
635
+ Global Link: yes
636
+ Output Scopes: interest_group_trait
637
+
638
+ ### ig_type
639
+ Scope to an interest group type
640
+ Requires Data: yes
641
+ Global Link: yes
642
+ Output Scopes: interest_group_type
643
+
644
+ ### infamy_threshold
645
+ Scope to infamy level threshold for comparison purposes (infamy_threshold:infamous)
646
+ Requires Data: yes
647
+ Output Scopes: value
648
+
649
+ ### is_setup
650
+ Scope to true/false if gamestate is being initialized!
651
+ Global Link: yes
652
+ Output Scopes: value
653
+
654
+ ### je_tutorial
655
+ Scope to the active tutorial lesson's journal entry (do not use this outside tutorial)
656
+ Output Scopes: journal_entry
657
+
658
+ ### law_type
659
+ Scope to a law type from its name (law_type:law_protected_speech)
660
+ Requires Data: yes
661
+ Global Link: yes
662
+ Output Scopes: law_type
663
+
664
+ ### lobby_type
665
+ Scope to a political lobby type from its name (lobby_type:lobby_pro_country)
666
+ Requires Data: yes
667
+ Global Link: yes
668
+ Output Scopes: political_lobby_type
669
+
670
+ ### local_var
671
+ Reference a previous set local variable via its name eg: local_var:person_of_interest
672
+ Requires Data: yes
673
+ Global Link: yes
674
+
675
+ ### local_variable_map
676
+ Reference a previous set variable via its name eg: "local_variable_map(rewards_for_country|c:FRA)"
677
+ Requires Data: yes
678
+ Global Link: yes
679
+
680
+ ### mobilization_option
681
+ Scope to a mobilization option from its name (mobilization_option:key)
682
+ Requires Data: yes
683
+ Global Link: yes
684
+ Output Scopes: mobilization_option
685
+
686
+ ### movement_type
687
+ Scope to a political movement type from its name (movement_type:movement_religious_majority)
688
+ Requires Data: yes
689
+ Global Link: yes
690
+ Output Scopes: political_movement_type
691
+
692
+ ### named_script_value
693
+ A script value that will calculate and returns its value in the context it is used
694
+ Wild Card: yes
695
+ Output Scopes: value, color
696
+
697
+ ### no
698
+ Boolean literal for false values
699
+ Global Link: yes
700
+ Output Scopes: boolean
701
+
702
+ ### p
703
+ Scope to province specified by hex key
704
+ Requires Data: yes
705
+ Global Link: yes
706
+ Output Scopes: province
707
+
708
+ ### play_type
709
+ Scope to a diplomatic play type from its name (play_type:dp_default_treaty_article)
710
+ Requires Data: yes
711
+ Global Link: yes
712
+ Output Scopes: diplomatic_play_type
713
+
714
+ ### player
715
+ Scope to the player (do not use this outside tutorial)
716
+ Output Scopes: country
717
+
718
+ ### pop_type
719
+ Scope to a pop type from its name (pop_type:laborers)
720
+ Requires Data: yes
721
+ Global Link: yes
722
+ Output Scopes: pop_type
723
+
724
+ ### prev
725
+ The previous scope
726
+ Global Link: yes
727
+
728
+ ### principle
729
+ Scope to the power bloc principle from its name (principle:key)
730
+ Requires Data: yes
731
+ Global Link: yes
732
+ Output Scopes: power_bloc_principle
733
+
734
+ ### principle_group
735
+ Scope to the power bloc principle group from its name (principle_group:key)
736
+ Requires Data: yes
737
+ Global Link: yes
738
+ Output Scopes: power_bloc_principle_group
739
+
740
+ ### rank_value
741
+ Scope to rank value of a particular country rank (rank_value:great_power)
742
+ Requires Data: yes
743
+ Output Scopes: value
744
+
745
+ ### rel
746
+ Scope to the religion with specified key
747
+ Requires Data: yes
748
+ Global Link: yes
749
+ Output Scopes: religion
750
+
751
+ ### relations_threshold
752
+ Scope to relations threshold level for comparison purposes (relations_threshold:warm)
753
+ Requires Data: yes
754
+ Output Scopes: value
755
+
756
+ ### root
757
+ The head of the current top scope eg: reciever of an event, taker of a decision
758
+ Global Link: yes
759
+
760
+ ### s
761
+ Scope to state region specified by key
762
+ Requires Data: yes
763
+ Global Link: yes
764
+ Output Scopes: state_region
765
+
766
+ ### scope
767
+ Reference a previously saved scope via its name eg: scope:target
768
+ Requires Data: yes
769
+ Global Link: yes
770
+
771
+ ### ship_group
772
+ Scope to a ship group from its name (ship_group:ship_group_capital_ships)
773
+ Requires Data: yes
774
+ Global Link: yes
775
+ Output Scopes: ship_group
776
+
777
+ ### ship_type
778
+ Scope to a ship type from its name (ship_type:ship_type_frigate)
779
+ Requires Data: yes
780
+ Global Link: yes
781
+ Output Scopes: ship_type
782
+
783
+ ### sr
784
+ Scope to the strategic region of specified key
785
+ Requires Data: yes
786
+ Global Link: yes
787
+ Output Scopes: strategic_region
788
+
789
+ ### strait_type
790
+ Scope to a strait type from its name (strait_type:key)
791
+ Requires Data: yes
792
+ Global Link: yes
793
+ Output Scopes: strait_type
794
+
795
+ ### tension_threshold
796
+ Scope to tension level threshold for comparison purposes (tension_threshold:warm)
797
+ Requires Data: yes
798
+ Output Scopes: value
799
+
800
+ ### this
801
+ The current scope
802
+
803
+ ### unit_type
804
+ Scope to a combat unit type from its name (unit_type:key)
805
+ Requires Data: yes
806
+ Global Link: yes
807
+ Output Scopes: combat_unit_type
808
+
809
+ ### value
810
+ A numeric literal value eg: 1, 5.2, -6
811
+ Wild Card: yes
812
+ Global Link: yes
813
+ Output Scopes: value
814
+
815
+ ### var
816
+ Reference a previous set variable via its name eg: var:mortal_enemy
817
+ Requires Data: yes
818
+
819
+ ### variable_map
820
+ Reference a variable set under a specified scope in a named container on this scope: "variable_map(our_relations_with|c:FRA)"
821
+ Requires Data: yes
822
+
823
+ ### yes
824
+ Boolean literal for true values
825
+ Global Link: yes
826
+ Output Scopes: boolean
827
+
828
+ ### num_units
829
+ Get the number of active units for a commander or military formation
830
+ Input Scopes: character, military_formation
831
+ Output Scopes: value
832
+
833
+ ### num_units_in_battle
834
+ Get the number of active units in battle for a commander or military formation
835
+ Input Scopes: character, military_formation
836
+ Output Scopes: value
837
+
838
+ ### num_units_not_in_battle
839
+ Get the number of active units not in battle for a commander or military formation
840
+ Input Scopes: character, military_formation
841
+ Output Scopes: value
842
+
843
+ ### ai_colonization_value
844
+ Scope to target country AI desire to colonize a strategic region (example: value = ai_colonization_value:root)
845
+ Requires Data: yes
846
+ Input Scopes: strategic_region
847
+ Output Scopes: value
848
+
849
+ ### active_law
850
+ Scope to the scoped country's active law in the named law group (active_law:lawgroup_trade_policy)
851
+ Requires Data: yes
852
+ Input Scopes: country
853
+ Output Scopes: law
854
+
855
+ ### ai_army_comparison
856
+ Scope to comparative army strength between two countries (example: value = ai_army_comparison:root)
857
+ Requires Data: yes
858
+ Input Scopes: country
859
+ Output Scopes: value
860
+
861
+ ### ai_gdp_comparison
862
+ Scope to comparative GDP between two countries (example: value = ai_army_comparison:root)
863
+ Requires Data: yes
864
+ Input Scopes: country
865
+ Output Scopes: value
866
+
867
+ ### ai_ideological_opinion
868
+ Scope to AI ideological opinion of scope country on target country (example: value = ai_ideological_opinion:root)
869
+ Requires Data: yes
870
+ Input Scopes: country
871
+ Output Scopes: value
872
+
873
+ ### ai_navy_comparison
874
+ Scope to comparative navy strength between two countries (example: value = ai_navy_comparison:root)
875
+ Requires Data: yes
876
+ Input Scopes: country
877
+ Output Scopes: value
878
+
879
+ ### ai_subject_value
880
+ Scope to AI desire of target country to have scope country as a subject (example: value = ai_subject_value:root)
881
+ Requires Data: yes
882
+ Input Scopes: country
883
+ Output Scopes: value
884
+
885
+ ### ai_transit_rights_value
886
+ Scope to AI desire of to have transit rights through target country (example: value = ai_transit_rights_value:root)
887
+ Requires Data: yes
888
+ Input Scopes: country
889
+ Output Scopes: value
890
+
891
+ ### ai_treaty_fairness
892
+ Scope to AI evaluation of how fair (to both sides) it considers existing treaty articles with the target country to be (example: value = ai_treaty_fairness_score:root)
893
+ Requires Data: yes
894
+ Input Scopes: country
895
+ Output Scopes: value
896
+
897
+ ### ai_treaty_value
898
+ Scope to AI evaluation of how favorable to itself it considers existing treaty articles with the target country to be (example: value = ai_treaty_value:root)
899
+ Requires Data: yes
900
+ Input Scopes: country
901
+ Output Scopes: value
902
+
903
+ ### army_size
904
+ Number of battalions of scope country, excluding currently raised conscripts.
905
+ army_size >= 20
906
+ army_size > c:FRA.army_size
907
+ Input Scopes: country
908
+ Output Scopes: value
909
+
910
+ ### army_size_including_conscripts
911
+ Number of battalions of scope country, including currently raised conscripts.
912
+ army_size_including_conscripts >= 20
913
+ army_size_including_conscripts > c:FRA.army_size_including_conscripts
914
+ Input Scopes: country
915
+ Output Scopes: value
916
+
917
+ ### army_size_including_raised_conscripts
918
+ Number of battalions of scope country, including currently raised conscripts but excluding unraised conscripts.
919
+ army_size_including_raised_conscripts >= 20
920
+ army_size_including_raised_conscripts > c:FRA.army_size_including_raised_conscripts
921
+ Input Scopes: country
922
+ Output Scopes: value
923
+
924
+ ### building_levels
925
+ Get the total number of non-subsistence building levels of the scoped country
926
+ Input Scopes: country
927
+ Output Scopes: value
928
+
929
+ ### cached_ai_coastal_population
930
+ Scope to total coastal population recorded in AI spending variables (example: value = cached_ai_coastal_population)
931
+ Input Scopes: country
932
+ Output Scopes: value
933
+
934
+ ### cached_ai_incorporated_coastal_population
935
+ Scope to total incorporated coastal population recorded in AI spending variables (example: value = cached_ai_incorporated_coastal_population)
936
+ Input Scopes: country
937
+ Output Scopes: value
938
+
939
+ ### cached_ai_incorporated_population
940
+ Scope to total incorporated population recorded in AI spending variables (example: value = cached_ai_incorporated_population)
941
+ Input Scopes: country
942
+ Output Scopes: value
943
+
944
+ ### cached_ai_overseas_subject_population
945
+ Scope to total population in direct non-adjacent subjects recorded in AI spending variables (example: value = cached_ai_overseas_subject_population)
946
+ Input Scopes: country
947
+ Output Scopes: value
948
+
949
+ ### cached_ai_subject_population
950
+ Scope to total population in direct subjects recorded in AI spending variables (example: value = cached_ai_subject_population)
951
+ Input Scopes: country
952
+ Output Scopes: value
953
+
954
+ ### cached_ai_total_population
955
+ Scope to total population recorded in AI spending variables (example: value = cached_ai_total_population)
956
+ Input Scopes: country
957
+ Output Scopes: value
958
+
959
+ ### cached_ai_unincorporated_coastal_population
960
+ Scope to total unincorporated coastal population recorded in AI spending variables (example: value = cached_ai_unincorporated_coastal_population)
961
+ Input Scopes: country
962
+ Output Scopes: value
963
+
964
+ ### cached_ai_unincorporated_population
965
+ Scope to total unincorporated population recorded in AI spending variables (example: value = cached_ai_unincorporated_population)
966
+ Input Scopes: country
967
+ Output Scopes: value
968
+
969
+ ### capital
970
+ Scope to the capital state of a country
971
+ Input Scopes: country
972
+ Output Scopes: state
973
+
974
+ ### civil_war_origin_country
975
+ Scope to the origin country of a civil war country
976
+ Input Scopes: country
977
+ Output Scopes: country
978
+
979
+ ### colonial_growth_per_colony
980
+ Scope to the country's colonial growth per colony value (example: colonial_growth_per_colony > 0)
981
+ Input Scopes: country
982
+ Output Scopes: value
983
+
984
+ ### company
985
+ Scope to the scoped country's company of the named company type (company:company_rheinmetall)
986
+ Requires Data: yes
987
+ Input Scopes: country
988
+ Output Scopes: company
989
+
990
+ ### country_definition
991
+ Scope to country's definition
992
+ Input Scopes: country
993
+ Output Scopes: country_definition
994
+
995
+ ### credit
996
+ Scope to the current amount of max credit the country can take
997
+ Input Scopes: country
998
+ Output Scopes: value
999
+
1000
+ ### currently_enacting_law
1001
+ Scope from a country to the law that they're currently enacting
1002
+ Input Scopes: country
1003
+ Output Scopes: law
1004
+
1005
+ ### diplomatic_pact_expense_ratio
1006
+ Scope to the ratio of diplomatic pact expenses to income for this country, clamped 0-1 (example: value = diplomatic_pact_expense_ratio)
1007
+ Input Scopes: country
1008
+ Output Scopes: value
1009
+
1010
+ ### flagship
1011
+ Get the flagship of the scoped country
1012
+ Input Scopes: country
1013
+ Output Scopes: ship
1014
+
1015
+ ### get_ruler_for
1016
+ Scopes from country to a character that would be ruler, under the given transfer of power type
1017
+ get_ruler_for:parliamentary_elective = { effects... }
1018
+ Requires Data: yes
1019
+ Input Scopes: country
1020
+ Output Scopes: character
1021
+
1022
+ ### government_size
1023
+ Get the scoped country's current number of Parties & independent IGs in government
1024
+ Input Scopes: country
1025
+ Output Scopes: value
1026
+
1027
+ ### heir
1028
+ Scope to the heir of a country
1029
+ Input Scopes: country
1030
+ Output Scopes: character
1031
+
1032
+ ### imposed_law
1033
+ Scope from a country to the law currently imposed on them (enacting or not)
1034
+ Input Scopes: country
1035
+ Output Scopes: law
1036
+
1037
+ ### income
1038
+ Get the current weekly income of the scoped country
1039
+ Input Scopes: country
1040
+ Output Scopes: value
1041
+
1042
+ ### income_transfer_expenses
1043
+ Scope to the amount of money scope country is transfering to other countries via treaties & pacts (example:income_transfer_expenses >= 100)
1044
+ Input Scopes: country
1045
+ Output Scopes: value
1046
+
1047
+ ### income_transfer_relative_expenses
1048
+ Scope to the fraction of their income country is transfering to other countries via treaties & pacts (example:income_transfer_relative_expenses >= 0.2)
1049
+ Input Scopes: country
1050
+ Output Scopes: value
1051
+
1052
+ ### infamy
1053
+ Scope to infamy of scope country (example: infamy >= 2)
1054
+ Input Scopes: country
1055
+ Output Scopes: value
1056
+
1057
+ ### institution
1058
+ Scope to a country's institution from its name (institution:institution_health_system)
1059
+ Requires Data: yes
1060
+ Input Scopes: country
1061
+ Output Scopes: institution
1062
+
1063
+ ### investment_pool_income
1064
+ Get the current weekly investment pool income of the scoped country
1065
+ Input Scopes: country
1066
+ Output Scopes: value
1067
+
1068
+ ### je
1069
+ Scope to the journal entry of specified key belonging to the country
1070
+ Requires Data: yes
1071
+ Input Scopes: country
1072
+ Output Scopes: journal_entry
1073
+
1074
+ ### legitimacy
1075
+ Scope to the current amount of legitimacy in country
1076
+ Input Scopes: country
1077
+ Output Scopes: value
1078
+
1079
+ ### lobby_foreign_anti_clout
1080
+ Scope to the total clout of all anti-country foreign policy lobbies targeting a specific country (lobby_foreign_anti_clout:root >= 0.2)
1081
+ Requires Data: yes
1082
+ Input Scopes: country
1083
+ Output Scopes: value
1084
+
1085
+ ### lobby_foreign_pro_clout
1086
+ Scope to the total clout of all pro-country foreign policy lobbies targeting a specific country (lobby_foreign_pro_clout:root >= 0.2)
1087
+ Requires Data: yes
1088
+ Input Scopes: country
1089
+ Output Scopes: value
1090
+
1091
+ ### lobby_in_government_foreign_anti_clout
1092
+ Scope to the total clout of all anti-country foreign policy lobbies in government targeting a specific country (lobby_in_government_foreign_anti_clout:root >= 0.2)
1093
+ Requires Data: yes
1094
+ Input Scopes: country
1095
+ Output Scopes: value
1096
+
1097
+ ### lobby_in_government_foreign_pro_clout
1098
+ Scope to the total clout of all pro-country foreign policy lobbies in government targeting a specific country (lobby_in_government_foreign_pro_clout:root >= 0.2)
1099
+ Requires Data: yes
1100
+ Input Scopes: country
1101
+ Output Scopes: value
1102
+
1103
+ ### lobby_war_opposition
1104
+ Scope to the total clout of all lobbies that oppose the scoped war (lobby_war_opposition:root >= 0.2)
1105
+ Requires Data: yes
1106
+ Input Scopes: country
1107
+ Output Scopes: value
1108
+
1109
+ ### lobby_war_support
1110
+ Scope to the total clout of all lobbies that support the scoped war (lobby_war_support:root >= 0.2)
1111
+ Requires Data: yes
1112
+ Input Scopes: country
1113
+ Output Scopes: value
1114
+
1115
+ ### market_capital
1116
+ Scope to the market capital of a country
1117
+ Input Scopes: country
1118
+ Output Scopes: state
1119
+
1120
+ ### military_expenses
1121
+ Get the current military expenses (slaves, wages and goods) of the scoped country
1122
+ Input Scopes: country
1123
+ Output Scopes: value
1124
+
1125
+ ### military_expenses_share
1126
+ Get the current share of military expenses (slaves, wages and goods) relative to the total expenses of the scoped country
1127
+ Input Scopes: country
1128
+ Output Scopes: value
1129
+
1130
+ ### mutual_trade_value_with_country
1131
+ Scope to the total base value of goods traded in trade routes between the two markets (example: mutual_trade_value_with_country:root >= 1000)
1132
+ Requires Data: yes
1133
+ Input Scopes: country
1134
+ Output Scopes: value
1135
+
1136
+ ### naval_combat_power
1137
+ Scope to the country's navy combat power (example: naval_combat_power > 100)
1138
+ Input Scopes: country
1139
+ Output Scopes: value
1140
+
1141
+ ### naval_hostility_average_damage_dealt
1142
+ Scope to average damage dealt by this country in naval hostilities it initiated over the lookback period. Returns -1 if no hostilities found.
1143
+ Input Scopes: country
1144
+ Output Scopes: value
1145
+
1146
+ ### naval_hostility_damage
1147
+ Scope to damage points inflicted by this country against another in active naval hostilities (example: naval_hostility_damage:root >= 50)
1148
+ Requires Data: yes
1149
+ Input Scopes: country
1150
+ Output Scopes: value
1151
+
1152
+ ### naval_vulnerability
1153
+ Scope to a country's naval vulnerability score based on trade reliance and coastal GDP share, capped at a define maximum
1154
+ Input Scopes: country
1155
+ Output Scopes: value
1156
+
1157
+ ### navy_size
1158
+ Number of flotillas of scope country.
1159
+ navy_size >= 20
1160
+ navy_size > c:FRA.navy_size
1161
+ Input Scopes: country
1162
+ Output Scopes: value
1163
+
1164
+ ### num_active_interests
1165
+ Scope to the number of active interests a country has
1166
+ num_active_interests > 5
1167
+ Input Scopes: country
1168
+ Output Scopes: value
1169
+
1170
+ ### num_active_natural_interests
1171
+ Scope to the number of active natural interests a country has
1172
+ num_active_natural_interests > 5
1173
+ Input Scopes: country
1174
+ Output Scopes: value
1175
+
1176
+ ### num_active_plays
1177
+ Get the current number of active Diplomatic Plays the scoped country started
1178
+ Input Scopes: country
1179
+ Output Scopes: value
1180
+
1181
+ ### num_admirals
1182
+ Scope to the country's number of admirals
1183
+ Input Scopes: country
1184
+ Output Scopes: value
1185
+
1186
+ ### num_alliances
1187
+ Get the total number of alliances of the scoped country (example: num_alliances:root >= 2)
1188
+ Input Scopes: country
1189
+ Output Scopes: value
1190
+
1191
+ ### num_alliances_and_defensive_pacts_with_allies
1192
+ Scope to the number of alliances target country has with allies of scope country (example: num_alliances_and_defensive_pacts_with_allies:root >= 2)
1193
+ Requires Data: yes
1194
+ Input Scopes: country
1195
+ Output Scopes: value
1196
+
1197
+ ### num_alliances_and_defensive_pacts_with_rivals
1198
+ Scope to the number of alliances & defensive pacts target country has with rivals of scope country (example: num_alliances_and_defensive_pacts_with_rivals:root >= 2)
1199
+ Requires Data: yes
1200
+ Input Scopes: country
1201
+ Output Scopes: value
1202
+
1203
+ ### num_characters
1204
+ Scope to the country's number of characters
1205
+ Input Scopes: country
1206
+ Output Scopes: value
1207
+
1208
+ ### num_colony_projects
1209
+ Get the scoped country's current number of incomplete / in progress colony projects
1210
+ Input Scopes: country
1211
+ Output Scopes: value
1212
+
1213
+ ### num_commanders
1214
+ Scope to the country's number of commanders
1215
+ Input Scopes: country
1216
+ Output Scopes: value
1217
+
1218
+ ### num_defensive_pacts
1219
+ Scope to the number of defensive pacts target country has in total (example: num_defensive_pacts >= 2)
1220
+ Input Scopes: country
1221
+ Output Scopes: value
1222
+
1223
+ ### num_generals
1224
+ Scope to the country's number of generals
1225
+ Input Scopes: country
1226
+ Output Scopes: value
1227
+
1228
+ ### num_income_transfer_pacts
1229
+ Scope to the number of income-transfering (to others) pacts target country has in total (example: num_income_transfer_pacts >= 2)
1230
+ Input Scopes: country
1231
+ Output Scopes: value
1232
+
1233
+ ### num_income_transfer_treaty_articles
1234
+ Scope to the number of income-transfering (to others) treaty articles target country has in total (example: num_income_transfer_treaty_articles >= 2)
1235
+ Input Scopes: country
1236
+ Output Scopes: value
1237
+
1238
+ ### num_income_transfers
1239
+ Scope to the number of income-transfering (to others) pacts and treaty articles target country has in total (example: num_income_transfers >= 2)
1240
+ Input Scopes: country
1241
+ Output Scopes: value
1242
+
1243
+ ### num_incorporated_states
1244
+ Get the scoped country's current number of incorporated states
1245
+ Input Scopes: country
1246
+ Output Scopes: value
1247
+
1248
+ ### num_interests
1249
+ Scope to the number of interests a country has (including inactive)
1250
+ num_interests > 5
1251
+ Input Scopes: country
1252
+ Output Scopes: value
1253
+
1254
+ ### num_natural_interests
1255
+ Scope to the number of natural interests a country has (including inactive)
1256
+ num_natural_interests > 5
1257
+ Input Scopes: country
1258
+ Output Scopes: value
1259
+
1260
+ ### num_obligations_earned
1261
+ Scope from a country to the number of obligations others owe them (=which they have earned)
1262
+ Input Scopes: country
1263
+ Output Scopes: value
1264
+
1265
+ ### num_pending_events
1266
+ Scope to the number of pending events in scope country
1267
+ num_pending_events > 0
1268
+ Input Scopes: country
1269
+ Output Scopes: value
1270
+
1271
+ ### num_pending_events
1272
+ Scope to the number of pending events of given category in scope country
1273
+ num_pending_events:enactment > 0
1274
+ Requires Data: yes
1275
+ Input Scopes: country
1276
+ Output Scopes: value
1277
+
1278
+ ### num_politicians
1279
+ Scope to the country's number of politicians
1280
+ Input Scopes: country
1281
+ Output Scopes: value
1282
+
1283
+ ### num_positive_relations
1284
+ Get the current number of countries with positive Relation with the scoped country
1285
+ Input Scopes: country
1286
+ Output Scopes: value
1287
+
1288
+ ### num_queued_constructions
1289
+ Scope to the number of queued constructions target country has in total (example: num_queued_constructions >= 2)
1290
+ Input Scopes: country
1291
+ Output Scopes: value
1292
+
1293
+ ### num_queued_government_constructions
1294
+ Scope to the number of queued government constructions target country has in total (example: num_queued_government_constructions >= 2)
1295
+ Input Scopes: country
1296
+ Output Scopes: value
1297
+
1298
+ ### num_queued_private_constructions
1299
+ Scope to the number of queued private constructions target country has in total (example: num_queued_private_constructions >= 2)
1300
+ Input Scopes: country
1301
+ Output Scopes: value
1302
+
1303
+ ### num_rivals
1304
+ Scope to the number of rivals target country has in total (example: num_rivals >= 2)
1305
+ Input Scopes: country
1306
+ Output Scopes: value
1307
+
1308
+ ### num_ruling_igs
1309
+ Get the scoped country's current number of IGs in government
1310
+ Input Scopes: country
1311
+ Output Scopes: value
1312
+
1313
+ ### num_shared_rivals
1314
+ Scope to the number of shared rivals scope country has with target country (example: num_shared_rivals:root >= 2)
1315
+ Requires Data: yes
1316
+ Input Scopes: country
1317
+ Output Scopes: value
1318
+
1319
+ ### num_states
1320
+ Get the scoped country's current number of states
1321
+ Input Scopes: country
1322
+ Output Scopes: value
1323
+
1324
+ ### num_unincorporated_states
1325
+ Get the scoped country's current number of unincorporated states
1326
+ Input Scopes: country
1327
+ Output Scopes: value
1328
+
1329
+ ### overlord
1330
+ Scope to the direct overlord of the country in scope
1331
+ Input Scopes: country
1332
+ Output Scopes: country
1333
+
1334
+ ### owning_company
1335
+ Scope to the company owning the scoped country
1336
+ Input Scopes: country
1337
+ Output Scopes: company
1338
+
1339
+ ### pirated_trade_value_by
1340
+ Scope to the average weekly base value of goods pilfered from this country by a target country (example: pirated_trade_value_by:root >= 50)
1341
+ Requires Data: yes
1342
+ Input Scopes: country
1343
+ Output Scopes: value
1344
+
1345
+ ### power_bloc
1346
+ Scope to the power bloc for the scoped country
1347
+ Input Scopes: country
1348
+ Output Scopes: power_bloc
1349
+
1350
+ ### principal
1351
+ Get the current debt principal of the country
1352
+ Input Scopes: country
1353
+ Output Scopes: value
1354
+
1355
+ ### py
1356
+ Scope to the active party of specified key belonging to the country
1357
+ Requires Data: yes
1358
+ Input Scopes: country
1359
+ Output Scopes: party
1360
+
1361
+ ### relations
1362
+ Scope to relations between two countries (example: relations:root >= 2)
1363
+ Requires Data: yes
1364
+ Input Scopes: country
1365
+ Output Scopes: value
1366
+
1367
+ ### relations_change_rate
1368
+ Scope to daily change in relations progress between two countries (example: relations_change_rate:root > 0)
1369
+ Requires Data: yes
1370
+ Input Scopes: country
1371
+ Output Scopes: value
1372
+
1373
+ ### ruler
1374
+ Scope to the ruler of a country
1375
+ Input Scopes: country
1376
+ Output Scopes: character
1377
+
1378
+ ### strait_trade_importance_by
1379
+ Scope to the trade importance of goods this country is trading through straits controlled by a target country. Accumulated value is multiplied by STRAIT_FULL_CONTROL_TRADE_IMPORTANCE_MULT for straits where the controller controls both sides (example: strait_trade_importance_by:root >= 100)
1380
+ Requires Data: yes
1381
+ Input Scopes: country
1382
+ Output Scopes: value
1383
+
1384
+ ### technology_being_researched
1385
+ Scope to the current technology a country is researching
1386
+ Input Scopes: country
1387
+ Output Scopes: technology
1388
+
1389
+ ### techs_researched
1390
+ Scope to the current amount of techs researched of a country
1391
+ Input Scopes: country
1392
+ Output Scopes: value
1393
+
1394
+ ### tension
1395
+ Scope to tension between two countries (example: tension:root >= 2)
1396
+ Requires Data: yes
1397
+ Input Scopes: country
1398
+ Output Scopes: value
1399
+
1400
+ ### top_overlord
1401
+ Scope to the top overlord of the country in scope
1402
+ Input Scopes: country
1403
+ Output Scopes: country
1404
+
1405
+ ### total_crew_needed
1406
+ Get the total crew needed by all ships of a country
1407
+ Input Scopes: country
1408
+ Output Scopes: value
1409
+
1410
+ ### total_export_value
1411
+ Scope to the total value of scope country's exports to the world market (example: total_trade_value >= 1000)
1412
+ Input Scopes: country
1413
+ Output Scopes: value
1414
+
1415
+ ### total_import_value
1416
+ Scope to the total value of scope country's imports from the world market (example: total_trade_value >= 1000)
1417
+ Input Scopes: country
1418
+ Output Scopes: value
1419
+
1420
+ ### total_marine_capacity
1421
+ Get the total marine capacity across all fleets of a country
1422
+ Input Scopes: country
1423
+ Output Scopes: value
1424
+
1425
+ ### total_trade_value
1426
+ Scope to the total value of scope country's trade with the world market (example: total_trade_value >= 1000)
1427
+ Input Scopes: country
1428
+ Output Scopes: value
1429
+
1430
+ ### ai_state_value
1431
+ Scope to target country AI desire to own scope state (example: value = ai_state_value:root)
1432
+ Requires Data: yes
1433
+ Input Scopes: state
1434
+ Output Scopes: value
1435
+
1436
+ ### ai_treaty_port_value
1437
+ Scope to target country AI desire to have a treaty port in scope state (example: value = ai_treaty_port_value:root)
1438
+ Requires Data: yes
1439
+ Input Scopes: state
1440
+ Output Scopes: value
1441
+
1442
+ ### b
1443
+ Scope to the building of specified key in the state
1444
+ Requires Data: yes
1445
+ Input Scopes: state
1446
+ Output Scopes: building
1447
+
1448
+ ### decree_cost
1449
+ Scope to a state's cost for a certain decree
1450
+ authority > decree_cost:decree_road_maintaintenance
1451
+ Requires Data: yes
1452
+ Input Scopes: state
1453
+ Output Scopes: value
1454
+
1455
+ ### mass_migration_culture
1456
+ Scope to the mass migration target culture of a state
1457
+ Input Scopes: state
1458
+ Output Scopes: culture
1459
+
1460
+ ### nf
1461
+ Scope to a Decree of specified key applied to the state
1462
+ Requires Data: yes
1463
+ Input Scopes: state
1464
+ Output Scopes: decree
1465
+
1466
+ ### num_world_market_hub_trade_center_levels
1467
+ Get the total number of trade center levels associated with scope world market hub state
1468
+ Input Scopes: state
1469
+ Output Scopes: value
1470
+
1471
+ ### population_below_expected_sol
1472
+ Scope to the current percentage of the state's population that are below their expected standard of living (0-1)
1473
+ Input Scopes: state
1474
+ Output Scopes: value
1475
+
1476
+ ### sg
1477
+ Scope from a state to the StateGoods with the specified key
1478
+ Requires Data: yes
1479
+ Input Scopes: state
1480
+ Output Scopes: state_goods
1481
+
1482
+ ### state_region
1483
+ Scope to the state region of a state
1484
+ Input Scopes: state
1485
+ Output Scopes: state_region
1486
+
1487
+ ### world_market_hub
1488
+ Scope to the world market hub state associated with the scoped state
1489
+ Input Scopes: state
1490
+ Output Scopes: state
1491
+
1492
+ ### attacker_side
1493
+ Scope from a battle to the BattleSide corresponding to the attacker
1494
+ Input Scopes: battle
1495
+ Output Scopes: battle_side
1496
+
1497
+ ### defender_side
1498
+ Scope from a battle to the BattleSide corresponding to the defender
1499
+ Input Scopes: battle
1500
+ Output Scopes: battle_side
1501
+
1502
+ ### base_price
1503
+ Get the base price of the scoped good
1504
+ Input Scopes: goods
1505
+ Output Scopes: value
1506
+
1507
+ ### average_expected_sol
1508
+ Get the average expected Standard of Living of the scope
1509
+ Input Scopes: country, state
1510
+ Output Scopes: value
1511
+
1512
+ ### average_sol
1513
+ Get the average Standard of Living of the scope
1514
+ Input Scopes: country, state
1515
+ Output Scopes: value
1516
+
1517
+ ### migration_pull
1518
+ Get the migration pull for a state or the mass migration pull for a country.
1519
+ Input Scopes: country, state
1520
+ Output Scopes: value
1521
+
1522
+ ### group
1523
+ Scope from an object to its group
1524
+ Input Scopes: building, building_type
1525
+ Output Scopes: building_group
1526
+
1527
+ ### market
1528
+ Scope to the market of the object
1529
+ Input Scopes: country, building, market, market_goods, province, state, state_goods, state_region
1530
+ Output Scopes: market
1531
+
1532
+ ### momentum
1533
+ Get the scoped party's raw momentum
1534
+ Input Scopes: party
1535
+ Output Scopes: value
1536
+
1537
+ ### front
1538
+ Scope to a front from various scopes
1539
+ From a battle to the front where it takes place
1540
+ From a character to the front where they are at or travelling towards
1541
+ From a military formation to the front it is currently at
1542
+ From a province to the front that contains it From an invasion to the invasion front
1543
+ Input Scopes: battle, character, military_formation, invasion, province
1544
+ Output Scopes: front
1545
+
1546
+ ### num_garrison_units
1547
+ Returns the number of units garrisoned in a HQ
1548
+ Input Scopes: hq
1549
+ Output Scopes: value
1550
+
1551
+ ### first_country
1552
+ Scope to the first_country of any of:
1553
+ 1. diplomatic pact
1554
+ 2. treaty
1555
+ 3. treaty options
1556
+ 4. treaty article's treaty
1557
+ 5. treaty article options (for mutual article types only)
1558
+ Input Scopes: diplomatic_pact, treaty_article, treaty_options, treaty_article_options, treaty
1559
+ Output Scopes: country
1560
+
1561
+ ### second_country
1562
+ Scope to the second_country of any of:
1563
+ 1. diplomatic pact
1564
+ 2. treaty
1565
+ 3. treaty options
1566
+ 4. treaty article's treaty
1567
+ 5. treaty article options (for mutual article types only)
1568
+ Input Scopes: diplomatic_pact, treaty_article, treaty_options, treaty_article_options, treaty
1569
+ Output Scopes: country
1570
+
1571
+ ### region_state
1572
+ Unknown, add something in code registration
1573
+ Requires Data: yes
1574
+ Input Scopes: state_region
1575
+ Output Scopes: state
1576
+
1577
+ ### investment
1578
+ Scope to current investment level in an institution (example: investment < investment_max)
1579
+ Input Scopes: institution
1580
+ Output Scopes: value
1581
+
1582
+ ### investment_max
1583
+ Scope to the country's current maximum investment level in an institution (example: investment < investment_max)
1584
+ Input Scopes: institution
1585
+ Output Scopes: value
1586
+
1587
+ ### attacker_warleader
1588
+ Scope to the attacker warleader of a war
1589
+ Input Scopes: war
1590
+ Output Scopes: country
1591
+
1592
+ ### defender_warleader
1593
+ Scope to the defender warleader of a war
1594
+ Input Scopes: war
1595
+ Output Scopes: country
1596
+
1597
+ ### diplomatic_play
1598
+ Scope from a war to its diplomatic play
1599
+ Input Scopes: war
1600
+ Output Scopes: diplomatic_play
1601
+
1602
+ ### enforced_on_country
1603
+ Scope to the enforced_on_country of an enforced treaty
1604
+ Input Scopes: treaty
1605
+ Output Scopes: country
1606
+
1607
+ ### enforcer_country
1608
+ Scope to the enforcer_country of an enforced treaty
1609
+ Input Scopes: treaty
1610
+ Output Scopes: country
1611
+
1612
+ ### command_limit_num_units
1613
+ Get the baseline number of units from their military formation a commander would normally get, depending on their command limit
1614
+ Input Scopes: character
1615
+ Output Scopes: value
1616
+
1617
+ ### commander_military_formation
1618
+ Scope to the Military Formation of a Character.
1619
+ Input Scopes: character
1620
+ Output Scopes: military_formation
1621
+
1622
+ ### ideology
1623
+ Scope to the ideology of the scoped character (example: scope:example_character = { ideology = { save_scope_as = example_ideology } } )
1624
+ Input Scopes: character
1625
+ Output Scopes: ideology
1626
+
1627
+ ### interest_group
1628
+ Scope to the interest group of the character!
1629
+ Input Scopes: character
1630
+ Output Scopes: interest_group
1631
+
1632
+ ### interest_group_type
1633
+ Scope to the type of the scoped character's interest group
1634
+ Input Scopes: character
1635
+ Output Scopes: interest_group_type
1636
+
1637
+ ### num_battalions
1638
+ Returns the number of active battalions under a commander
1639
+ Input Scopes: character
1640
+ Output Scopes: value
1641
+
1642
+ ### num_mobilized_battalions
1643
+ Returns the number of fully mobilized units under a General
1644
+ Input Scopes: character
1645
+ Output Scopes: value
1646
+
1647
+ ### num_units_share
1648
+ Share of units a commander has considering his command limit. Example: if the character has 30 Command Limit, the fleet has 60 total Command Limit, and the formation has 50 total ships, then the character should get 25 ships for their battle)
1649
+ Input Scopes: character
1650
+ Output Scopes: value
1651
+
1652
+ ### opposing_commander
1653
+ Scope from a character in battle to the character on the other side of the battle
1654
+ Input Scopes: character
1655
+ Output Scopes: character
1656
+
1657
+ ### popularity
1658
+ Get the scoped character's popularity, normally ranging between -100 and +100
1659
+ Input Scopes: character
1660
+ Output Scopes: value
1661
+
1662
+ ### religion
1663
+ Scope to country or country definition's primary religion or pop religion
1664
+ Input Scopes: country, character, country_definition, political_movement, pop
1665
+ Output Scopes: religion
1666
+
1667
+ ### num_ships_of_group
1668
+ Number of ships of the provided ship group in the scoped country or military formation
1669
+ "num_ships_of_group(ship_group:ship_group_capital_ships)"
1670
+ Requires Data: yes
1671
+ Input Scopes: country, military_formation
1672
+ Output Scopes: value
1673
+
1674
+ ### required_construction
1675
+ Get the required amount of construction for scope building type
1676
+ Input Scopes: building_type
1677
+ Output Scopes: value
1678
+
1679
+ ### slaves_role
1680
+ Scope from building type to it's slaves role pop type
1681
+ Input Scopes: building_type
1682
+ Output Scopes: pop_type
1683
+
1684
+ ### leader
1685
+ Scope to the leader of the interest group
1686
+ Input Scopes: interest_group
1687
+ Output Scopes: character
1688
+
1689
+ ### lobby_join_weight
1690
+ Scope to the join weight of an interest group to a particular lobby (lobby_join_weight:root >= 5)
1691
+ Requires Data: yes
1692
+ Input Scopes: interest_group
1693
+ Output Scopes: value
1694
+
1695
+ ### party
1696
+ Scope to the party that an IG is supporting
1697
+ Input Scopes: interest_group
1698
+ Output Scopes: party
1699
+
1700
+ ### amended_treaty
1701
+ Scope to the treaty the scoped treaty is amending
1702
+ Input Scopes: treaty_options, treaty
1703
+ Output Scopes: treaty
1704
+
1705
+ ### binding_period
1706
+ Get the original binding period in days when the treaty was signed for the scoped treaty
1707
+ Input Scopes: treaty_options, treaty
1708
+ Output Scopes: value
1709
+
1710
+ ### remaining_binding_period
1711
+ Get the current remaining binding period in days for the scoped treaty
1712
+ Input Scopes: treaty_options, treaty
1713
+ Output Scopes: value
1714
+
1715
+ ### input_building_type
1716
+ Scope to the building type input in a treaty article
1717
+ Input Scopes: treaty_article, treaty_article_options
1718
+ Output Scopes: building_type
1719
+
1720
+ ### input_company
1721
+ Scope to the company input in a treaty article
1722
+ Input Scopes: treaty_article, treaty_article_options
1723
+ Output Scopes: company
1724
+
1725
+ ### input_country
1726
+ Scope to the country input in a treaty article
1727
+ Input Scopes: treaty_article, treaty_article_options
1728
+ Output Scopes: country
1729
+
1730
+ ### input_goods
1731
+ Scope to the goods input in a treaty article
1732
+ Input Scopes: treaty_article, treaty_article_options
1733
+ Output Scopes: goods
1734
+
1735
+ ### input_law
1736
+ Scope to the law input in a treaty article
1737
+ Input Scopes: treaty_article, treaty_article_options
1738
+ Output Scopes: law_type
1739
+
1740
+ ### input_market_goods
1741
+ Scope to the market goods input in a treaty article (example: input_market_goods:root)
1742
+ Requires Data: yes
1743
+ Input Scopes: treaty_article, treaty_article_options
1744
+ Output Scopes: market_goods
1745
+
1746
+ ### input_quantity
1747
+ Scope to the quantity input in a treaty article
1748
+ Input Scopes: treaty_article, treaty_article_options
1749
+ Output Scopes: value
1750
+
1751
+ ### input_ship
1752
+ Scope to the ship input in a treaty article
1753
+ Input Scopes: treaty_article, treaty_article_options
1754
+ Output Scopes: ship
1755
+
1756
+ ### input_state
1757
+ Scope to the state input in a treaty article
1758
+ Input Scopes: treaty_article, treaty_article_options
1759
+ Output Scopes: state
1760
+
1761
+ ### input_strategic_region
1762
+ Scope to the strategic region input in a treaty article
1763
+ Input Scopes: treaty_article, treaty_article_options
1764
+ Output Scopes: strategic_region
1765
+
1766
+ ### source_country
1767
+ Scope to the source_country of any of:
1768
+ 1. treaty article (for directed article types only)
1769
+ 2. treaty article options (for directed article types only)
1770
+ Input Scopes: treaty_article, treaty_article_options
1771
+ Output Scopes: country
1772
+
1773
+ ### target_country
1774
+ Scope to the target_country of any of:
1775
+ 1. treaty article (for directed article types only)
1776
+ 2. treaty article options (for directed article types only)
1777
+ Input Scopes: treaty_article, treaty_article_options
1778
+ Output Scopes: country
1779
+
1780
+ ### power_projection
1781
+ Get the power projection value of the scoped formation, unit, or ship
1782
+ Input Scopes: new_combat_unit, military_formation, ship
1783
+ Output Scopes: value
1784
+
1785
+ ### num_provinces
1786
+ Get the scoped entity's current number of provinces
1787
+ scopes: state, stateregion, front
1788
+ Input Scopes: front, state, state_region
1789
+ Output Scopes: value
1790
+
1791
+ ### target
1792
+ Scope to the target of the object
1793
+ Input Scopes: diplomatic_play, diplomatic_catalyst, political_lobby, journal_entry
1794
+
1795
+ ### pop_weight_modifier_scale
1796
+ Get the Pop's weight modifier scale multiplier
1797
+ Input Scopes: pop
1798
+ Output Scopes: value
1799
+
1800
+ ### workplace
1801
+ Scope to the workplace of a pop
1802
+ Input Scopes: pop
1803
+ Output Scopes: building
1804
+
1805
+ ### culture
1806
+ Scope to pop's or character's culture
1807
+ Input Scopes: character, new_combat_unit, political_movement, pop
1808
+ Output Scopes: culture
1809
+
1810
+ ### identity
1811
+ Scope to the central identity for the scoped power bloc
1812
+ Input Scopes: power_bloc
1813
+ Output Scopes: power_bloc_identity
1814
+
1815
+ ### num_mandates
1816
+ Scope to the number of available mandates of the scoped power bloc (power_bloc.num_mandates > 0)
1817
+ Input Scopes: power_bloc
1818
+ Output Scopes: value
1819
+
1820
+ ### power_bloc_leader
1821
+ Scope to the leader country of the scoped power bloc
1822
+ Input Scopes: power_bloc
1823
+ Output Scopes: country
1824
+
1825
+ ### power_struggle_contender
1826
+ Scope to the contender country if there is a power struggle
1827
+ Input Scopes: power_bloc
1828
+ Output Scopes: country
1829
+
1830
+ ### political_movement
1831
+ If used in a character scope, scope to the political movement that character supports.
1832
+ If used in a revolution civil war scope, scope to the movement that started the revolution.
1833
+ If used in an interest group scope, scope to the group's dominant movement.
1834
+ Input Scopes: character, civil_war
1835
+ Output Scopes: political_movement
1836
+
1837
+ ### shipping_lane
1838
+ Scope to the shipping lane for the military formation, or treaty article (goods transfer)
1839
+ Input Scopes: treaty_article
1840
+ Output Scopes: shipping_lanes
1841
+
1842
+ ### treaty
1843
+ Scope to the treaty a treaty article belongs to
1844
+ Input Scopes: treaty_article
1845
+ Output Scopes: treaty
1846
+
1847
+ ### average_defense
1848
+ Returns the average defense of units on Front on the same side as Country
1849
+ Requires Data: yes
1850
+ Input Scopes: front
1851
+ Output Scopes: value
1852
+
1853
+ ### average_offense
1854
+ Returns the average offense of units on Front on the same side as Country
1855
+ Requires Data: yes
1856
+ Input Scopes: front
1857
+ Output Scopes: value
1858
+
1859
+ ### front_length
1860
+ Returns the number of provinces in Front
1861
+ Input Scopes: front
1862
+ Output Scopes: value
1863
+
1864
+ ### invasion
1865
+ Returns the invasion of the scoped front if any
1866
+ Input Scopes: front
1867
+ Output Scopes: invasion
1868
+
1869
+ ### num_defending_battalions
1870
+ Returns the total number of units in battle on Front on the same side as Country
1871
+ Requires Data: yes
1872
+ Input Scopes: front
1873
+ Output Scopes: value
1874
+
1875
+ ### num_total_battalions
1876
+ Returns the total number of units on Front on the same side as Country
1877
+ Requires Data: yes
1878
+ Input Scopes: front
1879
+ Output Scopes: value
1880
+
1881
+
1882
+ --------------------
1883
+
1884
+ Event Targets Saved from Code:
1885
+
1886
+ context
1887
+ amendment
1888
+ area
1889
+ attacker
1890
+ defender
1891
+ war_goal_holder
1892
+ actor
1893
+ recipient
1894
+ ship
1895
+ ship_modification_type
1896
+ country_formation
1897
+ ally
1898
+ initiator
1899
+ target
1900
+ goods
1901
+ workplace
1902
+ region
1903
+ diplomatic_play
1904
+ diplomatic_play_type
1905
+ technology
1906
+ diplomatic_action
1907
+ diplomatic_pact
1908
+ market
1909
+ trade_center
1910
+ command
1911
+ target_region
1912
+ target_country
1913
+ power_bloc
1914
+ with_country
1915
+ without_country
1916
+ group
1917
+ goal_holder
1918
+ evaluation
1919
+ state
1920
+ target_state
1921
+ first_state
1922
+ second_state
1923
+ epicentre
1924
+ intensity
1925
+ interest_group
1926
+ negotiating_interest_group
1927
+ political_movement
1928
+ revolutionary_faction
1929
+ new_character
1930
+ new_diplomatic_relation
1931
+ war
1932
+ neighbor
1933
+ theater
1934
+ type
1935
+ country
1936
+ culture
1937
+ religion
1938
+ combat_unit_type
1939
+ num_states
1940
+ num_units
1941
+ num_levels
1942
+ notification_target
1943
+ notification_ignore
1944
+ previous
1945
+ next
1946
+ overlord
1947
+ subject
1948
+ role
1949
+ general
1950
+ admiral
1951
+ army
1952
+ fleet
1953
+ politician
1954
+ is_monarch
1955
+ character
1956
+ pop
1957
+ rank
1958
+ hq
1959
+ front
1960
+ journal_entry
1961
+ battle
1962
+ own_commander
1963
+ enemy_country
1964
+ enemy_commander
1965
+ attacker_commander
1966
+ defender_commander
1967
+ province
1968
+ invasion
1969
+ is_naval_invasion
1970
+ is_advancing_side
1971
+ is_military_formation
1972
+ is_initiator
1973
+ law
1974
+ number
1975
+ relations
1976
+ distance_to_strategic_objective
1977
+ distance_to_closest_war_goal
1978
+ occupation_fraction
1979
+ military_formation
1980
+ enemy_military_formation
1981
+ is_strategic_objective
1982
+ investor_country
1983
+ has_interest
1984
+ has_capital_interest
1985
+ is_adjacent_to_strategic_objective
1986
+ company_type
1987
+ company
1988
+ political_lobby
1989
+ diplomatic_catalyst
1990
+ duration
1991
+ successful_contender
1992
+ failed_contender
1993
+ selected_identity
1994
+ wargoal_impact
1995
+ clout
1996
+ approval
1997
+ withdrawing_country
1998
+ non_withdrawing_country
1999
+ declining_country
2000
+ proposing_country
2001
+ treaty
2002
+ is_treaty_active
2003
+ is_renegotiation
2004
+ bad_faith_factor
2005
+ treaty_options
2006
+ binding_period
2007
+ article
2008
+ article_options
2009
+ first_country
2010
+ second_country
2011
+ source_country
2012
+ other_country
2013
+ creator_country
2014
+ input
2015
+ market_goods
2016
+ other_market_goods
2017
+ quantity
2018
+ building
2019
+ stakeholder
2020
+ war_goal
2021
+ strait
2022
+ is_sole_controller
2023
+ amenability
2024
+ advance_chance
2025
+ stall_chance
2026
+ num_sunk_ships
2027
+ count
2028
+ region_score