172 |
173 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 | `;
187 |
188 |
189 | }
190 | private getNonce() {
191 | let text = '';
192 | const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
193 | for (let i = 0; i < 32; i++) {
194 | text += possible.charAt(Math.floor(Math.random() * possible.length));
195 | }
196 | return text;
197 | };
198 | }
199 |
--------------------------------------------------------------------------------
/client/test/runTest.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path';
2 |
3 | import { runTests } from 'vscode-test';
4 |
5 | async function main() {
6 | try {
7 | // The folder containing the Extension Manifest package.json
8 | // Passed to `--extensionDevelopmentPath`
9 | const extensionDevelopmentPath = path.resolve(__dirname, '../../../');
10 |
11 | // The path to the extension test script
12 | // Passed to --extensionTestsPath
13 | const extensionTestsPath = path.resolve(__dirname, './suite/index');
14 |
15 | const launchArgs = [
16 | path.resolve(__dirname, "../../../client/test/sample mod/"),
17 | path.resolve(__dirname, "../../../client/test/sample mod/events/irm.txt"),
18 | "--disable-extensions"
19 | ]
20 |
21 | // Download VS Code, unzip it and run the integration test
22 | await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs });
23 | } catch (err) {
24 | console.error('Failed to run tests');
25 | process.exit(1);
26 | }
27 | }
28 |
29 | main();
--------------------------------------------------------------------------------
/client/test/sample mod/common/defines/irm_defines.txt:
--------------------------------------------------------------------------------
1 | NGraphics = {
2 | MAPNAME_SECTOR_SCALE = 5 # sector name size
3 | }
4 | NGameplay = {
5 | POP_FACTION_MIN_POTENTIAL_MEMBERS = 3 # If a faction has less potential members than this, do not form
6 | POP_FACTION_CREATION_COOLDOWN = 30 # Wait this many days after creating a faction to create another one (not applied to hidden factions)
7 | }
--------------------------------------------------------------------------------
/client/test/sample mod/common/edicts/irm_planetary_edicts.txt:
--------------------------------------------------------------------------------
1 | # Sets the edict cost and time for all edicts with this variables
2 | @standardEdictCost = 150
3 | @standardEdictLength = 3600
4 |
5 | # Restricted Migration
6 | planet_edict = {
7 | name = "restricted_migration"
8 | influence_cost = @standardEdictCost
9 | length = @standardEdictLength
10 |
11 | modifier = {
12 | planet_migration_all_pull = -9.99
13 | }
14 |
15 | potential = {}
16 | allow = { not = { has_edict = "land_of_opportunity" } }
17 |
18 | ai_weight = { weight = 0 }
19 | }
20 |
21 |
22 | # Establish sector capital
23 | planet_edict = {
24 | name = "sector_capital_new"
25 | influence_cost = 0
26 | length = 0
27 |
28 | potential = {
29 | sector_controlled = yes
30 | sector = { not = { any_planet = { is_sector_capital = yes } } }
31 | }
32 | allow = {}
33 | effect = {
34 | custom_tooltip = "edict_sector_capital_effect"
35 | hidden_effect = {
36 | # Set planet as sector capital
37 | add_modifier = { modifier = "sector_capital" days = -1 }
38 | # Launch sector reconfiguration
39 | # Unassign leader, to prevent disappearing of him
40 | sector = {
41 | if = { limit = { exists = leader } unassign_leader = leader }
42 | sector_do_reconfigure = yes
43 | }
44 | }
45 | }
46 | }
47 |
48 | # Relocate sector capital
49 | planet_edict = {
50 | name = "sector_capital_move"
51 | influence_cost = @standardEdictCost
52 | length = 0
53 |
54 | potential = {
55 | sector_controlled = yes
56 | sector = { any_planet = { is_sector_capital = yes } }
57 | }
58 | allow = {
59 | custom_tooltip = {
60 | fail_text = "edict_sector_capital_not_established"
61 | not = { has_modifier = "sector_capital" }
62 | }
63 | custom_tooltip = {
64 | fail_text = "edict_sector_capital_has_sector_edict"
65 | sector = {
66 | not = {
67 | any_planet = {
68 | is_sector_capital = yes
69 | has_sector_edict_time = yes
70 | }
71 | }
72 | }
73 | }
74 | }
75 | effect = {
76 | custom_tooltip = "edict_sector_capital_effect"
77 | hidden_effect = {
78 | # Set planet as sector capital
79 | add_modifier = { modifier = "sector_capital" days = -1 }
80 | # Launch sector reconfiguration
81 | # Unassign leader, to prevent disappearing of him
82 | sector = {
83 | if = { limit = { exists = leader } unassign_leader = leader }
84 | sector_do_reconfigure = yes
85 | }
86 | }
87 | }
88 | }
89 |
90 | # Manage Sector
91 | planet_edict = {
92 | name = "manage_sector"
93 | influence_cost = 0
94 | length = 0
95 |
96 | potential = {
97 | sector_controlled = yes
98 | has_modifier = "sector_capital"
99 | }
100 | allow = {
101 | custom_tooltip = {
102 | fail_text = "edict_manage_sector_duplicated"
103 | owner = { not = { any_owned_planet = { has_planet_flag = "ui_management_open" } } }
104 | }
105 | }
106 | effect = {
107 | hidden_effect = {
108 | # Run sector management screen from sector capital
109 | planet_event = { id = irm_sector.2 }
110 | }
111 | }
112 | }
--------------------------------------------------------------------------------
/client/test/sample mod/common/on_actions/irm_on_actions.txt:
--------------------------------------------------------------------------------
1 | # No scope, like on_game_start
2 | on_monthly_pulse = {
3 | events = {
4 | irm.2
5 | }
6 | }
7 |
8 | # No scope, like on_game_start
9 | on_yearly_pulse = {
10 | events = {
11 | irm.3
12 | }
13 | }
14 |
15 | # A colony has been destroyed. Called just before owner and controller is cleared
16 | # Scope = Planet
17 | on_colony_destroyed = {
18 | events = {
19 | irm_sector.105
20 | }
21 | }
22 |
23 | # A planets controller becomes a country not the same as the owner.
24 | # Root = Planet
25 | # From = Planet Owner
26 | # FromFrom = Planet Controller (the one occupying)
27 | on_planet_occupied = {
28 | events = {
29 | irm_sector.105
30 | }
31 | }
32 |
33 | # Initial rebels manage to take control of the planet, happens before the new owner is set, after the war is created.
34 | # This = Rebel Country
35 | # From = Planet
36 | # FromFrom = War
37 | on_rebels_take_planet = {
38 | events = {
39 | irm_sector.1051
40 | }
41 | }
42 |
43 | # Initial rebels manage to take control of the planet, happens after the new owner is set, after the war is created.
44 | # This = Rebel Country
45 | # From = Planet
46 | # FromFrom = War
47 | on_rebels_take_planet_owner_switched = {
48 | events = {
49 | irm_sector.1051
50 | }
51 | }
52 |
53 | #From = Country scope
54 | #This = Planet scope
55 | on_planet_ownerless = {
56 | events = {
57 | irm_sector.105
58 | }
59 | }
60 |
61 | #Fired whenever a new owner is set for a planet,
62 | #be it after a war or through a trade
63 | #From = Country scope (new owner)
64 | #This = Planet scope
65 | on_planet_transfer = {
66 | events = {
67 | irm_sector.105
68 | }
69 | }
70 |
71 | # Executed as a leader has died
72 | # This = Country
73 | # From = Leader
74 | on_leader_death = {
75 | events = {
76 | irm_faction.2
77 | }
78 | }
79 |
80 | # A pop has finished migrating to another planet
81 | # Root = pop
82 | # From = Tile on the new planet
83 | # FromFrom = Tile on the old planet
84 | on_pop_migration_end = {
85 | events = {
86 | #irm.231
87 | }
88 | }
89 |
90 | # A pop has been resettled to another planet
91 | # Root = pop
92 | # From = Tile on the old planet
93 | on_pop_resettled = {
94 | events = {
95 | #irm.232
96 | }
97 | }
--------------------------------------------------------------------------------
/client/test/sample mod/common/policies/irm_policies.txt:
--------------------------------------------------------------------------------
1 | administrative_system = {
2 | potential = {
3 | NOT = { has_ethic = "ethic_gestalt_consciousness" }
4 | has_country_flag="adm_enabled"
5 | }
6 |
7 | option = {
8 | name = "federal"
9 |
10 | policy_flags = {
11 | federal_system
12 | }
13 |
14 | valid = {
15 | has_authority = auth_democratic
16 | sectors > 0
17 | }
18 |
19 | modifier = {
20 | #country_core_sector_system_cap = 1
21 | }
22 |
23 | }
24 |
25 | option = {
26 | name = "corporate"
27 |
28 | policy_flags = {
29 | corporate_system
30 | }
31 |
32 | valid = {
33 | has_authority = auth_oligarchic
34 | sectors > 0
35 | }
36 |
37 | }
38 |
39 | option = {
40 | name = "unitary"
41 |
42 | policy_flags = {
43 | unitary_system
44 | }
45 |
46 | }
47 |
48 | option = {
49 | name = "dominion"
50 |
51 | policy_flags = {
52 | dominion_system
53 | }
54 |
55 | valid = {
56 | has_authority = auth_dictatorial
57 | sectors > 0
58 | }
59 |
60 | }
61 |
62 | option = {
63 | name = "empire"
64 |
65 | policy_flags = {
66 | empire_system
67 | }
68 |
69 | valid = {
70 | has_authority = auth_imperial
71 | sectors > 0
72 | }
73 |
74 | }
75 |
76 | }
--------------------------------------------------------------------------------
/client/test/sample mod/common/pop_faction_types/irm_regionalist.txt:
--------------------------------------------------------------------------------
1 | # Regionalist Faction
2 |
3 | regionalist = {
4 |
5 | # This = Pop faction
6 | unique = no
7 |
8 | # This = Country
9 | # Global Conditions
10 | is_potential = {
11 | is_ai = no
12 | sectors > 0
13 | }
14 |
15 | # This = Country
16 | parameters = {
17 | sector = {
18 | type = sector
19 | valid_objects = {
20 | is_core_sector = no
21 | }
22 | }
23 | }
24 |
25 | # This = Pop faction
26 | valid = {
27 | not = { has_pop_faction_flag = "regionalist_dublicated" } # prevent duplicates
28 | parameter:sector = {
29 | debug_scope_type = sector
30 | owner = { is_same_empire = root.owner }
31 | }
32 | }
33 |
34 | # This = Pop
35 | can_join_faction = {
36 | pop_can_politics = yes
37 | planet = { exists = sector }
38 | not = { has_modifier = "pop_suppressed" }
39 | # temporary planets? to keep the issue with taking out planets
40 | }
41 |
42 | # This = Pop
43 | # !!! WARNING !!!
44 | # All of this stuff must be linked with tooltips in irm_button.txt !
45 | attraction = {
46 | base = 0
47 |
48 | # BASIC
49 |
50 | # Basic faction attraction within sector
51 | modifier = {
52 | add = 100
53 | is_region_pop = yes
54 | }
55 |
56 | # Attraction for regionalist founders, to establish the faction
57 | modifier = {
58 | add = 9999
59 | is_region_pop = yes
60 | has_pop_faction_flag = "regionalist_founder"
61 | }
62 |
63 | # COUNTRY
64 |
65 | # Colonial Viceroys
66 | modifier = {
67 | factor = 0.85
68 | is_region_pop = yes
69 | owner = { has_tradition = "tr_domination_colonial_viceroys" }
70 | }
71 |
72 | # FACTION
73 |
74 | # Regionalist faction existance
75 | modifier = {
76 | factor = 1.50
77 | is_region_pop = yes
78 | owner = {
79 | count_pop_factions = {
80 | limit = {
81 | is_pop_faction_type = "regionalist"
82 | check_pop_faction_parameter = { which = sector value = parameter:sector }
83 | }
84 | count > 0
85 | }
86 | }
87 | }
88 |
89 | # Regionalist faction membership
90 | modifier = {
91 | factor = 1.75
92 | is_region_pop = yes
93 | member_of_faction = root
94 | }
95 |
96 | # PLANET
97 |
98 | modifier = {
99 | factor = 3.00
100 | is_region_pop = yes
101 | planet = { has_modifier = "disconnected_from_sector" }
102 | }
103 |
104 | # Distance to capital
105 | modifier = {
106 | factor = 1.15
107 | planet = {
108 | exists = sector
109 | sector = { is_same_value = parameter:sector }
110 | distance = { source = parameter:sector.owner.capital_scope min_distance = 50 max_distance = 150 }
111 | }
112 | }
113 |
114 | # POP
115 |
116 | # Government ethos
117 | modifier = {
118 | factor = 0.95
119 | has_same_ethos = owner #### REWORK !!!
120 | }
121 |
122 | # Unemployed Pop
123 | modifier = {
124 | factor = 1.25
125 | is_region_pop = yes
126 | is_unemployed = yes
127 | }
128 |
129 | # Different species
130 | modifier = {
131 | factor = 1.5
132 | is_region_pop = yes
133 | not = { is_same_species = owner_species }
134 | }
135 |
136 | # SECTOR
137 |
138 | # Governor Seat
139 | modifier = {
140 | factor = 1.20
141 | is_region_pop = yes
142 | planet = { sector = { not = { exists = leader } } }
143 | }
144 | modifier = {
145 | factor = 0.85
146 | is_region_pop = yes
147 | planet = { sector = { exists = leader } }
148 | }
149 |
150 | # Sector Edict (Reduces Regionalism)
151 | modifier = {
152 | factor = 0.80
153 | is_region_pop = yes
154 | planet = {
155 | sector = {
156 | exists = leader
157 | leader = { has_trait = "trait_edict_regionalism" }
158 | }
159 | }
160 | }
161 |
162 | }
163 |
164 | # Leader selection
165 | leader = {
166 | base = 100
167 |
168 | modifier = {
169 | factor = 0
170 | nor = {
171 | has_leader_flag = "faction_leader"
172 | is_event_leader = yes
173 | }
174 | }
175 | }
176 |
177 | # This = Pop faction
178 | on_create = {
179 | # Check all potential factions within this sector.
180 | # If this faction is similar to existing, mark as duplicated.
181 | # Duplicated factions will be no valid and never appear.
182 | if = {
183 | limit = {
184 | parameter:sector = {
185 | any_pop = {
186 | exists = pop_faction
187 | pop_faction = {
188 | is_pop_faction_type = "regionalist"
189 | check_pop_faction_parameter = { which = sector value = prevprev }
190 | not = { is_same_value = root }
191 | }
192 | }
193 | }
194 | }
195 | # Mark the duplicate
196 | set_pop_faction_flag = "regionalist_dublicated"
197 |
198 | # Otherwise, establish the faction
199 | else = {
200 | # Name this faction from the sector scope, to get the proper name
201 | parameter:sector = { root = { set_name = "pft_regionalist_name" } }
202 |
203 | # Establish the faction
204 | faction_set_leader = yes
205 |
206 | # Show the default message
207 | pop_faction_event = { id = factions.1 }
208 | }
209 | }
210 |
211 | }
212 |
213 | # This = Country
214 | on_destroy = {
215 | every_owned_leader = {
216 | limit = {
217 | leader_class = governor
218 | has_leader_flag = "faction_leader"
219 | leader_of_faction = no
220 | }
221 | kill_leader = { show_notification = no }
222 | }
223 | }
224 |
225 | # Govenor
226 | demand = {
227 | title = "demand_governor"
228 | desc = "demand_governor_desc"
229 | unfulfilled_title = "demand_governor_not"
230 |
231 | fulfilled_effect = 2.5
232 | unfulfilled_effect = -10
233 |
234 | potential = {
235 | exists = parameter:sector
236 | exists = root.leader
237 | or = {
238 | parameter:sector = {
239 | exists = leader
240 | leader = {
241 | not = { root.leader = { is_same_value = prev } }
242 | }
243 | }
244 | parameter:sector = {
245 | not = { exists = leader }
246 | }
247 | }
248 | }
249 |
250 | trigger = {
251 | exists = parameter:sector
252 | parameter:sector = {
253 | exists = leader
254 | leader = {
255 | not = { root.leader = { is_same_value = prev } }
256 | }
257 | }
258 | }
259 | }
260 |
261 | # Govenor, faction leader
262 | demand = {
263 | title = "demand_governor_faction"
264 | desc = "demand_governor_faction_desc"
265 | #unfulfilled_title = "demand_governor_not"
266 |
267 | fulfilled_effect = 5
268 | #unfulfilled_effect = -5
269 |
270 | potential = {
271 | exists = parameter:sector
272 | exists = root.leader
273 | parameter:sector = {
274 | exists = leader
275 | leader = {
276 | leader_of_faction = yes
277 | root.leader = { is_same_value = prev }
278 | }
279 | }
280 | }
281 |
282 | trigger = {
283 | exists = parameter:sector
284 | parameter:sector = {
285 | exists = leader
286 | leader = {
287 | leader_of_faction = yes
288 | root.leader = { is_same_value = prev }
289 | }
290 | }
291 | }
292 | }
293 |
294 | # Same majority species governor
295 | demand = {
296 | title = "demand_same_gov"
297 | desc = "demand_same_gov_desc"
298 | unfulfilled_title = "demand_same_gov_not"
299 |
300 | fulfilled_effect = 2.5
301 | unfulfilled_effect = -5
302 |
303 | potential = {
304 | exists = parameter:sector
305 | exists = parameter:sector.leader
306 | owner = {
307 | any_owned_pop = {
308 | is_region_pop = yes
309 | pop_can_politics = yes
310 | not = { is_same_species = parameter:sector.leader }
311 | }
312 | }
313 | }
314 |
315 | trigger = {
316 | exists = parameter:sector
317 | exists = parameter:sector.leader
318 | pop_percentage = {
319 | limit = {
320 | is_region_pop = yes
321 | pop_can_politics = yes
322 | not = { is_same_species = parameter:sector.leader }
323 | }
324 | percentage < 0.50
325 | }
326 | }
327 | }
328 |
329 | # Experienced Leadership
330 | demand = {
331 | title = "demand_xp_gov"
332 | desc = "demand_xp_gov_desc"
333 | unfulfilled_title = "demand_xp_gov"
334 |
335 | fulfilled_effect = 2.5
336 | unfulfilled_effect = 0
337 |
338 | potential = {
339 | exists = parameter:sector
340 | exists = parameter:sector.leader
341 | parameter:sector.leader = { has_skill > 4 }
342 | }
343 |
344 | trigger = {
345 | exists = parameter:sector
346 | exists = parameter:sector.leader
347 | parameter:sector.leader = { has_skill > 4 }
348 | }
349 | }
350 |
351 | # Sector's Statecraft 1
352 | demand = {
353 | title = "demand_sector_statecraft"
354 | desc = "demand_sector_statecraft_desc"
355 | #unfulfilled_title = ""
356 |
357 | fulfilled_effect = 2.5
358 | #unfulfilled_effect = -15
359 |
360 | potential = {
361 | exists = parameter:sector
362 | owner = { sectors > 2 sectors < 10 }
363 | }
364 |
365 | trigger = {
366 | exists = parameter:sector
367 | owner = { sectors > 2 sectors < 10 }
368 | }
369 | }
370 | # Sector's Statecraft 2
371 | demand = {
372 | title = "demand_sector_statecraft"
373 | desc = "demand_sector_statecraft_desc"
374 | #unfulfilled_title = ""
375 |
376 | fulfilled_effect = 5
377 | #unfulfilled_effect = -15
378 |
379 | potential = {
380 | exists = parameter:sector
381 | owner = { sectors > 9 }
382 | }
383 |
384 | trigger = {
385 | exists = parameter:sector
386 | owner = { sectors > 9 }
387 | }
388 | }
389 |
390 | # Sector Capital
391 | demand = {
392 | title = "demand_sector_capital"
393 | desc = "demand_sector_capital_desc"
394 | unfulfilled_title = "demand_sector_capital_no"
395 |
396 | #fulfilled_effect = 0
397 | unfulfilled_effect = -15
398 |
399 | potential = {
400 | exists = parameter:sector
401 | parameter:sector = {
402 | not = { any_planet = { is_sector_capital = yes } }
403 | }
404 | }
405 |
406 | trigger = {
407 | exists = parameter:sector
408 | parameter:sector = { any_planet = { is_sector_capital = yes } }
409 | }
410 | }
411 |
412 | # Lost Worlds
413 | demand = {
414 | #title = "demand_lost_worlds"
415 | desc = "demand_lost_worlds_desc"
416 | unfulfilled_title = "demand_lost_worlds"
417 |
418 | #fulfilled_effect = 0
419 | unfulfilled_effect = -20
420 |
421 | potential = {
422 | exists = parameter:sector
423 | owner = {
424 | any_owned_pop = {
425 | exists = pop_faction
426 | pop_faction = {
427 | is_pop_faction_type = "regionalist"
428 | is_same_value = root
429 | }
430 | planet = {
431 | exists = sector
432 | sector = { not = { is_same_value = parameter:sector } }
433 | }
434 | }
435 | }
436 | }
437 |
438 | trigger = {
439 | exists = parameter:sector
440 | not = {
441 | owner = {
442 | any_owned_pop = {
443 | exists = pop_faction
444 | pop_faction = {
445 | is_pop_faction_type = "regionalist"
446 | is_same_value = root
447 | }
448 | planet = {
449 | exists = sector
450 | sector = { not = { is_same_value = parameter:sector } }
451 | }
452 | }
453 | }
454 | }
455 | }
456 | }
457 |
458 |
459 | # This = Pop faction
460 | # Faction management & actions
461 | actions = {
462 |
463 | # Sector Management Screen
464 | manage_sector = {
465 |
466 | title = "action_manage_sector"
467 | description = "action_manage_sector_desc"
468 |
469 | potential = {
470 | exists = parameter:sector
471 | parameter:sector = { any_planet = { is_sector_capital = yes } }
472 | owner = { not = { any_owned_planet = { has_planet_flag = "ui_management_open" } } }
473 | }
474 | effect = {
475 | parameter:sector = {
476 | random_planet = {
477 | limit = { is_sector_capital = yes }
478 | planet_event = { id = irm_sector.2 }
479 | }
480 | }
481 | }
482 | }
483 |
484 | }
485 |
486 | }
487 |
--------------------------------------------------------------------------------
/client/test/sample mod/common/scripted_effects/irm_helpers.txt:
--------------------------------------------------------------------------------
1 | # GENERAL
2 |
3 |
4 |
5 |
6 | # Scopes: Any (Country, Star, Planet, Fleet, Leader etc)
7 | # Gives the random values from 10000 to 999999
8 | get_random_6 = {
9 |
10 | # Reset potential variables
11 | set_variable = { which = "rand_uid" value = 0 }
12 |
13 | # Set values for certain signs
14 | get_random_value = yes
15 | set_variable = { which = "var_1" value = "var_rand" }
16 | multiply_variable = { which = "var_5" value = 1 }
17 |
18 | get_random_value = yes
19 | set_variable = { which = "var_2" value = "var_rand" }
20 | multiply_variable = { which = "var_2" value = 10 }
21 |
22 | get_random_value = yes
23 | set_variable = { which = "var_3" value = "var_rand" }
24 | multiply_variable = { which = "var_3" value = 100 }
25 |
26 | get_random_value = yes
27 | set_variable = { which = "var_4" value = "var_rand" }
28 | multiply_variable = { which = "var_4" value = 1000 }
29 |
30 | get_random_value = yes
31 | set_variable = { which = "var_5" value = "var_rand" }
32 | multiply_variable = { which = "var_5" value = 10000 }
33 |
34 | get_random_value = yes
35 | set_variable = { which = "var_6" value = "var_rand" }
36 | multiply_variable = { which = "var_6" value = 100000 }
37 |
38 | # Assemle the value
39 | change_variable = { which = "rand_uid" value = "var_1" }
40 | change_variable = { which = "rand_uid" value = "var_2" }
41 | change_variable = { which = "rand_uid" value = "var_3" }
42 | change_variable = { which = "rand_uid" value = "var_4" }
43 | change_variable = { which = "rand_uid" value = "var_5" }
44 | change_variable = { which = "rand_uid" value = "var_6" }
45 |
46 | # Assign scope uid
47 | set_variable = { which = "uid" value = "rand_uid" }
48 |
49 | # Unset helper's variables
50 | unset_variables = yes
51 |
52 | }
53 | # Scopes: set_variable scopers
54 | # Gives the random value from 1 to 9
55 | get_random_value = {
56 | random_list = {
57 | 12 = { set_variable = { which = "var_rand" value = 1 } }
58 | 11 = { set_variable = { which = "var_rand" value = 2 } }
59 | 11 = { set_variable = { which = "var_rand" value = 3 } }
60 | 11 = { set_variable = { which = "var_rand" value = 4 } }
61 | 11 = { set_variable = { which = "var_rand" value = 5 } }
62 | 11 = { set_variable = { which = "var_rand" value = 6 } }
63 | 11 = { set_variable = { which = "var_rand" value = 7 } }
64 | 11 = { set_variable = { which = "var_rand" value = 8 } }
65 | 11 = { set_variable = { which = "var_rand" value = 9 } }
66 | }
67 | }
68 |
69 | # Scopes: set_variable scopers
70 | # Unset unnecessary variables
71 | unset_variables = {
72 | set_variable = { which = "var_1" value = 0 }
73 | set_variable = { which = "var_2" value = 0 }
74 | set_variable = { which = "var_3" value = 0 }
75 | set_variable = { which = "var_4" value = 0 }
76 | set_variable = { which = "var_5" value = 0 }
77 | set_variable = { which = "var_6" value = 0 }
78 | set_variable = { which = "var_rand" value = 0 }
79 | set_variable = { which = "rand_uid" value = 0 }
80 | }
81 |
--------------------------------------------------------------------------------
/client/test/sample mod/common/sector_types/irm_sector_types.txt:
--------------------------------------------------------------------------------
1 | # production_targets: strategic resources
2 | # ships: ships to build
3 | # ai_weight - used for AI chance ( modifier - weight, will replace the weight value | modifier - factor, will multiply the weight value )
4 |
5 | # Allows sector to build military ships
6 | military = {
7 | production_targets = {
8 | #minerals
9 | #unity
10 | }
11 |
12 | ships = {
13 | constructor
14 | colonizer
15 | corvette
16 | destroyer
17 | cruiser
18 | battleship
19 | }
20 |
21 | ai_weight = {
22 | weight = 0
23 | }
24 | }
--------------------------------------------------------------------------------
/client/test/sample mod/common/static_modifiers/irm_static_modifiers.txt:
--------------------------------------------------------------------------------
1 | # COUNTRY
2 | suppressed_regionalism = {
3 | country_resource_influence_add = -1
4 | }
5 |
6 | # PLANET
7 |
8 | # Sector Capital
9 | sector_capital = {
10 | pop_government_ethic_attraction = 0.50
11 | icon = "gfx/interface/icons/planet_modifiers/capital.dds"
12 | icon_frame = 1
13 | }
14 |
15 | # Former Capital
16 | former_capital = {
17 | pop_happiness = -0.05
18 | icon = "gfx/interface/icons/planet_modifiers/capital.dds"
19 | icon_frame = 3
20 | }
21 |
22 | # POP
23 |
24 | # Faction suppressed pop
25 | pop_suppressed = {
26 | pop_happiness = -0.20
27 | pop_government_ethic_attraction = 1.00
28 | }
--------------------------------------------------------------------------------
/client/test/sample mod/common/traits/irm_leader_traits.txt:
--------------------------------------------------------------------------------
1 | # Leader traits
2 |
3 |
4 | # RULER
5 |
6 | # Negotiator, increasing trade attractiveness
7 | trait_ruler_negotiator = {
8 | cost = 1
9 | icon = "gfx/interface/icons/traits/leader_traits/trait_ruler_negotiator.dds"
10 |
11 | modification = no
12 | leader_trait = yes
13 | leader_class = { ruler }
14 |
15 | leader_potential_add = {
16 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
17 | }
18 |
19 | modifier = {
20 | country_trade_attractiveness = 0.15
21 | }
22 |
23 | }
24 |
25 | # Administrator, +1 core system
26 | trait_ruler_administrator = {
27 | cost = 1
28 | icon = "gfx/interface/icons/traits/leader_traits/trait_ruler_administrator.dds"
29 |
30 | modification = no
31 | leader_trait = yes
32 | leader_class = { ruler }
33 |
34 | leader_potential_add = {
35 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
36 | }
37 |
38 | modifier = {
39 | country_core_sector_system_cap = 1
40 | }
41 |
42 | }
43 |
44 | # Outer Space, decrease distance effect for colonization
45 | trait_ruler_outerspace = {
46 | cost = 1
47 | icon = "gfx/interface/icons/traits/leader_traits/trait_ruler_outerspace.dds"
48 |
49 | modification = no
50 | leader_trait = yes
51 | leader_class = { ruler }
52 |
53 | leader_potential_add = {
54 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
55 | }
56 |
57 | modifier = {
58 | country_distant_colony_influence_cost_mult = -0.15
59 | }
60 |
61 | }
62 |
63 |
64 | # GOVERNOR (Basic)
65 |
66 | # Industrialist, boosts minerals output
67 | trait_governor_industrialist = {
68 | cost = 1
69 | icon = "gfx/interface/icons/traits/leader_traits/trait_governor_industrialist.dds"
70 |
71 | modification = no
72 | leader_trait = yes
73 | leader_class = { governor }
74 |
75 | leader_potential_add = {
76 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
77 | }
78 |
79 | modifier = {
80 | tile_resource_minerals_mult = 0.1
81 | }
82 |
83 | }
84 |
85 | # Investor, boosts energy output
86 | trait_governor_investor = {
87 | cost = 1
88 | icon = "gfx/interface/icons/traits/leader_traits/trait_governor_investor.dds"
89 |
90 | modification = no
91 | leader_trait = yes
92 | leader_class = { governor }
93 |
94 | leader_potential_add = {
95 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
96 | }
97 |
98 | modifier = {
99 | tile_resource_energy_mult = 0.1
100 | }
101 | }
102 |
103 | # Investor, boosts energy output
104 | trait_governor_charismatic = {
105 | cost = 1
106 | icon = "gfx/interface/icons/traits/leader_traits/trait_governor_charismatic.dds"
107 |
108 | modification = no
109 | leader_trait = yes
110 | leader_class = { governor }
111 |
112 | leader_potential_add = {
113 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
114 | }
115 |
116 | modifier = {
117 | edict_influence_cost = -0.2
118 | edict_length_mult = 0.25
119 | }
120 | }
121 |
122 |
123 | # SECTOR EDICTS
124 |
125 | # Edict - food
126 | trait_edict_food = {
127 | cost = 1
128 | modification = no
129 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_food.dds"
130 | modifier = {
131 | tile_resource_food_mult = 0.10
132 | }
133 | leader_potential_add = {
134 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
135 | }
136 | leader_trait = yes
137 | leader_class = { governor }
138 | initial = no
139 | randomized = no
140 | }
141 | # Edict - energy
142 | trait_edict_energy = {
143 | cost = 1
144 | modification = no
145 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_energy.dds"
146 | modifier = {
147 | tile_resource_energy_mult = 0.10
148 | }
149 | leader_potential_add = {
150 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
151 | }
152 | leader_trait = yes
153 | leader_class = { governor }
154 | initial = no
155 | randomized = no
156 | }
157 | # Edict - minerals
158 | trait_edict_minerals = {
159 | cost = 1
160 | modification = no
161 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_minerals.dds"
162 | modifier = {
163 | tile_resource_minerals_mult = 0.10
164 | }
165 | leader_potential_add = {
166 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
167 | }
168 | leader_trait = yes
169 | leader_class = { governor }
170 | initial = no
171 | randomized = no
172 | }
173 | # Edict - research
174 | trait_edict_research = {
175 | cost = 1
176 | modification = no
177 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_research.dds"
178 | modifier = {
179 | tile_resource_physics_research_mult = 0.10
180 | tile_resource_society_research_mult = 0.10
181 | tile_resource_engineering_research_mult = 0.10
182 | }
183 | leader_potential_add = {
184 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
185 | }
186 | leader_trait = yes
187 | leader_class = { governor }
188 | initial = no
189 | randomized = no
190 | }
191 | # Edict - infrastructure
192 | trait_edict_infrastructure = {
193 | cost = 1
194 | modification = no
195 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_infrastructure.dds"
196 | modifier = {
197 | planet_clear_blocker_cost_mult = -0.10
198 | planet_building_cost_mult = -0.10
199 | }
200 | leader_potential_add = {
201 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
202 | }
203 | leader_trait = yes
204 | leader_class = { governor }
205 | initial = no
206 | randomized = no
207 | }
208 | # Edict - happiness
209 | trait_edict_happiness = {
210 | cost = 1
211 | modification = no
212 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_happiness.dds"
213 | modifier = {
214 | pop_happiness = 0.10
215 | }
216 | leader_potential_add = {
217 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
218 | }
219 | leader_trait = yes
220 | leader_class = { governor }
221 | initial = no
222 | randomized = no
223 | }
224 | # Edict - migration
225 | trait_edict_migration = {
226 | cost = 1
227 | modification = no
228 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_migration.dds"
229 | modifier = {
230 | planet_migration_all_pull = 0.5
231 | }
232 | leader_potential_add = {
233 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
234 | }
235 | leader_trait = yes
236 | leader_class = { governor }
237 | initial = no
238 | randomized = no
239 | }
240 | # Edict - ethics
241 | trait_edict_ethics = {
242 | cost = 1
243 | modification = no
244 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_ethics.dds"
245 | modifier = {
246 | pop_government_ethic_attraction = 0.15
247 | }
248 | leader_potential_add = {
249 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
250 | }
251 | leader_trait = yes
252 | leader_class = { governor }
253 | initial = no
254 | randomized = no
255 | }
256 | # Edict - growth
257 | trait_edict_growth = {
258 | cost = 1
259 | modification = no
260 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_growth.dds"
261 | modifier = {
262 | pop_growth_speed = 0.10
263 | }
264 | leader_potential_add = {
265 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
266 | }
267 | leader_trait = yes
268 | leader_class = { governor }
269 | initial = no
270 | randomized = no
271 | }
272 | # Edict - regionalism
273 | trait_edict_regionalism = {
274 | cost = 1
275 | modification = no
276 | icon = "gfx/interface/icons/traits/leader_traits/trait_edict_ethics.dds"
277 | modifier = {
278 |
279 | }
280 | leader_potential_add = {
281 | NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
282 | }
283 | leader_trait = yes
284 | leader_class = { governor }
285 | initial = no
286 | randomized = no
287 | }
--------------------------------------------------------------------------------
/client/test/sample mod/events/irm.txt:
--------------------------------------------------------------------------------
1 | # IRM
2 | # Imperial Routine - General Events
3 |
4 | namespace = irm
5 |
6 | # Scope = N/A
7 | # Country events
8 | country_event = {
9 | id = irm.1
10 | hide_window = yes
11 |
12 | trigger = {
13 | is_ai = no
14 | is_country_type = default
15 | }
16 |
17 | immediate = {
18 | # Regular events
19 | country_event = { id = irm_sector.101 } # listener: leader's edict traits
20 | country_event = { id = irm_sector.102 } # listener: update timer for edict's length
21 | country_event = { id = irm_sector.104 }
22 | # listener: update timer for policy cd
23 | }
24 | }
25 |
26 | # Scope = N/A
27 | # Monthly regular events
28 | event = {
29 | id = irm.2
30 | hide_window = yes
31 | is_triggered_only = yes
32 |
33 | immediate = {
34 | every_country = {
35 | limit = { is_ai = no is_country_type = default }
36 | country_event = { id = irm_sector.103 } # sector regular estimations
37 | country_event = { id = irm_sector.201 } # clean up all vars for former sector capitals
38 | country_event = { id = irm_sector.202 } # clean up duplicated capitals
39 | country_event = { id = irm_faction.201 } # some xp for faction leaders
40 | country_event = { id = irm_faction.203 } # refresh faction name
41 | }
42 | }
43 | }
44 |
45 | # Scope = N/A
46 | # Yearly regular events
47 | event = {
48 | id = irm.3
49 | hide_window = yes
50 | is_triggered_only = yes
51 |
52 | immediate = {
53 | every_country = {
54 | limit = { is_ai = no is_country_type = default }
55 | country_event = { id = irm_faction.202 } # faction suppressions
56 | }
57 | }
58 | }
59 |
60 |
61 |
62 |
63 | # TMP
64 |
65 | planet_event = {
66 | id = irm.100
67 | hide_window = yes
68 | is_triggered_only = yes
69 |
70 | immediate = {
71 | owner = {
72 | random_pop_faction = {
73 | limit = {
74 | is_pop_faction_type = "regionalist"
75 | check_pop_faction_parameter = { which = sector value = root.sector }
76 | }
77 | leader = {
78 | kill_leader = { show_notification = yes }
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/client/test/sample mod/events/irm_faction.txt:
--------------------------------------------------------------------------------
1 | namespace = irm_faction
2 |
3 | # 000 TRIGGERED ACTIONS
4 |
5 | # This = Country
6 | # From = Leader (dead)
7 | # Tracks faction leader's death, create a new leader for faction
8 | country_event = {
9 | id = irm_faction.2
10 | hide_window = yes
11 | is_triggered_only = yes
12 |
13 | trigger = {
14 | from = {
15 | leader_class = governor
16 | leader_of_faction = yes
17 | has_leader_flag = "faction_leader"
18 | exists = pop_faction
19 | }
20 | }
21 |
22 | # Create new faction leader
23 | immediate = {
24 | from = {
25 | pop_faction = {
26 | faction_set_leader = yes
27 | }
28 | }
29 | }
30 |
31 | }
32 |
33 | # 200 REGULAR ACTIONS
34 |
35 | # This = Country
36 | # Adds small amount of xp for all faction leaders
37 | country_event = {
38 | id = irm_faction.201
39 | hide_window = yes
40 | is_triggered_only = yes
41 |
42 | immediate = {
43 | every_pop_faction = {
44 | limit = {
45 | exists = owner
46 | owner = { is_same_empire = root }
47 | exists = leader
48 | }
49 | leader = {
50 | if = {
51 | # Add xp through variables for faction leaders
52 | # (they cannot receive any xp cuz they are not "direcly owned")
53 | limit = { has_leader_flag = "faction_leader" }
54 | change_variable = { which = num_leader_xp value = 1 }
55 | if = { limit = { check_variable = { which = num_leader_xp value = 200 } } add_skill = 1 }
56 | if = { limit = { check_variable = { which = num_leader_xp value = 300 } } add_skill = 1 }
57 | if = { limit = { check_variable = { which = num_leader_xp value = 825 } } add_skill = 1 }
58 | if = { limit = { check_variable = { which = num_leader_xp value = 1250 } } add_skill = 1 }
59 | if = { limit = { check_variable = { which = num_leader_xp value = 1750 } } add_skill = 1 }
60 | if = { limit = { check_variable = { which = num_leader_xp value = 2325 } } add_skill = 1 }
61 | if = { limit = { check_variable = { which = num_leader_xp value = 2975 } } add_skill = 1 }
62 | if = { limit = { check_variable = { which = num_leader_xp value = 3700 } } add_skill = 1 }
63 | if = { limit = { check_variable = { which = num_leader_xp value = 4500 } } add_skill = 1 }
64 | # For usual leaders just give them xp and clear vars
65 | else = {
66 | add_experience = 1.5
67 | set_variable = { which = num_leader_xp value = 0 }
68 | }
69 | }
70 | }
71 | }
72 | }
73 | }
74 |
75 | # This = Country
76 | # Suppression mechanics: remove a pop from suppressed faction
77 | country_event = {
78 | id = irm_faction.202
79 | hide_window = yes
80 | is_triggered_only = yes
81 |
82 | immediate = {
83 | every_pop_faction = {
84 | limit = { has_modifier = "suppressed_faction" }
85 | random_owned_pop = {
86 | limit = { is_faction_pop = yes planet = { exists = sector sector = { is_core_sector = yes }}}
87 | random = {
88 | chance = 75
89 | # Add modifier
90 | if = {
91 | limit = { not = { has_modifier = "pop_suppressed" } }
92 | add_modifier = { modifier = "pop_suppressed" days = 3600 }
93 | }
94 | # Suppress pop
95 | pop_suppress = yes
96 | }
97 | } }
98 | }
99 |
100 | }
101 |
102 | # This = Country
103 | # Refresh faction name to match it with related sector
104 | country_event = {
105 | id = irm_faction.203
106 | hide_window = yes
107 | is_triggered_only = yes
108 |
109 | immediate = {
110 | every_sector = {
111 | limit = { is_core_sector = no }
112 | owner = {
113 | random_pop_faction = {
114 | limit = {
115 | is_pop_faction_type = "regionalist"
116 | check_pop_faction_parameter = { which = sector value = prevprev }
117 | }
118 | set_name = "pft_regionalist_rename"
119 | }
120 | }
121 | }
122 | }
123 |
124 | }
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/buttons/button_faction_communicate.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/buttons/button_faction_communicate.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/buttons/button_faction_develop.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/buttons/button_faction_develop.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/buttons/button_faction_install.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/buttons/button_faction_install.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/buttons/button_sector_dev_upgrade.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/buttons/button_sector_dev_upgrade.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/buttons/sector_military.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/buttons/sector_military.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/buttons/sector_military_selected.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/buttons/sector_military_selected.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/custom/button_sector_armies.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/custom/button_sector_armies.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/custom/button_sector_fleets.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/custom/button_sector_fleets.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/custom/button_sector_na.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/custom/button_sector_na.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/custom/icon_faction_army.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/custom/icon_faction_army.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/custom/icon_faction_fleet.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/custom/icon_faction_fleet.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/custom/icon_sector_logo.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/custom/icon_sector_logo.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/faction_icons/faction_icons_regionalist.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/faction_icons/faction_icons_regionalist.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/planet_modifiers/modifier_frames.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/planet_modifiers/modifier_frames.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_energy.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_energy.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_ethics.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_ethics.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_food.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_food.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_growth.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_growth.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_happiness.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_happiness.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_infrastructure.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_infrastructure.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_migration.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_migration.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_minerals.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_minerals.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_regionalism.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_regionalism.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_research.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_edict_research.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_governor_charismatic.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_governor_charismatic.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_governor_industrialist.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_governor_industrialist.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_governor_investor.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_governor_investor.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_ruler_administrator.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_ruler_administrator.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_ruler_negotiator.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_ruler_negotiator.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_ruler_outerspace.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/icons/traits/leader_traits/trait_ruler_outerspace.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/bar_blue.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/bar_blue.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/bar_empty.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/bar_empty.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/bar_green.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/bar_green.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/bar_grey.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/bar_grey.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/bar_red.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/bar_red.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/bar_yellow.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/bar_yellow.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_autonomy.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_autonomy.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_bribe.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_bribe.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_dev_capital.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_dev_capital.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_propose.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_propose.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_spec.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/faction/button_faction_settings_spec.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/sector/button_sector_army_rise.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/sector/button_sector_army_rise.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/sector/button_sector_fleet_orders.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/sector/button_sector_fleet_orders.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/sector/button_sector_fleet_rise.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/sector/button_sector_fleet_rise.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/interface/ui/sep_vertical.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/interface/ui/sep_vertical.dds
--------------------------------------------------------------------------------
/client/test/sample mod/gfx/portraits/city_sets/faction_room.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cwtools/cwtools-vscode/7273459277f58d52393eb5415945efeb1197e3dc/client/test/sample mod/gfx/portraits/city_sets/faction_room.dds
--------------------------------------------------------------------------------
/client/test/sample mod/interface/zzz_sprites.gfx:
--------------------------------------------------------------------------------
1 | spriteTypes = {
2 |
3 | # FACTION
4 |
5 | spriteType = {
6 | name = "GFX_faction_icon_regionalist"
7 | textureFile = "gfx/interface/icons/faction_icons/faction_icons_regionalist.dds"
8 | noOfFrames = 1
9 | }
10 |
11 | #spriteType = {
12 | # name = "GFX_sector_logo"
13 | # texturefile = "gfx/interface/icons/custom/icon_sector_logo.dds"
14 | #}
15 |
16 | # ui icons
17 |
18 | spriteType = {
19 | name = "GFX_sep_v"
20 | texturefile = "gfx/interface/ui/sep_vertical.dds"
21 | }
22 |
23 | # progress bars
24 |
25 | spriteType = {
26 | name = "GFX_bar_empty"
27 | texturefile = "gfx/interface/ui/bar_empty.dds"
28 | }
29 | spriteType = {
30 | name = "GFX_bar_green"
31 | texturefile = "gfx/interface/ui/bar_green.dds"
32 | }
33 | spriteType = {
34 | name = "GFX_bar_yellow"
35 | texturefile = "gfx/interface/ui/bar_yellow.dds"
36 | }
37 | spriteType = {
38 | name = "GFX_bar_red"
39 | texturefile = "gfx/interface/ui/bar_red.dds"
40 | }
41 | spriteType = {
42 | name = "GFX_bar_blue"
43 | texturefile = "gfx/interface/ui/bar_blue.dds"
44 | }
45 | spriteType = {
46 | name = "GFX_bar_grey"
47 | texturefile = "gfx/interface/ui/bar_grey.dds"
48 | }
49 |
50 | # buttons
51 |
52 | spriteType = {
53 | name = "GFX_button_faction_communicate"
54 | texturefile = "gfx/interface/buttons/button_faction_communicate.dds"
55 | }
56 |
57 | spriteType = {
58 | name = "GFX_button_faction_install"
59 | texturefile = "gfx/interface/buttons/button_faction_install.dds"
60 | }
61 |
62 | spriteType = {
63 | name = "GFX_button_faction_develop"
64 | texturefile = "gfx/interface/buttons/button_faction_develop.dds"
65 | }
66 |
67 | # sector military forces
68 |
69 | spriteType = {
70 | name = "GFX_button_sector_fleet_rise"
71 | texturefile = "gfx/interface/ui/sector/button_sector_fleet_rise.dds"
72 | }
73 | spriteType = {
74 | name = "GFX_button_sector_fleet_orders"
75 | texturefile = "gfx/interface/ui/sector/button_sector_fleet_orders.dds"
76 | }
77 | spriteType = {
78 | name = "GFX_button_sector_army_rise"
79 | texturefile = "gfx/interface/ui/sector/button_sector_army_rise.dds"
80 | }
81 |
82 | spriteType = {
83 | name = "GFX_button_sector_dev_upgrade"
84 | texturefile = "gfx/interface/buttons/button_sector_dev_upgrade.dds"
85 | }
86 |
87 |
88 | spriteType = {
89 | name = "GFX_button_settings_bribe"
90 | texturefile = "gfx/interface/ui/faction/button_faction_settings_bribe.dds"
91 | }
92 |
93 | spriteType = {
94 | name = "GFX_button_settings_spec"
95 | texturefile = "gfx/interface/ui/faction/button_faction_settings_spec.dds"
96 | }
97 |
98 | spriteType = {
99 | name = "GFX_button_settings_propose"
100 | texturefile = "gfx/interface/ui/faction/button_faction_settings_propose.dds"
101 | }
102 |
103 | spriteType = {
104 | name = "GFX_button_settings_autonomy"
105 | texturefile = "gfx/interface/ui/faction/button_faction_settings_autonomy.dds"
106 | }
107 |
108 | spriteType = {
109 | name = "GFX_button_settings_dev_capital"
110 | texturefile = "gfx/interface/ui/faction/button_faction_settings_dev_capital.dds"
111 | }
112 |
113 | # MODIFIERS
114 |
115 | spriteType = {
116 | name = "GFX_modifier_frames"
117 | texturefile = "gfx/interface/icons/planet_modifiers/modifier_frames.dds"
118 | noOfFrames = 4
119 | }
120 |
121 |
122 | # SECTOR
123 |
124 | spriteType = {
125 | name = "GFX_sector_military_focus"
126 | texturefile = "gfx/interface/buttons/sector_military.dds"
127 | noOfFrames = 3
128 | }
129 |
130 | spriteType = {
131 | name = "GFX_sector_military_focus_selected"
132 | texturefile = "gfx/interface/buttons/sector_military_selected.dds"
133 | }
134 |
135 | }
--------------------------------------------------------------------------------
/client/test/suite/extension.test.ts:
--------------------------------------------------------------------------------
1 | //
2 | // Note: This example test is leveraging the Mocha test framework.
3 | // Please refer to their documentation on https://mochajs.org/ for help.
4 | //
5 |
6 | // The module 'assert' provides assertion methods from node
7 | import * as assert from 'assert';
8 |
9 | // You can import and use all API from the 'vscode' module
10 | // as well as import your extension to test it
11 | import * as vscode from 'vscode';
12 | import { it, describe, before } from 'mocha';
13 | //import * as myExtension from '../../extension/extension';
14 |
15 | // Defines a Mocha test suite to group tests of similar kind together
16 | suite("Extension Tests", () => {
17 |
18 | // Defines a Mocha unit test
19 | test("Something 1", () => {
20 | assert.equal(-1, [1, 2, 3].indexOf(5));
21 | assert.equal(-1, [1, 2, 3].indexOf(0));
22 | });
23 | });
24 |
25 | before(() => {
26 |
27 | })
28 |
29 | suite(`Debug Integration Test: `, function() {
30 | test('Extension should be present', () => {
31 | assert.ok(vscode.extensions.getExtension('tboby.cwtools-vscode'));
32 | });
33 |
34 | test('should activate', function () {
35 | this.timeout(1 * 60 * 1000);
36 | return vscode.extensions.getExtension('tboby.cwtools-vscode').activate().then((_) => {
37 | assert.ok(true);
38 | });
39 | });
40 |
41 | describe('should have errors', function () {
42 | this.timeout(1 * 60 * 1000);
43 | it('should have errors', async function (done) {
44 | await vscode.extensions.getExtension('tboby.cwtools-vscode').activate().then((x) => {
45 | setTimeout(() => {
46 | let count = 0;
47 | x.default.diagnostics.forEach(([], [], []) => count++);
48 | assert.ok(count);
49 | done();
50 | }, 45000);
51 | })});
52 | });
53 | });
54 |
--------------------------------------------------------------------------------
/client/test/suite/index.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path';
2 | import Mocha from 'mocha';
3 | import glob from 'glob';
4 |
5 | export function run(): Promise