diff --git a/FModel/App.config b/FModel/App.config
index 7334403f..bd961af9 100644
--- a/FModel/App.config
+++ b/FModel/App.config
@@ -40,21 +40,6 @@
-
- True
-
-
- True
-
-
- False
-
-
- False
-
-
- True
-
1
@@ -67,30 +52,6 @@
False
-
- False
-
-
- True
-
-
- False
-
-
- True
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj
index 7e31a178..863bcfda 100644
--- a/FModel/FModel.csproj
+++ b/FModel/FModel.csproj
@@ -156,6 +156,7 @@
+
@@ -193,15 +194,6 @@
-
-
-
-
-
-
-
-
-
@@ -256,6 +248,7 @@
+
@@ -283,7 +276,6 @@
-
diff --git a/FModel/Forms/AESManager.cs b/FModel/Forms/AESManager.cs
index e10f04ba..c02d3523 100644
--- a/FModel/Forms/AESManager.cs
+++ b/FModel/Forms/AESManager.cs
@@ -52,8 +52,9 @@ namespace FModel.Forms
private void OKButton_Click(object sender, EventArgs e)
{
- if (!string.IsNullOrWhiteSpace(textBox2.Text))
+ if (!string.IsNullOrWhiteSpace(textBox2.Text) && textBox2.Text.StartsWith("0x"))
{
+ if (textBox2.Text.Contains(" ")) { textBox2.Text = textBox2.Text.Replace(" ", string.Empty); }
Properties.Settings.Default.AESKey = textBox2.Text.Substring(2).ToUpper();
}
else { Properties.Settings.Default.AESKey = ""; }
diff --git a/FModel/Forms/UpdateModeSettings.Designer.cs b/FModel/Forms/UpdateModeSettings.Designer.cs
index a4ca4189..150257db 100644
--- a/FModel/Forms/UpdateModeSettings.Designer.cs
+++ b/FModel/Forms/UpdateModeSettings.Designer.cs
@@ -29,22 +29,13 @@ namespace FModel.Forms
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateModeSettings));
- this.panel2 = new System.Windows.Forms.Panel();
- this.label4 = new System.Windows.Forms.Label();
- this.panel1 = new System.Windows.Forms.Panel();
- this.label3 = new System.Windows.Forms.Label();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.checkBoxUMCTGalleries = new System.Windows.Forms.CheckBox();
- this.checkBox15 = new System.Windows.Forms.CheckBox();
- this.checkBox13 = new System.Windows.Forms.CheckBox();
- this.checkBox12 = new System.Windows.Forms.CheckBox();
- this.checkBox11 = new System.Windows.Forms.CheckBox();
- this.checkBox10 = new System.Windows.Forms.CheckBox();
- this.checkBox9 = new System.Windows.Forms.CheckBox();
- this.checkBox1 = new System.Windows.Forms.CheckBox();
- this.checkBox14 = new System.Windows.Forms.CheckBox();
- this.label7 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.optionsOKButton = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.checkBox1 = new System.Windows.Forms.CheckBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.label10 = new System.Windows.Forms.Label();
this.checkBox8 = new System.Windows.Forms.CheckBox();
this.checkBox7 = new System.Windows.Forms.CheckBox();
this.filenameLabel = new System.Windows.Forms.Label();
@@ -54,193 +45,57 @@ namespace FModel.Forms
this.label8 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.wPictureBox = new System.Windows.Forms.PictureBox();
- this.checkBox6 = new System.Windows.Forms.CheckBox();
- this.checkBox5 = new System.Windows.Forms.CheckBox();
- this.checkBox4 = new System.Windows.Forms.CheckBox();
- this.checkBox3 = new System.Windows.Forms.CheckBox();
- this.checkBox2 = new System.Windows.Forms.CheckBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.optionsOKButton = new System.Windows.Forms.Button();
- this.panel2.SuspendLayout();
- this.panel1.SuspendLayout();
- this.groupBox1.SuspendLayout();
+ this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
+ this.checkedListBox2 = new System.Windows.Forms.CheckedListBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.wPictureBox)).BeginInit();
+ this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
- // panel2
+ // label2
//
- this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(215)))), ((int)(((byte)(243)))));
- this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panel2.Controls.Add(this.label4);
- this.panel2.Location = new System.Drawing.Point(12, 296);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(253, 22);
- this.panel2.TabIndex = 24;
- this.panel2.Visible = false;
+ this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.label2.AutoSize = true;
+ this.label2.ForeColor = System.Drawing.Color.Red;
+ this.label2.Location = new System.Drawing.Point(149, 443);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(320, 13);
+ this.label2.TabIndex = 20;
+ this.label2.Text = "The more Assets you choose, the more time it will take to complete";
//
- // label4
+ // label1
//
- this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.label4.Location = new System.Drawing.Point(3, 3);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(245, 13);
- this.label4.TabIndex = 0;
- this.label4.Text = "- Include Sprays, Banners, Emojis, Musics, Toys";
- this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.AutoSize = true;
+ this.label1.ForeColor = System.Drawing.Color.Red;
+ this.label1.Location = new System.Drawing.Point(133, 442);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(19, 13);
+ this.label1.TabIndex = 19;
+ this.label1.Text = "⚠️";
//
- // panel1
+ // optionsOKButton
//
- this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(215)))), ((int)(((byte)(243)))));
- this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panel1.Controls.Add(this.label3);
- this.panel1.Location = new System.Drawing.Point(12, 310);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(232, 22);
- this.panel1.TabIndex = 23;
- this.panel1.Visible = false;
- //
- // label3
- //
- this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.label3.Location = new System.Drawing.Point(3, 3);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(224, 13);
- this.label3.TabIndex = 0;
- this.label3.Text = "- Include All New Creative Devices Textures";
- this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.checkBoxUMCTGalleries);
- this.groupBox1.Controls.Add(this.checkBox15);
- this.groupBox1.Controls.Add(this.checkBox13);
- this.groupBox1.Controls.Add(this.checkBox12);
- this.groupBox1.Controls.Add(this.checkBox11);
- this.groupBox1.Controls.Add(this.checkBox10);
- this.groupBox1.Controls.Add(this.checkBox9);
- this.groupBox1.Controls.Add(this.checkBox1);
- this.groupBox1.Controls.Add(this.checkBox14);
- this.groupBox1.Controls.Add(this.label7);
- this.groupBox1.Location = new System.Drawing.Point(12, 231);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(633, 68);
- this.groupBox1.TabIndex = 22;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Texture Extraction";
- //
- // checkBoxUMCTGalleries
- //
- this.checkBoxUMCTGalleries.AutoSize = true;
- this.checkBoxUMCTGalleries.Location = new System.Drawing.Point(438, 42);
- this.checkBoxUMCTGalleries.Name = "checkBoxUMCTGalleries";
- this.checkBoxUMCTGalleries.Size = new System.Drawing.Size(108, 17);
- this.checkBoxUMCTGalleries.TabIndex = 9;
- this.checkBoxUMCTGalleries.Text = "Creative Galleries";
- this.checkBoxUMCTGalleries.UseVisualStyleBackColor = true;
- //
- // checkBox15
- //
- this.checkBox15.AutoSize = true;
- this.checkBox15.Location = new System.Drawing.Point(360, 42);
- this.checkBox15.Name = "checkBox15";
- this.checkBox15.Size = new System.Drawing.Size(66, 17);
- this.checkBox15.TabIndex = 8;
- this.checkBox15.Text = "Vehicles";
- this.checkBox15.UseVisualStyleBackColor = true;
- //
- // checkBox13
- //
- this.checkBox13.AutoSize = true;
- this.checkBox13.Location = new System.Drawing.Point(438, 19);
- this.checkBox13.Name = "checkBox13";
- this.checkBox13.Size = new System.Drawing.Size(107, 17);
- this.checkBox13.TabIndex = 7;
- this.checkBox13.Text = "Creative Devices";
- this.checkBox13.UseVisualStyleBackColor = true;
- //
- // checkBox12
- //
- this.checkBox12.AutoSize = true;
- this.checkBox12.Location = new System.Drawing.Point(248, 42);
- this.checkBox12.Name = "checkBox12";
- this.checkBox12.Size = new System.Drawing.Size(60, 17);
- this.checkBox12.TabIndex = 6;
- this.checkBox12.Text = "Athena";
- this.checkBox12.UseVisualStyleBackColor = true;
- //
- // checkBox11
- //
- this.checkBox11.AutoSize = true;
- this.checkBox11.Location = new System.Drawing.Point(108, 42);
- this.checkBox11.Name = "checkBox11";
- this.checkBox11.Size = new System.Drawing.Size(105, 17);
- this.checkBox11.TabIndex = 5;
- this.checkBox11.Text = "Featured Images";
- this.checkBox11.UseVisualStyleBackColor = true;
- //
- // checkBox10
- //
- this.checkBox10.AutoSize = true;
- this.checkBox10.Location = new System.Drawing.Point(551, 19);
- this.checkBox10.Name = "checkBox10";
- this.checkBox10.Size = new System.Drawing.Size(72, 17);
- this.checkBox10.TabIndex = 4;
- this.checkBox10.Text = "2d Assets";
- this.checkBox10.UseVisualStyleBackColor = true;
- this.checkBox10.MouseEnter += new System.EventHandler(this.checkBox10_MouseEnter);
- this.checkBox10.MouseLeave += new System.EventHandler(this.checkBox10_MouseLeave);
- this.checkBox10.MouseMove += new System.Windows.Forms.MouseEventHandler(this.checkBox10_MouseMove);
- //
- // checkBox9
- //
- this.checkBox9.AutoSize = true;
- this.checkBox9.Location = new System.Drawing.Point(108, 19);
- this.checkBox9.Name = "checkBox9";
- this.checkBox9.Size = new System.Drawing.Size(124, 17);
- this.checkBox9.TabIndex = 3;
- this.checkBox9.Text = "Cosmetics && Variants";
- this.checkBox9.UseVisualStyleBackColor = true;
- //
- // checkBox1
- //
- this.checkBox1.AutoSize = true;
- this.checkBox1.Location = new System.Drawing.Point(360, 20);
- this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(72, 17);
- this.checkBox1.TabIndex = 2;
- this.checkBox1.Text = "Weapons";
- this.checkBox1.UseVisualStyleBackColor = true;
- //
- // checkBox14
- //
- this.checkBox14.AutoSize = true;
- this.checkBox14.Location = new System.Drawing.Point(248, 20);
- this.checkBox14.Name = "checkBox14";
- this.checkBox14.Size = new System.Drawing.Size(106, 17);
- this.checkBox14.TabIndex = 1;
- this.checkBox14.Text = "Loading Screens";
- this.checkBox14.UseVisualStyleBackColor = true;
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(6, 20);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(96, 13);
- this.label7.TabIndex = 0;
- this.label7.Text = "Supported Folders:";
+ this.optionsOKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.optionsOKButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.optionsOKButton.Location = new System.Drawing.Point(475, 439);
+ this.optionsOKButton.Name = "optionsOKButton";
+ this.optionsOKButton.Size = new System.Drawing.Size(97, 21);
+ this.optionsOKButton.TabIndex = 18;
+ this.optionsOKButton.Text = "OK";
+ this.optionsOKButton.UseVisualStyleBackColor = true;
+ this.optionsOKButton.Click += new System.EventHandler(this.optionsOKButton_Click);
//
// groupBox4
//
+ this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox4.Controls.Add(this.checkBox1);
+ this.groupBox4.Controls.Add(this.comboBox1);
+ this.groupBox4.Controls.Add(this.label10);
this.groupBox4.Controls.Add(this.checkBox8);
this.groupBox4.Controls.Add(this.checkBox7);
this.groupBox4.Controls.Add(this.filenameLabel);
@@ -250,23 +105,62 @@ namespace FModel.Forms
this.groupBox4.Controls.Add(this.label8);
this.groupBox4.Controls.Add(this.button1);
this.groupBox4.Controls.Add(this.wPictureBox);
- this.groupBox4.Controls.Add(this.checkBox6);
- this.groupBox4.Controls.Add(this.checkBox5);
- this.groupBox4.Controls.Add(this.checkBox4);
- this.groupBox4.Controls.Add(this.checkBox3);
- this.groupBox4.Controls.Add(this.checkBox2);
- this.groupBox4.Controls.Add(this.label6);
- this.groupBox4.Location = new System.Drawing.Point(12, 12);
+ this.groupBox4.Location = new System.Drawing.Point(12, 232);
this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(633, 213);
+ this.groupBox4.Size = new System.Drawing.Size(560, 195);
this.groupBox4.TabIndex = 21;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Icon Creation";
//
+ // checkBox1
+ //
+ this.checkBox1.AutoSize = true;
+ this.checkBox1.Location = new System.Drawing.Point(244, 54);
+ this.checkBox1.Name = "checkBox1";
+ this.checkBox1.Size = new System.Drawing.Size(139, 17);
+ this.checkBox1.TabIndex = 30;
+ this.checkBox1.Text = "New Rarity Background";
+ this.checkBox1.UseVisualStyleBackColor = true;
+ this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1_CheckedChanged);
+ //
+ // comboBox1
+ //
+ this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Items.AddRange(new object[] {
+ "English",
+ "French",
+ "German",
+ "Italian",
+ "Spanish",
+ "Spanish (LA)",
+ "Arabic",
+ "Japanese",
+ "Korean",
+ "Polish",
+ "Portuguese (Brazil)",
+ "Russian",
+ "Turkish",
+ "Chinese (S)",
+ "Traditional Chinese"});
+ this.comboBox1.Location = new System.Drawing.Point(70, 19);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(309, 21);
+ this.comboBox1.TabIndex = 29;
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(6, 22);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(58, 13);
+ this.label10.TabIndex = 28;
+ this.label10.Text = "Language:";
+ //
// checkBox8
//
this.checkBox8.AutoSize = true;
- this.checkBox8.Location = new System.Drawing.Point(6, 57);
+ this.checkBox8.Location = new System.Drawing.Point(6, 54);
this.checkBox8.Name = "checkBox8";
this.checkBox8.Size = new System.Drawing.Size(177, 17);
this.checkBox8.TabIndex = 26;
@@ -277,7 +171,7 @@ namespace FModel.Forms
// checkBox7
//
this.checkBox7.AutoSize = true;
- this.checkBox7.Location = new System.Drawing.Point(6, 105);
+ this.checkBox7.Location = new System.Drawing.Point(6, 90);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(15, 14);
this.checkBox7.TabIndex = 25;
@@ -286,8 +180,10 @@ namespace FModel.Forms
//
// filenameLabel
//
+ this.filenameLabel.AutoEllipsis = true;
this.filenameLabel.AutoSize = true;
- this.filenameLabel.Location = new System.Drawing.Point(115, 106);
+ this.filenameLabel.Location = new System.Drawing.Point(115, 91);
+ this.filenameLabel.MaximumSize = new System.Drawing.Size(260, 13);
this.filenameLabel.Name = "filenameLabel";
this.filenameLabel.Size = new System.Drawing.Size(60, 13);
this.filenameLabel.TabIndex = 24;
@@ -295,10 +191,10 @@ namespace FModel.Forms
//
// trackBar1
//
- this.trackBar1.Location = new System.Drawing.Point(58, 158);
+ this.trackBar1.Location = new System.Drawing.Point(58, 144);
this.trackBar1.Maximum = 100;
this.trackBar1.Name = "trackBar1";
- this.trackBar1.Size = new System.Drawing.Size(398, 45);
+ this.trackBar1.Size = new System.Drawing.Size(325, 45);
this.trackBar1.TabIndex = 20;
this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;
this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
@@ -306,7 +202,7 @@ namespace FModel.Forms
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(22, 129);
+ this.label9.Location = new System.Drawing.Point(22, 115);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(30, 13);
this.label9.TabIndex = 23;
@@ -314,11 +210,11 @@ namespace FModel.Forms
//
// trackBar2
//
- this.trackBar2.Location = new System.Drawing.Point(58, 129);
+ this.trackBar2.Location = new System.Drawing.Point(58, 115);
this.trackBar2.Maximum = 1000;
this.trackBar2.Minimum = 1;
this.trackBar2.Name = "trackBar2";
- this.trackBar2.Size = new System.Drawing.Size(398, 45);
+ this.trackBar2.Size = new System.Drawing.Size(325, 45);
this.trackBar2.TabIndex = 22;
this.trackBar2.TickFrequency = 25;
this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None;
@@ -328,7 +224,7 @@ namespace FModel.Forms
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(6, 161);
+ this.label8.Location = new System.Drawing.Point(6, 147);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(46, 13);
this.label8.TabIndex = 21;
@@ -336,7 +232,7 @@ namespace FModel.Forms
//
// button1
//
- this.button1.Location = new System.Drawing.Point(27, 99);
+ this.button1.Location = new System.Drawing.Point(27, 84);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(82, 24);
this.button1.TabIndex = 19;
@@ -347,121 +243,80 @@ namespace FModel.Forms
// wPictureBox
//
this.wPictureBox.Image = global::FModel.Properties.Resources.wTemplate;
- this.wPictureBox.Location = new System.Drawing.Point(462, 42);
+ this.wPictureBox.Location = new System.Drawing.Point(389, 19);
this.wPictureBox.Name = "wPictureBox";
this.wPictureBox.Size = new System.Drawing.Size(165, 165);
this.wPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.wPictureBox.TabIndex = 18;
this.wPictureBox.TabStop = false;
//
- // checkBox6
+ // checkedListBox1
//
- this.checkBox6.AutoSize = true;
- this.checkBox6.Location = new System.Drawing.Point(476, 19);
- this.checkBox6.Name = "checkBox6";
- this.checkBox6.Size = new System.Drawing.Size(78, 17);
- this.checkBox6.TabIndex = 14;
- this.checkBox6.Text = "Challenges";
- this.checkBox6.UseVisualStyleBackColor = true;
+ this.checkedListBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.checkedListBox1.CheckOnClick = true;
+ this.checkedListBox1.FormattingEnabled = true;
+ this.checkedListBox1.Items.AddRange(new object[] {
+ "[BR] Cosmetics",
+ "[BR] Cosmetics Variants",
+ "[BR] Banners",
+ "[BR] Challenges",
+ "[BR] Consumables",
+ "[BR] Gadgets",
+ "[BR] Traps",
+ "[BR] Weapons",
+ "[STW] Heroes",
+ "[STW] Defenders",
+ "[STW] Workers",
+ "[STW] Traps",
+ "[STW] Weapons",
+ "[STW] Ingredients",
+ "[STW] Persistent Resources",
+ "[STW] CardPacks",
+ "Tokens"});
+ this.checkedListBox1.Location = new System.Drawing.Point(6, 22);
+ this.checkedListBox1.Name = "checkedListBox1";
+ this.checkedListBox1.Size = new System.Drawing.Size(270, 184);
+ this.checkedListBox1.TabIndex = 22;
//
- // checkBox5
+ // checkedListBox2
//
- this.checkBox5.AutoSize = true;
- this.checkBox5.Location = new System.Drawing.Point(189, 19);
- this.checkBox5.Name = "checkBox5";
- this.checkBox5.Size = new System.Drawing.Size(64, 17);
- this.checkBox5.TabIndex = 4;
- this.checkBox5.Text = "Variants";
- this.checkBox5.UseVisualStyleBackColor = true;
+ this.checkedListBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.checkedListBox2.FormattingEnabled = true;
+ this.checkedListBox2.Items.AddRange(new object[] {
+ "[BR] 2D Assets",
+ "[BR] Featured Images",
+ "Icons",
+ "Additional Banners",
+ "Additional Loading Screens"});
+ this.checkedListBox2.Location = new System.Drawing.Point(284, 22);
+ this.checkedListBox2.Name = "checkedListBox2";
+ this.checkedListBox2.Size = new System.Drawing.Size(270, 184);
+ this.checkedListBox2.TabIndex = 23;
//
- // checkBox4
+ // groupBox1
//
- this.checkBox4.AutoSize = true;
- this.checkBox4.Location = new System.Drawing.Point(415, 19);
- this.checkBox4.Name = "checkBox4";
- this.checkBox4.Size = new System.Drawing.Size(53, 17);
- this.checkBox4.TabIndex = 3;
- this.checkBox4.Text = "Traps";
- this.checkBox4.UseVisualStyleBackColor = true;
- //
- // checkBox3
- //
- this.checkBox3.AutoSize = true;
- this.checkBox3.Location = new System.Drawing.Point(261, 19);
- this.checkBox3.Name = "checkBox3";
- this.checkBox3.Size = new System.Drawing.Size(147, 17);
- this.checkBox3.TabIndex = 2;
- this.checkBox3.Text = "Consumables && Weapons";
- this.checkBox3.UseVisualStyleBackColor = true;
- this.checkBox3.MouseEnter += new System.EventHandler(this.checkBox3_MouseEnter);
- this.checkBox3.MouseLeave += new System.EventHandler(this.checkBox3_MouseLeave);
- this.checkBox3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.checkBox3_MouseMove);
- //
- // checkBox2
- //
- this.checkBox2.AutoSize = true;
- this.checkBox2.Location = new System.Drawing.Point(108, 19);
- this.checkBox2.Name = "checkBox2";
- this.checkBox2.Size = new System.Drawing.Size(74, 17);
- this.checkBox2.TabIndex = 1;
- this.checkBox2.Text = "Cosmetics";
- this.checkBox2.UseVisualStyleBackColor = true;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(6, 20);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(96, 13);
- this.label6.TabIndex = 0;
- this.label6.Text = "Supported Folders:";
- //
- // label2
- //
- this.label2.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
- this.label2.AutoSize = true;
- this.label2.ForeColor = System.Drawing.Color.Red;
- this.label2.Location = new System.Drawing.Point(184, 315);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(320, 13);
- this.label2.TabIndex = 20;
- this.label2.Text = "The more Assets you choose, the more time it will take to complete";
- //
- // label1
- //
- this.label1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
- this.label1.AutoSize = true;
- this.label1.ForeColor = System.Drawing.Color.Red;
- this.label1.Location = new System.Drawing.Point(168, 314);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(19, 13);
- this.label1.TabIndex = 19;
- this.label1.Text = "⚠️";
- //
- // optionsOKButton
- //
- this.optionsOKButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
- this.optionsOKButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.optionsOKButton.Location = new System.Drawing.Point(512, 311);
- this.optionsOKButton.Name = "optionsOKButton";
- this.optionsOKButton.Size = new System.Drawing.Size(97, 21);
- this.optionsOKButton.TabIndex = 18;
- this.optionsOKButton.Text = "OK";
- this.optionsOKButton.UseVisualStyleBackColor = true;
- this.optionsOKButton.Click += new System.EventHandler(this.optionsOKButton_Click);
+ this.groupBox1.Controls.Add(this.checkedListBox2);
+ this.groupBox1.Controls.Add(this.checkedListBox1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(560, 214);
+ this.groupBox1.TabIndex = 24;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Icon Creation " +
+ " Texure";
//
// UpdateModeSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(657, 344);
- this.Controls.Add(this.panel2);
- this.Controls.Add(this.panel1);
- this.Controls.Add(this.groupBox1);
+ this.ClientSize = new System.Drawing.Size(584, 472);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.optionsOKButton);
+ this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
@@ -469,37 +324,25 @@ namespace FModel.Forms
this.Name = "UpdateModeSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Update Mode Settings";
- this.panel2.ResumeLayout(false);
- this.panel1.ResumeLayout(false);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.wPictureBox)).EndInit();
+ this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
-
- private System.Windows.Forms.Panel panel2;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Panel panel1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.CheckBox checkBox15;
- private System.Windows.Forms.CheckBox checkBox13;
- private System.Windows.Forms.CheckBox checkBox12;
- private System.Windows.Forms.CheckBox checkBox11;
- private System.Windows.Forms.CheckBox checkBox10;
- private System.Windows.Forms.CheckBox checkBox9;
- private System.Windows.Forms.CheckBox checkBox1;
- private System.Windows.Forms.CheckBox checkBox14;
- private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button optionsOKButton;
private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.CheckBox checkBox1;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.Label label10;
private System.Windows.Forms.CheckBox checkBox8;
private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.Label filenameLabel;
@@ -509,15 +352,8 @@ namespace FModel.Forms
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox wPictureBox;
- private System.Windows.Forms.CheckBox checkBox6;
- private System.Windows.Forms.CheckBox checkBox5;
- private System.Windows.Forms.CheckBox checkBox4;
- private System.Windows.Forms.CheckBox checkBox3;
- private System.Windows.Forms.CheckBox checkBox2;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button optionsOKButton;
- private System.Windows.Forms.CheckBox checkBoxUMCTGalleries;
+ private System.Windows.Forms.CheckedListBox checkedListBox1;
+ private System.Windows.Forms.CheckedListBox checkedListBox2;
+ private System.Windows.Forms.GroupBox groupBox1;
}
}
diff --git a/FModel/Forms/UpdateModeSettings.cs b/FModel/Forms/UpdateModeSettings.cs
index 0f46505c..67c9f29d 100644
--- a/FModel/Forms/UpdateModeSettings.cs
+++ b/FModel/Forms/UpdateModeSettings.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
@@ -8,6 +9,8 @@ namespace FModel.Forms
{
public partial class UpdateModeSettings : Form
{
+ private static string _oldLanguage;
+
public UpdateModeSettings()
{
// Check if watermark exists
@@ -15,12 +18,15 @@ namespace FModel.Forms
InitializeComponent();
- //ICON CREATION
- checkBox2.Checked = Properties.Settings.Default.UMCosmetics;
- checkBox5.Checked = Properties.Settings.Default.UMVariants;
- checkBox3.Checked = Properties.Settings.Default.UMConsumablesWeapons;
- checkBox4.Checked = Properties.Settings.Default.UMTraps;
- checkBox6.Checked = Properties.Settings.Default.UMChallenges;
+ checkBox1.Checked = Properties.Settings.Default.rarityNew;
+
+ //WATERMARK
+ button1.Enabled = Properties.Settings.Default.UMWatermark;
+ checkBox7.Checked = Properties.Settings.Default.UMWatermark;
+ trackBar1.Enabled = Properties.Settings.Default.UMWatermark;
+ trackBar2.Enabled = Properties.Settings.Default.UMWatermark;
+ trackBar1.Value = Properties.Settings.Default.UMOpacity;
+ trackBar2.Value = Properties.Settings.Default.UMSize;
//FEATURED
checkBox8.Checked = Properties.Settings.Default.UMFeatured;
@@ -28,7 +34,15 @@ namespace FModel.Forms
{
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
- Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
+ Bitmap bmp = null;
+ if (Properties.Settings.Default.UMFeatured)
+ {
+ bmp = new Bitmap(Properties.Settings.Default.rarityNew ? new Bitmap(Resources.wTemplateF) : new Bitmap(Resources.wTemplateFv1));
+ }
+ else
+ {
+ bmp = new Bitmap(Properties.Settings.Default.rarityNew ? new Bitmap(Resources.wTemplate) : new Bitmap(Resources.wTemplatev1));
+ }
Graphics g = Graphics.FromImage(bmp);
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
@@ -38,48 +52,53 @@ namespace FModel.Forms
wPictureBox.Image = bmp;
}
- //WATERMARK
- button1.Enabled = Properties.Settings.Default.UMWatermark;
- trackBar1.Enabled = Properties.Settings.Default.UMWatermark;
- trackBar2.Enabled = Properties.Settings.Default.UMWatermark;
- trackBar2.Value = Properties.Settings.Default.UMSize;
- trackBar1.Value = Properties.Settings.Default.UMOpacity;
- checkBox7.Checked = Properties.Settings.Default.UMWatermark;
-
- //TEXTURES
- checkBox9.Checked = Properties.Settings.Default.UMTCosmeticsVariants;
- checkBox14.Checked = Properties.Settings.Default.UMTLoading;
- checkBox1.Checked = Properties.Settings.Default.UMTWeapons;
- checkBox10.Checked = Properties.Settings.Default.UMTBanners;
- checkBox11.Checked = Properties.Settings.Default.UMTFeaturedIMGs;
- checkBox12.Checked = Properties.Settings.Default.UMTAthena;
- checkBox13.Checked = Properties.Settings.Default.UMTDevices;
- checkBox15.Checked = Properties.Settings.Default.UMTVehicles;
- checkBoxUMCTGalleries.Checked = Properties.Settings.Default.UMCTGalleries;
+ _oldLanguage = Properties.Settings.Default.IconLanguage;
+ comboBox1.SelectedIndex = comboBox1.FindStringExact(Properties.Settings.Default.IconLanguage);
}
private void optionsOKButton_Click(object sender, EventArgs e)
{
- Properties.Settings.Default.UMCosmetics = checkBox2.Checked;
- Properties.Settings.Default.UMVariants = checkBox5.Checked;
- Properties.Settings.Default.UMConsumablesWeapons = checkBox3.Checked;
- Properties.Settings.Default.UMTraps = checkBox4.Checked;
- Properties.Settings.Default.UMChallenges = checkBox6.Checked;
+ RegisterSettings.updateModeListParameters = new List();
+
Properties.Settings.Default.UMFeatured = checkBox8.Checked;
Properties.Settings.Default.UMWatermark = checkBox7.Checked;
- Properties.Settings.Default.UMTCosmeticsVariants = checkBox9.Checked;
- Properties.Settings.Default.UMTLoading = checkBox14.Checked;
- Properties.Settings.Default.UMTWeapons = checkBox1.Checked;
- Properties.Settings.Default.UMTBanners = checkBox10.Checked;
- Properties.Settings.Default.UMTFeaturedIMGs = checkBox11.Checked;
- Properties.Settings.Default.UMTAthena = checkBox12.Checked;
- Properties.Settings.Default.UMTDevices = checkBox13.Checked;
- Properties.Settings.Default.UMTVehicles = checkBox15.Checked;
- Properties.Settings.Default.UMCTGalleries = checkBoxUMCTGalleries.Checked;
+ Properties.Settings.Default.rarityNew = checkBox1.Checked;
Properties.Settings.Default.UMSize = trackBar2.Value;
Properties.Settings.Default.UMOpacity = trackBar1.Value;
+ //PARAMETERS
+ if (checkedListBox1.GetItemCheckState(0) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/Cosmetics/"); }
+ if (checkedListBox1.GetItemCheckState(1) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/CosmeticVariantTokens/"); }
+ if (checkedListBox1.GetItemCheckState(2) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/BannerToken/"); }
+ if (checkedListBox1.GetItemCheckState(3) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/ChallengeBundles/"); }
+ if (checkedListBox1.GetItemCheckState(4) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/Consumables/"); }
+ if (checkedListBox1.GetItemCheckState(5) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/Gameplay/"); }
+ if (checkedListBox1.GetItemCheckState(6) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/Traps/"); }
+ if (checkedListBox1.GetItemCheckState(7) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Athena/Items/Weapons/"); }
+ if (checkedListBox1.GetItemCheckState(8) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Heroes/"); }
+ if (checkedListBox1.GetItemCheckState(9) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/Defenders/"); }
+ if (checkedListBox1.GetItemCheckState(10) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/Workers/"); }
+ if (checkedListBox1.GetItemCheckState(11) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/Traps/"); }
+ if (checkedListBox1.GetItemCheckState(12) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/Weapons/"); }
+ if (checkedListBox1.GetItemCheckState(13) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/Ingredients/"); }
+ if (checkedListBox1.GetItemCheckState(14) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/PersistentResources/"); }
+ if (checkedListBox1.GetItemCheckState(15) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/CardPacks/"); }
+ if (checkedListBox1.GetItemCheckState(16) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/Items/Tokens/"); }
+
+ if (checkedListBox2.GetItemCheckState(0) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/2dAssets/"); }
+ if (checkedListBox2.GetItemCheckState(1) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/UI/Foundation/Textures/BattleRoyale/FeaturedItems/"); }
+ if (checkedListBox2.GetItemCheckState(2) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/UI/Foundation/Textures/Icons/"); }
+ if (checkedListBox2.GetItemCheckState(3) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/UI/Foundation/Textures/Banner/"); }
+ if (checkedListBox2.GetItemCheckState(4) == CheckState.Checked) { RegisterSettings.updateModeListParameters.Add("../FortniteGame/Content/UI/Foundation/Textures/LoadingScreens/"); }
+
+ //LOCRES
+ Properties.Settings.Default.IconLanguage = comboBox1.SelectedItem.ToString();
+ if (comboBox1.SelectedItem.ToString() != _oldLanguage)
+ {
+ LoadLocRes.LoadMySelectedLocRes(Properties.Settings.Default.IconLanguage);
+ }
+
Properties.Settings.Default.Save();
Close();
}
@@ -155,48 +174,58 @@ namespace FModel.Forms
private void checkBox8_CheckedChanged(object sender, EventArgs e)
{
- Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
- Graphics g = Graphics.FromImage(bmp);
- if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
+ if (!checkBox8.Checked)
{
- Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
- var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
- g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
+ Bitmap bmp = checkBox1.Checked ? new Bitmap(Resources.wTemplate) : new Bitmap(Resources.wTemplatev1);
+ Graphics g = Graphics.FromImage(bmp);
+ if (File.Exists(Properties.Settings.Default.UMFilename))
+ {
+ Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
+ var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
+ g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
+ }
+ wPictureBox.Image = bmp;
+ }
+ if (checkBox8.Checked)
+ {
+ Bitmap bmp = checkBox1.Checked ? new Bitmap(Resources.wTemplateF) : new Bitmap(Resources.wTemplateFv1);
+ Graphics g = Graphics.FromImage(bmp);
+ if (File.Exists(Properties.Settings.Default.UMFilename))
+ {
+ Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
+ var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
+ g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
+ }
+ wPictureBox.Image = bmp;
}
-
- wPictureBox.Image = bmp;
}
- #region MOVE PANEL
- //CONSUMABLES & WEAPONS
- private void checkBox3_MouseEnter(object sender, EventArgs e)
+ private void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
- panel1.Visible = true;
+ if (!checkBox1.Checked)
+ {
+ Bitmap bmp = checkBox8.Checked ? new Bitmap(Resources.wTemplateFv1) : new Bitmap(Resources.wTemplatev1);
+ Graphics g = Graphics.FromImage(bmp);
+ if (File.Exists(Properties.Settings.Default.UMFilename))
+ {
+ Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
+ var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
+ g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
+ }
+ wPictureBox.Image = bmp;
+ }
+ if (checkBox1.Checked)
+ {
+ Bitmap bmp = checkBox8.Checked ? new Bitmap(Resources.wTemplateF) : new Bitmap(Resources.wTemplate);
+ Graphics g = Graphics.FromImage(bmp);
+ if (File.Exists(Properties.Settings.Default.UMFilename))
+ {
+ Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
+ var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
+ g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
+ }
+ wPictureBox.Image = bmp;
+ }
}
- private void checkBox3_MouseLeave(object sender, EventArgs e)
- {
- panel1.Visible = false;
- }
- private void checkBox3_MouseMove(object sender, MouseEventArgs e)
- {
- panel1.Left = e.X + 40;
- panel1.Top = e.Y + 5;
- }
-
- //2D ASSETS
- private void checkBox10_MouseEnter(object sender, EventArgs e)
- {
- panel2.Visible = true;
- }
- private void checkBox10_MouseLeave(object sender, EventArgs e)
- {
- panel2.Visible = false;
- }
- private void checkBox10_MouseMove(object sender, MouseEventArgs e)
- {
- panel2.Left = e.X + 225;
- panel2.Top = e.Y + 225;
- }
- #endregion
}
}
diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs
index b3eb7db2..c36a4344 100644
--- a/FModel/MainWindow.cs
+++ b/FModel/MainWindow.cs
@@ -14,8 +14,6 @@ using AutoUpdaterDotNET;
using csharp_wick;
using FModel.Converter;
using FModel.Forms;
-using FModel.Parser.Challenges;
-using FModel.Parser.Items;
using FModel.Properties;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -27,12 +25,9 @@ namespace FModel
{
public partial class MainWindow : Form
{
- #region to refactor
- private static Stopwatch StopWatch { get; set; }
- private static Dictionary _diffToExtract { get; set; }
+ private static Stopwatch _stopWatch { get; set; }
private static List _itemsToDisplay { get; set; }
- public static string[] SelectedItemsArray { get; set; }
- #endregion
+ private static string[] _selectedItemsArray { get; set; }
public MainWindow()
{
@@ -175,7 +170,6 @@ namespace FModel
AddToUI.checkAndAddDynamicKeys();
Utilities.colorMyPaks(loadOneToolStripMenuItem);
Utilities.SetFolderPermission(App.DefaultOutputPath);
- Utilities.JohnWickCheck();
Utilities.CreateDefaultFolders();
FontUtilities.SetFont();
});
@@ -382,7 +376,7 @@ namespace FModel
private void CreatePakList(ToolStripItemClickedEventArgs selectedPak = null, bool loadAllPaKs = false, bool getDiff = false, bool updateMode = false)
{
ThePak.AllpaksDictionary = new Dictionary();
- _diffToExtract = new Dictionary();
+ RegisterSettings.updateModeDictionary = new Dictionary();
ThePak.PaksMountPoint = new Dictionary();
PakHelper.PakAsTxt = null;
@@ -453,7 +447,7 @@ namespace FModel
ComparePaKs();
if (updateMode && Checking.DifferenceFileExists)
{
- UmFilter(PakHelper.PakAsTxt, _diffToExtract);
+ RegisterSettings.UpdateModeAddToDict(PakHelper.PakAsTxt);
Checking.UmWorking = true;
}
@@ -570,77 +564,6 @@ namespace FModel
backgroundWorker2.RunWorkerAsync();
}
}
- private void UmFilter(String[] theFile, Dictionary diffToExtract)
- {
- List searchResults = new List();
-
- if (Settings.Default.UMCosmetics)
- searchResults.Add("Athena/Items/Cosmetics/");
- if (Settings.Default.UMVariants)
- searchResults.Add("Athena/Items/CosmeticVariantTokens/");
- if (Settings.Default.UMConsumablesWeapons)
- {
- searchResults.Add("AGID_");
- searchResults.Add("WID_");
- }
- if (Settings.Default.UMTraps)
- searchResults.Add("Athena/Items/Traps/");
- if (Settings.Default.UMChallenges)
- searchResults.Add("Athena/Items/ChallengeBundles/");
-
- if (Settings.Default.UMTCosmeticsVariants)
- {
- searchResults.Add("UI/Foundation/Textures/Icons/Backpacks/");
- searchResults.Add("UI/Foundation/Textures/Icons/Emotes/");
- searchResults.Add("UI/Foundation/Textures/Icons/Heroes/Athena/Soldier/");
- searchResults.Add("UI/Foundation/Textures/Icons/Heroes/Variants/");
- searchResults.Add("UI/Foundation/Textures/Icons/Skydiving/");
- searchResults.Add("UI/Foundation/Textures/Icons/Pets/");
- searchResults.Add("UI/Foundation/Textures/Icons/Wraps/");
- }
- if (Settings.Default.UMTLoading)
- {
- searchResults.Add("FortniteGame/Content/2dAssets/Loadingscreens/");
- searchResults.Add("UI/Foundation/Textures/LoadingScreens/");
- }
- if (Settings.Default.UMTWeapons)
- searchResults.Add("UI/Foundation/Textures/Icons/Weapons/Items/");
- if (Settings.Default.UMTBanners)
- {
- searchResults.Add("FortniteGame/Content/2dAssets/Banners/");
- searchResults.Add("UI/Foundation/Textures/Banner/");
- searchResults.Add("FortniteGame/Content/2dAssets/Sprays/");
- searchResults.Add("FortniteGame/Content/2dAssets/Emoji/");
- searchResults.Add("FortniteGame/Content/2dAssets/Music/");
- searchResults.Add("FortniteGame/Content/2dAssets/Toys/");
- }
- if (Settings.Default.UMTFeaturedIMGs)
- searchResults.Add("UI/Foundation/Textures/BattleRoyale/");
- if (Settings.Default.UMTAthena)
- searchResults.Add("UI/Foundation/Textures/Icons/Athena/");
- if (Settings.Default.UMTAthena)
- searchResults.Add("UI/Foundation/Textures/Icons/Athena/");
- if (Settings.Default.UMTDevices)
- searchResults.Add("UI/Foundation/Textures/Icons/Devices/");
- if (Settings.Default.UMTVehicles)
- searchResults.Add("UI/Foundation/Textures/Icons/Vehicles/");
- if (Settings.Default.UMCTGalleries)
- searchResults.Add("Athena/Items/Consumables/PlaysetGrenade/PlaysetGrenadeInstances/");
-
- for (int i = 0; i < theFile.Length; i++)
- {
- bool b = searchResults.Any(s => theFile[i].Contains(s));
- if (b)
- {
- string filename = theFile[i].Substring(theFile[i].LastIndexOf("/", StringComparison.Ordinal) + 1);
- if (filename.Contains(".uasset") || filename.Contains(".uexp") || filename.Contains(".ubulk"))
- {
- if (!diffToExtract.ContainsKey(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal))))
- diffToExtract.Add(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal)), theFile[i]);
- }
- }
- }
- }
//EVENTS
private async void loadOneToolStripMenuItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
@@ -700,14 +623,14 @@ namespace FModel
//UPDATE MODE
private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
{
- StopWatch = new Stopwatch();
- StopWatch.Start();
+ _stopWatch = new Stopwatch();
+ _stopWatch.Start();
Utilities.CreateDefaultFolders();
RegisterInArray(e, true);
}
private void backgroundWorker2_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
- StopWatch.Stop();
+ _stopWatch.Stop();
if (e.Cancelled)
{
new UpdateMyState("Canceled!", "Error").ChangeProcessState();
@@ -722,12 +645,12 @@ namespace FModel
}
else
{
- TimeSpan ts = StopWatch.Elapsed;
+ TimeSpan ts = _stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10);
new UpdateMyState("Time elapsed: " + elapsedTime, "Success").ChangeProcessState();
}
- SelectedItemsArray = null;
+ _selectedItemsArray = null;
Checking.UmWorking = false;
Invoke(new Action(() =>
{
@@ -861,7 +784,7 @@ namespace FModel
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
- if (listBox1.SelectedItem != null && SelectedItemsArray == null)
+ if (listBox1.SelectedItem != null && _selectedItemsArray == null)
{
ExtractButton.Enabled = true;
}
@@ -888,10 +811,10 @@ namespace FModel
{
Invoke(new Action(() =>
{
- SelectedItemsArray = new string[_diffToExtract.Count];
- for (int i = 0; i < _diffToExtract.Count; i++) //ADD DICT ITEM TO ARRAY
+ _selectedItemsArray = new string[RegisterSettings.updateModeDictionary.Count];
+ for (int i = 0; i < RegisterSettings.updateModeDictionary.Count; i++) //ADD DICT ITEM TO ARRAY
{
- SelectedItemsArray[i] = _diffToExtract.Keys.ElementAt(i);
+ _selectedItemsArray[i] = RegisterSettings.updateModeDictionary.Keys.ElementAt(i);
}
}));
}
@@ -899,10 +822,10 @@ namespace FModel
{
Invoke(new Action(() =>
{
- SelectedItemsArray = new string[listBox1.SelectedItems.Count];
+ _selectedItemsArray = new string[listBox1.SelectedItems.Count];
for (int i = 0; i < listBox1.SelectedItems.Count; i++) //ADD SELECTED ITEM TO ARRAY
{
- SelectedItemsArray[i] = listBox1.SelectedItems[i].ToString();
+ _selectedItemsArray[i] = listBox1.SelectedItems[i].ToString();
}
}));
}
@@ -911,7 +834,7 @@ namespace FModel
}
private void ExtractAndSerializeItems(DoWorkEventArgs e)
{
- for (int i = 0; i < SelectedItemsArray.Length; i++)
+ for (int i = 0; i < _selectedItemsArray.Length; i++)
{
if (backgroundWorker1.CancellationPending && backgroundWorker1.IsBusy)
{
@@ -924,7 +847,7 @@ namespace FModel
return;
}
- ThePak.CurrentUsedItem = SelectedItemsArray[i];
+ ThePak.CurrentUsedItem = _selectedItemsArray[i];
Checking.ExtractedFilePath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary[ThePak.CurrentUsedItem], ThePak.CurrentUsedItem);
@@ -976,99 +899,89 @@ namespace FModel
}
else { throw new ArgumentException("Can't serialize this file"); }
}
- private void NavigateThroughJson(PakAsset theAsset, string questJson = null)
+ private void NavigateThroughJson(PakAsset theAsset, string theAssetExtractedPath = null)
{
try
{
- string parsedJson = string.Empty;
-
- try
- {
- parsedJson = JToken.Parse(theAsset.GetSerialized()).ToString();
- }
- catch (JsonReaderException)
- {
- return;
- }
-
- ItemsIdParser[] itemId = ItemsIdParser.FromJson(parsedJson);
+ dynamic AssetData = JsonConvert.DeserializeObject(theAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
new UpdateMyState("Parsing " + ThePak.CurrentUsedItem + "...", "Waiting").ChangeProcessState();
- for (int i = 0; i < itemId.Length; i++)
+ JToken exportToken = AssetArray[0]["export_type"];
+ switch (exportToken != null ? exportToken.Value() : "")
{
- switch (itemId[i].ExportType)
- {
- case "AthenaBackpackItemDefinition":
- case "AthenaBattleBusItemDefinition":
- case "AthenaCharacterItemDefinition":
- case "AthenaConsumableEmoteItemDefinition":
- case "AthenaSkyDiveContrailItemDefinition":
- case "AthenaDanceItemDefinition":
- case "AthenaEmojiItemDefinition":
- case "AthenaGliderItemDefinition":
- case "AthenaItemWrapDefinition":
- case "AthenaLoadingScreenItemDefinition":
- case "AthenaMusicPackItemDefinition":
- case "AthenaPetCarrierItemDefinition":
- case "AthenaPickaxeItemDefinition":
- case "AthenaSprayItemDefinition":
- case "AthenaToyItemDefinition":
- case "AthenaVictoryPoseItemDefinition":
- case "FortBannerTokenType":
- case "AthenaGadgetItemDefinition":
- CreateItemIcon(itemId[i], "athIteDef");
- break;
- case "FortWeaponRangedItemDefinition":
- case "FortWeaponMeleeItemDefinition":
- case "FortIngredientItemDefinition":
- CreateItemIcon(itemId[i], "consAndWeap");
- break;
- case "FortVariantTokenType":
- CreateItemIcon(itemId[i], "variant");
- break;
- case "FortAmmoItemDefinition":
- CreateItemIcon(itemId[i], "ammo");
- break;
- case "FortHeroType":
- CreateItemIcon(itemId[i], "stwHeroes");
- break;
- case "FortDefenderItemDefinition":
- CreateItemIcon(itemId[i], "stwDefenders");
- break;
- case "FortContextTrapItemDefinition":
- case "FortTrapItemDefinition":
- case "FortCardPackItemDefinition":
- case "FortPlaysetGrenadeItemDefinition":
- case "FortConsumableAccountItemDefinition":
- case "FortBadgeItemDefinition":
- case "FortCurrencyItemDefinition":
- case "FortConversionControlItemDefinition":
- case "FortHomebaseNodeItemDefinition":
- case "FortPersonalVehicleItemDefinition":
- case "FortCampaignHeroLoadoutItemDefinition":
- case "FortNeverPersistItemDefinition":
- case "FortPersistentResourceItemDefinition":
- case "FortResourceItemDefinition":
- case "FortGadgetItemDefinition":
- case "FortStatItemDefinition":
- case "FortTokenType":
- case "FortDailyRewardScheduleTokenDefinition":
- case "FortWorkerType":
- case "FortConditionalResourceItemDefinition":
- case "FortAwardItemDefinition":
- case "FortChallengeBundleScheduleDefinition":
- CreateItemIcon(itemId[i]);
- break;
- case "FortChallengeBundleItemDefinition":
- CreateBundleChallengesIcon(itemId[i], parsedJson, questJson);
- break;
- case "Texture2D":
- ConvertTexture2D();
- break;
- case "SoundWave":
- ConvertSoundWave();
- break;
- }
+ case "AthenaBackpackItemDefinition":
+ case "AthenaBattleBusItemDefinition":
+ case "AthenaCharacterItemDefinition":
+ case "AthenaConsumableEmoteItemDefinition":
+ case "AthenaSkyDiveContrailItemDefinition":
+ case "AthenaDanceItemDefinition":
+ case "AthenaEmojiItemDefinition":
+ case "AthenaGliderItemDefinition":
+ case "AthenaItemWrapDefinition":
+ case "AthenaLoadingScreenItemDefinition":
+ case "AthenaMusicPackItemDefinition":
+ case "AthenaPetCarrierItemDefinition":
+ case "AthenaPickaxeItemDefinition":
+ case "AthenaSprayItemDefinition":
+ case "AthenaToyItemDefinition":
+ case "AthenaVictoryPoseItemDefinition":
+ case "FortBannerTokenType":
+ case "AthenaGadgetItemDefinition":
+ CreateItemIcon(AssetArray[0], "athIteDef");
+ break;
+ case "FortWeaponRangedItemDefinition":
+ case "FortWeaponMeleeItemDefinition":
+ case "FortIngredientItemDefinition":
+ CreateItemIcon(AssetArray[0], "consAndWeap");
+ break;
+ case "FortVariantTokenType":
+ CreateItemIcon(AssetArray[0], "variant");
+ break;
+ case "FortAmmoItemDefinition":
+ CreateItemIcon(AssetArray[0], "ammo");
+ break;
+ case "FortHeroType":
+ CreateItemIcon(AssetArray[0], "stwHeroes");
+ break;
+ case "FortDefenderItemDefinition":
+ CreateItemIcon(AssetArray[0], "stwDefenders");
+ break;
+ case "FortContextTrapItemDefinition":
+ case "FortTrapItemDefinition":
+ case "FortCardPackItemDefinition":
+ case "FortPlaysetGrenadeItemDefinition":
+ case "FortConsumableAccountItemDefinition":
+ case "FortBadgeItemDefinition":
+ case "FortCurrencyItemDefinition":
+ case "FortConversionControlItemDefinition":
+ case "FortHomebaseNodeItemDefinition":
+ case "FortPersonalVehicleItemDefinition":
+ case "FortCampaignHeroLoadoutItemDefinition":
+ case "FortNeverPersistItemDefinition":
+ case "FortPersistentResourceItemDefinition":
+ case "FortResourceItemDefinition":
+ case "FortGadgetItemDefinition":
+ case "FortStatItemDefinition":
+ case "FortTokenType":
+ case "FortDailyRewardScheduleTokenDefinition":
+ case "FortWorkerType":
+ case "FortConditionalResourceItemDefinition":
+ case "FortAwardItemDefinition":
+ case "FortChallengeBundleScheduleDefinition":
+ CreateItemIcon(AssetArray[0]);
+ break;
+ case "FortChallengeBundleItemDefinition":
+ CreateBundleChallengesIcon(AssetArray[0], theAssetExtractedPath);
+ break;
+ case "Texture2D":
+ ConvertTexture2D();
+ break;
+ case "SoundWave":
+ ConvertSoundWave();
+ break;
+ default:
+ break;
}
}
catch (Exception ex)
@@ -1076,7 +989,7 @@ namespace FModel
throw new ArgumentException(ex.Message);
}
}
- private void CreateItemIcon(ItemsIdParser theItem, string specialMode = null)
+ private void CreateItemIcon(JToken theItem, string specialMode = null)
{
new UpdateMyState(ThePak.CurrentUsedItem + " is an Item Definition", "Success").ChangeProcessState();
@@ -1144,10 +1057,9 @@ namespace FModel
/// to parse from this instead of calling MyAsset.GetSerialized() again
/// needed for the LastFolder
/// the bundle image ready to be displayed in pictureBox1
- private void CreateBundleChallengesIcon(ItemsIdParser theItem, string theParsedJson, string extractedBundlePath)
+ private void CreateBundleChallengesIcon(JToken theItem, string extractedBundlePath)
{
- ChallengeBundleIdParser bundleParser = ChallengeBundleIdParser.FromJson(theParsedJson).FirstOrDefault();
- BundleInfos.getBundleData(bundleParser);
+ BundleInfos.getBundleData(theItem);
bool isFortbyte = false;
Bitmap bmp = new Bitmap(2500, 15000);
@@ -1158,7 +1070,7 @@ namespace FModel
BundleDesign.toDrawOn.SmoothingMode = SmoothingMode.HighQuality;
BundleDesign.myItem = theItem;
- BundleDesign.drawBackground(bmp, bundleParser);
+ BundleDesign.drawBackground(bmp, theItem);
if (BundleInfos.BundleData[0].rewardItemId != null && string.Equals(BundleInfos.BundleData[0].rewardItemId, "AthenaFortbyte", StringComparison.CurrentCultureIgnoreCase))
isFortbyte = true;
@@ -1204,7 +1116,7 @@ namespace FModel
}
new UpdateMyConsole("", Color.Black, true).AppendToConsole();
- BundleDesign.drawCompletionReward(bundleParser);
+ BundleDesign.drawCompletionReward(theItem);
BundleDesign.drawWatermark(bmp);
//cut if too long and return the bitmap
@@ -1217,7 +1129,6 @@ namespace FModel
pictureBox1.Image = newImg;
}
- new UpdateMyState(theItem.DisplayName.SourceString, "Success").ChangeProcessState();
if (autoSaveImagesToolStripMenuItem.Checked || Checking.UmWorking)
{
Invoke(new Action(() =>
@@ -1319,14 +1230,14 @@ namespace FModel
//EVENTS
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
- StopWatch = new Stopwatch();
- StopWatch.Start();
+ _stopWatch = new Stopwatch();
+ _stopWatch.Start();
Utilities.CreateDefaultFolders();
RegisterInArray(e);
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
- StopWatch.Stop();
+ _stopWatch.Stop();
if (e.Cancelled)
{
new UpdateMyState("Canceled!", "Error").ChangeProcessState();
@@ -1337,12 +1248,12 @@ namespace FModel
}
else
{
- TimeSpan ts = StopWatch.Elapsed;
+ TimeSpan ts = _stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10);
new UpdateMyState("Time elapsed: " + elapsedTime, "Success").ChangeProcessState();
}
- SelectedItemsArray = null;
+ _selectedItemsArray = null;
Invoke(new Action(() =>
{
StopButton.Enabled = false;
@@ -1357,7 +1268,7 @@ namespace FModel
}
private void ListBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
- if (listBox1.SelectedItem != null && SelectedItemsArray == null)
+ if (listBox1.SelectedItem != null && _selectedItemsArray == null)
{
ExtractProcess();
}
@@ -1682,7 +1593,7 @@ namespace FModel
private void ExtractFolderContentsToolStripMenuItem_Click(object sender, EventArgs e)
{
- _diffToExtract = new Dictionary();
+ RegisterSettings.updateModeDictionary = new Dictionary();
for (int i = 0; i < PakHelper.PakAsTxt.Length; i++)
{
@@ -1691,8 +1602,8 @@ namespace FModel
string filename = Path.GetFileName(PakHelper.PakAsTxt[i]);
if (filename.Contains(".uasset") || filename.Contains(".uexp") || filename.Contains(".ubulk"))
{
- if (!_diffToExtract.ContainsKey(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal))))
- _diffToExtract.Add(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal)), PakHelper.PakAsTxt[i]);
+ if (!RegisterSettings.updateModeDictionary.ContainsKey(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal))))
+ RegisterSettings.updateModeDictionary.Add(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal)), PakHelper.PakAsTxt[i]);
}
}
}
diff --git a/FModel/Methods/IconGenerator/ChallengeGenerator/BundleDesign.cs b/FModel/Methods/IconGenerator/ChallengeGenerator/BundleDesign.cs
index 6f3fabc3..593f9f99 100644
--- a/FModel/Methods/IconGenerator/ChallengeGenerator/BundleDesign.cs
+++ b/FModel/Methods/IconGenerator/ChallengeGenerator/BundleDesign.cs
@@ -1,11 +1,10 @@
-using FModel.Parser.Challenges;
-using FModel.Parser.Items;
using FModel.Properties;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Windows.Forms;
using System;
+using Newtonsoft.Json.Linq;
namespace FModel
{
@@ -14,7 +13,7 @@ namespace FModel
public static string BundlePath { get; set; }
public static int theY { get; set; }
public static Graphics toDrawOn { get; set; }
- public static ItemsIdParser myItem { get; set; }
+ public static JToken myItem { get; set; }
///
/// get a random color in case DisplayStyle doesn't exist in drawBackground()
@@ -36,10 +35,12 @@ namespace FModel
///
///
///
- public static void drawBackground(Bitmap myBitmap, ChallengeBundleIdParser myBundle)
+ public static void drawBackground(Bitmap myBitmap, JToken myBundle)
{
new UpdateMyState("Drawing...", "Waiting").ChangeProcessState();
- if (myBundle.DisplayStyle != null)
+
+ JToken displayStyle = myBundle["DisplayStyle"];
+ if (displayStyle != null)
{
//main header
toDrawOn.FillRectangle(new SolidBrush(BundleInfos.getSecondaryColor(myBundle)), new Rectangle(0, 0, myBitmap.Width, 281));
@@ -72,25 +73,35 @@ namespace FModel
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70));
//image
- if (myBundle.DisplayStyle.DisplayImage != null)
+ JToken displayImage = displayStyle["DisplayImage"];
+ JToken largePreviewImage = myBundle["LargePreviewImage"];
+ if (displayImage != null)
{
- string textureFile = Path.GetFileName(myBundle.DisplayStyle.DisplayImage.AssetPathName).Substring(0, Path.GetFileName(myBundle.DisplayStyle.DisplayImage.AssetPathName).LastIndexOf('.'));
- Image challengeIcon;
- using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
+ JToken assetPathName = displayImage["asset_path_name"];
+ if (assetPathName != null)
{
- challengeIcon = new Bitmap(bmpTemp);
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
+ Image challengeIcon;
+ using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
+ {
+ challengeIcon = new Bitmap(bmpTemp);
+ }
+ toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
}
- toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
}
- else if (myBundle.LargePreviewImage != null)
+ else if (largePreviewImage != null)
{
- string textureFile = Path.GetFileName(myBundle.LargePreviewImage.AssetPathName).Substring(0, Path.GetFileName(myBundle.LargePreviewImage.AssetPathName).LastIndexOf('.'));
- Image challengeIcon;
- using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
+ JToken assetPathName = largePreviewImage["asset_path_name"];
+ if (assetPathName != null)
{
- challengeIcon = new Bitmap(bmpTemp);
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
+ Image challengeIcon;
+ using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
+ {
+ challengeIcon = new Bitmap(bmpTemp);
+ }
+ toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
}
- toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
}
else
{
@@ -139,45 +150,67 @@ namespace FModel
/// ignoring these 2 should give us an item id, we draw this item
///
///
- public static void drawCompletionReward(ChallengeBundleIdParser myBundle)
+ public static void drawCompletionReward(JToken myBundle)
{
- if (myBundle.BundleCompletionRewards != null)
+ JToken bundleCompletionRewards = myBundle["BundleCompletionRewards"];
+ if (bundleCompletionRewards != null)
{
theY += 100;
- for (int x = 0; x < myBundle.BundleCompletionRewards.Length; x++)
+ JArray bundleCompletionRewardsArray = bundleCompletionRewards.Value();
+ foreach (JToken token in bundleCompletionRewardsArray)
{
- for (int i = 0; i < myBundle.BundleCompletionRewards[x].Rewards.Length; i++)
+ string compCount = string.Empty;
+ JToken completionCount = token["CompletionCount"];
+ if (completionCount != null)
{
- string compCount = myBundle.BundleCompletionRewards[x].CompletionCount.ToString();
- string itemQuantity = myBundle.BundleCompletionRewards[x].Rewards[i].Quantity.ToString();
+ compCount = completionCount.Value();
+ }
- if (myBundle.BundleCompletionRewards[x].Rewards[i].ItemDefinition.AssetPathName == "None")
+ JToken rewards = token["Rewards"];
+ if (rewards != null)
+ {
+ JArray rewardsArray = rewards.Value();
+ for (int i = 0; i < rewardsArray.Count; i++)
{
- theY += 140;
-
- DrawingRewards.getRewards(myBundle.BundleCompletionRewards[x].Rewards[i].TemplateId, itemQuantity);
-
- drawCompletionText(compCount);
- }
- else
- {
- string rewardId = Path.GetFileName(myBundle.BundleCompletionRewards[x].Rewards[i].ItemDefinition.AssetPathName.Substring(0, myBundle.BundleCompletionRewards[x].Rewards[i].ItemDefinition.AssetPathName.LastIndexOf(".", StringComparison.Ordinal)));
-
- if (rewardId != "AthenaBattlePass_WeeklyChallenge_Token" && rewardId != "AthenaBattlePass_WeeklyBundle_Token")
+ string itemQuantity = string.Empty;
+ JToken quantity = rewardsArray[i]["Quantity"];
+ if (quantity != null)
{
- theY += 140;
+ itemQuantity = quantity.Value();
+ }
- try //needed for rare cases where the icon is in /Content/icon.uasset and atm idk why but i can't extract
+ JToken itemDefinition = rewardsArray[i]["ItemDefinition"];
+ if (itemDefinition != null)
+ {
+ JToken assetPathName = itemDefinition["asset_path_name"];
+ if (assetPathName != null)
{
- if (rewardId.Contains("Fortbyte_WeeklyChallengesComplete_")) { drawForbyteReward(); }
- else { DrawingRewards.getRewards(rewardId, itemQuantity); }
- }
- catch (Exception)
- {
- drawUnknownReward();
- }
+ if (assetPathName.Value().Equals("None"))
+ {
+ theY += 140;
+ DrawingRewards.getRewards(rewardsArray[i]["TemplateId"].Value(), itemQuantity);
+ drawCompletionText(compCount);
+ }
+ else
+ {
+ string rewardId = Path.GetFileName(assetPathName.Value().Substring(0, assetPathName.Value().LastIndexOf(".", StringComparison.Ordinal)));
- drawCompletionText(compCount);
+ if (!rewardId.Equals("AthenaBattlePass_WeeklyChallenge_Token") && !rewardId.Equals("AthenaBattlePass_WeeklyBundle_Token"))
+ {
+ theY += 140;
+ try //needed for rare cases where the icon is in /Content/icon.uasset and atm idk why but i can't extract
+ {
+ if (rewardId.Contains("Fortbyte_WeeklyChallengesComplete_")) { drawForbyteReward(); }
+ else { DrawingRewards.getRewards(rewardId, itemQuantity); }
+ }
+ catch (Exception)
+ {
+ drawUnknownReward();
+ }
+ drawCompletionText(compCount);
+ }
+ }
+ }
}
}
}
@@ -245,7 +278,7 @@ namespace FModel
if (text.Contains("{Bundle_Name}"))
{
- text = text.Replace("{Bundle_Name}", SearchResource.getTextByKey(myItem.DisplayName.Key, myItem.DisplayName.SourceString));
+ text = text.Replace("{Bundle_Name}", SearchResource.getTextByKey(myItem["DisplayName"]["key"].Value(), myItem["DisplayName"]["source_string"].Value()));
}
if (text.Contains("{Date}"))
{
diff --git a/FModel/Methods/IconGenerator/ChallengeGenerator/BundleInfos.cs b/FModel/Methods/IconGenerator/ChallengeGenerator/BundleInfos.cs
index cd4d3b1f..6d3dd2e3 100644
--- a/FModel/Methods/IconGenerator/ChallengeGenerator/BundleInfos.cs
+++ b/FModel/Methods/IconGenerator/ChallengeGenerator/BundleInfos.cs
@@ -1,7 +1,4 @@
using csharp_wick;
-using FModel.Parser.Challenges;
-using FModel.Parser.Items;
-using FModel.Parser.Quests;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -15,26 +12,74 @@ namespace FModel
static class BundleInfos
{
public static List BundleData { get; set; }
- public static Color getSecondaryColor(ChallengeBundleIdParser myBundle)
+ public static Color getSecondaryColor(JToken myBundle)
{
- int Red = (int)(myBundle.DisplayStyle.SecondaryColor.R * 255);
- int Green = (int)(myBundle.DisplayStyle.SecondaryColor.G * 255);
- int Blue = (int)(myBundle.DisplayStyle.SecondaryColor.B * 255);
+ int Red = 0;
+ int Green = 0;
+ int Blue = 0;
+
+ JToken displayStyle = myBundle["DisplayStyle"];
+ if (displayStyle != null)
+ {
+ JToken secondaryColor = displayStyle["SecondaryColor"];
+ if (secondaryColor != null)
+ {
+ JToken r = secondaryColor["r"];
+ JToken g = secondaryColor["g"];
+ JToken b = secondaryColor["b"];
+ if (r != null && g != null && b != null)
+ {
+ Red = (int)(r.Value() * 255);
+ Green = (int)(g.Value() * 255);
+ Blue = (int)(b.Value() * 255);
+ }
+ }
+ }
if (Red + Green + Blue <= 75 || getLastFolder(BundleDesign.BundlePath) == "LTM") { return getAccentColor(myBundle); }
else { return Color.FromArgb(255, Red, Green, Blue); }
}
- public static Color getAccentColor(ChallengeBundleIdParser myBundle)
+ public static Color getAccentColor(JToken myBundle)
{
- int Red = (int)(myBundle.DisplayStyle.AccentColor.R * 255);
- int Green = (int)(myBundle.DisplayStyle.AccentColor.G * 255);
- int Blue = (int)(myBundle.DisplayStyle.AccentColor.B * 255);
+ int Red = 0;
+ int Green = 0;
+ int Blue = 0;
+
+ JToken displayStyle = myBundle["DisplayStyle"];
+ if (displayStyle != null)
+ {
+ JToken accentColor = displayStyle["AccentColor"];
+ if (accentColor != null)
+ {
+ JToken r = accentColor["r"];
+ JToken g = accentColor["g"];
+ JToken b = accentColor["b"];
+ if (r != null && g != null && b != null)
+ {
+ Red = (int)(r.Value() * 255);
+ Green = (int)(g.Value() * 255);
+ Blue = (int)(b.Value() * 255);
+ }
+ }
+ }
return Color.FromArgb(255, Red, Green, Blue);
}
- public static string getBundleDisplayName(ItemsIdParser theItem)
+ public static string getBundleDisplayName(JToken theItem)
{
- string text = SearchResource.getTextByKey(theItem.DisplayName.Key, theItem.DisplayName.SourceString);
+ string text = string.Empty;
+
+ JToken displayName = theItem["DisplayName"];
+ if (displayName != null)
+ {
+ JToken key = displayName["key"];
+ JToken sourceString = displayName["source_string"];
+ if (key != null && sourceString != null)
+ {
+ text = SearchResource.getTextByKey(key.Value(), sourceString.Value());
+ }
+ }
+
return text.ToUpper();
}
public static string getLastFolder(string pathToExtractedBundle)
@@ -48,14 +93,27 @@ namespace FModel
/// foreach questfile to getQuestData()
///
///
- public static void getBundleData(ChallengeBundleIdParser myBundle)
+ public static void getBundleData(JToken myBundle)
{
BundleData = new List();
- for (int i = 0; i < myBundle.QuestInfos.Length; i++)
+ JToken questInfos = myBundle["QuestInfos"];
+ if (questInfos != null)
{
- string questName = Path.GetFileName(myBundle.QuestInfos[i].QuestDefinition.AssetPathName).Substring(0, Path.GetFileName(myBundle.QuestInfos[i].QuestDefinition.AssetPathName).LastIndexOf(".", StringComparison.Ordinal));
- getQuestData(questName);
+ JArray questInfosArray = questInfos.Value();
+ foreach (JToken token in questInfosArray)
+ {
+ JToken questDefinition = token["QuestDefinition"];
+ if (questDefinition != null)
+ {
+ JToken assetPathName = questDefinition["asset_path_name"];
+ if (assetPathName != null)
+ {
+ string questName = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf(".", StringComparison.Ordinal));
+ getQuestData(questName);
+ }
+ }
+ }
}
}
@@ -80,83 +138,121 @@ namespace FModel
{
new UpdateMyState("Parsing " + questFile + "...", "Waiting").ChangeProcessState();
- QuestParser[] questParser = QuestParser.FromJson(JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString());
- for (int x = 0; x < questParser.Length; x++)
- {
- string oldQuest = string.Empty;
- long oldCount = 0;
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
- //fortbyte check
- bool isFortbyte = false;
- Parser.Quests.Reward assetTypeToken = null;
- if (questParser[x].Rewards != null) //this caused a null exception for some challenges (most of them in the Styles folder)
+ //fortbyte check
+ JToken rewards = AssetArray[0]["Rewards"];
+ JToken assetTypeToken = null;
+ bool isFortbyte = false;
+ if (rewards != null)
+ {
+ JArray rewardsArray = rewards.Value();
+ assetTypeToken = rewardsArray.Where(item => item["ItemPrimaryAssetId"]["PrimaryAssetType"]["Name"].Value().Equals("Token")).FirstOrDefault();
+ if (assetTypeToken != null)
{
- assetTypeToken = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name == "Token").FirstOrDefault();
- if (assetTypeToken != null)
+ isFortbyte = rewardsArray.Any(item => item["ItemPrimaryAssetId"]["PrimaryAssetName"].Value().Equals("AthenaFortbyte"));
+ }
+ }
+
+ JToken objectives = AssetArray[0]["Objectives"];
+ if (objectives != null)
+ {
+ long questCount = 0;
+ string descriptionKey = string.Empty;
+ string descriptionSource = string.Empty;
+
+ JArray objectivesArray = objectives.Value();
+ foreach (JToken token in objectivesArray)
+ {
+ //quest count
+ JToken count = token["Count"];
+ if (count != null)
{
- isFortbyte = assetTypeToken.ItemPrimaryAssetId.PrimaryAssetName == "AthenaFortbyte";
+ questCount = count.Value();
+ JToken objectiveCompletionCount = AssetArray[0]["ObjectiveCompletionCount"];
+ if (objectiveCompletionCount != null && objectiveCompletionCount.Value() > 0)
+ {
+ questCount = objectiveCompletionCount.Value();
+ }
+ }
+
+ //quest description
+ JToken description = token["Description"];
+ if (description != null)
+ {
+ descriptionKey = description["key"].Value();
+ descriptionSource = description["source_string"].Value();
+ }
+ JToken descriptionMain = AssetArray[0]["Description"];
+ if (descriptionMain != null)
+ {
+ descriptionKey = descriptionMain["key"].Value();
+ descriptionSource = descriptionMain["source_string"].Value();
}
}
- for (int p = 0; p < questParser[x].Objectives.Length; p++)
+ string questDescription = SearchResource.getTextByKey(descriptionKey, descriptionSource);
+ if (string.IsNullOrEmpty(questDescription)) { questDescription = " "; }
+
+ if (rewards != null && !isFortbyte)
{
- long newCount = questParser[x].Objectives[p].Count;
- if (questParser[x].ObjectiveCompletionCount > 0)
- newCount = questParser[x].ObjectiveCompletionCount;
-
- // In the game "Description" has priority over "Objectives.Description"
- string descriptionKey = questParser[x].Objectives[p].Description.Key;
- string descriptionSource = questParser[x].Objectives[p].Description.SourceString;
- if (questParser[x].Description != null)
+ //quest rewards
+ JArray rewardsArray = rewards.Value();
+ try
{
- descriptionKey = questParser[x].Description.Key;
- descriptionSource = questParser[x].Description.SourceString;
+ string rewardId = rewardsArray.Where(item => !item["ItemPrimaryAssetId"]["PrimaryAssetType"]["Name"].Value().Equals("Quest") && !item["ItemPrimaryAssetId"]["PrimaryAssetType"]["Name"].Value().Equals("Token")).FirstOrDefault()["ItemPrimaryAssetId"]["PrimaryAssetName"].Value();
+ string rewardQuantity = rewardsArray.Where(item => !item["ItemPrimaryAssetId"]["PrimaryAssetType"]["Name"].Value().Equals("Quest") && !item["ItemPrimaryAssetId"]["PrimaryAssetType"]["Name"].Value().Equals("Token")).FirstOrDefault()["Quantity"].Value();
+
+ BundleInfoEntry currentData = new BundleInfoEntry(questDescription, questCount, rewardId, rewardQuantity);
+ bool isAlreadyAdded = BundleData.Any(item => item.questDescr.Equals(currentData.questDescr, StringComparison.InvariantCultureIgnoreCase) && item.questCount == currentData.questCount);
+ if (!isAlreadyAdded) { BundleData.Add(currentData); }
}
-
- string newQuest = SearchResource.getTextByKey(descriptionKey, descriptionSource);
- if (string.IsNullOrEmpty(newQuest)) { newQuest = " "; }
- if (newQuest != oldQuest && newCount != oldCount)
+ catch (NullReferenceException)
{
- if (questParser[x].Rewards != null && !isFortbyte)
+ JToken hiddenRewards = AssetArray[0]["HiddenRewards"];
+ if (hiddenRewards != null)
{
- try
- {
- string rewardId = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name != "Quest").Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name != "Token").FirstOrDefault().ItemPrimaryAssetId.PrimaryAssetName;
- string rewardQuantity = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name != "Quest").Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name != "Token").FirstOrDefault().Quantity.ToString();
+ string rewardId = hiddenRewards[0]["TemplateId"].Value();
+ string rewardQuantity = hiddenRewards[0]["Quantity"].Value();
- BundleData.Add(new BundleInfoEntry(newQuest, newCount, rewardId, rewardQuantity));
- }
- catch (NullReferenceException)
- {
- if (questParser[x].HiddenRewards != null)
- {
- string rewardId = questParser[x].HiddenRewards.FirstOrDefault().TemplateId;
- string rewardQuantity = questParser[x].HiddenRewards.FirstOrDefault().Quantity.ToString();
-
- BundleData.Add(new BundleInfoEntry(newQuest, newCount, rewardId, rewardQuantity));
- }
- }
-
- //get stage
- for (int k = 0; k < questParser[x].Rewards.Length; k++)
- {
- string qAssetType = questParser[x].Rewards[k].ItemPrimaryAssetId.PrimaryAssetType.Name;
- string qAssetName = questParser[x].Rewards[k].ItemPrimaryAssetId.PrimaryAssetName;
-
- if (qAssetType == "Quest")
- {
- getQuestData(qAssetName);
- }
- }
+ BundleInfoEntry currentData = new BundleInfoEntry(questDescription, questCount, rewardId, rewardQuantity);
+ bool isAlreadyAdded = BundleData.Any(item => item.questDescr.Equals(currentData.questDescr, StringComparison.InvariantCultureIgnoreCase) && item.questCount == currentData.questCount);
+ if (!isAlreadyAdded) { BundleData.Add(currentData); }
}
- else if (isFortbyte && assetTypeToken != null)
- BundleData.Add(new BundleInfoEntry(newQuest, newCount, assetTypeToken.ItemPrimaryAssetId.PrimaryAssetName, questParser[x].Weight > 0 ? questParser[x].Weight.ToString() : "01"));
- else
- BundleData.Add(new BundleInfoEntry(newQuest, newCount, "", ""));
-
- oldQuest = newQuest;
- oldCount = newCount;
}
+
+ //quest stage
+ foreach (JToken token in rewardsArray)
+ {
+ string qAssetType = token["ItemPrimaryAssetId"]["PrimaryAssetType"]["Name"].Value();
+ string qAssetName = token["ItemPrimaryAssetId"]["PrimaryAssetName"].Value();
+
+ if (qAssetType == "Quest")
+ {
+ getQuestData(qAssetName);
+ }
+ }
+ }
+ else if (isFortbyte && assetTypeToken != null)
+ {
+ //thank you Quest_BR_S9_Fortbyte_04
+ JToken weight = AssetArray[0]["Weight"];
+ JToken weightToUse = null;
+ if (weight != null)
+ {
+ weightToUse = weight;
+ }
+
+ BundleInfoEntry currentData = new BundleInfoEntry(questDescription, questCount, assetTypeToken["ItemPrimaryAssetId"]["PrimaryAssetName"].Value(), weightToUse == null ? "01" : weightToUse.Value());
+ bool isAlreadyAdded = BundleData.Any(item => item.questDescr.Equals(currentData.questDescr, StringComparison.InvariantCultureIgnoreCase) && item.questCount == currentData.questCount);
+ if (!isAlreadyAdded) { BundleData.Add(currentData); }
+ }
+ else
+ {
+ BundleInfoEntry currentData = new BundleInfoEntry(questDescription, questCount, "", "");
+ bool isAlreadyAdded = BundleData.Any(item => item.questDescr.Equals(currentData.questDescr, StringComparison.InvariantCultureIgnoreCase) && item.questCount == currentData.questCount);
+ if (!isAlreadyAdded) { BundleData.Add(currentData); }
}
}
}
@@ -170,8 +266,7 @@ namespace FModel
}
catch (KeyNotFoundException)
{
- //do not stop when questFile doesn't exist
- //Console.WriteLine("Can't extract " + questFile);
+ new UpdateMyConsole("[FModel] Can't extract " + questFile, Color.Red, true);
}
}
}
diff --git a/FModel/Methods/IconGenerator/ChallengeGenerator/DrawingRewards.cs b/FModel/Methods/IconGenerator/ChallengeGenerator/DrawingRewards.cs
index 94a7aec5..125183f7 100644
--- a/FModel/Methods/IconGenerator/ChallengeGenerator/DrawingRewards.cs
+++ b/FModel/Methods/IconGenerator/ChallengeGenerator/DrawingRewards.cs
@@ -1,5 +1,4 @@
using csharp_wick;
-using FModel.Parser.Items;
using FModel.Properties;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -66,13 +65,12 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- var itemId = ItemsIdParser.FromJson(JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString());
- for (int i = 0; i < itemId.Length; i++)
- {
- ItemIcon.SearchAthIteDefIcon(itemId[i]);
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
- drawIcon(item);
- }
+ ItemIcon.SearchAthIteDefIcon(AssetArray[0]);
+
+ drawIcon(item);
}
}
catch (JsonSerializationException)
@@ -104,30 +102,34 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString().TrimStart('[').TrimEnd(']');
- JObject jo = JObject.Parse(parsedJson);
- foreach (JToken token in jo.FindTokens(bannerName))
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
+
+ JToken bannerToken = ((JObject)AssetArray[0]).GetValue(bannerName, StringComparison.InvariantCultureIgnoreCase);
+ if (bannerToken != null)
{
- var bannerId = Parser.Banners.BannersParser.FromJson(token.ToString());
-
- if (bannerId.LargeImage != null)
+ JToken largeImage = bannerToken["LargeImage"];
+ JToken smallImage = bannerToken["SmallImage"];
+ if (largeImage != null)
{
- string textureFile = Path.GetFileName(bannerId.LargeImage.AssetPathName)
- ?.Substring(0,
- Path.GetFileName(bannerId.LargeImage.AssetPathName).LastIndexOf('.'));
-
- ItemIcon.ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ JToken assetPathName = largeImage["asset_path_name"];
+ if (assetPathName != null)
+ {
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
+ ItemIcon.ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ drawIcon(bannerName);
+ }
}
- else if (bannerId.SmallImage != null)
+ else if (smallImage != null)
{
- string textureFile = Path.GetFileName(bannerId.SmallImage.AssetPathName)
- ?.Substring(0,
- Path.GetFileName(bannerId.SmallImage.AssetPathName).LastIndexOf('.'));
-
- ItemIcon.ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ JToken assetPathName = smallImage["asset_path_name"];
+ if (assetPathName != null)
+ {
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
+ ItemIcon.ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ drawIcon(bannerName);
+ }
}
-
- drawIcon(bannerName);
}
}
}
diff --git a/FModel/Methods/IconGenerator/ItemGenerator/DrawText.cs b/FModel/Methods/IconGenerator/ItemGenerator/DrawText.cs
index acb28725..68a77995 100644
--- a/FModel/Methods/IconGenerator/ItemGenerator/DrawText.cs
+++ b/FModel/Methods/IconGenerator/ItemGenerator/DrawText.cs
@@ -1,13 +1,10 @@
using csharp_wick;
-using FModel.Parser.Items;
using FModel.Properties;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using System;
using System.Drawing;
using System.Linq;
using System.IO;
-using System.Collections.Generic;
namespace FModel
{
@@ -19,15 +16,17 @@ namespace FModel
private static string CosmeticId { get; set; }
private static string MaxStackSize { get; set; }
private static string ItemAction { get; set; }
+ private static string WeaponDataTable { get; set; }
private static string WeaponRowName { get; set; }
private static string CosmeticUff { get; set; }
private static string HeroType { get; set; }
private static string DefenderType { get; set; }
private static string MinToMax { get; set; }
- private static JObject cSetsjo { get; set; }
- private static JObject weaponStats { get; set; }
+ private static JArray cosmeticsSetsArray { get; set; }
+ private static JArray weaponsStatsArray { get; set; }
+ private static string weaponStatsFilename { get; set; }
- public static void DrawTexts(ItemsIdParser theItem, Graphics myGraphic, string mode)
+ public static void DrawTexts(JToken theItem, Graphics myGraphic, string mode)
{
using (myGraphic)
{
@@ -63,20 +62,21 @@ namespace FModel
break;
}
- if (theItem.ExportType == "AthenaItemWrapDefinition" && Checking.WasFeatured && ItemIcon.ItemIconPath.Contains("WeaponRenders"))
+ JToken exportToken = theItem["export_type"];
+ if (exportToken != null && exportToken.Value().Equals("AthenaItemWrapDefinition") && Checking.WasFeatured && ItemIcon.ItemIconPath.Contains("WeaponRenders"))
{
DrawAdditionalImage(theItem, myGraphic);
}
- if (theItem.AmmoData != null && theItem.AmmoData.AssetPathName.Contains("Ammo")) //TO AVOID TRIGGERING CONSUMABLES, NAME SHOULD CONTAIN "AMMO"
+
+ JToken ammoToken = theItem["AmmoData"];
+ if (ammoToken != null)
{
- ItemIcon.GetAmmoData(theItem.AmmoData.AssetPathName, myGraphic);
- try
+ JToken assetPathName = ammoToken["asset_path_name"];
+ if (assetPathName != null && assetPathName.Value().Contains("Ammo")) //TO AVOID TRIGGERING CONSUMABLES, NAME SHOULD CONTAIN "AMMO"
{
- DrawWeaponStat(WeaponRowName, myGraphic);
- }
- catch (Exception)
- {
- //stw weapons
+ ItemIcon.GetAmmoData(assetPathName.Value(), myGraphic);
+
+ DrawWeaponStat(WeaponDataTable, WeaponRowName, myGraphic);
}
}
@@ -88,7 +88,7 @@ namespace FModel
/// todo: find a better way to handle errors
///
///
- private static void SetTexts(ItemsIdParser theItem)
+ private static void SetTexts(JToken theItem)
{
CosmeticSource = "";
CosmeticSet = "";
@@ -96,14 +96,19 @@ namespace FModel
CosmeticId = "";
MaxStackSize = "";
ItemAction = "";
+ WeaponDataTable = "";
WeaponRowName = "";
CosmeticUff = "";
HeroType = "";
DefenderType = "";
MinToMax = "";
- try
+ JToken shortDescription = theItem["ShortDescription"];
+ if (shortDescription != null)
{
+ JToken key = shortDescription["key"];
+ JToken sourceString = shortDescription["source_string"];
+
switch (Settings.Default.IconLanguage)
{
case "French":
@@ -120,99 +125,107 @@ namespace FModel
case "Turkish":
case "Chinese (S)":
case "Traditional Chinese":
- ShortDescription = theItem.ShortDescription != null ? SearchResource.getTextByKey(theItem.ShortDescription.Key, theItem.ShortDescription.SourceString) : "";
+ if (key != null && sourceString != null)
+ {
+ ShortDescription = SearchResource.getTextByKey(key.Value(), sourceString.Value());
+ }
break;
default:
- ShortDescription = theItem.ShortDescription != null ? theItem.ShortDescription.SourceString : "";
+ if (sourceString != null)
+ {
+ ShortDescription = sourceString.Value();
+ }
break;
}
}
- catch (Exception)
+
+ JToken gameplayTags = theItem["GameplayTags"];
+ if (gameplayTags != null)
{
- //avoid generator to stop when a string isn't found
- }
- try
- {
- CosmeticSet = theItem.GameplayTags.GameplayTagsGameplayTags[Array.FindIndex(theItem.GameplayTags.GameplayTagsGameplayTags, x => x.StartsWith("Cosmetics.Set."))];
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
- }
- try
- {
- CosmeticSource = theItem.GameplayTags.GameplayTagsGameplayTags[Array.FindIndex(theItem.GameplayTags.GameplayTagsGameplayTags, x => x.StartsWith("Cosmetics.Source."))].Substring(17);
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
- }
- try
- {
- CosmeticId = theItem.CosmeticItem;
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
- }
- try
- {
- MaxStackSize = "Max Stack Size: " + theItem.MaxStackSize;
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
- }
- try
- {
- ItemAction = theItem.GameplayTags.GameplayTagsGameplayTags[Array.FindIndex(theItem.GameplayTags.GameplayTagsGameplayTags, x => x.StartsWith("Athena.ItemAction."))].Substring(18);
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
- }
- try
- {
- if (theItem.WeaponStatHandle != null && theItem.WeaponStatHandle.RowName != "Harvest_Pickaxe_Athena_C_T01" && theItem.WeaponStatHandle.RowName != "Edged_Sword_Athena_C_T01")
+ JToken gameplayTagsTwo = gameplayTags["gameplay_tags"];
+ if (gameplayTagsTwo != null)
{
- WeaponRowName = theItem.WeaponStatHandle.RowName;
+ JArray gameplayTagsArray = gameplayTagsTwo.Value();
+
+ JToken cosmeticSet = gameplayTagsArray.Children().FirstOrDefault(x => x.ToString().StartsWith("Cosmetics.Set."));
+ if (cosmeticSet != null)
+ {
+ CosmeticSet = gameplayTagsArray[gameplayTagsArray.IndexOf(cosmeticSet)].Value();
+ }
+
+ JToken cosmeticSource = gameplayTagsArray.Children().FirstOrDefault(x => x.ToString().StartsWith("Cosmetics.Source."));
+ if (cosmeticSource != null)
+ {
+ CosmeticSource = cosmeticSource.Value().Substring(17);
+ }
+
+ JToken athenaItemAction = gameplayTagsArray.Children().FirstOrDefault(x => x.ToString().StartsWith("Athena.ItemAction."));
+ if (athenaItemAction != null)
+ {
+ ItemAction = athenaItemAction.Value().Substring(18);
+ }
+
+ JToken userFacingFlags = gameplayTagsArray.Children().FirstOrDefault(x => x.ToString().StartsWith("Cosmetics.UserFacingFlags."));
+ if (userFacingFlags != null)
+ {
+ CosmeticUff = userFacingFlags.Value();
+ }
+
+ JToken defenderType = gameplayTagsArray.Children().FirstOrDefault(x => x.ToString().StartsWith("NPC.CharacterType.Survivor.Defender."));
+ if (defenderType != null)
+ {
+ DefenderType = defenderType.Value().Substring(36);
+ }
}
}
- catch (Exception)
+
+ JToken cosmeticId = theItem["cosmetic_item"];
+ if (cosmeticId != null)
{
- //avoid generator to stop when a string isn't found
+ CosmeticId = cosmeticId.Value();
}
- try
+
+ JToken maxStackSize = theItem["MaxStackSize"];
+ if (maxStackSize != null)
{
- CosmeticUff = theItem.GameplayTags.GameplayTagsGameplayTags[Array.FindIndex(theItem.GameplayTags.GameplayTagsGameplayTags, x => x.StartsWith("Cosmetics.UserFacingFlags."))];
+ MaxStackSize = "Max Stack Size: " + maxStackSize.Value();
}
- catch (Exception)
+
+ JToken weaponStatHandle = theItem["WeaponStatHandle"];
+ if (weaponStatHandle != null)
{
- //avoid generator to stop when a string isn't found
+ JToken dataTable = weaponStatHandle["DataTable"];
+ if (dataTable != null)
+ {
+ WeaponDataTable = dataTable.Value();
+ }
+
+ JToken rowName = weaponStatHandle["RowName"];
+ if (rowName != null)
+ {
+ WeaponRowName = rowName.Value();
+ }
}
- try
+
+ JToken attributeInitKey = theItem["AttributeInitKey"];
+ if (attributeInitKey != null)
{
- HeroType = theItem.AttributeInitKey != null ? theItem.AttributeInitKey.AttributeInitCategory : "";
+ JToken attributeInitCategory = attributeInitKey["AttributeInitCategory"];
+ if (attributeInitCategory != null)
+ {
+ HeroType = attributeInitCategory.Value();
+ }
}
- catch (Exception)
+
+ JToken minLevel = theItem["MinLevel"];
+ JToken maxLevel = theItem["MaxLevel"];
+ if (maxLevel != null)
{
- //avoid generator to stop when a string isn't found
- }
- try
- {
- DefenderType = theItem.GameplayTags.GameplayTagsGameplayTags[Array.FindIndex(theItem.GameplayTags.GameplayTagsGameplayTags, x => x.StartsWith("NPC.CharacterType.Survivor.Defender."))].Substring(36);
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
- }
- try
- {
- MinToMax = " " + theItem.MinLevel + " to " + theItem.MaxLevel;
- }
- catch (Exception)
- {
- //avoid generator to stop when a string isn't found
+ MinToMax = " 0 to " + maxLevel.Value();
+ if (minLevel != null)
+ {
+ MinToMax = " " + minLevel.Value() + " to " + maxLevel.Value();
+ }
}
}
@@ -222,7 +235,7 @@ namespace FModel
///
///
///
- private static void DrawCosmeticUff(ItemsIdParser theItem, Graphics myGraphic)
+ private static void DrawCosmeticUff(JToken theItem, Graphics myGraphic)
{
Image imageLogo = null;
Point pointCoords = new Point(6, 6);
@@ -231,9 +244,9 @@ namespace FModel
{
if (CosmeticUff.Contains("Animated"))
imageLogo = Resources.Animated64;
- else if (CosmeticUff.Contains("HasUpgradeQuests") && theItem.ExportType != "AthenaPetCarrierItemDefinition")
+ else if (CosmeticUff.Contains("HasUpgradeQuests") && !theItem["export_type"].Value().Equals("AthenaPetCarrierItemDefinition"))
imageLogo = Resources.Quests64;
- else if (CosmeticUff.Contains("HasUpgradeQuests") && theItem.ExportType == "AthenaPetCarrierItemDefinition")
+ else if (CosmeticUff.Contains("HasUpgradeQuests") && theItem["export_type"].Value().Equals("AthenaPetCarrierItemDefinition"))
imageLogo = Resources.Pets64;
else if (CosmeticUff.Contains("HasVariants"))
imageLogo = Resources.Variant64;
@@ -255,28 +268,34 @@ namespace FModel
///
///
///
- private static void DrawDisplayName(ItemsIdParser theItem, Graphics myGraphic)
+ private static void DrawDisplayName(JToken theItem, Graphics myGraphic)
{
- if (theItem.DisplayName != null)
+ JToken displayName = theItem["DisplayName"];
+ if (displayName != null)
{
- //myGraphic.DrawRectangle(new Pen(new SolidBrush(Color.Red)), new Rectangle(5, 405, 512, 55));
+ JToken key = displayName["key"];
+ JToken sourceString = displayName["source_string"];
+ if (key != null && sourceString != null)
+ {
+ //myGraphic.DrawRectangle(new Pen(new SolidBrush(Color.Red)), new Rectangle(5, 405, 512, 55));
- string text = SearchResource.getTextByKey(theItem.DisplayName.Key, theItem.DisplayName.SourceString);
+ string text = SearchResource.getTextByKey(key.Value(), sourceString.Value());
- Font goodFont = FontUtilities.FindFont(
- myGraphic,
- text,
- Settings.Default.rarityNew ? new Rectangle(5, 405, 512, 55).Size : new Rectangle(5, 395, 512, 49).Size,
- new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[0], 35)
- );
+ Font goodFont = FontUtilities.FindFont(
+ myGraphic,
+ text,
+ Settings.Default.rarityNew ? new Rectangle(5, 405, 512, 55).Size : new Rectangle(5, 395, 512, 49).Size,
+ new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[0], 35)
+ );
- myGraphic.DrawString(
- text,
- goodFont,
- new SolidBrush(Color.White),
- Settings.Default.rarityNew ? new Point(522, 405) : new Point(522 / 2, 395),
- Settings.Default.rarityNew ? FontUtilities.rightString : FontUtilities.centeredString
- );
+ myGraphic.DrawString(
+ text,
+ goodFont,
+ new SolidBrush(Color.White),
+ Settings.Default.rarityNew ? new Point(522, 405) : new Point(522 / 2, 395),
+ Settings.Default.rarityNew ? FontUtilities.rightString : FontUtilities.centeredString
+ );
+ }
}
}
@@ -285,35 +304,42 @@ namespace FModel
///
///
///
- private static void DrawDescription(ItemsIdParser theItem, Graphics myGraphic)
+ private static void DrawDescription(JToken theItem, Graphics myGraphic)
{
- if (theItem.Description != null)
+ JToken description = theItem["Description"];
+ if (description != null)
{
- //myGraphic.DrawRectangle(new Pen(new SolidBrush(Color.Pink)), new Rectangle(5, 455, 512, 42));
-
- string text = SearchResource.getTextByKey(theItem.Description.Key, theItem.Description.SourceString);
- if (!string.IsNullOrEmpty(CosmeticSet))
+ JToken key = description["key"];
+ JToken sourceString = description["source_string"];
+ if (key != null && sourceString != null)
{
- string theSet = DrawCosmeticSet(CosmeticSet);
- if (!string.IsNullOrEmpty(theSet))
- {
- text += theSet;
- }
- }
+ //myGraphic.DrawRectangle(new Pen(new SolidBrush(Color.Pink)), new Rectangle(5, 455, 512, 42));
- myGraphic.DrawString(
- text,
- new Font("Arial", Settings.Default.rarityNew ? 9 : 10),
- new SolidBrush(Color.White),
- new RectangleF(5, Settings.Default.rarityNew ? 455 : 441, 512, Settings.Default.rarityNew ? 42 : 49),
- Settings.Default.rarityNew ? FontUtilities.rightString : FontUtilities.centeredStringLine
- );
+ string text = SearchResource.getTextByKey(key.Value(), sourceString.Value());
+
+ if (!string.IsNullOrEmpty(CosmeticSet))
+ {
+ string theSet = DrawCosmeticSet(CosmeticSet);
+ if (!string.IsNullOrEmpty(theSet))
+ {
+ text += theSet;
+ }
+ }
+
+ myGraphic.DrawString(
+ text,
+ new Font("Arial", Settings.Default.rarityNew ? 9 : 10),
+ new SolidBrush(Color.White),
+ new RectangleF(5, Settings.Default.rarityNew ? 455 : 441, 512, Settings.Default.rarityNew ? 42 : 49),
+ Settings.Default.rarityNew ? FontUtilities.rightString : FontUtilities.centeredStringLine
+ );
+ }
}
}
private static string DrawCosmeticSet(string setName)
{
- if (cSetsjo == null)
+ if (cosmeticsSetsArray == null)
{
string extractedCosmeticsSetsPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["CosmeticSets"], "CosmeticSets");
@@ -326,8 +352,8 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString().TrimStart('[').TrimEnd(']');
- cSetsjo = JObject.Parse(parsedJson);
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ cosmeticsSetsArray = JArray.FromObject(AssetData);
return searchSetName(setName);
}
else { return ""; }
@@ -346,37 +372,37 @@ namespace FModel
}
private static string searchSetName(string setName)
{
- string toReturn = string.Empty;
-
- JToken setToken = cSetsjo.FindTokens(setName).FirstOrDefault();
- Parser.CosmeticSetsParser.CosmeticSetsParser cSetsParsed = Parser.CosmeticSetsParser.CosmeticSetsParser.FromJson(setToken.ToString());
-
- switch (Settings.Default.IconLanguage)
+ JToken setToken = cosmeticsSetsArray[0][setName];
+ if (setToken != null)
{
- case "French":
- case "German":
- case "Italian":
- case "Spanish":
- case "Spanish (LA)":
- case "Arabic":
- case "Japanese":
- case "Korean":
- case "Polish":
- case "Portuguese (Brazil)":
- case "Russian":
- case "Turkish":
- case "Chinese (S)":
- case "Traditional Chinese":
- string translatedName = SearchResource.getTextByKey(cSetsParsed.DisplayName.Key, cSetsParsed.DisplayName.SourceString, cSetsParsed.DisplayName.Namespace);
+ string toReturn = string.Empty;
+ switch (Settings.Default.IconLanguage)
+ {
+ case "French":
+ case "German":
+ case "Italian":
+ case "Spanish":
+ case "Spanish (LA)":
+ case "Arabic":
+ case "Japanese":
+ case "Korean":
+ case "Polish":
+ case "Portuguese (Brazil)":
+ case "Russian":
+ case "Turkish":
+ case "Chinese (S)":
+ case "Traditional Chinese":
+ string translatedName = SearchResource.getTextByKey(setToken["DisplayName"]["key"].Value(), setToken["DisplayName"]["source_string"].Value(), setToken["DisplayName"]["namespace"].Value());
- toReturn = string.Format(SearchResource.getTextByKey("CosmeticItemDescription_SetMembership_NotRich", cSetsParsed.DisplayName.SourceString, "Fort.Cosmetics"), translatedName);
- break;
- default:
- toReturn = string.Format("\nPart of the {0} set.", cSetsParsed.DisplayName.SourceString);
- break;
+ toReturn = string.Format(SearchResource.getTextByKey("CosmeticItemDescription_SetMembership_NotRich", setToken["DisplayName"]["source_string"].Value(), "Fort.Cosmetics"), translatedName);
+ break;
+ default:
+ toReturn = string.Format("\nPart of the {0} set.", setToken["DisplayName"]["source_string"].Value());
+ break;
+ }
+ return toReturn;
}
-
- return toReturn;
+ else { return ""; }
}
///
@@ -405,20 +431,27 @@ namespace FModel
///
///
///
- private static void DrawAdditionalImage(ItemsIdParser theItem, Graphics myGraphic)
+ private static void DrawAdditionalImage(JToken theItem, Graphics myGraphic)
{
- string wrapAddImg = theItem.LargePreviewImage.AssetPathName.Substring(theItem.LargePreviewImage.AssetPathName.LastIndexOf(".", StringComparison.Ordinal) + 1);
-
- ItemIcon.ItemIconPath = JohnWick.AssetToTexture2D(wrapAddImg);
-
- if (File.Exists(ItemIcon.ItemIconPath))
+ JToken largePreviewImage = theItem["LargePreviewImage"];
+ if (largePreviewImage != null)
{
- Image itemIcon;
- using (var bmpTemp = new Bitmap(ItemIcon.ItemIconPath))
+ JToken assetPathName = largePreviewImage["asset_path_name"];
+ if (assetPathName != null)
{
- itemIcon = new Bitmap(bmpTemp);
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.') + 1);
+
+ ItemIcon.ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ if (File.Exists(ItemIcon.ItemIconPath))
+ {
+ Image itemIcon;
+ using (var bmpTemp = new Bitmap(ItemIcon.ItemIconPath))
+ {
+ itemIcon = new Bitmap(bmpTemp);
+ }
+ myGraphic.DrawImage(ImageUtilities.ResizeImage(itemIcon, 122, 122), new Point(275, 272));
+ }
}
- myGraphic.DrawImage(ImageUtilities.ResizeImage(itemIcon, 122, 122), new Point(275, 272));
}
}
@@ -428,12 +461,12 @@ namespace FModel
///
///
///
- private static void DrawWeaponStat(string weaponName, Graphics myGraphic)
+ private static void DrawWeaponStat(string filename, string weaponName, Graphics myGraphic)
{
- if (weaponStats == null)
+ if (weaponsStatsArray == null || !weaponStatsFilename.Equals(filename))
{
ItemIcon.ItemIconPath = string.Empty;
- string extractedWeaponsStatPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["AthenaRangedWeapons"], "AthenaRangedWeapons");
+ string extractedWeaponsStatPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary[filename], filename);
if (extractedWeaponsStatPath != null)
{
if (extractedWeaponsStatPath.Contains(".uasset") || extractedWeaponsStatPath.Contains(".uexp") || extractedWeaponsStatPath.Contains(".ubulk"))
@@ -443,7 +476,9 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- weaponStats = JObject.Parse(JohnWick.MyAsset.GetSerialized().ToString().TrimStart('[').TrimEnd(']'));
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ weaponsStatsArray = JArray.FromObject(AssetData);
+ weaponStatsFilename = filename;
loopingLol(weaponName, myGraphic);
}
}
@@ -458,24 +493,36 @@ namespace FModel
}
private static void loopingLol(string weaponName, Graphics myGraphic)
{
- IEnumerable myStats = weaponStats.Value(weaponName).Properties();
+ JToken weaponToken = weaponsStatsArray[0][weaponName];
+ if (weaponToken != null)
+ {
+ JToken dmgPb = weaponToken["DmgPB"];
+ if (dmgPb != null)
+ {
+ Image bulletImage = Resources.dmg64;
+ myGraphic.DrawImage(ImageUtilities.ResizeImage(bulletImage, 15, 15), new Point(5, 502));
+ DrawToLeft(" " + dmgPb.Value(), myGraphic); //damage per bullet
+ }
- string damagePerBullet = myStats.Where(x => x.Name == "DmgPB").Select(x => x.Value).FirstOrDefault().ToString();
- Image bulletImage = Resources.dmg64;
- myGraphic.DrawImage(ImageUtilities.ResizeImage(bulletImage, 15, 15), new Point(5, 502));
- DrawToLeft(" " + damagePerBullet, myGraphic); //damage per bullet
+ JToken clipSize = weaponToken["ClipSize"];
+ if (clipSize != null)
+ {
+ Image clipSizeImage = Resources.clipSize64;
+ myGraphic.DrawImage(ImageUtilities.ResizeImage(clipSizeImage, 15, 15), new Point(52, 502));
+ myGraphic.DrawString(" " + clipSize.Value(), new Font(FontUtilities.pfc.Families[0], 11), new SolidBrush(Color.White), new Point(50, 503));
+ }
+ else { clipSize = ""; }
- string clipSize = myStats.Where(x => x.Name == "ClipSize").Select(x => x.Value).FirstOrDefault().ToString();
- Image clipSizeImage = Resources.clipSize64;
- myGraphic.DrawImage(ImageUtilities.ResizeImage(clipSizeImage, 15, 15), new Point(52, 502));
- myGraphic.DrawString(" " + clipSize, new Font(FontUtilities.pfc.Families[0], 11), new SolidBrush(Color.White), new Point(50, 503));
+ JToken reloadTime = weaponToken["ReloadTime"];
+ if (reloadTime != null)
+ {
+ Image reload = Resources.reload64;
+ myGraphic.DrawImage(ImageUtilities.ResizeImage(reload, 15, 15), new Point(50 + (clipSize.Value().Length * 7) + 47, 502)); //50=clipsize text position | for each clipsize letter we add 7 to x | 47=difference between 2 icons
+ myGraphic.DrawString(reloadTime + " " + SearchResource.getTextByKey("6BA53D764BA5CC13E821D2A807A72365", "seconds"), new Font(FontUtilities.pfc.Families[0], 11), new SolidBrush(Color.White), new Point(64 + (clipSize.Value().Length * 7) + 47, 503)); //64=50+icon size (-1 because that wasn't perfectly at the position i wanted)
+ }
- string reloadTime = myStats.Where(x => x.Name == "ReloadTime").Select(x => x.Value).FirstOrDefault().ToString();
- Image reload = Resources.reload64;
- myGraphic.DrawImage(ImageUtilities.ResizeImage(reload, 15, 15), new Point(50 + (clipSize.Length * 7) + 47, 502)); //50=clipsize text position | for each clipsize letter we add 7 to x | 47=difference between 2 icons
- myGraphic.DrawString(reloadTime + " " + SearchResource.getTextByKey("6BA53D764BA5CC13E821D2A807A72365", "seconds"), new Font(FontUtilities.pfc.Families[0], 11), new SolidBrush(Color.White), new Point(64 + (clipSize.Length * 7) + 47, 503)); //64=50+icon size (-1 because that wasn't perfectly at the position i wanted)
-
- DrawToRight(weaponName, myGraphic);
+ DrawToRight(weaponName, myGraphic);
+ }
}
///
@@ -485,10 +532,13 @@ namespace FModel
///
private static void DrawPower(Graphics myGraphic)
{
- Image bolt = Resources.LBolt64;
- myGraphic.DrawImage(ImageUtilities.ResizeImage(bolt, 15, 15), new Point(5, 501));
+ if (!string.IsNullOrEmpty(MinToMax))
+ {
+ Image bolt = Resources.LBolt64;
+ myGraphic.DrawImage(ImageUtilities.ResizeImage(bolt, 15, 15), new Point(5, 501));
- DrawToLeft(MinToMax, myGraphic);
+ DrawToLeft(MinToMax, myGraphic);
+ }
}
}
}
diff --git a/FModel/Methods/IconGenerator/ItemGenerator/ItemIcon.cs b/FModel/Methods/IconGenerator/ItemGenerator/ItemIcon.cs
index 30fd10b0..be2b306f 100644
--- a/FModel/Methods/IconGenerator/ItemGenerator/ItemIcon.cs
+++ b/FModel/Methods/IconGenerator/ItemGenerator/ItemIcon.cs
@@ -1,10 +1,7 @@
using csharp_wick;
-using FModel.Parser.Featured;
-using FModel.Parser.Items;
using FModel.Properties;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
@@ -21,7 +18,7 @@ namespace FModel
///
///
///
- public static void GetItemIcon(ItemsIdParser theItem, bool featured = false)
+ public static void GetItemIcon(JToken theItem, bool featured = false)
{
if (!featured)
{
@@ -30,12 +27,17 @@ namespace FModel
}
else
{
- if (theItem.DisplayAssetPath != null && theItem.DisplayAssetPath.AssetPathName.Contains("/Game/Catalog/DisplayAssets/"))
+ JToken displayAssetPathToken = theItem["DisplayAssetPath"];
+ if (displayAssetPathToken != null)
{
- string catalogName = theItem.DisplayAssetPath.AssetPathName;
- SearchFeaturedIcon(theItem, catalogName.Substring(catalogName.LastIndexOf('.') + 1));
+ JToken displayAssetPathNameToken = displayAssetPathToken["asset_path_name"];
+ if (displayAssetPathNameToken != null && displayAssetPathNameToken.Value().Contains("/Game/Catalog/DisplayAssets/"))
+ {
+ string catalogName = displayAssetPathNameToken.Value();
+ SearchFeaturedIcon(theItem, catalogName.Substring(catalogName.LastIndexOf('.') + 1));
+ }
}
- else if (theItem.DisplayAssetPath == null)
+ else if (displayAssetPathToken == null)
{
SearchFeaturedIcon(theItem, "DA_Featured_" + ThePak.CurrentUsedItem);
}
@@ -51,11 +53,13 @@ namespace FModel
/// if no HeroDefinition and WeaponDefinition move to SearchLargeSmallIcon
///
///
- public static void SearchAthIteDefIcon(ItemsIdParser theItem)
+ public static void SearchAthIteDefIcon(JToken theItem)
{
- if (theItem.HeroDefinition != null)
+ JToken heroDefinition = theItem["HeroDefinition"];
+ JToken weaponDefinition = theItem["WeaponDefinition"];
+ if (heroDefinition != null)
{
- string heroFilePath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary[theItem.HeroDefinition], theItem.HeroDefinition);
+ string heroFilePath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary[heroDefinition.Value()], heroDefinition.Value());
if (heroFilePath != null)
{
if (heroFilePath.Contains(".uasset") || heroFilePath.Contains(".uexp") || heroFilePath.Contains(".ubulk"))
@@ -65,17 +69,16 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString();
- var itemId = ItemsIdParser.FromJson(parsedJson);
- for (int i = 0; i < itemId.Length; i++)
- {
- if (itemId[i].LargePreviewImage != null)
- {
- string textureFile = Path.GetFileName(itemId[i].LargePreviewImage.AssetPathName)
- ?.Substring(0,
- Path.GetFileName(itemId[i].LargePreviewImage.AssetPathName)
- .LastIndexOf('.'));
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
+ JToken largePreviewImage = AssetArray[0]["LargePreviewImage"];
+ if (largePreviewImage != null)
+ {
+ JToken assetPathName = largePreviewImage["asset_path_name"];
+ if (assetPathName != null)
+ {
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
}
@@ -89,19 +92,19 @@ namespace FModel
}
}
}
- else if (theItem.WeaponDefinition != null)
+ else if (weaponDefinition != null)
{
//MANUAL FIX
- if (theItem.WeaponDefinition == "WID_Harvest_Pickaxe_NutCracker")
+ if (weaponDefinition.Value().Equals("WID_Harvest_Pickaxe_NutCracker"))
{
- theItem.WeaponDefinition = "WID_Harvest_Pickaxe_Nutcracker";
+ weaponDefinition = "WID_Harvest_Pickaxe_Nutcracker";
}
- if (theItem.WeaponDefinition == "WID_Harvest_Pickaxe_Wukong")
+ if (weaponDefinition.Value().Equals("WID_Harvest_Pickaxe_Wukong"))
{
- theItem.WeaponDefinition = "WID_Harvest_Pickaxe_WuKong";
+ weaponDefinition = "WID_Harvest_Pickaxe_WuKong";
}
- string weaponFilePath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary[theItem.WeaponDefinition], theItem.WeaponDefinition);
+ string weaponFilePath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary[weaponDefinition.Value()], weaponDefinition.Value());
if (weaponFilePath != null)
{
if (weaponFilePath.Contains(".uasset") || weaponFilePath.Contains(".uexp") || weaponFilePath.Contains(".ubulk"))
@@ -111,16 +114,16 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString();
- var itemId = ItemsIdParser.FromJson(parsedJson);
- for (int i = 0; i < itemId.Length; i++)
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
+
+ JToken largePreviewImage = AssetArray[0]["LargePreviewImage"];
+ if (largePreviewImage != null)
{
- if (itemId[i].LargePreviewImage != null)
+ JToken assetPathName = largePreviewImage["asset_path_name"];
+ if (assetPathName != null)
{
- string textureFile = Path.GetFileName(itemId[i].LargePreviewImage.AssetPathName)
- ?.Substring(0,
- Path.GetFileName(itemId[i].LargePreviewImage.AssetPathName)
- .LastIndexOf('.'));
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
}
@@ -141,21 +144,29 @@ namespace FModel
/// convert Large or Small image to a png image
///
///
- private static void SearchLargeSmallIcon(ItemsIdParser theItem)
+ private static void SearchLargeSmallIcon(JToken theItem)
{
- if (theItem.LargePreviewImage != null)
+ JToken largePreviewImage = theItem["LargePreviewImage"];
+ JToken smallPreviewImage = theItem["SmallPreviewImage"];
+ if (largePreviewImage != null)
{
- string textureFile = Path.GetFileName(theItem.LargePreviewImage.AssetPathName)?.Substring(0,
- Path.GetFileName(theItem.LargePreviewImage.AssetPathName).LastIndexOf('.'));
+ JToken assetPathName = largePreviewImage["asset_path_name"];
+ if (assetPathName != null)
+ {
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
- ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ }
}
- else if (theItem.SmallPreviewImage != null)
+ else if (smallPreviewImage != null)
{
- string textureFile = Path.GetFileName(theItem.SmallPreviewImage.AssetPathName)?.Substring(0,
- Path.GetFileName(theItem.SmallPreviewImage.AssetPathName).LastIndexOf('.'));
+ JToken assetPathName = smallPreviewImage["asset_path_name"];
+ if (assetPathName != null)
+ {
+ string textureFile = Path.GetFileName(assetPathName.Value()).Substring(0, Path.GetFileName(assetPathName.Value()).LastIndexOf('.'));
- ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
+ }
}
}
@@ -165,7 +176,7 @@ namespace FModel
///
///
///
- public static void SearchFeaturedIcon(ItemsIdParser theItem, string catName)
+ public static void SearchFeaturedIcon(JToken theItem, string catName)
{
switch (catName)
{
@@ -192,7 +203,7 @@ namespace FModel
///
///
///
- private static void GetFeaturedItemIcon(ItemsIdParser theItem, string catName)
+ private static void GetFeaturedItemIcon(JToken theItem, string catName)
{
try
{
@@ -208,28 +219,38 @@ namespace FModel
if (JohnWick.MyAsset.GetSerialized() != null)
{
ThePak.CurrentUsedItem = catName;
- string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString();
- var featuredId = FeaturedParser.FromJson(parsedJson);
- for (int i = 0; i < featuredId.Length; i++)
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
+
+ switch (catName)
{
- switch (catName)
- {
- case "DA_Featured_Glider_ID_070_DarkViking":
- case "DA_Featured_CID_319_Athena_Commando_F_Nautilus":
- if (featuredId[i].TileImage != null)
+ case "DA_Featured_Glider_ID_070_DarkViking":
+ case "DA_Featured_CID_319_Athena_Commando_F_Nautilus":
+ JToken tileImage = AssetArray[0]["TileImage"];
+ if (tileImage != null)
+ {
+ JToken resourceObject = tileImage["ResourceObject"];
+ if (resourceObject != null)
{
- string textureFile = featuredId[i].TileImage.ResourceObject;
+ string textureFile = resourceObject.Value();
+
ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
}
- break;
- default:
- if (featuredId[i].DetailsImage != null)
+ }
+ break;
+ default:
+ JToken detailsImage = AssetArray[0]["DetailsImage"];
+ if (detailsImage != null)
+ {
+ JToken resourceObject = detailsImage["ResourceObject"];
+ if (resourceObject != null)
{
- string textureFile = featuredId[i].DetailsImage.ResourceObject;
+ string textureFile = resourceObject.Value();
+
ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
}
- break;
- }
+ }
+ break;
}
// There is no featured image (as legends pack, shadow pack...)
@@ -270,26 +291,24 @@ namespace FModel
{
if (JohnWick.MyAsset.GetSerialized() != null)
{
- string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString();
- var ammoId = ItemsIdParser.FromJson(parsedJson);
- for (int i = 0; i < ammoId.Length; i++)
- {
- SearchLargeSmallIcon(ammoId[i]);
+ dynamic AssetData = JsonConvert.DeserializeObject(JohnWick.MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
- if (File.Exists(ItemIconPath))
+ SearchLargeSmallIcon(AssetArray[0]);
+
+ if (File.Exists(ItemIconPath))
+ {
+ Image itemIcon;
+ using (var bmpTemp = new Bitmap(ItemIconPath))
{
- Image itemIcon;
- using (var bmpTemp = new Bitmap(ItemIconPath))
- {
- itemIcon = new Bitmap(bmpTemp);
- }
- toDrawOn.DrawImage(ImageUtilities.ResizeImage(itemIcon, 64, 64), new Point(6, 6));
- }
- else
- {
- Image itemIcon = Resources.unknown512;
- toDrawOn.DrawImage(ImageUtilities.ResizeImage(itemIcon, 64, 64), new Point(6, 6));
+ itemIcon = new Bitmap(bmpTemp);
}
+ toDrawOn.DrawImage(ImageUtilities.ResizeImage(itemIcon, 64, 64), new Point(6, 6));
+ }
+ else
+ {
+ Image itemIcon = Resources.unknown512;
+ toDrawOn.DrawImage(ImageUtilities.ResizeImage(itemIcon, 64, 64), new Point(6, 6));
}
}
}
diff --git a/FModel/Methods/IconGenerator/ItemGenerator/Rarity.cs b/FModel/Methods/IconGenerator/ItemGenerator/Rarity.cs
index bade67ff..54fc2e84 100644
--- a/FModel/Methods/IconGenerator/ItemGenerator/Rarity.cs
+++ b/FModel/Methods/IconGenerator/ItemGenerator/Rarity.cs
@@ -1,5 +1,5 @@
-using FModel.Parser.Items;
-using FModel.Properties;
+using FModel.Properties;
+using Newtonsoft.Json.Linq;
using System.Drawing;
namespace FModel
@@ -11,9 +11,10 @@ namespace FModel
///
///
/// the resource image depending on the rarity
- private static Image GetRarityImage(ItemsIdParser theItem)
+ private static Image GetRarityImage(JToken theItem)
{
- switch (theItem.Rarity)
+ JToken raritiesToken = theItem["Rarity"];
+ switch (raritiesToken != null ? raritiesToken.Value() : "")
{
case "EFortRarity::Transcendent":
return Settings.Default.rarityNew ? Resources.T512 : Resources.T512v1;
@@ -39,9 +40,9 @@ namespace FModel
///
///
/// the resource image depending on the series
- private static Image GetSeriesImage(ItemsIdParser theItem)
+ private static Image GetSeriesImage(JToken theItem, string theSeries)
{
- if (theItem.Series == "MarvelSeries")
+ if (theSeries.Equals("MarvelSeries"))
{
return Settings.Default.rarityNew ? Resources.Marvel512 : Resources.Marvel512v1;
}
@@ -58,7 +59,7 @@ namespace FModel
///
///
/// the resource image depending on specialMode
- private static Image GetSpecialModeImage(ItemsIdParser theItem, string specialMode)
+ private static Image GetSpecialModeImage(JToken theItem, string specialMode)
{
if (specialMode == "ammo")
{
@@ -76,13 +77,13 @@ namespace FModel
///
///
///
- public static void DrawRarity(ItemsIdParser theItem, Graphics toDrawOn, string specialMode = null)
+ public static void DrawRarity(JToken theItem, Graphics toDrawOn, string specialMode = null)
{
Image rarityBg;
-
- if (theItem.Series != null)
+ JToken seriesToken = theItem["Series"];
+ if (!string.IsNullOrEmpty(seriesToken != null ? seriesToken.Value() : ""))
{
- rarityBg = GetSeriesImage(theItem);
+ rarityBg = GetSeriesImage(theItem, seriesToken.Value());
}
else if (specialMode != null)
{
@@ -92,7 +93,6 @@ namespace FModel
{
rarityBg = GetRarityImage(theItem);
}
-
toDrawOn.DrawImage(rarityBg, new Point(0, 0));
}
}
diff --git a/FModel/Methods/JohnWick/JohnWick.cs b/FModel/Methods/JohnWick/JohnWick.cs
index f6e5d672..bf2aa300 100644
--- a/FModel/Methods/JohnWick/JohnWick.cs
+++ b/FModel/Methods/JohnWick/JohnWick.cs
@@ -1,5 +1,4 @@
using csharp_wick;
-using FModel.Parser.RenderMat;
using FModel.Properties;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -93,7 +92,7 @@ namespace FModel
string TexturePath = string.Empty;
if (!string.IsNullOrEmpty(textureFilePath))
{
- if ((textureFilePath.Contains("MI_UI_FeaturedRenderSwitch_") || textureFilePath.Contains("M_UI_ChallengeTile_PCB") || textureFilePath.Contains("Wraps\\FeaturedMaterials\\") || textureFilePath.Contains("M-Wraps-StreetDemon")))
+ if (textureFilePath.Contains("MI_UI_FeaturedRenderSwitch_") || textureFilePath.Contains("M_UI_ChallengeTile_PCB") || textureFilePath.Contains("Wraps\\FeaturedMaterials\\") || textureFilePath.Contains("M-Wraps-StreetDemon"))
return GetRenderSwitchMaterialTexture(textureFilePath);
else
{
@@ -121,15 +120,38 @@ namespace FModel
{
if (MyAsset.GetSerialized() != null)
{
- string parsedRsmJson = JToken.Parse(MyAsset.GetSerialized()).ToString();
- var rsmid = RenderSwitchMaterial.FromJson(parsedRsmJson);
- for (int i = 0; i < rsmid.Length; i++)
- {
- if (rsmid[i].TextureParameterValues.FirstOrDefault()?.ParameterValue != null)
- {
- string textureFile = rsmid[i].TextureParameterValues.FirstOrDefault()?.ParameterValue;
+ dynamic AssetData = JsonConvert.DeserializeObject(MyAsset.GetSerialized());
+ JArray AssetArray = JArray.FromObject(AssetData);
- TexturePath = AssetToTexture2D(textureFile);
+ JToken textureParameterValues = AssetArray[0]["TextureParameterValues"];
+ if (textureParameterValues != null)
+ {
+ JArray textureParameterValuesArray = textureParameterValues.Value();
+ foreach (JToken token in textureParameterValuesArray)
+ {
+ JToken parameterInfo = token["ParameterInfo"];
+ if (parameterInfo != null)
+ {
+ JToken name = parameterInfo["Name"];
+ if (name != null && name.Value().Equals("TextureB"))
+ {
+ JToken parameterValue = token["ParameterValue"];
+ if (parameterValue != null)
+ {
+ string textureFile = parameterValue.Value();
+ TexturePath = AssetToTexture2D(textureFile);
+ }
+ }
+ else if (name != null && name.Value().Contains("Texture"))
+ {
+ JToken parameterValue = token["ParameterValue"];
+ if (parameterValue != null)
+ {
+ string textureFile = parameterValue.Value();
+ TexturePath = AssetToTexture2D(textureFile);
+ }
+ }
+ }
}
}
}
diff --git a/FModel/Methods/UpdateMode/RegisterSettings.cs b/FModel/Methods/UpdateMode/RegisterSettings.cs
new file mode 100644
index 00000000..9b95bf29
--- /dev/null
+++ b/FModel/Methods/UpdateMode/RegisterSettings.cs
@@ -0,0 +1,30 @@
+using FModel.Properties;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace FModel
+{
+ static class RegisterSettings
+ {
+ public static Dictionary updateModeDictionary { get; set; }
+ public static List updateModeListParameters { get; set; }
+
+ public static void UpdateModeAddToDict(string[] myPaksFilesList)
+ {
+ for (int i = 0; i < myPaksFilesList.Length; i++)
+ {
+ bool b = updateModeListParameters.Any(s => myPaksFilesList[i].Contains(s));
+ if (b)
+ {
+ string filename = myPaksFilesList[i].Substring(myPaksFilesList[i].LastIndexOf("/", StringComparison.Ordinal) + 1);
+ if (filename.Contains(".uasset") || filename.Contains(".uexp") || filename.Contains(".ubulk"))
+ {
+ if (!updateModeDictionary.ContainsKey(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal))))
+ updateModeDictionary.Add(filename.Substring(0, filename.LastIndexOf(".", StringComparison.Ordinal)), myPaksFilesList[i]);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/FModel/Methods/Utilities/Utilities.cs b/FModel/Methods/Utilities/Utilities.cs
index c194a256..3823c5f0 100644
--- a/FModel/Methods/Utilities/Utilities.cs
+++ b/FModel/Methods/Utilities/Utilities.cs
@@ -76,21 +76,6 @@ namespace FModel
Directory.CreateDirectory(App.DefaultOutputPath);
}
- ///
- ///
- ///
- public static void JohnWickCheck()
- {
- if (File.Exists(App.DefaultOutputPath + "\\john-wick-parse-modded.exe")) //2.0-
- {
- File.Delete(App.DefaultOutputPath + "\\john-wick-parse-modded.exe");
- }
- if (File.Exists(App.DefaultOutputPath + "\\john-wick-parse_custom.exe")) //2.0+
- {
- File.Delete(App.DefaultOutputPath + "\\john-wick-parse_custom.exe");
- }
- }
-
///
/// this should tell me if i can read the file, to avoid crash when a pak is being written by the launcher
///
diff --git a/FModel/Methods/VarApp.cs b/FModel/Methods/VarApp.cs
index d8e12e28..46403ff2 100644
--- a/FModel/Methods/VarApp.cs
+++ b/FModel/Methods/VarApp.cs
@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json.Linq;
+using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
diff --git a/FModel/Parser/Banners/BannersParser.cs b/FModel/Parser/Banners/BannersParser.cs
deleted file mode 100644
index 2ebe9d70..00000000
--- a/FModel/Parser/Banners/BannersParser.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-//
-// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
-//
-// using FModel.Parser.Banners;
-//
-// var bannersParser = BannersParser.FromJson(jsonString);
-
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.Banners
-{
- public partial class BannersParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("SmallImage")]
- public Image SmallImage { get; set; }
-
- [JsonProperty("LargeImage")]
- public Image LargeImage { get; set; }
-
- [JsonProperty("CategoryRowName")]
- public string CategoryRowName { get; set; }
-
- [JsonProperty("DisplayName")]
- public FTextInfos DisplayName { get; set; }
-
- [JsonProperty("DisplayDescription")]
- public FTextInfos DisplayDescription { get; set; }
-
- [JsonProperty("bFullUsageRights")]
- public bool BFullUsageRights { get; set; }
- }
-
- public partial class FTextInfos
- {
- [JsonProperty("key")]
- public string Key { get; set; }
-
- [JsonProperty("source_string")]
- public string SourceString { get; set; }
- }
-
- public class Image
- {
- [JsonProperty("asset_path_name")]
- public string AssetPathName { get; set; }
-
- [JsonProperty("sub_path_string")]
- public string SubPathString { get; set; }
- }
-
- public partial class BannersParser
- {
- public static BannersParser FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this BannersParser self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-}
diff --git a/FModel/Parser/Challenges/ChallengeBundleIdParser.cs b/FModel/Parser/Challenges/ChallengeBundleIdParser.cs
deleted file mode 100644
index 1c804381..00000000
--- a/FModel/Parser/Challenges/ChallengeBundleIdParser.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.Challenges
-{
- public partial class ChallengeBundleIdParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("QuestInfos")]
- public QuestInfo[] QuestInfos { get; set; }
-
- [JsonProperty("BundleCompletionRewards")]
- public BundleCompletionReward[] BundleCompletionRewards { get; set; }
-
- [JsonProperty("DisplayStyle")]
- public DisplayStyle DisplayStyle { get; set; }
-
- [JsonProperty("DisplayName")]
- public DisplayName DisplayName { get; set; }
-
- [JsonProperty("SmallPreviewImage")]
- public LargePreviewImage SmallPreviewImage { get; set; }
-
- [JsonProperty("LargePreviewImage")]
- public LargePreviewImage LargePreviewImage { get; set; }
- }
-
- public partial class DisplayName
- {
- [JsonProperty("key")]
- public string Key { get; set; }
-
- [JsonProperty("source_string")]
- public string SourceString { get; set; }
- }
-
- public class BundleCompletionReward
- {
- [JsonProperty("CompletionCount")]
- public long CompletionCount { get; set; }
-
- [JsonProperty("Rewards")]
- public Reward[] Rewards { get; set; }
- }
-
- public class Reward
- {
- [JsonProperty("ItemDefinition")]
- public LargePreviewImage ItemDefinition { get; set; }
-
- [JsonProperty("TemplateId")]
- public string TemplateId { get; set; }
-
- [JsonProperty("Quantity")]
- public long Quantity { get; set; }
-
- [JsonProperty("RewardGiftBox")]
- public RewardGiftBox RewardGiftBox { get; set; }
-
- [JsonProperty("IsChaseReward")]
- public bool IsChaseReward { get; set; }
-
- [JsonProperty("RewardType")]
- public string RewardType { get; set; }
- }
-
- public class LargePreviewImage
- {
- [JsonProperty("asset_path_name")]
- public string AssetPathName { get; set; }
-
- [JsonProperty("sub_path_string")]
- public string SubPathString { get; set; }
- }
-
- public class RewardGiftBox
- {
- [JsonProperty("GiftBoxToUse")]
- public LargePreviewImage GiftBoxToUse { get; set; }
-
- [JsonProperty("GiftBoxFormatData")]
- public object[] GiftBoxFormatData { get; set; }
- }
-
- public class DisplayStyle
- {
- [JsonProperty("PrimaryColor")]
- public ColorChallenge PrimaryColor { get; set; }
-
- [JsonProperty("SecondaryColor")]
- public ColorChallenge SecondaryColor { get; set; }
-
- [JsonProperty("AccentColor")]
- public ColorChallenge AccentColor { get; set; }
-
- [JsonProperty("DisplayImage")]
- public LargePreviewImage DisplayImage { get; set; }
- }
-
- public class ColorChallenge
- {
- [JsonProperty("r")]
- public double R { get; set; }
-
- [JsonProperty("g")]
- public double G { get; set; }
-
- [JsonProperty("b")]
- public double B { get; set; }
-
- [JsonProperty("a")]
- public long A { get; set; }
- }
-
- public class QuestInfo
- {
- [JsonProperty("QuestDefinition")]
- public LargePreviewImage QuestDefinition { get; set; }
-
- [JsonProperty("QuestUnlockType")]
- public string QuestUnlockType { get; set; }
-
- [JsonProperty("UnlockValue")]
- public long UnlockValue { get; set; }
-
- [JsonProperty("RewardGiftBox")]
- public RewardGiftBox RewardGiftBox { get; set; }
- }
-
- public partial class ChallengeBundleIdParser
- {
- public static ChallengeBundleIdParser[] FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this ChallengeBundleIdParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-}
diff --git a/FModel/Parser/Featured/FeaturedParser.cs b/FModel/Parser/Featured/FeaturedParser.cs
deleted file mode 100644
index 632cc4cb..00000000
--- a/FModel/Parser/Featured/FeaturedParser.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.Featured
-{
- public partial class FeaturedParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("TileImage")]
- public ImageLol TileImage { get; set; }
-
- [JsonProperty("DetailsImage")]
- public ImageLol DetailsImage { get; set; }
-
- [JsonProperty("Gradient")]
- public Gradient Gradient { get; set; }
-
- [JsonProperty("Background")]
- public Background Background { get; set; }
- }
-
- public class Background
- {
- [JsonProperty("r")]
- public double R { get; set; }
-
- [JsonProperty("g")]
- public double G { get; set; }
-
- [JsonProperty("b")]
- public double B { get; set; }
-
- [JsonProperty("a")]
- public long A { get; set; }
- }
-
- public class ImageLol
- {
- [JsonProperty("ImageSize")]
- public ImageSize ImageSize { get; set; }
-
- [JsonProperty("ResourceObject")]
- public string ResourceObject { get; set; }
- }
-
- public class ImageSize
- {
- [JsonProperty("x")]
- public long X { get; set; }
-
- [JsonProperty("y")]
- public long Y { get; set; }
- }
-
- public class Gradient
- {
- [JsonProperty("Start")]
- public Background Start { get; set; }
-
- [JsonProperty("Stop")]
- public Background Stop { get; set; }
- }
-
- public partial class FeaturedParser
- {
- public static FeaturedParser[] FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this FeaturedParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-}
diff --git a/FModel/Parser/Items/CosmeticSetsParser.cs b/FModel/Parser/Items/CosmeticSetsParser.cs
deleted file mode 100644
index 84c88f91..00000000
--- a/FModel/Parser/Items/CosmeticSetsParser.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-//
-// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
-//
-// using FModel.Parser.CosmeticSetsParser;
-//
-// var cosmeticSetsParser = CosmeticSetsParser.FromJson(jsonString);
-
-namespace FModel.Parser.CosmeticSetsParser
-{
- using System.Globalization;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
-
- public partial class CosmeticSetsParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("Tag")]
- public Tag Tag { get; set; }
-
- [JsonProperty("DisplayName")]
- public Description DisplayName { get; set; }
-
- [JsonProperty("Description")]
- public Description Description { get; set; }
- }
-
- public partial class Description
- {
- [JsonProperty("namespace")]
- public string Namespace { get; set; }
-
- [JsonProperty("key")]
- public string Key { get; set; }
-
- [JsonProperty("source_string")]
- public string SourceString { get; set; }
- }
-
- public partial class Tag
- {
- [JsonProperty("TagName")]
- public string TagName { get; set; }
- }
-
- public partial class CosmeticSetsParser
- {
- public static CosmeticSetsParser FromJson(string json) => JsonConvert.DeserializeObject(json, FModel.Parser.CosmeticSetsParser.Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this CosmeticSetsParser self) => JsonConvert.SerializeObject(self, FModel.Parser.CosmeticSetsParser.Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- },
- };
- }
-}
diff --git a/FModel/Parser/Items/ItemIDParser.cs b/FModel/Parser/Items/ItemIDParser.cs
deleted file mode 100644
index 6ee56b09..00000000
--- a/FModel/Parser/Items/ItemIDParser.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.Items
-{
- public partial class ItemsIdParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("cosmetic_item")]
- public string CosmeticItem { get; set; }
-
- [JsonProperty("CharacterParts")]
- public string[] CharacterParts { get; set; }
-
- [JsonProperty("HeroDefinition")]
- public string HeroDefinition { get; set; }
-
- [JsonProperty("WeaponDefinition")]
- public string WeaponDefinition { get; set; }
-
- [JsonProperty("Rarity")]
- public string Rarity { get; set; }
-
- [JsonProperty("Series")]
- public string Series { get; set; }
-
- [JsonProperty("DisplayName")]
- public FTextInfos DisplayName { get; set; }
-
- [JsonProperty("ShortDescription")]
- public FTextInfos ShortDescription { get; set; }
-
- [JsonProperty("Description")]
- public FTextInfos Description { get; set; }
-
- [JsonProperty("GameplayTags")]
- public GameplayTags GameplayTags { get; set; }
-
- [JsonProperty("SmallPreviewImage")]
- public PreviewImage SmallPreviewImage { get; set; }
-
- [JsonProperty("LargePreviewImage")]
- public PreviewImage LargePreviewImage { get; set; }
-
- [JsonProperty("DisplayAssetPath")]
- public DisplayAssetPath DisplayAssetPath { get; set; }
-
- [JsonProperty("AmmoData")]
- public AmmoData AmmoData { get; set; }
-
- [JsonProperty("AttributeInitKey")]
- public AttributeInitKey AttributeInitKey { get; set; }
-
- [JsonProperty("MaxStackSize")]
- public long MaxStackSize { get; set; }
-
- [JsonProperty("MinLevel")]
- public long MinLevel { get; set; }
-
- [JsonProperty("MaxLevel")]
- public long MaxLevel { get; set; }
-
- [JsonProperty("WeaponStatHandle")]
- public WeaponStatHandle WeaponStatHandle { get; set; }
- }
-
- public partial class FTextInfos
- {
- [JsonProperty("namespace")]
- public string Namespace { get; set; }
-
- [JsonProperty("key")]
- public string Key { get; set; }
-
- [JsonProperty("source_string")]
- public string SourceString { get; set; }
- }
-
- public class GameplayTags
- {
- [JsonProperty("gameplay_tags")]
- public string[] GameplayTagsGameplayTags { get; set; }
- }
-
- public class PreviewImage
- {
- [JsonProperty("asset_path_name")]
- public string AssetPathName { get; set; }
-
- [JsonProperty("sub_path_string")]
- public string SubPathString { get; set; }
- }
-
- public class DisplayAssetPath
- {
- [JsonProperty("asset_path_name")]
- public string AssetPathName { get; set; }
-
- [JsonProperty("sub_path_string")]
- public string SubPathString { get; set; }
- }
-
- public partial class AmmoData
- {
- [JsonProperty("asset_path_name")]
- public string AssetPathName { get; set; }
-
- [JsonProperty("sub_path_string")]
- public string SubPathString { get; set; }
- }
-
- public partial class AttributeInitKey
- {
- [JsonProperty("AttributeInitCategory")]
- public string AttributeInitCategory { get; set; }
-
- [JsonProperty("AttributeInitSubCategory")]
- public string AttributeInitSubCategory { get; set; }
- }
-
- public partial class WeaponStatHandle
- {
- [JsonProperty("DataTable")]
- public string DataTable { get; set; }
-
- [JsonProperty("RowName")]
- public string RowName { get; set; }
- }
-
- public partial class ItemsIdParser
- {
- public static ItemsIdParser[] FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this ItemsIdParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-}
diff --git a/FModel/Parser/Meshes/MeshesParser.cs b/FModel/Parser/Meshes/MeshesParser.cs
deleted file mode 100644
index c3c73091..00000000
--- a/FModel/Parser/Meshes/MeshesParser.cs
+++ /dev/null
@@ -1,538 +0,0 @@
-//
-//
-// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
-//
-// using FModel.Parser.Meshes;
-//
-// var meshesParser = MeshesParser.FromJson(jsonString);
-
-using System;
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.Meshes
-{
- public partial class MeshesParser
- {
- [JsonProperty("super_object")]
- public SuperObject SuperObject { get; set; }
-
- [JsonProperty("imported_bounds")]
- public ImportedBounds ImportedBounds { get; set; }
-
- [JsonProperty("materials")]
- public Material[] Materials { get; set; }
-
- [JsonProperty("ref_skeleton")]
- public RefSkeleton RefSkeleton { get; set; }
-
- [JsonProperty("lod_models")]
- public LodModel[] LodModels { get; set; }
- }
-
- public class ImportedBounds
- {
- [JsonProperty("origin")]
- public BoxExtend Origin { get; set; }
-
- [JsonProperty("box_extend")]
- public BoxExtend BoxExtend { get; set; }
-
- [JsonProperty("sphere_radius")]
- public double SphereRadius { get; set; }
- }
-
- public class BoxExtend
- {
- [JsonProperty("x")]
- public double X { get; set; }
-
- [JsonProperty("y")]
- public double Y { get; set; }
-
- [JsonProperty("z")]
- public double Z { get; set; }
-
- [JsonProperty("w", NullValueHandling = NullValueHandling.Ignore)]
- public double? W { get; set; }
- }
-
- public class LodModel
- {
- [JsonProperty("sections")]
- public Section[] Sections { get; set; }
-
- [JsonProperty("indices")]
- public Indices Indices { get; set; }
-
- [JsonProperty("active_bone_indices")]
- public long[] ActiveBoneIndices { get; set; }
-
- [JsonProperty("required_bones")]
- public long[] RequiredBones { get; set; }
-
- [JsonProperty("position_vertex_buffer")]
- public PositionVertexBuffer PositionVertexBuffer { get; set; }
-
- [JsonProperty("static_mesh_vertex_buffer")]
- public StaticMeshVertexBuffer StaticMeshVertexBuffer { get; set; }
-
- [JsonProperty("skin_weight_vertex_buffer")]
- public SkinWeightVertexBuffer SkinWeightVertexBuffer { get; set; }
-
- [JsonProperty("colour_vertex_buffer")]
- public object ColourVertexBuffer { get; set; }
- }
-
- public class Indices
- {
- [JsonProperty("Indices16")]
- public long[] Indices16 { get; set; }
- }
-
- public class PositionVertexBuffer
- {
- [JsonProperty("verts")]
- public BoxExtend[] Verts { get; set; }
-
- [JsonProperty("stride")]
- public long Stride { get; set; }
-
- [JsonProperty("num_verts")]
- public long NumVerts { get; set; }
- }
-
- public class Section
- {
- [JsonProperty("material_index")]
- public long MaterialIndex { get; set; }
-
- [JsonProperty("base_index")]
- public long BaseIndex { get; set; }
-
- [JsonProperty("num_triangles")]
- public long NumTriangles { get; set; }
-
- [JsonProperty("base_vertex_index")]
- public long BaseVertexIndex { get; set; }
-
- [JsonProperty("cloth_mapping_data")]
- public object[] ClothMappingData { get; set; }
-
- [JsonProperty("bone_map")]
- public long[] BoneMap { get; set; }
-
- [JsonProperty("num_vertices")]
- public long NumVertices { get; set; }
-
- [JsonProperty("max_bone_influences")]
- public long MaxBoneInfluences { get; set; }
-
- [JsonProperty("clothing_data")]
- public ClothingData ClothingData { get; set; }
-
- [JsonProperty("disabled")]
- public bool Disabled { get; set; }
- }
-
- public class ClothingData
- {
- [JsonProperty("asset_guid")]
- public string AssetGuid { get; set; }
-
- [JsonProperty("asset_lod_index")]
- public long AssetLodIndex { get; set; }
- }
-
- public class SkinWeightVertexBuffer
- {
- [JsonProperty("weights")]
- public Weight[] Weights { get; set; }
-
- [JsonProperty("num_vertices")]
- public long NumVertices { get; set; }
- }
-
- public class Weight
- {
- [JsonProperty("bone_index")]
- public long[] BoneIndex { get; set; }
-
- [JsonProperty("bone_weight")]
- public long[] BoneWeight { get; set; }
- }
-
- public class StaticMeshVertexBuffer
- {
- [JsonProperty("num_tex_coords")]
- public long NumTexCoords { get; set; }
-
- [JsonProperty("num_vertices")]
- public long NumVertices { get; set; }
-
- [JsonProperty("tangents")]
- public Tangents Tangents { get; set; }
-
- [JsonProperty("uvs")]
- public Uvs Uvs { get; set; }
- }
-
- public class Tangents
- {
- [JsonProperty("Low")]
- public TangentsLow[] Low { get; set; }
- }
-
- public class TangentsLow
- {
- [JsonProperty("normal")]
- public BoxExtend Normal { get; set; }
-
- [JsonProperty("tangent")]
- public BoxExtend Tangent { get; set; }
- }
-
- public class Uvs
- {
- [JsonProperty("Low")]
- public UvsLow[] Low { get; set; }
- }
-
- public class UvsLow
- {
- [JsonProperty("value")]
- public Value Value { get; set; }
- }
-
- public class Value
- {
- [JsonProperty("x")]
- public long X { get; set; }
-
- [JsonProperty("y")]
- public long Y { get; set; }
- }
-
- public class Material
- {
- [JsonProperty("material_interface")]
- public string MaterialInterface { get; set; }
-
- [JsonProperty("material_slot_name")]
- public string MaterialSlotName { get; set; }
-
- [JsonProperty("uv_channel_data")]
- public UvChannelData UvChannelData { get; set; }
- }
-
- public class UvChannelData
- {
- [JsonProperty("initialised")]
- public bool Initialised { get; set; }
-
- [JsonProperty("override_densities")]
- public bool OverrideDensities { get; set; }
-
- [JsonProperty("local_uv_densities")]
- public double[] LocalUvDensities { get; set; }
- }
-
- public class RefSkeleton
- {
- [JsonProperty("ref_bone_info")]
- public RefBoneInfo[] RefBoneInfo { get; set; }
-
- [JsonProperty("ref_bone_pose")]
- public RefBonePose[] RefBonePose { get; set; }
-
- [JsonProperty("name_to_index")]
- public NameToIndex[][] NameToIndex { get; set; }
- }
-
- public class RefBoneInfo
- {
- [JsonProperty("name")]
- public string Name { get; set; }
-
- [JsonProperty("parent_index")]
- public long ParentIndex { get; set; }
- }
-
- public class RefBonePose
- {
- [JsonProperty("rotation")]
- public BoxExtend Rotation { get; set; }
-
- [JsonProperty("translation")]
- public BoxExtend Translation { get; set; }
-
- [JsonProperty("scale_3d")]
- public BoxExtend Scale3D { get; set; }
- }
-
- public class SuperObject
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("Skeleton")]
- public string Skeleton { get; set; }
-
- [JsonProperty("LODInfo")]
- public LodInfo[] LodInfo { get; set; }
-
- [JsonProperty("MinLod")]
- public MinLod MinLod { get; set; }
-
- [JsonProperty("bHasBeenSimplified")]
- public bool BHasBeenSimplified { get; set; }
-
- [JsonProperty("SamplingInfo")]
- public SamplingInfo SamplingInfo { get; set; }
- }
-
- public class LodInfo
- {
- [JsonProperty("ScreenSize")]
- public MinLod ScreenSize { get; set; }
-
- [JsonProperty("LODHysteresis")]
- public double LodHysteresis { get; set; }
-
- [JsonProperty("LODMaterialMap")]
- public object[] LodMaterialMap { get; set; }
-
- [JsonProperty("ReductionSettings")]
- public ReductionSettings ReductionSettings { get; set; }
-
- [JsonProperty("BonesToRemove")]
- public object[] BonesToRemove { get; set; }
-
- [JsonProperty("BonesToPrioritize")]
- public object[] BonesToPrioritize { get; set; }
-
- [JsonProperty("WeightOfPrioritization")]
- public long WeightOfPrioritization { get; set; }
-
- [JsonProperty("BakePose")]
- [JsonConverter(typeof(ParseStringConverter))]
- public long BakePose { get; set; }
-
- [JsonProperty("BakePoseOverride")]
- [JsonConverter(typeof(ParseStringConverter))]
- public long BakePoseOverride { get; set; }
-
- [JsonProperty("SourceImportFilename")]
- public string SourceImportFilename { get; set; }
-
- [JsonProperty("bHasBeenSimplified")]
- public bool BHasBeenSimplified { get; set; }
-
- [JsonProperty("bHasPerLODVertexColors")]
- public bool BHasPerLodVertexColors { get; set; }
-
- [JsonProperty("bAllowCPUAccess")]
- public bool BAllowCpuAccess { get; set; }
-
- [JsonProperty("bSupportUniformlyDistributedSampling")]
- public bool BSupportUniformlyDistributedSampling { get; set; }
- }
-
- public class ReductionSettings
- {
- [JsonProperty("TerminationCriterion")]
- public string TerminationCriterion { get; set; }
-
- [JsonProperty("NumOfTrianglesPercentage")]
- public double NumOfTrianglesPercentage { get; set; }
-
- [JsonProperty("NumOfVertPercentage")]
- public double NumOfVertPercentage { get; set; }
-
- [JsonProperty("MaxNumOfTriangles")]
- public long MaxNumOfTriangles { get; set; }
-
- [JsonProperty("MaxNumOfVerts")]
- public long MaxNumOfVerts { get; set; }
-
- [JsonProperty("MaxDeviationPercentage")]
- public double MaxDeviationPercentage { get; set; }
-
- [JsonProperty("ReductionMethod")]
- public string ReductionMethod { get; set; }
-
- [JsonProperty("SilhouetteImportance")]
- public string SilhouetteImportance { get; set; }
-
- [JsonProperty("TextureImportance")]
- public string TextureImportance { get; set; }
-
- [JsonProperty("ShadingImportance")]
- public string ShadingImportance { get; set; }
-
- [JsonProperty("SkinningImportance")]
- public string SkinningImportance { get; set; }
-
- [JsonProperty("bRemapMorphTargets")]
- public bool BRemapMorphTargets { get; set; }
-
- [JsonProperty("bRecalcNormals")]
- public bool BRecalcNormals { get; set; }
-
- [JsonProperty("WeldingThreshold")]
- public double WeldingThreshold { get; set; }
-
- [JsonProperty("NormalsThreshold")]
- public long NormalsThreshold { get; set; }
-
- [JsonProperty("MaxBonesPerVertex")]
- public long MaxBonesPerVertex { get; set; }
-
- [JsonProperty("bEnforceBoneBoundaries")]
- public bool BEnforceBoneBoundaries { get; set; }
-
- [JsonProperty("VolumeImportance")]
- public long VolumeImportance { get; set; }
-
- [JsonProperty("bLockEdges")]
- public bool BLockEdges { get; set; }
-
- [JsonProperty("BaseLOD")]
- public long BaseLod { get; set; }
- }
-
- public class MinLod
- {
- [JsonProperty("cooked")]
- public bool Cooked { get; set; }
-
- [JsonProperty("value")]
- public double Value { get; set; }
- }
-
- public class SamplingInfo
- {
- [JsonProperty("BuiltData")]
- public BuiltData BuiltData { get; set; }
- }
-
- public class BuiltData
- {
- [JsonProperty("WholeMeshBuiltData")]
- public WholeMeshBuiltDatum[] WholeMeshBuiltData { get; set; }
- }
-
- public class WholeMeshBuiltDatum
- {
- [JsonProperty("prob")]
- public object[] Prob { get; set; }
-
- [JsonProperty("alias")]
- public object[] Alias { get; set; }
-
- [JsonProperty("total_weight")]
- public long TotalWeight { get; set; }
- }
-
- public struct NameToIndex
- {
- public long? Integer;
- public string String;
-
- public static implicit operator NameToIndex(long integer) => new NameToIndex { Integer = integer };
- public static implicit operator NameToIndex(string String) => new NameToIndex { String = String };
- }
-
- public partial class MeshesParser
- {
- public static MeshesParser[] FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this MeshesParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- NameToIndexConverter.Singleton,
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-
- internal class NameToIndexConverter : JsonConverter
- {
- public override bool CanConvert(Type t) => t == typeof(NameToIndex) || t == typeof(NameToIndex?);
-
- public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
- {
- switch (reader.TokenType)
- {
- case JsonToken.Integer:
- var integerValue = serializer.Deserialize(reader);
- return new NameToIndex { Integer = integerValue };
- case JsonToken.String:
- case JsonToken.Date:
- var stringValue = serializer.Deserialize(reader);
- return new NameToIndex { String = stringValue };
- }
- throw new Exception("Cannot unmarshal type NameToIndex");
- }
-
- public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
- {
- var value = (NameToIndex)untypedValue;
- if (value.Integer != null)
- {
- serializer.Serialize(writer, value.Integer.Value);
- return;
- }
- if (value.String != null)
- {
- serializer.Serialize(writer, value.String);
- return;
- }
- throw new Exception("Cannot marshal type NameToIndex");
- }
-
- public static readonly NameToIndexConverter Singleton = new NameToIndexConverter();
- }
-
- internal class ParseStringConverter : JsonConverter
- {
- public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
-
- public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == JsonToken.Null) return null;
- var value = serializer.Deserialize(reader);
- long l;
- if (Int64.TryParse(value, out l))
- {
- return l;
- }
- throw new Exception("Cannot unmarshal type long");
- }
-
- public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
- {
- if (untypedValue == null)
- {
- serializer.Serialize(writer, null);
- return;
- }
- var value = (long)untypedValue;
- serializer.Serialize(writer, value.ToString());
- }
-
- public static readonly ParseStringConverter Singleton = new ParseStringConverter();
- }
-}
diff --git a/FModel/Parser/Quests/QuestParser.cs b/FModel/Parser/Quests/QuestParser.cs
deleted file mode 100644
index c6328da9..00000000
--- a/FModel/Parser/Quests/QuestParser.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.Quests
-{
- public partial class QuestParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("QuestType")]
- public string QuestType { get; set; }
-
- [JsonProperty("bAthenaMustCompleteInSingleMatch")]
- public bool BAthenaMustCompleteInSingleMatch { get; set; }
-
- [JsonProperty("bIncludedInCategories")]
- public bool BIncludedInCategories { get; set; }
-
- [JsonProperty("ObjectiveCompletionCount")]
- public long ObjectiveCompletionCount { get; set; }
-
- [JsonProperty("Rewards")]
- public Reward[] Rewards { get; set; }
-
- [JsonProperty("HiddenRewards")]
- public HiddenRewards[] HiddenRewards { get; set; }
-
- [JsonProperty("Objectives")]
- public Objective[] Objectives { get; set; }
-
- [JsonProperty("Weight")]
- public double Weight { get; set; }
-
- [JsonProperty("CompletionText")]
- public FTextInfos CompletionText { get; set; }
-
- [JsonProperty("GrantToProfileType")]
- public string GrantToProfileType { get; set; }
-
- [JsonProperty("DisplayName")]
- public FTextInfos DisplayName { get; set; }
-
- [JsonProperty("Description")]
- public FTextInfos Description { get; set; }
-
- [JsonProperty("GameplayTags")]
- public GameplayTags GameplayTags { get; set; }
-
- [JsonProperty("SmallPreviewImage")]
- public LargePreviewImage SmallPreviewImage { get; set; }
-
- [JsonProperty("LargePreviewImage")]
- public LargePreviewImage LargePreviewImage { get; set; }
- }
-
- public partial class FTextInfos
- {
- [JsonProperty("key")]
- public string Key { get; set; }
-
- [JsonProperty("source_string")]
- public string SourceString { get; set; }
- }
-
- public class GameplayTags
- {
- [JsonProperty("gameplay_tags")]
- public string[] GameplayTagsGameplayTags { get; set; }
- }
-
- public class LargePreviewImage
- {
- [JsonProperty("asset_path_name")]
- public string AssetPathName { get; set; }
-
- [JsonProperty("sub_path_string")]
- public string SubPathString { get; set; }
- }
-
- public class Objective
- {
- [JsonProperty("BackendName")]
- public string BackendName { get; set; }
-
- [JsonProperty("ObjectiveStatHandle")]
- public ObjectiveStatHandle ObjectiveStatHandle { get; set; }
-
- [JsonProperty("AlternativeStatHandles")]
- public object[] AlternativeStatHandles { get; set; }
-
- [JsonProperty("ItemEvent")]
- public string ItemEvent { get; set; }
-
- [JsonProperty("bHidden")]
- public bool BHidden { get; set; }
-
- [JsonProperty("bRequirePrimaryMissionCompletion")]
- public bool BRequirePrimaryMissionCompletion { get; set; }
-
- [JsonProperty("bCanProgressInZone")]
- public bool BCanProgressInZone { get; set; }
-
- [JsonProperty("bDisplayDynamicAnnouncementUpdate")]
- public bool BDisplayDynamicAnnouncementUpdate { get; set; }
-
- [JsonProperty("DynamicStatusUpdateType")]
- public string DynamicStatusUpdateType { get; set; }
-
- [JsonProperty("LinkVaultTab")]
- public string LinkVaultTab { get; set; }
-
- [JsonProperty("LinkToItemManagement")]
- public string LinkToItemManagement { get; set; }
-
- [JsonProperty("ItemReference")]
- public LargePreviewImage ItemReference { get; set; }
-
- [JsonProperty("ItemTemplateIdOverride")]
- public string ItemTemplateIdOverride { get; set; }
-
- [JsonProperty("LinkSquadID")]
- public string LinkSquadId { get; set; }
-
- [JsonProperty("LinkSquadIndex")]
- public long LinkSquadIndex { get; set; }
-
- [JsonProperty("Description")]
- public FTextInfos Description { get; set; }
-
- [JsonProperty("HudShortDescription")]
- public FTextInfos HudShortDescription { get; set; }
-
- [JsonProperty("HudIcon")]
- public LargePreviewImage HudIcon { get; set; }
-
- [JsonProperty("Count")]
- public long Count { get; set; }
-
- [JsonProperty("Stage")]
- public long Stage { get; set; }
-
- [JsonProperty("DynamicStatusUpdatePercentInterval")]
- public long DynamicStatusUpdatePercentInterval { get; set; }
-
- [JsonProperty("DynamicUpdateCompletionDelay")]
- public long DynamicUpdateCompletionDelay { get; set; }
-
- [JsonProperty("ScriptedAction")]
- public LargePreviewImage ScriptedAction { get; set; }
- }
-
- public class ObjectiveStatHandle
- {
- [JsonProperty("DataTable")]
- public string DataTable { get; set; }
-
- [JsonProperty("RowName")]
- public string RowName { get; set; }
- }
-
- public class Reward
- {
- [JsonProperty("ItemPrimaryAssetId")]
- public ItemPrimaryAssetId ItemPrimaryAssetId { get; set; }
-
- [JsonProperty("Quantity")]
- public long Quantity { get; set; }
- }
-
- public class HiddenRewards
- {
- [JsonProperty("TemplateId")]
- public string TemplateId { get; set; }
-
- [JsonProperty("Quantity")]
- public long Quantity { get; set; }
- }
-
- public class ItemPrimaryAssetId
- {
- [JsonProperty("PrimaryAssetType")]
- public PrimaryAssetType PrimaryAssetType { get; set; }
-
- [JsonProperty("PrimaryAssetName")]
- public string PrimaryAssetName { get; set; }
- }
-
- public class PrimaryAssetType
- {
- [JsonProperty("Name")]
- public string Name { get; set; }
- }
-
- public partial class QuestParser
- {
- public static QuestParser[] FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this QuestParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-}
diff --git a/FModel/Parser/RenderMat/RenderSwitchMaterial.cs b/FModel/Parser/RenderMat/RenderSwitchMaterial.cs
deleted file mode 100644
index 40cacda5..00000000
--- a/FModel/Parser/RenderMat/RenderSwitchMaterial.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using System.Globalization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace FModel.Parser.RenderMat
-{
- public partial class RenderSwitchMaterial
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("Parent")]
- public string Parent { get; set; }
-
- [JsonProperty("ScalarParameterValues")]
- public ScalarParameterValue[] ScalarParameterValues { get; set; }
-
- [JsonProperty("TextureParameterValues")]
- public TextureParameterValue[] TextureParameterValues { get; set; }
-
- [JsonProperty("BasePropertyOverrides")]
- public BasePropertyOverrides BasePropertyOverrides { get; set; }
- }
-
- public class BasePropertyOverrides
- {
- [JsonProperty("BlendMode")]
- public string BlendMode { get; set; }
-
- [JsonProperty("ShadingModel")]
- public string ShadingModel { get; set; }
-
- [JsonProperty("OpacityMaskClipValue")]
- public double OpacityMaskClipValue { get; set; }
- }
-
- public class ScalarParameterValue
- {
- [JsonProperty("ParameterInfo")]
- public ParameterInfo ParameterInfo { get; set; }
-
- [JsonProperty("ParameterValue")]
- public long ParameterValue { get; set; }
-
- [JsonProperty("ExpressionGUID")]
- public string ExpressionGuid { get; set; }
- }
-
- public class ParameterInfo
- {
- [JsonProperty("Name")]
- public string Name { get; set; }
-
- [JsonProperty("Association")]
- public string Association { get; set; }
-
- [JsonProperty("Index")]
- public long Index { get; set; }
- }
-
- public class TextureParameterValue
- {
- [JsonProperty("ParameterInfo")]
- public ParameterInfo ParameterInfo { get; set; }
-
- [JsonProperty("ParameterValue")]
- public string ParameterValue { get; set; }
-
- [JsonProperty("ExpressionGUID")]
- public string ExpressionGuid { get; set; }
- }
-
- public partial class RenderSwitchMaterial
- {
- public static RenderSwitchMaterial[] FromJson(string json) => JsonConvert.DeserializeObject(json, Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this RenderSwitchMaterial[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- }
- };
- }
-}
diff --git a/FModel/Parser/Weapons/WeaponStatParser.cs b/FModel/Parser/Weapons/WeaponStatParser.cs
deleted file mode 100644
index 1626ed42..00000000
--- a/FModel/Parser/Weapons/WeaponStatParser.cs
+++ /dev/null
@@ -1,538 +0,0 @@
-//
-//
-// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
-//
-// using FModel.Parser.Weapons;
-//
-// var weaponStatParser = WeaponStatParser.FromJson(jsonString);
-
-namespace FModel.Parser.Weapons
-{
- using System;
-
- using System.Globalization;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
-
- public partial class WeaponStatParser
- {
- [JsonProperty("export_type")]
- public string ExportType { get; set; }
-
- [JsonProperty("Spread")]
- public double Spread { get; set; }
-
- [JsonProperty("SpreadDownsights")]
- public double SpreadDownsights { get; set; }
-
- [JsonProperty("StandingStillSpreadMultiplier")]
- public double StandingStillSpreadMultiplier { get; set; }
-
- [JsonProperty("AthenaCrouchingSpreadMultiplier")]
- public double AthenaCrouchingSpreadMultiplier { get; set; }
-
- [JsonProperty("AthenaJumpingFallingSpreadMultiplier")]
- public long AthenaJumpingFallingSpreadMultiplier { get; set; }
-
- [JsonProperty("AthenaSprintingSpreadMultiplier")]
- public double AthenaSprintingSpreadMultiplier { get; set; }
-
- [JsonProperty("MinSpeedForSpreadMultiplier")]
- public long MinSpeedForSpreadMultiplier { get; set; }
-
- [JsonProperty("MaxSpeedForSpreadMultiplier")]
- public long MaxSpeedForSpreadMultiplier { get; set; }
-
- [JsonProperty("SpreadDownsightsAdditionalCooldownTime")]
- public long SpreadDownsightsAdditionalCooldownTime { get; set; }
-
- [JsonProperty("HeatX1")]
- public double HeatX1 { get; set; }
-
- [JsonProperty("HeatY1")]
- public double HeatY1 { get; set; }
-
- [JsonProperty("HeatX2")]
- public double HeatX2 { get; set; }
-
- [JsonProperty("HeatY2")]
- public double HeatY2 { get; set; }
-
- [JsonProperty("HeatX3")]
- public long HeatX3 { get; set; }
-
- [JsonProperty("HeatY3")]
- public double HeatY3 { get; set; }
-
- [JsonProperty("HeatXScale")]
- public long HeatXScale { get; set; }
-
- [JsonProperty("HeatYScale")]
- public long HeatYScale { get; set; }
-
- [JsonProperty("CoolX1")]
- public double CoolX1 { get; set; }
-
- [JsonProperty("CoolY1")]
- public double CoolY1 { get; set; }
-
- [JsonProperty("CoolX2")]
- public double CoolX2 { get; set; }
-
- [JsonProperty("CoolY2")]
- public long CoolY2 { get; set; }
-
- [JsonProperty("CoolX3")]
- public long CoolX3 { get; set; }
-
- [JsonProperty("CoolY3")]
- public long CoolY3 { get; set; }
-
- [JsonProperty("CoolXScale")]
- public long CoolXScale { get; set; }
-
- [JsonProperty("CoolYScale")]
- public long CoolYScale { get; set; }
-
- [JsonProperty("PerfectAimCooldown")]
- public long PerfectAimCooldown { get; set; }
-
- [JsonProperty("BulletsPerCartridge")]
- public long BulletsPerCartridge { get; set; }
-
- [JsonProperty("FiringRate")]
- public double FiringRate { get; set; }
-
- [JsonProperty("ROFScale")]
- public long RofScale { get; set; }
-
- [JsonProperty("BurstFiringRate")]
- public long BurstFiringRate { get; set; }
-
- [JsonProperty("FiringRateDownsightsMultiplier")]
- public long FiringRateDownsightsMultiplier { get; set; }
-
- [JsonProperty("AutofireAcquisitionDelay")]
- public double AutofireAcquisitionDelay { get; set; }
-
- [JsonProperty("AutofireCooldown")]
- public long AutofireCooldown { get; set; }
-
- [JsonProperty("RecoilVert")]
- public double RecoilVert { get; set; }
-
- [JsonProperty("RecoilVertScale")]
- public long RecoilVertScale { get; set; }
-
- [JsonProperty("RecoilVertScaleGamepad")]
- public double RecoilVertScaleGamepad { get; set; }
-
- [JsonProperty("VertRecoilDownChance")]
- public long VertRecoilDownChance { get; set; }
-
- [JsonProperty("RecoilHoriz")]
- public double RecoilHoriz { get; set; }
-
- [JsonProperty("RecoilHorizScale")]
- public long RecoilHorizScale { get; set; }
-
- [JsonProperty("RecoilHorizScaleGamepad")]
- public long RecoilHorizScaleGamepad { get; set; }
-
- [JsonProperty("RecoilInterpSpeed")]
- public long RecoilInterpSpeed { get; set; }
-
- [JsonProperty("RecoilRecoveryInterpSpeed")]
- public double RecoilRecoveryInterpSpeed { get; set; }
-
- [JsonProperty("RecoilRecoveryDelay")]
- public long RecoilRecoveryDelay { get; set; }
-
- [JsonProperty("RecoilRecoveryFraction")]
- public long RecoilRecoveryFraction { get; set; }
-
- [JsonProperty("RecoilDownsightsMultiplier")]
- public double RecoilDownsightsMultiplier { get; set; }
-
- [JsonProperty("AthenaRecoilMagnitudeMin")]
- public long AthenaRecoilMagnitudeMin { get; set; }
-
- [JsonProperty("AthenaRecoilMagnitudeMax")]
- public long AthenaRecoilMagnitudeMax { get; set; }
-
- [JsonProperty("AthenaRecoilMagnitudeScale")]
- public long AthenaRecoilMagnitudeScale { get; set; }
-
- [JsonProperty("AthenaRecoilAngleMin")]
- public long AthenaRecoilAngleMin { get; set; }
-
- [JsonProperty("AthenaRecoilAngleMax")]
- public long AthenaRecoilAngleMax { get; set; }
-
- [JsonProperty("AthenaRecoilRollMagnitudeMin")]
- public long AthenaRecoilRollMagnitudeMin { get; set; }
-
- [JsonProperty("AthenaRecoilRollMagnitudeMax")]
- public long AthenaRecoilRollMagnitudeMax { get; set; }
-
- [JsonProperty("AthenaRecoilInterpSpeed")]
- public long AthenaRecoilInterpSpeed { get; set; }
-
- [JsonProperty("AthenaRecoilRecoveryInterpSpeed")]
- public long AthenaRecoilRecoveryInterpSpeed { get; set; }
-
- [JsonProperty("AthenaRecoilDownsightsMultiplier")]
- public double AthenaRecoilDownsightsMultiplier { get; set; }
-
- [JsonProperty("AthenaRecoilHipFireMultiplier")]
- public long AthenaRecoilHipFireMultiplier { get; set; }
-
- [JsonProperty("AthenaAimAssistRange")]
- public long AthenaAimAssistRange { get; set; }
-
- [JsonProperty("ADSTransitionInTime")]
- public double AdsTransitionInTime { get; set; }
-
- [JsonProperty("ADSTransitionOutTime")]
- public double AdsTransitionOutTime { get; set; }
-
- [JsonProperty("MaxSpareAmmo")]
- public long MaxSpareAmmo { get; set; }
-
- [JsonProperty("BulletsPerTracer")]
- public long BulletsPerTracer { get; set; }
-
- [JsonProperty("AIDelayBeforeFiringMin")]
- public long AiDelayBeforeFiringMin { get; set; }
-
- [JsonProperty("AIDelayBeforeFiringMax")]
- public double AiDelayBeforeFiringMax { get; set; }
-
- [JsonProperty("AIFireDurationMin")]
- public double AiFireDurationMin { get; set; }
-
- [JsonProperty("AIFireDurationMax")]
- public double AiFireDurationMax { get; set; }
-
- [JsonProperty("AIMinSpreadDuration")]
- public long AiMinSpreadDuration { get; set; }
-
- [JsonProperty("AIMaxSpreadDuration")]
- public long AiMaxSpreadDuration { get; set; }
-
- [JsonProperty("AIDurationSpreadMultiplier")]
- public long AiDurationSpreadMultiplier { get; set; }
-
- [JsonProperty("AIAdditionalSpreadForTargetMovingLaterally")]
- public long AiAdditionalSpreadForTargetMovingLaterally { get; set; }
-
- [JsonProperty("AIAthenaHearFiringNoiseRange")]
- public long AiAthenaHearFiringNoiseRange { get; set; }
-
- [JsonProperty("EQSDensity")]
- public long EqsDensity { get; set; }
-
- [JsonProperty("MinApproachRange")]
- public long MinApproachRange { get; set; }
-
- [JsonProperty("MinActualRange")]
- public long MinActualRange { get; set; }
-
- [JsonProperty("MinPreferredRange")]
- public long MinPreferredRange { get; set; }
-
- [JsonProperty("MinPreferredRangeEQS")]
- public long MinPreferredRangeEqs { get; set; }
-
- [JsonProperty("MaxPreferredRangeEQS")]
- public long MaxPreferredRangeEqs { get; set; }
-
- [JsonProperty("MaxPreferredRange")]
- public long MaxPreferredRange { get; set; }
-
- [JsonProperty("MaxActualRange")]
- public long MaxActualRange { get; set; }
-
- [JsonProperty("MaxApproachRange")]
- public long MaxApproachRange { get; set; }
-
- [JsonProperty("SweepRadius")]
- public long SweepRadius { get; set; }
-
- [JsonProperty("AutoReloadDelayOverride")]
- public long AutoReloadDelayOverride { get; set; }
-
- [JsonProperty("OverheatingMaxValue")]
- public long OverheatingMaxValue { get; set; }
-
- [JsonProperty("OverheatHeatingValue")]
- public long OverheatHeatingValue { get; set; }
-
- [JsonProperty("OverheatingCoolingValue")]
- public long OverheatingCoolingValue { get; set; }
-
- [JsonProperty("HeatingCooldownDelay")]
- public long HeatingCooldownDelay { get; set; }
-
- [JsonProperty("OverheatedCooldownDelay")]
- public long OverheatedCooldownDelay { get; set; }
-
- [JsonProperty("FortHomingTurnSpeedMin")]
- public long FortHomingTurnSpeedMin { get; set; }
-
- [JsonProperty("FortHomingTurnSpeedMax")]
- public long FortHomingTurnSpeedMax { get; set; }
-
- [JsonProperty("FortHomingTimeUntilMaxTurnSpeed")]
- public long FortHomingTimeUntilMaxTurnSpeed { get; set; }
-
- [JsonProperty("BaseLevel")]
- public long BaseLevel { get; set; }
-
- [JsonProperty("NamedWeightRow")]
- public string NamedWeightRow { get; set; }
-
- [JsonProperty("DmgPB")]
- public long DmgPb { get; set; }
-
- [JsonProperty("DmgMid")]
- public double DmgMid { get; set; }
-
- [JsonProperty("DmgLong")]
- public double DmgLong { get; set; }
-
- [JsonProperty("DmgMaxRange")]
- public double DmgMaxRange { get; set; }
-
- [JsonProperty("EnvDmgPB")]
- public long EnvDmgPb { get; set; }
-
- [JsonProperty("EnvDmgMid")]
- public long EnvDmgMid { get; set; }
-
- [JsonProperty("EnvDmgLong")]
- public long EnvDmgLong { get; set; }
-
- [JsonProperty("EnvDmgMaxRange")]
- public long EnvDmgMaxRange { get; set; }
-
- [JsonProperty("ImpactDmgPB")]
- public long ImpactDmgPb { get; set; }
-
- [JsonProperty("ImpactDmgMid")]
- public long ImpactDmgMid { get; set; }
-
- [JsonProperty("ImpactDmgLong")]
- public double ImpactDmgLong { get; set; }
-
- [JsonProperty("ImpactDmgMaxRange")]
- public double ImpactDmgMaxRange { get; set; }
-
- [JsonProperty("bForceControl")]
- public bool BForceControl { get; set; }
-
- [JsonProperty("RngPB")]
- public long RngPb { get; set; }
-
- [JsonProperty("RngMid")]
- public long RngMid { get; set; }
-
- [JsonProperty("RngLong")]
- public long RngLong { get; set; }
-
- [JsonProperty("RngMax")]
- public long RngMax { get; set; }
-
- [JsonProperty("DmgScaleTable")]
- [JsonConverter(typeof(ParseStringConverter))]
- public long DmgScaleTable { get; set; }
-
- [JsonProperty("DmgScaleTableRow")]
- public string DmgScaleTableRow { get; set; }
-
- [JsonProperty("DmgScale")]
- public long DmgScale { get; set; }
-
- [JsonProperty("EnvDmgScaleTable")]
- [JsonConverter(typeof(ParseStringConverter))]
- public long EnvDmgScaleTable { get; set; }
-
- [JsonProperty("EnvDmgScaleTableRow")]
- public string EnvDmgScaleTableRow { get; set; }
-
- [JsonProperty("EnvDmgScale")]
- public long EnvDmgScale { get; set; }
-
- [JsonProperty("ImpactDmgScaleTable")]
- [JsonConverter(typeof(ParseStringConverter))]
- public long ImpactDmgScaleTable { get; set; }
-
- [JsonProperty("ImpactDmgScaleTableRow")]
- public string ImpactDmgScaleTableRow { get; set; }
-
- [JsonProperty("ImpactDmgScale")]
- public long ImpactDmgScale { get; set; }
-
- [JsonProperty("SurfaceRatioRowName")]
- public string SurfaceRatioRowName { get; set; }
-
- [JsonProperty("DamageZone_Light")]
- public long DamageZoneLight { get; set; }
-
- [JsonProperty("DamageZone_Normal")]
- public long DamageZoneNormal { get; set; }
-
- [JsonProperty("DamageZone_Critical")]
- public long DamageZoneCritical { get; set; }
-
- [JsonProperty("DamageZone_Vulnerability")]
- public long DamageZoneVulnerability { get; set; }
-
- [JsonProperty("KnockbackMagnitude")]
- public long KnockbackMagnitude { get; set; }
-
- [JsonProperty("MidRangeKnockbackMagnitude")]
- public long MidRangeKnockbackMagnitude { get; set; }
-
- [JsonProperty("LongRangeKnockbackMagnitude")]
- public long LongRangeKnockbackMagnitude { get; set; }
-
- [JsonProperty("KnockbackZAngle")]
- public long KnockbackZAngle { get; set; }
-
- [JsonProperty("StunTime")]
- public long StunTime { get; set; }
-
- [JsonProperty("StunScale")]
- public long StunScale { get; set; }
-
- [JsonProperty("Durability")]
- public string Durability { get; set; }
-
- [JsonProperty("DurabilityRowName")]
- public string DurabilityRowName { get; set; }
-
- [JsonProperty("DurabilityScale")]
- public long DurabilityScale { get; set; }
-
- [JsonProperty("DurabilityPerUse")]
- public long DurabilityPerUse { get; set; }
-
- [JsonProperty("DiceCritChance")]
- public long DiceCritChance { get; set; }
-
- [JsonProperty("DiceCritDamageMultiplier")]
- public long DiceCritDamageMultiplier { get; set; }
-
- [JsonProperty("ReloadTime")]
- public double ReloadTime { get; set; }
-
- [JsonProperty("ReloadScale")]
- public long ReloadScale { get; set; }
-
- [JsonProperty("ReloadType")]
- public string ReloadType { get; set; }
-
- [JsonProperty("bAllowReloadInterrupt")]
- public bool BAllowReloadInterrupt { get; set; }
-
- [JsonProperty("bReloadInterruptIsImmediate")]
- public bool BReloadInterruptIsImmediate { get; set; }
-
- [JsonProperty("NumIndividualBulletsToReload")]
- public long NumIndividualBulletsToReload { get; set; }
-
- [JsonProperty("ClipSize")]
- public long ClipSize { get; set; }
-
- [JsonProperty("ClipScale")]
- public long ClipScale { get; set; }
-
- [JsonProperty("InitialClips")]
- public long InitialClips { get; set; }
-
- [JsonProperty("CartridgePerFire")]
- public long CartridgePerFire { get; set; }
-
- [JsonProperty("AmmoCostPerFire")]
- public long AmmoCostPerFire { get; set; }
-
- [JsonProperty("MaxAmmoCostPerFire")]
- public long MaxAmmoCostPerFire { get; set; }
-
- [JsonProperty("MinChargeTime")]
- public long MinChargeTime { get; set; }
-
- [JsonProperty("MaxChargeTime")]
- public long MaxChargeTime { get; set; }
-
- [JsonProperty("ChargeDownTime")]
- public long ChargeDownTime { get; set; }
-
- [JsonProperty("MinChargeDamageMultiplier")]
- public long MinChargeDamageMultiplier { get; set; }
-
- [JsonProperty("MaxChargeDamageMultiplier")]
- public long MaxChargeDamageMultiplier { get; set; }
-
- [JsonProperty("EquipAnimRate")]
- public long EquipAnimRate { get; set; }
-
- [JsonProperty("QuickBarSlotCooldownDuration")]
- public long QuickBarSlotCooldownDuration { get; set; }
- }
-
- public partial class WeaponStatParser
- {
- public static WeaponStatParser FromJson(string json) => JsonConvert.DeserializeObject(json, FModel.Parser.Weapons.Converter.Settings);
- }
-
- public static class Serialize
- {
- public static string ToJson(this WeaponStatParser self) => JsonConvert.SerializeObject(self, FModel.Parser.Weapons.Converter.Settings);
- }
-
- internal static class Converter
- {
- public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
- {
- MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
- DateParseHandling = DateParseHandling.None,
- Converters =
- {
- new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
- },
- };
- }
-
- internal class ParseStringConverter : JsonConverter
- {
- public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
-
- public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == JsonToken.Null) return null;
- var value = serializer.Deserialize(reader);
- long l;
- if (Int64.TryParse(value, out l))
- {
- return l;
- }
- throw new Exception("Cannot unmarshal type long");
- }
-
- public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
- {
- if (untypedValue == null)
- {
- serializer.Serialize(writer, null);
- return;
- }
- var value = (long)untypedValue;
- serializer.Serialize(writer, value.ToString());
- return;
- }
-
- public static readonly ParseStringConverter Singleton = new ParseStringConverter();
- }
-}
diff --git a/FModel/Properties/Settings.Designer.cs b/FModel/Properties/Settings.Designer.cs
index 6a5fab83..29e738d2 100644
--- a/FModel/Properties/Settings.Designer.cs
+++ b/FModel/Properties/Settings.Designer.cs
@@ -143,66 +143,6 @@ namespace FModel.Properties {
}
}
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UMCosmetics {
- get {
- return ((bool)(this["UMCosmetics"]));
- }
- set {
- this["UMCosmetics"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UMVariants {
- get {
- return ((bool)(this["UMVariants"]));
- }
- set {
- this["UMVariants"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMConsumablesWeapons {
- get {
- return ((bool)(this["UMConsumablesWeapons"]));
- }
- set {
- this["UMConsumablesWeapons"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMTraps {
- get {
- return ((bool)(this["UMTraps"]));
- }
- set {
- this["UMTraps"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UMChallenges {
- get {
- return ((bool)(this["UMChallenges"]));
- }
- set {
- this["UMChallenges"] = value;
- }
- }
-
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
@@ -251,102 +191,6 @@ namespace FModel.Properties {
}
}
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMTCosmeticsVariants {
- get {
- return ((bool)(this["UMTCosmeticsVariants"]));
- }
- set {
- this["UMTCosmeticsVariants"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UMTLoading {
- get {
- return ((bool)(this["UMTLoading"]));
- }
- set {
- this["UMTLoading"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMTWeapons {
- get {
- return ((bool)(this["UMTWeapons"]));
- }
- set {
- this["UMTWeapons"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UMTBanners {
- get {
- return ((bool)(this["UMTBanners"]));
- }
- set {
- this["UMTBanners"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UMTFeaturedIMGs {
- get {
- return ((bool)(this["UMTFeaturedIMGs"]));
- }
- set {
- this["UMTFeaturedIMGs"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMTAthena {
- get {
- return ((bool)(this["UMTAthena"]));
- }
- set {
- this["UMTAthena"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMTDevices {
- get {
- return ((bool)(this["UMTDevices"]));
- }
- set {
- this["UMTDevices"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UMTVehicles {
- get {
- return ((bool)(this["UMTVehicles"]));
- }
- set {
- this["UMTVehicles"] = value;
- }
- }
-
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
diff --git a/FModel/Properties/Settings.settings b/FModel/Properties/Settings.settings
index ec0b274b..7c984c02 100644
--- a/FModel/Properties/Settings.settings
+++ b/FModel/Properties/Settings.settings
@@ -32,21 +32,6 @@
-
- True
-
-
- True
-
-
- False
-
-
- False
-
-
- True
-
1
@@ -59,30 +44,6 @@
False
-
- False
-
-
- True
-
-
- False
-
-
- True
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
diff --git a/FModel/Resources/LBolt64.png b/FModel/Resources/LBolt64.png
index cec78271..9ad2d185 100644
Binary files a/FModel/Resources/LBolt64.png and b/FModel/Resources/LBolt64.png differ
diff --git a/README.md b/README.md
index 1774869c..b990bab5 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ Also if you find this project useful, feel free to give it a :star: thank you :k
1. Read, Search, Extract, Serialize
2. Icon Creation for various BR/STW Cosmetics or Challenges with language support
3. Icon Merger
- 4. Automatic detection for Dynamic PAKs Keys
+ 4. Automatic Key detection for Dynamic PAKs
5. Twitter Api Authentication to send Tweets from within FModel
### What i'm using
- [Fortnite Asset Parser](https://github.com/SirWaddles/JohnWickParse) - *C# Bind*
@@ -81,6 +81,7 @@ I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) if you
## TODO
- [ ] Code refactoring
+ - [ ] Schematics icon with weapon icon and ingredients
- [x] Translation support
- [x] AES Manager
- [x] Display support for .locres files