-
Notifications
You must be signed in to change notification settings - Fork 12
/
LibNovC.galaxy
4075 lines (3508 loc) · 183 KB
/
LibNovC.galaxy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
include "TriggerLibs/NativeLib"
include "LibComC"
include "LibCMMI"
include "LibNCMI_h"
include "LibNCUI_h"
include "LibNovC_h"
//--------------------------------------------------------------------------------------------------
// Library: Campaign (Nova)
//--------------------------------------------------------------------------------------------------
// External Library Initialization
void libNovC_InitLibraries () {
libNtve_InitVariables();
libComC_InitVariables();
libCMMI_InitVariables();
libNCMI_InitVariables();
libNCUI_InitVariables();
}
// Variable Initialization
bool libNovC_InitVariables_completed = false;
void libNovC_InitVariables () {
int init_i;
int init_j;
if (libNovC_InitVariables_completed) {
return;
}
libNovC_InitVariables_completed = true;
libNovC_gv_resultsDialog = c_invalidDialogControlId;
for (init_i = 0; init_i <= libNovC_gv_nCC_DebugCampaignTechEquipmentGroupCount; init_i += 1) {
for (init_j = 0; init_j <= libNovC_gv_nCC_DebugCampaignTechEquipmentItemCount; init_j += 1) {
libNovC_gv_nC_DebugCampaignTechEquipmentCheckBox[init_i][init_j] = c_invalidDialogControlId;
}
}
libNovC_gv_nC_DebugCampaignTechUpgradesDialog = c_invalidDialogId;
libNovC_gv_nC_DebugCampaignTechUpgradesOpen = c_invalidDialogControlId;
libNovC_gv_nC_DebugCampaignTechUpgradesOK = c_invalidDialogControlId;
libNovC_gv_nC_DebugCampaignTechUpgradesCancel = c_invalidDialogControlId;
for (init_i = 0; init_i <= libNovC_gv_nCC_DebugCampaignTechUpgradesUnitsCountMax; init_i += 1) {
libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[init_i] = c_invalidDialogControlId;
}
for (init_i = 0; init_i <= libNovC_gv_nCC_DebugCampaignTechUpgradesUnitsCountMax; init_i += 1) {
libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[init_i] = c_invalidDialogControlId;
}
for (init_i = 0; init_i <= libNovC_gv_nCC_DebugCampaignTechUpgradesItemsCountMax; init_i += 1) {
libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitLabelList[init_i] = c_invalidDialogControlId;
}
for (init_i = 0; init_i <= libNovC_gv_nCC_DebugCampaignTechUpgradesItemsCountMax; init_i += 1) {
libNovC_gv_nC_DebugCampaignTechUpgradesButtonList[init_i] = c_invalidDialogControlId;
}
libNovC_gv_nC_DebugCampaignTechUpgradesActiveButton = c_invalidDialogControlId;
libNovC_gv_NC_DebugCampaignTechDialog = c_invalidDialogId;
libNovC_gv_NC_DebugCampaignTechOK = c_invalidDialogControlId;
libNovC_gv_NC_DebugCampaignTechCancel = c_invalidDialogControlId;
libNovC_gv_NC_DebugCampaignTechRandomizeTechButton = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressDialog = c_invalidDialogId;
libNovC_gv_NC_DebugProgressButtonOK = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressButtonCancel = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressButtonReset = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressButtonDirectSelect = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressLabelInfo = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressBonusObjectiveLevel = libNovC_ge_DebugProgressBonusObjectiveAmount_FullObjectives;
libNovC_gv_NC_DebugProgressButtonNoObjectives = c_invalidDialogControlId;
libNovC_gv_NC_DebugProgressButtonAllObjectives = c_invalidDialogControlId;
}
// Presets
// Functions
void libNovC_gf_PlayCinematic (string lp_scene, bool lp_animatic) {
// Variable Declarations
bool lv_wasStoryMode;
// Variable Initialization
// Deprecated
libComC_gf_PlayCinematic(lp_scene, lp_animatic);
}
trigger auto_libNovC_gf_CampaignAwardAchievement_Trigger = null;
string auto_libNovC_gf_CampaignAwardAchievement_lp_achievement;
int auto_libNovC_gf_CampaignAwardAchievement_lp_player;
void libNovC_gf_CampaignAwardAchievement (string lp_achievement, int lp_player) {
auto_libNovC_gf_CampaignAwardAchievement_lp_achievement = lp_achievement;
auto_libNovC_gf_CampaignAwardAchievement_lp_player = lp_player;
if (auto_libNovC_gf_CampaignAwardAchievement_Trigger == null) {
auto_libNovC_gf_CampaignAwardAchievement_Trigger = TriggerCreate("auto_libNovC_gf_CampaignAwardAchievement_TriggerFunc");
}
TriggerExecute(auto_libNovC_gf_CampaignAwardAchievement_Trigger, false, false);
}
bool auto_libNovC_gf_CampaignAwardAchievement_TriggerFunc (bool testConds, bool runActions) {
string lp_achievement = auto_libNovC_gf_CampaignAwardAchievement_lp_achievement;
int lp_player = auto_libNovC_gf_CampaignAwardAchievement_lp_player;
// Deprecated
libComC_gf_CampaignAwardAchievement(lp_achievement, lp_player);
return true;
}
void libNovC_gf_EnableCampaignTechUnit (bool lp_enableDisable, string lp_techUnit, int lp_player) {
// Deprecated
libComC_gf_EnableCampaignTechUnit(lp_enableDisable, lp_techUnit, lp_player);
}
bool libNovC_gf_CampaignTechUnitIsEnabled (string lp_techUnit) {
// Implementation
return (UserDataGetInt("TechUnit", lp_techUnit, "Enabled", 1) > 0);
}
void libNovC_gf_LoadCampaignData (string lp_map) {
// Deprecated
libNCMI_gf_InitializeNovaMission(lp_map);
}
void libNovC_gf_CampaignPlayCutscene (string lp_file, point lp_position, bool lp_waitDontWait, bool lp_allowSkip) {
// Deprecated
libComC_gf_CampaignPlayCutscene(lp_file, lp_position, lp_waitDontWait, lp_allowSkip);
}
void libNovC_gf_DisplayConversationTimestamp (string lp_conversation) {
// Variable Declarations
int lv_index;
// Variable Initialization
// Deprecated
libComC_gf_DisplayConversationTimestamp(lp_conversation);
}
void libNovC_gf_DisplayTimestamp (string lp_timestamp, bool lp_waitDontWait) {
// Deprecated
libComC_gf_DisplayTimestamp(lp_timestamp, lp_waitDontWait);
}
void libNovC_gf_HaltTimestamp () {
// Deprecated
libComC_gf_HaltTimestamp();
}
void libNovC_gf_CampaignPlayCutscene2 (string lp_file, bool lp_waitDontWait, bool lp_allowSkip) {
// Deprecated
libComC_gf_CampaignPlayMovieCutscene(lp_file, lp_waitDontWait, lp_allowSkip);
}
void libNovC_gf_CampaignStopCutscene () {
// Deprecated
libComC_gf_CampaignStopCutscene();
}
void libNovC_gf_CinematicFade (bool lp_fadeIn, fixed lp_duration, color lp_color, bool lp_waitUntilDone) {
// Deprecated
libComC_gf_CinematicFade(lp_fadeIn, lp_duration, lp_color, lp_waitUntilDone);
}
void libNovC_gf_PauseAITimeCampaign (bool lp_pauseUnpause) {
// Deprecated
libComC_gf_PauseAITimeCampaign(lp_pauseUnpause);
}
void libNovC_gf_PauseMissionTimeCampaign (bool lp_pauseUnpause) {
// Deprecated
libComC_gf_PauseMissionTimeCampaign(lp_pauseUnpause);
}
text libNovC_gf_FormatTimeCampaign (int lp_second) {
// Implementation
if ((lp_second < 3600)) {
return TextTimeFormat(StringExternal("Param/Value/lib_NovC_A4F1A203"), lp_second);
}
else {
return TextTimeFormat(StringExternal("Param/Value/lib_NovC_4E67BE7A"), lp_second);
}
}
actor libNovC_gf_AttachModelToUnit (unit lp_unit, string lp_model, string lp_attachPoint) {
// Variable Declarations
actorscope lv_scope;
actor lv_a;
// Variable Initialization
// Deprecated
return libNtve_gf_AttachModelToUnitInheritVisibility(lp_unit, lp_model, lp_attachPoint);
}
void libNovC_gf_ShowHideWorldCover (bool lp_showHide, fixed lp_transparency) {
// Deprecated
libComC_gf_ShowHideWorldCover(lp_showHide, lp_transparency);
}
void libNovC_gf_ClearAnimationwithblendtime (string lp_identifier, unit lp_unit, fixed lp_blendTime) {
// Deprecated
libComC_gf_ClearAnimationwithblendtime(lp_identifier, lp_unit, lp_blendTime);
}
void libNovC_gf_SetAllSoundChannelVolumesCampaign (int lp_mode) {
// Implementation
libComC_gf_SetAllSoundChannelVolumesCampaign(libComC_ge_VolumeChannelModeCampaign_Speech);
}
bool libNovC_gf_CampaignDebugModeIsOn (string lp_mode) {
// Implementation
return GameIsDebugOptionSet((lp_mode), 1);
}
void libNovC_gf_NC_DebugCampaignTechUpgradesCreateDialog () {
int autoF251B207_ai;
int autoF251B207_ae;
int auto8AFA6E82_ae;
int auto8AFA6E82_ai;
// Variable Declarations
int lv_dialogBackground;
int lv_lastItem;
int lv_x;
int lv_y;
string lv_indexTechItem;
int lv_techItemIndex;
int lv_armyUnitIndex;
// Variable Initialization
lv_dialogBackground = c_invalidDialogControlId;
lv_lastItem = c_invalidDialogControlId;
// Implementation
if ((libNovC_gv_nC_DebugCampaignTechUpgradesDialog != c_invalidDialogId)) {
return ;
}
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesOK, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesCancel, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesCheckClicked, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesItemClicked, true);
DialogSetVisible(libNovC_gv_NC_DebugCampaignTechDialog, PlayerGroupAll(), false);
DialogCreate(1600, 1000, c_anchorCenter, 0, 0, true);
libNovC_gv_nC_DebugCampaignTechUpgradesDialog = DialogLastCreated();
libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
lv_dialogBackground = DialogControlLastCreated();
libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());
DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 20.0);
lv_y = 50;
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 1200, 50, c_anchorTopLeft, 50, lv_y, StringExternal("Param/Value/lib_NovC_2AB08BE5"), Color(0.00, 100.00, 25.10), false, 2.0);
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModLeftSize32Bold", PlayerGroupAll());
lv_techItemIndex = 0;
autoF251B207_ai = 1;
autoF251B207_ae = UserDataInstanceCount("CampaignTechItem")+1;
while (autoF251B207_ai < autoF251B207_ae) {
lv_indexTechItem = UserDataInstance("CampaignTechItem", autoF251B207_ai);
autoF251B207_ai = autoF251B207_ai+1;
lv_x = (160 + (210 * ModI(lv_techItemIndex, 5)));
if ((ModI(lv_techItemIndex, 5) == 0)) {
lv_y += 110;
}
lv_techItemIndex += 1;
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 180, 80, c_anchorTopLeft, lv_x, lv_y, StringToText(""), libNovC_gf_NC_ArmyTechItemName(lv_indexTechItem), "");
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModCenterSize16", PlayerGroupAll());
libNovC_gv_nC_DebugCampaignTechUpgradesButtonList[lv_techItemIndex] = DialogControlLastCreated();
libNovC_gv_nC_DebugCampaignTechUpgradesItemList[lv_techItemIndex] = lv_indexTechItem;
libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lv_techItemIndex] = libNovC_gf_NC_ArmyTechItemAssignedUnit(lv_indexTechItem);
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 180, 60, c_anchorTopLeft, (lv_x + 30), (lv_y + 80), StringExternal("Param/Value/lib_NovC_A7BC7D6A"), Color(100.00, 100.00, 50.20), false, 0.0);
libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitLabelList[lv_techItemIndex] = DialogControlLastCreated();
if ((libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lv_techItemIndex] != null)) {
libNtve_gf_SetDialogItemText(libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitLabelList[lv_techItemIndex], StringToText((libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lv_techItemIndex])), PlayerGroupAll());
}
else {
libNtve_gf_SetDialogItemText(libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitLabelList[lv_techItemIndex], StringExternal("Param/Value/lib_NovC_20EE50E6"), PlayerGroupAll());
}
}
lv_x = 160;
lv_y += 180;
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 500, 60, c_anchorTopLeft, lv_x, lv_y, StringExternal("Param/Value/lib_NovC_7D0D617A"), Color(0.00, 100.00, 25.10), false, 0.0);
lv_y += 20;
libNtve_gf_CreateDialogItemImage(DialogLastCreated(), 1000, 100, c_anchorTopLeft, lv_x, lv_y, StringToText(""), "Assets\\Textures\\ui_research_frame_tooltip_protoss.dds", c_triggerImageTypeHorizontalBorder, true, Color(100,100,100), c_triggerBlendModeNormal);
auto8AFA6E82_ae = libNovC_gv_nCC_DebugCampaignTechUpgradesUnitsCountMax;
auto8AFA6E82_ai = 1;
lv_armyUnitIndex = 1;
for ( ; ( (auto8AFA6E82_ai >= 0 && lv_armyUnitIndex <= auto8AFA6E82_ae) || (auto8AFA6E82_ai <= 0 && lv_armyUnitIndex >= auto8AFA6E82_ae) ) ; lv_armyUnitIndex += auto8AFA6E82_ai ) {
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 220, 60, c_anchorTopLeft, lv_x, lv_y, StringExternal("Param/Value/lib_NovC_198090FF"), Color(100.00, 100.00, 100.00), false, 2.0);
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModCenterSize16", PlayerGroupAll());
libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex] = DialogControlLastCreated();
lv_lastItem = DialogControlLastCreated();
libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, lv_x, lv_y, StringToText(""), false);
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);
libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex] = DialogControlLastCreated();
libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxUnit[lv_armyUnitIndex] = null;
DialogControlSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], PlayerGroupAll(), false);
DialogControlSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex], PlayerGroupAll(), false);
lv_x += 180;
}
libNovC_gv_nC_DebugCampaignTechUpgradesActiveButton = c_invalidDialogControlId;
libNovC_gv_nC_DebugCampaignTechUpgradesActiveButtonIndex = 0;
libNovC_gv_nC_DebugCampaignTechUpgradesActiveItem = null;
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_0128CD2B"), "");
libNovC_gv_nC_DebugCampaignTechUpgradesOK = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_9701AE87"), "");
libNovC_gv_nC_DebugCampaignTechUpgradesCancel = DialogControlLastCreated();
DialogSetSize(libNovC_gv_nC_DebugCampaignTechUpgradesDialog, 1350, (lv_y + 250));
DialogControlSetSize(lv_dialogBackground, PlayerGroupAll(), (DialogGetWidth(libNovC_gv_nC_DebugCampaignTechUpgradesDialog) - 60), (DialogGetHeight(libNovC_gv_nC_DebugCampaignTechUpgradesDialog) - 60));
DialogSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesDialog, PlayerGroupAll(), true);
while (!((libNovC_gv_nC_DebugCampaignTechUpgradesDialog == c_invalidDialogId))) {
Wait(0.0625, c_timeReal);
}
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesOK, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesCancel, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesCheckClicked, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesItemClicked, false);
DialogSetVisible(libNovC_gv_NC_DebugCampaignTechDialog, PlayerGroupAll(), true);
}
void libNovC_gf_NC_DebugCampaignTechUpdateDialog () {
int auto1ADD736C_ae;
int auto1ADD736C_ai;
int autoFC22D2BD_ae;
int autoFC22D2BD_ai;
// Variable Declarations
int lv_equipmentGroupIndex;
int lv_equipmentIndex;
// Variable Initialization
// Implementation
auto1ADD736C_ae = libNovC_gv_nCC_DebugCampaignTechEquipmentGroupCount;
auto1ADD736C_ai = 1;
lv_equipmentGroupIndex = 1;
for ( ; ( (auto1ADD736C_ai >= 0 && lv_equipmentGroupIndex <= auto1ADD736C_ae) || (auto1ADD736C_ai <= 0 && lv_equipmentGroupIndex >= auto1ADD736C_ae) ) ; lv_equipmentGroupIndex += auto1ADD736C_ai ) {
autoFC22D2BD_ae = libNovC_gv_nCC_DebugCampaignTechEquipmentItemCount;
autoFC22D2BD_ai = 1;
lv_equipmentIndex = 1;
for ( ; ( (autoFC22D2BD_ai >= 0 && lv_equipmentIndex <= autoFC22D2BD_ae) || (autoFC22D2BD_ai <= 0 && lv_equipmentIndex >= autoFC22D2BD_ae) ) ; lv_equipmentIndex += autoFC22D2BD_ai ) {
if ((libComC_gf_CC_PerkStateCheck(libNovC_gv_nC_DebugCampaignTechEquipment[lv_equipmentGroupIndex][lv_equipmentIndex], libComC_ge_CC_PerkState_Active) == true)) {
libNtve_gf_SetDialogItemChecked(libNovC_gv_nC_DebugCampaignTechEquipmentCheckBox[lv_equipmentGroupIndex][lv_equipmentIndex], true, PlayerGroupAll());
}
}
}
}
void libNovC_gf_NC_DebugCampaignTechUpgradesUpdateDialog () {
int auto2E10E77E_ae;
int auto2E10E77E_ai;
// Variable Declarations
int lv_armyUnitIndex;
// Variable Initialization
// Implementation
auto2E10E77E_ae = libNovC_gv_nCC_DebugCampaignTechUpgradesUnitsCountMax;
auto2E10E77E_ai = 1;
lv_armyUnitIndex = 1;
for ( ; ( (auto2E10E77E_ai >= 0 && lv_armyUnitIndex <= auto2E10E77E_ae) || (auto2E10E77E_ai <= 0 && lv_armyUnitIndex >= auto2E10E77E_ae) ) ; lv_armyUnitIndex += auto2E10E77E_ai ) {
if ((libNovC_gf_NC_ArmyTechItemUnitFromIndex(libNovC_gv_nC_DebugCampaignTechUpgradesActiveItem, lv_armyUnitIndex) != null)) {
DialogControlSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], PlayerGroupAll(), true);
DialogControlSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex], PlayerGroupAll(), true);
libNtve_gf_SetDialogItemText(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex], libComC_gf_StoryArmyUnitName(libNovC_gf_NC_ArmyTechItemUnitFromIndex(libNovC_gv_nC_DebugCampaignTechUpgradesActiveItem, lv_armyUnitIndex)), PlayerGroupAll());
libNtve_gf_SetDialogItemTooltip(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex], libNovC_gf_NC_ArmyTechItemDescriptionFromIndex(libNovC_gv_nC_DebugCampaignTechUpgradesActiveItem, lv_armyUnitIndex), PlayerGroupAll());
if ((libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[libNovC_gv_nC_DebugCampaignTechUpgradesActiveButtonIndex] == libNovC_gf_NC_ArmyTechItemUnitFromIndex(libNovC_gv_nC_DebugCampaignTechUpgradesActiveItem, lv_armyUnitIndex))) {
libNtve_gf_SetDialogItemChecked(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], true, PlayerGroupAll());
}
else {
libNtve_gf_SetDialogItemChecked(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], false, PlayerGroupAll());
}
}
else {
DialogControlSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], PlayerGroupAll(), false);
DialogControlSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex], PlayerGroupAll(), false);
}
}
}
void libNovC_gf_NC_DebugCampaignTechUpdateData () {
int auto517723FF_ae;
int auto517723FF_ai;
int autoE9695A20_ae;
int autoE9695A20_ai;
// Variable Declarations
int lv_equipmentGroupIndex;
int lv_equipmentIndex;
// Variable Initialization
// Implementation
auto517723FF_ae = libNovC_gv_nCC_DebugCampaignTechEquipmentGroupCount;
auto517723FF_ai = 1;
lv_equipmentGroupIndex = 1;
for ( ; ( (auto517723FF_ai >= 0 && lv_equipmentGroupIndex <= auto517723FF_ae) || (auto517723FF_ai <= 0 && lv_equipmentGroupIndex >= auto517723FF_ae) ) ; lv_equipmentGroupIndex += auto517723FF_ai ) {
autoE9695A20_ae = libNovC_gv_nCC_DebugCampaignTechEquipmentItemCount;
autoE9695A20_ai = 1;
lv_equipmentIndex = 1;
for ( ; ( (autoE9695A20_ai >= 0 && lv_equipmentIndex <= autoE9695A20_ae) || (autoE9695A20_ai <= 0 && lv_equipmentIndex >= autoE9695A20_ae) ) ; lv_equipmentIndex += autoE9695A20_ai ) {
if ((libNovC_gv_nC_DebugCampaignTechEquipmentCheckBox[lv_equipmentGroupIndex][lv_equipmentIndex] != c_invalidDialogControlId)) {
if ((libNtve_gf_DialogItemIsChecked(libNovC_gv_nC_DebugCampaignTechEquipmentCheckBox[lv_equipmentGroupIndex][lv_equipmentIndex], 1) == true)) {
libComC_gf_CC_PerkStateSet(libNovC_gv_nC_DebugCampaignTechEquipment[lv_equipmentGroupIndex][lv_equipmentIndex], libComC_ge_CC_PerkState_Active);
}
else {
libComC_gf_CC_PerkStateSet(libNovC_gv_nC_DebugCampaignTechEquipment[lv_equipmentGroupIndex][lv_equipmentIndex], libComC_ge_CC_PerkState_Locked);
}
}
}
}
}
void libNovC_gf_NC_DebugCampaignTechUpgradesUpdateData () {
int autoA6D914FE_ai;
int autoA6D914FE_ae;
int autoE50E16A8_ae;
int autoE50E16A8_ai;
// Variable Declarations
string lv_indexTechItem;
string lv_indexArmyUnit;
int lv_techItemIndex;
int lv_armyUnitIndex;
// Variable Initialization
// Implementation
autoA6D914FE_ai = 1;
autoA6D914FE_ae = UserDataInstanceCount("CampaignTechItem")+1;
while (autoA6D914FE_ai < autoA6D914FE_ae) {
lv_indexTechItem = UserDataInstance("CampaignTechItem", autoA6D914FE_ai);
autoA6D914FE_ai = autoA6D914FE_ai+1;
libNovC_gf_NC_ArmyTechItemAssignedUnitSet(lv_indexTechItem, null);
}
autoE50E16A8_ae = libNovC_gv_nCC_DebugCampaignTechUpgradesItemsCountMax;
autoE50E16A8_ai = 1;
lv_techItemIndex = 1;
for ( ; ( (autoE50E16A8_ai >= 0 && lv_techItemIndex <= autoE50E16A8_ae) || (autoE50E16A8_ai <= 0 && lv_techItemIndex >= autoE50E16A8_ae) ) ; lv_techItemIndex += autoE50E16A8_ai ) {
if ((libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lv_techItemIndex] != null)) {
libNovC_gf_NC_ArmyTechItemAssignedUnitSet(libNovC_gv_nC_DebugCampaignTechUpgradesItemList[lv_techItemIndex], libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lv_techItemIndex]);
}
}
}
void libNovC_gf_NC_DebugCampaignTechUpgradesAssignUnit (int lp_upgradeItemIndex, string lp_activeUpgradeItem) {
int autoE6F121B0_ae;
int autoE6F121B0_ai;
// Variable Declarations
int lv_armyUnitIndex;
// Variable Initialization
// Implementation
autoE6F121B0_ae = libNovC_gv_nCC_DebugCampaignTechUpgradesUnitsCountMax;
autoE6F121B0_ai = 1;
lv_armyUnitIndex = 1;
for ( ; ( (autoE6F121B0_ai >= 0 && lv_armyUnitIndex <= autoE6F121B0_ae) || (autoE6F121B0_ai <= 0 && lv_armyUnitIndex >= autoE6F121B0_ae) ) ; lv_armyUnitIndex += autoE6F121B0_ai ) {
if ((libNtve_gf_DialogItemIsChecked(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], 1) == true) && (DialogControlIsVisible(libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex], 1) == true)) {
libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lp_upgradeItemIndex] = libNovC_gf_NC_ArmyTechItemUnitFromIndex(lp_activeUpgradeItem, lv_armyUnitIndex);
libNtve_gf_SetDialogItemText(libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitLabelList[lp_upgradeItemIndex], StringToText((libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lp_upgradeItemIndex])), PlayerGroupAll());
return ;
}
}
libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitList[lp_upgradeItemIndex] = null;
libNtve_gf_SetDialogItemText(libNovC_gv_nC_DebugCampaignTechUpgradesAssignedUnitLabelList[lp_upgradeItemIndex], StringExternal("Param/Value/lib_NovC_BAF53D89"), PlayerGroupAll());
}
void libNovC_gf_NC_DebugCampaignTechCreateDialog () {
int auto24839C6C_ai;
int auto24839C6C_ae;
int autoCCC6D65B_ai;
int autoCCC6D65B_ae;
// Variable Declarations
int lv_dialogBackground;
int lv_lastItem;
int lv_frame;
int lv_x;
int lv_y;
string lv_indexEquipmentGroup;
string lv_indexEquipment;
int lv_equipmentIndex;
int lv_equipmentGroupIndex;
int lv_unitIndex;
string lv_indexMission;
// Variable Initialization
lv_dialogBackground = c_invalidDialogControlId;
lv_lastItem = c_invalidDialogControlId;
lv_frame = c_invalidDialogControlId;
// Implementation
if ((libNovC_gv_NC_DebugCampaignTechDialog != c_invalidDialogId)) {
return ;
}
DialogCreate(1200, 1000, c_anchorCenter, 0, 0, true);
libNovC_gv_NC_DebugCampaignTechDialog = DialogLastCreated();
libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
lv_dialogBackground = DialogControlLastCreated();
libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());
DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 20.0);
lv_y = 50;
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 1000, 50, c_anchorTopLeft, 50, lv_y, StringExternal("Param/Value/lib_NovC_4D23591E"), Color(100.00, 50.20, 25.10), false, 2.0);
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModLeftSize32Bold", PlayerGroupAll());
lv_y += 50;
lv_equipmentGroupIndex = 0;
auto24839C6C_ai = 1;
auto24839C6C_ae = UserDataInstanceCount("CampaignPerkGroup")+1;
while (auto24839C6C_ai < auto24839C6C_ae) {
lv_indexEquipmentGroup = UserDataInstance("CampaignPerkGroup", auto24839C6C_ai);
auto24839C6C_ai = auto24839C6C_ai+1;
lv_equipmentGroupIndex += 1;
lv_x = 50;
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 500, 60, c_anchorTopLeft, lv_x, lv_y, libComC_gf_CC_PerkGroupName(lv_indexEquipmentGroup), Color(100.00, 50.20, 25.10), false, 0.0);
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModLeftSize20", PlayerGroupAll());
lv_y += 40;
libNtve_gf_CreateDialogItemImage(DialogLastCreated(), 1100, 100, c_anchorTopLeft, lv_x, lv_y, StringToText(""), "Assets\\Textures\\ui_research_frame_tooltip_protoss.dds", c_triggerImageTypeHorizontalBorder, true, Color(100,100,100), c_triggerBlendModeNormal);
lv_lastItem = DialogControlLastCreated();
lv_equipmentIndex = 1;
autoCCC6D65B_ai = 1;
autoCCC6D65B_ae = UserDataInstanceCount("CampaignPerk")+1;
while (autoCCC6D65B_ai < autoCCC6D65B_ae) {
lv_indexEquipment = UserDataInstance("CampaignPerk", autoCCC6D65B_ai);
autoCCC6D65B_ai = autoCCC6D65B_ai+1;
if( libComC_gf_CC_PerkGroupOfPerk(lv_indexEquipment) == lv_indexEquipmentGroup ) {
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 220, 60, c_anchorTopLeft, lv_x, lv_y, libComC_gf_CC_PerkName(lv_indexEquipment), Color(100.00, 100.00, 100.00), false, 2.0);
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModCenterSize16", PlayerGroupAll());
libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), libComC_gf_CC_PerkDescription(lv_indexEquipment), PlayerGroupAll());
lv_lastItem = DialogControlLastCreated();
libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), false);
libNovC_gv_nC_DebugCampaignTechEquipmentCheckBox[lv_equipmentGroupIndex][lv_equipmentIndex] = DialogControlLastCreated();
libNovC_gv_nC_DebugCampaignTechEquipment[lv_equipmentGroupIndex][lv_equipmentIndex] = lv_indexEquipment;
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);
lv_x += 220;
lv_equipmentIndex += 1;
}
}
lv_y += 100;
}
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_447CE194"), "");
libNovC_gv_NC_DebugCampaignTechOK = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_8D985BFF"), "");
libNovC_gv_NC_DebugCampaignTechCancel = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorTopRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_502FE759"), "");
libNovC_gv_nC_DebugCampaignTechUpgradesOpen = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorBottomLeft, 50, 50, StringExternal("Param/Value/lib_NovC_C4E15843"), StringExternal("Param/Value/lib_NovC_F5A62B9A"), "");
libNovC_gv_NC_DebugCampaignTechRandomizeTechButton = DialogControlLastCreated();
DialogSetSize(DialogLastCreated(), 1250, (lv_y + 150));
DialogControlSetSize(lv_dialogBackground, PlayerGroupAll(), (DialogGetWidth(libNovC_gv_NC_DebugCampaignTechDialog) - 60), (DialogGetHeight(libNovC_gv_NC_DebugCampaignTechDialog) - 60));
}
void libNovC_gf_NC_DebugCampaignTechCloseDialog () {
// Implementation
if ((libNovC_gv_NC_DebugCampaignTechDialog == c_invalidDialogId)) {
return ;
}
DialogDestroy(libNovC_gv_NC_DebugCampaignTechDialog);
libNovC_gv_NC_DebugCampaignTechDialog = c_invalidDialogId;
UISetWorldVisible(PlayerGroupAll(), true);
libNtve_gf_HideGameUI(true, PlayerGroupAll());
UISetCursorVisible(PlayerGroupAll(), false);
}
void libNovC_gf_NC_DebugCampaignTechDisplayDialog () {
// Implementation
if ((libNovC_gv_NC_DebugCampaignTechDialog != c_invalidDialogId)) {
return ;
}
UISetWorldVisible(PlayerGroupAll(), false);
libNtve_gf_HideGameUI(false, PlayerGroupAll());
UISetCursorVisible(PlayerGroupAll(), true);
libComC_gf_ShowHideWorldCover(true, 0);
libNovC_gf_NC_DebugCampaignTechStoreStates();
libNovC_gf_NC_DebugCampaignTechCreateDialog();
libNovC_gf_NC_DebugCampaignTechUpdateDialog();
DialogSetVisible(libNovC_gv_NC_DebugCampaignTechDialog, PlayerGroupAll(), true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechOK, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechCancel, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechRandomizeClicked, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechEquipmentCheckClicked, true);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesOpenClicked, true);
while (!((libNovC_gv_NC_DebugCampaignTechDialog == c_invalidDialogId))) {
Wait(0.25, c_timeReal);
}
TriggerEnable(libNovC_gt_NC_DebugCampaignTechOK, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechCancel, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechRandomizeClicked, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechEquipmentCheckClicked, false);
TriggerEnable(libNovC_gt_NC_DebugCampaignTechUpgradesOpenClicked, false);
libComC_gf_ShowHideWorldCover(false, 0);
}
void libNovC_gf_NC_DebugCampaignTechStoreStates () {
int autoAE49BCF5_ai;
int autoAE49BCF5_ae;
int autoD57CA587_ai;
int autoD57CA587_ae;
// Variable Declarations
string lv_indexEquipment;
string lv_indexTechItem;
// Variable Initialization
// Implementation
autoAE49BCF5_ai = 1;
autoAE49BCF5_ae = UserDataInstanceCount("CampaignTechItem")+1;
while (autoAE49BCF5_ai < autoAE49BCF5_ae) {
lv_indexTechItem = UserDataInstance("CampaignTechItem", autoAE49BCF5_ai);
autoAE49BCF5_ai = autoAE49BCF5_ai+1;
DataTableSetString(true, ("DebugTechSaveTechItem_" + (lv_indexTechItem)), (libNovC_gf_NC_ArmyTechItemAssignedUnit(lv_indexTechItem)));
}
autoD57CA587_ai = 1;
autoD57CA587_ae = UserDataInstanceCount("CampaignPerk")+1;
while (autoD57CA587_ai < autoD57CA587_ae) {
lv_indexEquipment = UserDataInstance("CampaignPerk", autoD57CA587_ai);
autoD57CA587_ai = autoD57CA587_ai+1;
DataTableSetInt(true, ("DebugTechSaveEquipment_" + (lv_indexEquipment)), (libComC_gf_CC_PerkState(lv_indexEquipment)));
}
}
void libNovC_gf_NC_DebugCampaignTechRestoreStates () {
int auto1206C1A8_ai;
int auto1206C1A8_ae;
int auto94F69BB7_ai;
int auto94F69BB7_ae;
int autoAE0C22D2_val;
// Variable Declarations
string lv_indexEquipment;
int lv_equipmentStateValue;
string lv_indexTechItem;
// Variable Initialization
// Implementation
auto1206C1A8_ai = 1;
auto1206C1A8_ae = UserDataInstanceCount("CampaignTechItem")+1;
while (auto1206C1A8_ai < auto1206C1A8_ae) {
lv_indexTechItem = UserDataInstance("CampaignTechItem", auto1206C1A8_ai);
auto1206C1A8_ai = auto1206C1A8_ai+1;
libNovC_gf_NC_ArmyTechItemAssignedUnitSet(lv_indexTechItem, (DataTableGetString(true, ("DebugTechSaveTechItem_" + (lv_indexTechItem)))));
}
auto94F69BB7_ai = 1;
auto94F69BB7_ae = UserDataInstanceCount("CampaignPerk")+1;
while (auto94F69BB7_ai < auto94F69BB7_ae) {
lv_indexEquipment = UserDataInstance("CampaignPerk", auto94F69BB7_ai);
auto94F69BB7_ai = auto94F69BB7_ai+1;
lv_equipmentStateValue = DataTableGetInt(true, ("DebugTechSaveEquipment_" + (lv_indexEquipment)));
autoAE0C22D2_val = lv_equipmentStateValue;
if (autoAE0C22D2_val == (libComC_ge_CC_PerkState_Active)) {
libComC_gf_CC_PerkStateSet(lv_indexEquipment, libComC_ge_CC_PerkState_Active);
}
else if (autoAE0C22D2_val == (libComC_ge_CC_PerkState_Locked)) {
libComC_gf_CC_PerkStateSet(lv_indexEquipment, libComC_ge_CC_PerkState_Locked);
}
else if (autoAE0C22D2_val == (libComC_ge_CC_PerkState_Unlocked)) {
libComC_gf_CC_PerkStateSet(lv_indexEquipment, libComC_ge_CC_PerkState_Unlocked);
}
else if (autoAE0C22D2_val == (libComC_ge_CC_PerkState_Hidden)) {
libComC_gf_CC_PerkStateSet(lv_indexEquipment, libComC_ge_CC_PerkState_Hidden);
}
else {
}
}
}
bool libNovC_gf_NC_DebugCampaignTechIsDupe (string lp_mission, string lp_category) {
int auto19F4F4D9_ae;
int auto19F4F4D9_ai;
// Variable Declarations
string lv_indexMission;
// Variable Initialization
// Implementation
auto19F4F4D9_ae = UserDataInstanceCount("Maps");
auto19F4F4D9_ai = 1;
while (auto19F4F4D9_ai <= auto19F4F4D9_ae) {
lv_indexMission = libComC_gf_CC_MapDataFromUserDataInstance(UserDataInstance("Maps", auto19F4F4D9_ai));
if (lv_indexMission != null && CatalogFieldValueGet(c_gameCatalogMap, lv_indexMission, "Kind", 1) == "Mission" && libComC_gf_CC_MapInternal(lv_indexMission) == false ) {
if ((lv_indexMission == lp_mission)) {
return false;
}
if ((libComC_gf_MissionArmyCategoryUnlocked(lv_indexMission) == lp_category)) {
return true;
}
}
auto19F4F4D9_ai = auto19F4F4D9_ai + 1;
}
return false;
}
void libNovC_gf_SetTechRestrictionsCallback (trigger lp_callbackTrigger) {
// Implementation
libNovC_gv_NC_TechLimitsCallback = lp_callbackTrigger;
}
void libNovC_gf_PurchaseStorymodeTech () {
// Variable Declarations
string lv_indexMission;
string lv_armyCategory;
// Variable Initialization
// Implementation
if ((GameIsTransitionMap() == true)) {
return ;
}
libNovC_gf_NC_DefaultTechProgress(libComC_gf_CurrentMap());
TriggerExecute(libNovC_gv_NC_TechLimitsCallback, true, false);
}
void libNovC_gf_NC_DefaultTechProgress (string lp_mission) {
int autoA603B55C_ae;
int autoA603B55C_ai;
// Variable Declarations
string lv_indexMission;
// Variable Initialization
// Implementation
if ((libComC_gf_CampaignMapTypeCheck(lp_mission, c_mapKindMission) == false)) {
return ;
}
TriggerDebugOutput(1, StringExternal("Param/Value/lib_NovC_FAFCC3CA"), false);
BankDeleteCampaignBanks(1, libNovC_gf_NC_CampaignSaveIndex());
libComC_gv_cC_StoryBank = null;
libComC_gv_NC_CampaignBank = null;
libComC_gv_cC_ArmyTechBank = null;
libComC_gf_CC_ResetCampaignData();
autoA603B55C_ae = UserDataInstanceCount("Maps");
autoA603B55C_ai = 1;
while (autoA603B55C_ai <= autoA603B55C_ae) {
lv_indexMission = libComC_gf_CC_MapDataFromUserDataInstance(UserDataInstance("Maps", autoA603B55C_ai));
if (lv_indexMission != null && CatalogFieldValueGet(c_gameCatalogMap, lv_indexMission, "Kind", 1) == "Mission" && libComC_gf_CC_MapInternal(lv_indexMission) == false ) {
if ((lv_indexMission == lp_mission)) {
break;
}
libComC_gf_CC_MissionMarkCompleted(lv_indexMission);
libComC_gv_cCX_LastSuccessfulMission = lv_indexMission;
TextExpressionSetToken("Param/Expression/lib_NovC_823D4FD3", "A", StringToText((lv_indexMission)));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_NovC_823D4FD3"), false);
}
autoA603B55C_ai = autoA603B55C_ai + 1;
}
libComC_gf_NS_SaveAllTransitionData(false, false, false);
libComC_gf_CC_SaveArmyTechBank(lp_mission, false);
libComC_gf_CC_ApplyTech(1);
}
string libNovC_gf_NC_DebugProgressDataTableID (string lp_type, string lp_name) {
// Implementation
return ("DebugProg" + lp_type + "&%&" + lp_name);
}
bool libNovC_gf_NC_DebugProgressDialogOpened () {
// Implementation
return (libNovC_gv_NC_DebugProgressDialog != c_invalidDialogId);
}
void libNovC_gf_NC_DebugProgressSetFirstStorymodeEpisode (bool lp_state) {
// Implementation
BankValueSetFromFlag(libComC_gf_CC_StoryBank(), "Debug", "StartedFirstStorymodeEpisode", lp_state);
BankSave(libComC_gf_CC_StoryBank());
}
void libNovC_gf_NC_DebugProgressAddMissionButton (string lp_mission, fixed lp_col, fixed lp_row) {
// Variable Declarations
int lv_xX;
int lv_yY;
int lv_width;
int lv_height;
int lv_marginX;
int lv_marginY;
int lv_index;
int lv_button;
int lv_button2;
// Variable Initialization
lv_button = c_invalidDialogControlId;
lv_button2 = c_invalidDialogControlId;
// Implementation
lv_xX = FixedToInt((((lp_col - 1.0) * 285.0) + 40.0));
lv_yY = FixedToInt((((lp_row - 1.0) * 70.0) + 35.0));
lv_width = 320;
lv_height = 75;
lv_marginX = 15;
lv_marginY = 10;
DialogControlCreate(libNovC_gv_NC_DebugProgressDialog, c_triggerControlTypeButton);
libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), ("Nova_DebugProgress_MissionButton" + (lp_mission)), PlayerGroupAll());
lv_button = DialogControlLastCreated();
libNtve_gf_SaveDataTableValueDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("Button", (lp_mission)), DialogControlLastCreated());
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), lv_width, lv_height);
DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_xX, lv_yY);
libNtve_gf_SetDialogItemText(DialogControlLastCreated(), libNovC_gf_NC_DebugProgressMapName(lp_mission), PlayerGroupAll());
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "DebugProgressPanelMissionHotS", PlayerGroupAll());
libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0.00, 100.00, 0.00), PlayerGroupAll());
DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
libNtve_gf_SaveDataTableValueDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("StateLabel", (lp_mission)), DialogControlLastCreated());
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), (lv_width - (lv_marginX * 2)), (lv_height - (lv_marginY * 2)));
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "DebugProgressPanelLabelTopRight", PlayerGroupAll());
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopRight, lv_button, c_anchorTopRight, (-1 * lv_marginX), (1 * lv_marginY));
DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
libNtve_gf_SaveDataTableValueDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("TechLabel", (lp_mission)), DialogControlLastCreated());
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), (lv_width - (lv_marginX * 2)), (lv_height - (lv_marginY * 2)));
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "DebugProgressPanelLabelTopLeft", PlayerGroupAll());
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_button, c_anchorTopLeft, (1 * lv_marginX), (1 * lv_marginY));
DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
libNtve_gf_SaveDataTableValueDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("ChampionLabel", (lp_mission)), DialogControlLastCreated());
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), (lv_width - (lv_marginX * 2)), (lv_height - (lv_marginY * 2)));
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "DebugProgressPanelLabelBottomLeft", PlayerGroupAll());
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, lv_button, c_anchorBottomLeft, (1 * lv_marginX), (-1 * lv_marginY));
DialogControlCreate(libNovC_gv_NC_DebugProgressDialog, c_triggerControlTypeButton);
lv_button2 = DialogControlLastCreated();
libNtve_gf_SaveDataTableValueDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("PlayButton", (lp_mission)), DialogControlLastCreated());
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 48, 48);
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, lv_button, c_anchorLeft, 0, 0);
TextExpressionSetToken("Param/Expression/lib_NovC_9081F58A", "A", libComC_gf_CC_MapName(lp_mission));
libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), TextExpressionAssemble("Param/Expression/lib_NovC_9081F58A"), PlayerGroupAll());
libNtve_gf_CreateDialogItemImage(libNovC_gv_NC_DebugProgressDialog, 32, 32, c_anchorTopLeft, 50, 50, StringToText(""), "Assets\\Textures\\ui_btn_aicommand_commandcard_assault.dds", c_triggerImageTypeNormal, false, Color(100,100,100), c_triggerBlendModeNormal);
libNtve_gf_SaveDataTableValueDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("PlayImage", (lp_mission)), DialogControlLastCreated());
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_button2, c_anchorCenter, 0, 0);
}
void libNovC_gf_NC_DebugProgressCreateDialog () {
// Variable Declarations
int lv_width;
int lv_height;
int lv_offsetX;
int lv_offsetY;
int lv_relativeButton;
int lv_travelButton;
// Variable Initialization
lv_relativeButton = c_invalidDialogControlId;
lv_travelButton = c_invalidDialogControlId;
// Implementation
if ((libNovC_gv_NC_DebugProgressDialog != c_invalidDialogId)) {
return ;
}
DialogCreate(1500, 1100, c_anchorCenter, 0, 0, true);
libNovC_gv_NC_DebugProgressDialog = DialogLastCreated();
libNovC_gf_NC_DebugProgressAddMissionButton("Nova01", 3.0, 1.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova02", 3.0, 2.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova03", 3.0, 3.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova04", 3.0, 4.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova05", 3.0, 5.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova06", 3.0, 6.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova07", 3.0, 7.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova08", 3.0, 8.0);
libNovC_gf_NC_DebugProgressAddMissionButton("Nova09", 3.0, 9.0);
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 190, 30, StringToText(""), StringExternal("Param/Value/lib_NovC_7BCF9B13"), "");
libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), "Nova_DebugProgress_OkButton", PlayerGroupAll());
libNovC_gv_NC_DebugProgressButtonOK = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 40, 30, StringToText(""), StringExternal("Param/Value/lib_NovC_208828FC"), "");
libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), "Nova_DebugProgress_CancelButton", PlayerGroupAll());
libNovC_gv_NC_DebugProgressButtonCancel = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomLeft, 40, 30, StringToText(""), StringExternal("Param/Value/lib_NovC_87B797D4"), "");
libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), "Nova_DebugProgress_ResetButton", PlayerGroupAll());
libNovC_gv_NC_DebugProgressButtonReset = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 60, c_anchorTopRight, 40, 40, StringExternal("Param/Value/lib_NovC_1AC0C55D"), StringExternal("Param/Value/lib_NovC_88E4833D"), "");
libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), ColorWithAlpha(0,0,0,0), PlayerGroupAll());
libNovC_gv_NC_DebugProgressButtonDirectSelect = DialogControlLastCreated();
if ((libNovC_gv_NC_DebugProgressRetailMode == true)) {
DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
}
else {
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 450, 50, c_anchorTopLeft, 50, 130, StringExternal("Param/Value/lib_NovC_A88CC51D"), ColorWithAlpha(0,0,0,0), false, 0.0);
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModLeftSize24", PlayerGroupAll());
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorTopLeft, 50, 170, StringToText(""), StringExternal("Param/Value/lib_NovC_7E2017AF"), "");
libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), ColorWithAlpha(0,0,0,0), PlayerGroupAll());
libNovC_gv_NC_DebugProgressButtonNoObjectives = DialogControlLastCreated();
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorTopLeft, 200, 170, StringToText(""), StringExternal("Param/Value/lib_NovC_C8262C22"), "");
libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(254*100/255,138*100/255,14*100/255), PlayerGroupAll());
libNovC_gv_NC_DebugProgressButtonAllObjectives = DialogControlLastCreated();
}
libNtve_gf_CreateDialogItemLabel(DialogLastCreated(), 600, 400, c_anchorTopLeft, 50, 50, StringToText(""), ColorWithAlpha(0,0,0,0), false, 2.0);
libNovC_gv_NC_DebugProgressLabelInfo = DialogControlLastCreated();
libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "DebugProgressPanelCampaignProgress", PlayerGroupAll());
lv_width = 300;
lv_height = 60;
lv_offsetX = 5;
lv_offsetY = 0;
}
void libNovC_gf_NC_DebugProgressUpdateDialog () {
int auto11F4A4EE_ae;
int auto11F4A4EE_ai;
int auto8E338A48_val;
// Variable Declarations
string lv_indexMission;
int lv_stateLabel;
int lv_techLabel;
int lv_button;
int lv_button2;
int lv_button3;
string lv_categoryUnlocked;
text lv_techText;
int lv_tooltip;
text lv_rewardText;
// Variable Initialization
lv_stateLabel = c_invalidDialogControlId;
lv_techLabel = c_invalidDialogControlId;
lv_button = c_invalidDialogControlId;
lv_button2 = c_invalidDialogControlId;
lv_button3 = c_invalidDialogControlId;
lv_tooltip = c_invalidDialogControlId;
// Implementation
libComC_gf_CC_UpdateCompletedMissionArray();
auto11F4A4EE_ae = CatalogEntryCount(c_gameCatalogMap);
auto11F4A4EE_ai = 1;
while (auto11F4A4EE_ai <= auto11F4A4EE_ae) {
lv_indexMission = CatalogEntryGet(c_gameCatalogMap, auto11F4A4EE_ai);
auto11F4A4EE_ai = auto11F4A4EE_ai + 1;
if (CatalogFieldValueGet(c_gameCatalogMap, lv_indexMission, "Kind", 1) == "Mission" && libComC_gf_CC_MapInternal(lv_indexMission) == false) {
lv_stateLabel = libNtve_gf_ValueFromDataTableDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("StateLabel", (lv_indexMission)));
lv_techLabel = libNtve_gf_ValueFromDataTableDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("TechLabel", (lv_indexMission)));
lv_categoryUnlocked = libComC_gf_MissionArmyCategoryUnlocked(lv_indexMission);
if ((lv_categoryUnlocked != null)) {
lv_techText = libComC_gf_NC_ArmyCategoryName(lv_categoryUnlocked);
}
else {
lv_techText = StringToText("");
}
lv_rewardText = null;
lv_button = libNtve_gf_ValueFromDataTableDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("Button", (lv_indexMission)));
lv_button2 = libNtve_gf_ValueFromDataTableDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("PlayButton", (lv_indexMission)));
lv_button3 = libNtve_gf_ValueFromDataTableDialogItem(true, libNovC_gf_NC_DebugProgressDataTableID("PlayImage", (lv_indexMission)));
if ((lv_stateLabel != c_invalidDialogControlId)) {
auto8E338A48_val = libComC_gf_MissionStatus(lv_indexMission);
if (auto8E338A48_val == libComC_ge_MissionStatus_Locked) {
DialogControlSetEnabled(lv_button, PlayerGroupAll(), false);
DialogControlSetVisible(lv_button2, PlayerGroupAll(), false);
DialogControlSetVisible(lv_button3, PlayerGroupAll(), false);
DialogControlSetEnabled(lv_stateLabel, PlayerGroupAll(), true);
libNtve_gf_SetDialogItemText(lv_stateLabel, StringExternal("Param/Value/lib_NovC_AD3F2E8D"), PlayerGroupAll());
TextExpressionSetToken("Param/Expression/lib_NovC_02D0E02A", "A", libNovC_gf_NC_DebugProgressMapName(lv_indexMission));
libNtve_gf_SetDialogItemText(lv_button, TextExpressionAssemble("Param/Expression/lib_NovC_02D0E02A"), PlayerGroupAll());
TextExpressionSetToken("Param/Expression/lib_NovC_43997B8A", "A", lv_techText);
libNtve_gf_SetDialogItemText(lv_techLabel, TextExpressionAssemble("Param/Expression/lib_NovC_43997B8A"), PlayerGroupAll());
libNtve_gf_SetDialogItemTooltip(lv_button, lv_rewardText, PlayerGroupAll());
}
else if (auto8E338A48_val == libComC_ge_MissionStatus_Available) {
DialogControlSetEnabled(lv_button, PlayerGroupAll(), true);
if ((libNovC_gv_NC_DebugProgressRetailMode == false)) {
DialogControlSetVisible(lv_button2, PlayerGroupAll(), true);
DialogControlSetVisible(lv_button3, PlayerGroupAll(), true);
}
else {
DialogControlSetVisible(lv_button2, PlayerGroupAll(), false);
DialogControlSetVisible(lv_button3, PlayerGroupAll(), false);
}
DialogControlSetEnabled(lv_stateLabel, PlayerGroupAll(), true);
TextExpressionSetToken("Param/Expression/lib_NovC_F82DB0D0", "A", IntToText(libComC_gf_MissionStatusAge(lv_indexMission, libComC_ge_MissionStatus_Available)));
libNtve_gf_SetDialogItemText(lv_stateLabel, TextExpressionAssemble("Param/Expression/lib_NovC_F82DB0D0"), PlayerGroupAll());
libNtve_gf_SetDialogItemText(lv_button, libNovC_gf_NC_DebugProgressMapName(lv_indexMission), PlayerGroupAll());
TextExpressionSetToken("Param/Expression/lib_NovC_2BB80ACF", "A", lv_techText);
libNtve_gf_SetDialogItemText(lv_techLabel, TextExpressionAssemble("Param/Expression/lib_NovC_2BB80ACF"), PlayerGroupAll());
libNtve_gf_SetDialogItemTooltip(lv_button, lv_rewardText, PlayerGroupAll());
}
else if (auto8E338A48_val == libComC_ge_MissionStatus_Completed) {
DialogControlSetEnabled(lv_button, PlayerGroupAll(), false);
DialogControlSetVisible(lv_button2, PlayerGroupAll(), false);
DialogControlSetVisible(lv_button3, PlayerGroupAll(), false);
DialogControlSetEnabled(lv_stateLabel, PlayerGroupAll(), false);
TextExpressionSetToken("Param/Expression/lib_NovC_010ABCE0", "A", IntToText(libComC_gf_MissionStatusAge(lv_indexMission, libComC_ge_MissionStatus_Completed)));
libNtve_gf_SetDialogItemText(lv_stateLabel, TextExpressionAssemble("Param/Expression/lib_NovC_010ABCE0"), PlayerGroupAll());
TextExpressionSetToken("Param/Expression/lib_NovC_2377F211", "A", libNovC_gf_NC_DebugProgressMapName(lv_indexMission));
libNtve_gf_SetDialogItemText(lv_button, TextExpressionAssemble("Param/Expression/lib_NovC_2377F211"), PlayerGroupAll());
TextExpressionSetToken("Param/Expression/lib_NovC_3391F05F", "A", lv_techText);
libNtve_gf_SetDialogItemText(lv_techLabel, TextExpressionAssemble("Param/Expression/lib_NovC_3391F05F"), PlayerGroupAll());
libNtve_gf_SetDialogItemTooltip(lv_button, lv_rewardText, PlayerGroupAll());
}
else {
}
}