forked from WolvenKit/WolvenKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wcc_commands.cs
2059 lines (1770 loc) · 77.4 KB
/
wcc_commands.cs
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
using System.ComponentModel;
using System.IO;
using System.Windows.Forms.Design;
using System.Runtime.CompilerServices;
using System;
namespace WolvenKit.Common.Wcc
{
/// <summary>
/// All wcc_lite commands.
/// </summary>
public static class Wcc_lite
{
//[Editor(typeof(PropertyGridFolderPicker), typeof(PropertyGridFolderPicker))]
//[Editor(typeof(PropertyGridFilePicker), typeof(PropertyGridFilePicker))]
#region Common Commands
[Serializable]
[DescriptionAttribute("Uncooks resources from a given bundle set.\n Usage: uncook -indir= -outdir = [options]")]
public class uncook : WCC_Command
{
public uncook()
{
Name = "uncook";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required")]
[DescriptionAttribute("Path to the bundled directory.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("indir")]
public string InputDirectory { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Path to the unbundled directory.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string OutputDirectory { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("Path to the input strings file.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("infile")]
public string InputFile { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Relative inner path to be extracted.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("In")]
[REDName("targetdir")]
public string TargetDirectory { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Comma delineated list of file extensions to uncook. If options missing will uncook all av")]
[REDName("uncookext")]
public string UncookExtensions { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Image format for XBM files. Choose one of bmp, png, jpg, or tga. Default is tga.")]
[TypeConverter(typeof(EnumConverter))]
[REDName("imgfmt")]
public imageformat Imgfmt { get; set; } //enum
[CategoryAttribute("Optional"),
DescriptionAttribute("Dump redswf files.")]
[REDName("dumpswf")]
public bool Dumpswf { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Upon failure, skips to the next file.")]
[REDName("skiperrors")]
public bool Skiperrors { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Unbundles data without uncooking it.")]
[REDName("unbundleonly")]
public bool Unbundleonly { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Target language for recursive dump. Used with targetlanguage.")]
[REDName("uncookonly")]
public bool Uncookonly { get; set; }
}
[Serializable]
[DescriptionAttribute("Dumps info for bundled files.\n Usage: dumpbundleinfo -indir= -outpath=")]
public class dumpbundleinfo : WCC_Command
{
public dumpbundleinfo()
{
Name = "dumpbundleinfo";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("Directory with the bundles (recursive).")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("indir")]
public string Indir { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Absolute path to output text file.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outfile")]
public string Outfile { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("where to place output.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outpath")]
public string Outpath { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Absolute path to input bundle (multiple can be specified).")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("infile")]
public string Infile { get; set; }
}
[Serializable]
[DescriptionAttribute("Export single assets from the engine. \n Usage: export -depot= -file= -out=")]
public class export : WCC_Command
{
public export()
{
Name = "export";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("local - Use local depot(r4data)\n absolutepath - Use depot at given directory.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("depot")]
public string Depot { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("relativepath - Local(depot) path for the file to export.")]
[REDTags("In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("absolutepath - Output absolute path for the exported file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("fbxversion - (Optional) Specify output FBX version - 2016, 2013, 2011, 2010, 2009.")]
//[TypeConverter(typeof(EnumConverter))]
[REDName("fbx")]
public string Fbx { get; set; }
/*
xbm(2D Texture) exportable into 5 file format(s):
dds: DirectDraw Surface
bmp: Windows Bitmap
jpg: Joint Photographics Experts Group
tga: Truevision Targa
png: Portable Network Graphics*/
}
[Serializable]
[DescriptionAttribute("Import assets into the engine. \n Usage: import -depot= -file= -out=")]
public class import : WCC_Command
{
public import()
{
Name = "import";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("local - Use local depot(r4data) /n absolutepath - Use depot at given directory")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("depot")]
public string Depot { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("inputfile - Absolute path to file to import")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("outputfile - Relative(depot) path for the output file")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("nameofgroup - (Optional) Name of texture group when importing texture.")]
[TypeConverter(typeof(EnumConverter))]
[REDName("texturegroup")]
public ETextureGroup texturegroup { get; set; }
}
[Serializable]
[DescriptionAttribute("Dump file content(objects).\n Usage: dumpfile -file= -dir= -out=")]
public class dumpfile : WCC_Command
{
public dumpfile()
{
Name = "dumpfile";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute(" dump the whole directory (recursive)")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("dir")]
public string Dir { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("depot path to the file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("absolute path to the output file")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("exclude given file extensions")]
[REDName("exclude")]
public string Exclude { get; set; }
}
[Serializable]
[DescriptionAttribute(" Unbundle the files.\n Usage: unbundle -dir= -outdir=")]
public class unbundle : WCC_Command
{
public unbundle()
{
Name = "unbundle";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("directory with the bundles (recursive)")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("dir")]
public string InputDirectory { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("absolute path to output directory")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string OutputDirectory { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("optional bundles.json dump (for repacking)")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("json")]
public string Json { get; set; }
}
[Serializable]
[DescriptionAttribute("Build data cache from cooked assets.\n Usage: buildcache -db -out [optional params]")]
public class buildcache : WCC_Command
{
public buildcache()
{
Name = "buildcache";
}
/// <summary>
/// Required
/// </summary>
[REDTags(new string[] { "Keyword" })]
[CategoryAttribute("Is Required"),
DescriptionAttribute("Available Cache builders: physics, shaders, texture. ")]
[Editor(typeof(EnumConverter), typeof(EnumConverter))]
[REDName("builder")]
public cachebuilder builder { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Path to cook.db.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string DataBase { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Uncooked Base Directory")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("basedir")]
public string basedir { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Select target platform(required)")]
[TypeConverter(typeof(EnumConverter))]
[REDName("platform")]
public platform Platform { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Path to output cache file.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("N - Process every Nth file")]
[REDName("modulo")]
public string Modulo { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("X - Initial offset for processing(use only with -modulo)")]
[REDName("offset")]
public string Offset { get; set; }
}
[Serializable]
[DescriptionAttribute("Generates a metadata.store file for the specified directory.\n Usage: metadatastore -path=")]
public class metadatastore : WCC_Command
{
public metadatastore()
{
Name = "metadatastore";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("Path to bundles directory.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("path")]
public string Directory { get; set; }
}
[Serializable]
[DescriptionAttribute("Cook file lists, generate cooked data and bundle files for packing.\n Usage: cook")]
public class cook : WCC_Command
{
public cook()
{
Name = "cook";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("Select target platform(required)")]
[TypeConverter(typeof(EnumConverter))]
[REDName("platform")]
public platform Platform { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Sepcify output directory(required).")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string outdir { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("NO INFO")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("basedir")]
public string basedir { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("NO INFO")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("mod")]
public string mod { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Input seed file(required).")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("seed")]
public string seed { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Manual depot file for cooking.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Cook.db file to check if it containes trimmed files.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("additionalDB")]
public string AdditionalDB { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("List of trimmed files from cook.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path")]
[REDName("trimedfiles")]
public string trimedfiles { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Don't cook resources from one directory.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("excludedir")]
public string excludedir { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Cook resources only from one directory.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags(/*"Path",*/ "In")]
[REDName("trimdir")]
public string trimdir { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Allow cooking errors.")]
[REDName("noerrors")]
public bool noerrors { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Allow asserts.")]
[REDName("noasserts")]
public bool noasserts { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("No output.")]
[REDName("silent")]
public bool silent { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Ignore files with given extension.")]
[REDName("ignore")]
public bool ignore { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Capture and save all cooked string ID's.")]
[REDName("stringids")]
public bool stringids { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Capture and save all cooked string key's.")]
[REDName("stringkeys")]
public bool stringkeys { get; set; }
}
[Serializable]
[DescriptionAttribute("Packs file from given directory into a bundle.\n Usage: pack -dir= -outdir= [-compression=]")]
public class pack : WCC_Command
{
public pack()
{
Name = "pack";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("Input directory to pack")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("dir")]
public string Directory { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Output directory with bundles (note: bundles bigger than 4GB are split)")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string Outdir { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("Compression type to use(default: LZ4HC)")]
[TypeConverter(typeof(EnumConverter))]
[REDName("compression")]
public compression compression { get; set; }
}
[Serializable]
[DescriptionAttribute("Cooks materials.\n Usage: cookmaterials -platform (-material=) (-fur=)")]
public class cookmaterials : WCC_Command
{
public cookmaterials()
{
Name = "cookmaterials";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("")]
[TypeConverter(typeof(EnumConverter))]
[REDName("platform")]
public platform Platform { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("")]
[REDName("static")]
public bool Static { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("")]
[REDName("fastfx")]
public bool fastfx { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("")]
[REDName("allmaterials")]
public bool allmaterials { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("")]
[REDName("material")]
public string material { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("")]
[REDName("resaveCRC")]
public bool resaveCRC { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("")]
[REDName("fur")]
public string fur { get; set; }
}
#endregion
#region Uncommon Commands
[Serializable]
[DescriptionAttribute("Analyze game and engine data and output cook lists.\n Usage: analyze -out [optional params]")]
public class analyze : WCC_Command
{
public analyze()
{
Name = "analyze";
}
/// <summary>
/// Required
/// </summary>
[REDTags(new string[] { "Keyword" })]
[CategoryAttribute("Is Required"),
DescriptionAttribute("Choose object to analyze.")]
[TypeConverter(typeof(EnumConverter))]
[REDName("analyzer")]
public analyzers Analyzer { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Output absolute path")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("Choose file to analyze.")]
[REDName("Object")]
public string Object { get; set; }///
[CategoryAttribute("Optional"),
DescriptionAttribute("reddlc relative path to use with analyze r4dlc")]
[REDName("-dlc")]
public string reddlc { get; set; }
}
[Serializable]
[DescriptionAttribute("Split cache file into multiple files.\n Usage: splitcache -file= -db=<cook.db> -outdir= Options:")]
public class splitcache : WCC_Command
{
public splitcache()
{
Name = "splitcache";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("input cache file.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get;set;}
[CategoryAttribute("Is Required")]
[DescriptionAttribute("path to the cook.db file to use as a reference")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string Database { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("where to place output caches.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string OutputDirectory { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("use custom fallback chunk name")]
[REDName("fallback")]
public string Fallback { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("remove data from non cooked files")]
[REDName("strip")]
public bool Strip { get; set; }
}
[Serializable]
[DescriptionAttribute("Reports file usage and chunk distribution of a given cook database.\n Usage: reportchunks -db= -out=")]
public class reportchunks : WCC_Command
{
public reportchunks()
{
Name = "reportchunks";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("path to the cook.db file to use as a reference")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string Database { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("where to place output.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Output { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("Outputs exhaustive report(default).")]
[REDName("showall")]
public bool Showall { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Outputs global statistics.")]
[REDName("showsumary")]
public bool Showsumary { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Outputs extension/chunk statistics.")]
[REDName("showextensions")]
public bool showextensions { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Outputs file/chunk statistics (slow!).")]
[REDName("showfilechunks")]
public bool showfilechunks { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Outputs the list of files in each chunk(slow!)")]
[REDName("showchunkfiles")]
public bool showchunkfiles { get; set; }
}
[Serializable]
[DescriptionAttribute("Dump data from compiled scripts. \n Usage: dumpscripts -file= -out=")]
public class dumpscripts : WCC_Command
{
public dumpscripts()
{
Name = "dumpscripts";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("<scriptfile.redscripts> - Input file (compiled script binary).")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("<outputfile.txt> - Output report file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outpath")]
public string Outpath { get; set; }
}
[Serializable]
[DescriptionAttribute("Validate resources.\n Usage: validate[-db= -file = -all] -outdir=")]
public class validate : WCC_Command
{
public validate()
{
Name = "validate";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("cook.db file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string db { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Validate single file.")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("NO INFO")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string Outdir { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("Validate all files in depot (not recommended)")]
[REDName("all")]
public bool all { get; set; }
}
[Serializable]
[DescriptionAttribute("Save Dialog Lines.\n Usage: get_txts -db= -outdir= [-lang=]")]
public class get_txts : WCC_Command
{
public get_txts()
{
Name = "get_txts";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("cook.db file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string db { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("NO INFO")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("outdir")]
public string OutputDirectory { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("NO INFO")]
[TypeConverter(typeof(EnumConverter))]
[REDName("lang")]
public language lang { get; set; }
}
[Serializable]
[DescriptionAttribute("Optimize(resort) collision cache.\n Usage: optimizecollisioncache -file= -out=")]
public class optimizecollisioncache : WCC_Command
{
public optimizecollisioncache()
{
Name = "optimizecollisioncache";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("depot path to the file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("file")]
public string File { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("absolute path to the output file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
}
[Serializable]
[DescriptionAttribute("Generalized commandlet for creating differential patches for specified type of content.\n ote: you can use -mod OR -current params\n Usage: patch -base= -current= -mod= [-name= ] -outdir=")]
public class patch : WCC_Command
{
public patch()
{
Name = "patch";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("Path to the base build (GoldMaster)")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("base")]
public string Base { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("(pro) Path to the current build (latest cook)")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("current")]
public string Current { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Path to the cooked mod directory")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("mod")]
public string ModDirectory { get; set; }
/// <summary>
/// Optional
/// </summary>
[CategoryAttribute("Optional"),
DescriptionAttribute("Output using custom directory name.")]
[REDName("name")]
public string DirectoryName { get; set; }
[CategoryAttribute("Optional"),
DescriptionAttribute("Output directory where the patched content will be dumped.")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("path")]
public string OutputDirectory { get; set; }
/* Content types:
"bundles" MODS + PATCH
"shaders" PATCH ONLY
"staticshaders" PATCH ONLY
"furshaders" PATCH ONLY
"speeches" PATCH ONLY
"strings" PATCH ONLY
"physics" PATCH ONLY
"sounds" PATCH ONLY
"specialcases" PATCH ONLY
"textures" MODS + PATCH*/
}
[Serializable]
[DescriptionAttribute("Extracts a list of character templates from cook.db.\n Usage: r4characters -db= -out=")]
public class r4characters : WCC_Command
{
public r4characters()
{
Name = "r4characters";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("cook.db file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string db { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Outfile")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
}
[Serializable]
[DescriptionAttribute("Extracts a list of character templates from cook.db.\n Usage: r4characters -db= -out=")]
public class r4charactersdlc : WCC_Command
{
public r4charactersdlc()
{
Name = "r4charactersdlc";
}
/// <summary>
/// Required
/// </summary>
[CategoryAttribute("Is Required"),
DescriptionAttribute("cook.db file")]
[EditorAttribute(typeof(FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "In")]
[REDName("db")]
public string db { get; set; }
[CategoryAttribute("Is Required"),
DescriptionAttribute("Outfile")]
[EditorAttribute(typeof(FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[REDTags("Path", "Out")]
[REDName("out")]
public string Out { get; set; }
}
[Serializable]
[DescriptionAttribute("Dumps the charset used in a given strings file(*.w3strings).\n Usage: dumpcharset -instringsfile= -outcharsetfile= [options]")]