mirror of
https://github.com/4sval/FModel.git
synced 2026-04-21 00:57:46 -05:00
added cosmetic set
This commit is contained in:
parent
4f4c39980c
commit
b58d5c1090
|
|
@ -204,6 +204,7 @@
|
|||
<Compile Include="Parser\Banners\BannersParser.cs" />
|
||||
<Compile Include="Parser\Challenges\ChallengeBundleIdParser.cs" />
|
||||
<Compile Include="Parser\Featured\FeaturedParser.cs" />
|
||||
<Compile Include="Parser\Items\CosmeticSetsParser.cs" />
|
||||
<Compile Include="Parser\Items\ItemIDParser.cs" />
|
||||
<Compile Include="Parser\LocRes\LocResParser.cs" />
|
||||
<Compile Include="Parser\Meshes\MeshesParser.cs" />
|
||||
|
|
@ -270,6 +271,8 @@
|
|||
<Content Include="DLLs\csharp-wick.dll" />
|
||||
<Content Include="DLLs\ScintillaNET FindReplaceDialog.dll" />
|
||||
<Content Include="FModel.ico" />
|
||||
<None Include="Resources\wTemplateF.png" />
|
||||
<None Include="Resources\wTemplate.png" />
|
||||
<None Include="Resources\T512.png" />
|
||||
<None Include="Resources\U512.png" />
|
||||
<None Include="Resources\R512.png" />
|
||||
|
|
@ -297,8 +300,6 @@
|
|||
<None Include="Resources\T-Icon-Animated-64.png" />
|
||||
<None Include="Resources\T-Icon-Adaptive-64.png" />
|
||||
<None Include="Resources\FModel_Logo.png" />
|
||||
<None Include="Resources\wTemplateF.png" />
|
||||
<None Include="Resources\wTemplate.png" />
|
||||
<None Include="Resources\unknown512.png" />
|
||||
<None Include="Resources\properties_16xLG.png" />
|
||||
<None Include="Resources\StatusAnnotations_Information_16xLG_color.png" />
|
||||
|
|
|
|||
55
FModel/MainWindow.Designer.cs
generated
55
FModel/MainWindow.Designer.cs
generated
|
|
@ -84,6 +84,7 @@ namespace FModel
|
|||
this.saveAsJSONToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.extractFolderContentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
|
|
@ -162,26 +163,26 @@ namespace FModel
|
|||
// loadOneToolStripMenuItem
|
||||
//
|
||||
this.loadOneToolStripMenuItem.Name = "loadOneToolStripMenuItem";
|
||||
this.loadOneToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.loadOneToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.loadOneToolStripMenuItem.Text = "Load One PAK";
|
||||
this.loadOneToolStripMenuItem.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.loadOneToolStripMenuItem_DropDownItemClicked);
|
||||
//
|
||||
// loadAllToolStripMenuItem
|
||||
//
|
||||
this.loadAllToolStripMenuItem.Name = "loadAllToolStripMenuItem";
|
||||
this.loadAllToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.loadAllToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.loadAllToolStripMenuItem.Text = "Load All PAKs";
|
||||
this.loadAllToolStripMenuItem.Click += new System.EventHandler(this.loadAllToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(159, 6);
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// backupPAKsToolStripMenuItem
|
||||
//
|
||||
this.backupPAKsToolStripMenuItem.Name = "backupPAKsToolStripMenuItem";
|
||||
this.backupPAKsToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.backupPAKsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.backupPAKsToolStripMenuItem.Text = "Backup PAKs";
|
||||
this.backupPAKsToolStripMenuItem.Click += new System.EventHandler(this.backupPAKsToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
@ -189,7 +190,7 @@ namespace FModel
|
|||
//
|
||||
this.differenceModeToolStripMenuItem.CheckOnClick = true;
|
||||
this.differenceModeToolStripMenuItem.Name = "differenceModeToolStripMenuItem";
|
||||
this.differenceModeToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.differenceModeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.differenceModeToolStripMenuItem.Text = "Difference Mode";
|
||||
this.differenceModeToolStripMenuItem.CheckedChanged += new System.EventHandler(this.differenceModeToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
|
|
@ -198,21 +199,21 @@ namespace FModel
|
|||
this.updateModeToolStripMenuItem.CheckOnClick = true;
|
||||
this.updateModeToolStripMenuItem.Enabled = false;
|
||||
this.updateModeToolStripMenuItem.Name = "updateModeToolStripMenuItem";
|
||||
this.updateModeToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.updateModeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.updateModeToolStripMenuItem.Text = "Update Mode";
|
||||
this.updateModeToolStripMenuItem.CheckedChanged += new System.EventHandler(this.updateModeToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(159, 6);
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.Image = global::FModel.Properties.Resources.properties_16xLG;
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.settingsToolStripMenuItem.Text = "Settings";
|
||||
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
@ -220,8 +221,9 @@ namespace FModel
|
|||
//
|
||||
this.filesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.searchToolStripMenuItem,
|
||||
this.copySelectedFilePathToolStripMenuItem,
|
||||
this.saveAsJSONToolStripMenuItem});
|
||||
this.saveAsJSONToolStripMenuItem,
|
||||
this.toolStripSeparator5,
|
||||
this.copySelectedFilePathToolStripMenuItem});
|
||||
this.filesToolStripMenuItem.Name = "filesToolStripMenuItem";
|
||||
this.filesToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
|
||||
this.filesToolStripMenuItem.Text = "Files";
|
||||
|
|
@ -230,23 +232,22 @@ namespace FModel
|
|||
//
|
||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||
this.searchToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(216, 22);
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.searchToolStripMenuItem.Text = "Search";
|
||||
this.searchToolStripMenuItem.Click += new System.EventHandler(this.searchToolStripMenuItem_Click);
|
||||
//
|
||||
// copySelectedFilePathToolStripMenuItem
|
||||
//
|
||||
this.copySelectedFilePathToolStripMenuItem.Name = "copySelectedFilePathToolStripMenuItem";
|
||||
this.copySelectedFilePathToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
|
||||
this.copySelectedFilePathToolStripMenuItem.Size = new System.Drawing.Size(216, 22);
|
||||
this.copySelectedFilePathToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.copySelectedFilePathToolStripMenuItem.Text = "Copy Selected File Path";
|
||||
this.copySelectedFilePathToolStripMenuItem.Click += new System.EventHandler(this.CopySelectedFilePathToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsJSONToolStripMenuItem
|
||||
//
|
||||
this.saveAsJSONToolStripMenuItem.Name = "saveAsJSONToolStripMenuItem";
|
||||
this.saveAsJSONToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F4;
|
||||
this.saveAsJSONToolStripMenuItem.Size = new System.Drawing.Size(216, 22);
|
||||
this.saveAsJSONToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
|
||||
this.saveAsJSONToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.saveAsJSONToolStripMenuItem.Text = "Save as JSON";
|
||||
this.saveAsJSONToolStripMenuItem.Click += new System.EventHandler(this.SaveAsJSONToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
@ -266,7 +267,7 @@ namespace FModel
|
|||
// saveImageToolStripMenuItem
|
||||
//
|
||||
this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem";
|
||||
this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.saveImageToolStripMenuItem.Text = "Save Image";
|
||||
this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
@ -274,30 +275,31 @@ namespace FModel
|
|||
//
|
||||
this.autoSaveImagesToolStripMenuItem.CheckOnClick = true;
|
||||
this.autoSaveImagesToolStripMenuItem.Name = "autoSaveImagesToolStripMenuItem";
|
||||
this.autoSaveImagesToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.autoSaveImagesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.autoSaveImagesToolStripMenuItem.Text = "Auto Save Images";
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(165, 6);
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// mergeImagesToolStripMenuItem
|
||||
//
|
||||
this.mergeImagesToolStripMenuItem.Name = "mergeImagesToolStripMenuItem";
|
||||
this.mergeImagesToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.mergeImagesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.mergeImagesToolStripMenuItem.Text = "Merge Images";
|
||||
this.mergeImagesToolStripMenuItem.Click += new System.EventHandler(this.mergeImagesToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(165, 6);
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// tweetToolStripMenuItem
|
||||
//
|
||||
this.tweetToolStripMenuItem.Name = "tweetToolStripMenuItem";
|
||||
this.tweetToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.tweetToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F4;
|
||||
this.tweetToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.tweetToolStripMenuItem.Text = "Tweet";
|
||||
this.tweetToolStripMenuItem.Click += new System.EventHandler(this.TweetToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
@ -313,7 +315,7 @@ namespace FModel
|
|||
//
|
||||
this.aboutFModelToolStripMenuItem.Image = global::FModel.Properties.Resources.StatusAnnotations_Information_16xLG_color;
|
||||
this.aboutFModelToolStripMenuItem.Name = "aboutFModelToolStripMenuItem";
|
||||
this.aboutFModelToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.aboutFModelToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.aboutFModelToolStripMenuItem.Text = "About FModel";
|
||||
this.aboutFModelToolStripMenuItem.Click += new System.EventHandler(this.aboutFModelToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
@ -480,6 +482,7 @@ namespace FModel
|
|||
// scintilla1
|
||||
//
|
||||
this.scintilla1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.scintilla1.CaretPeriod = 400;
|
||||
this.scintilla1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.scintilla1.IndentationGuides = ScintillaNET.IndentView.Real;
|
||||
this.scintilla1.Location = new System.Drawing.Point(3, 3);
|
||||
|
|
@ -578,7 +581,7 @@ namespace FModel
|
|||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.extractFolderContentsToolStripMenuItem});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip2";
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(197, 48);
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(197, 26);
|
||||
//
|
||||
// extractFolderContentsToolStripMenuItem
|
||||
//
|
||||
|
|
@ -587,6 +590,11 @@ namespace FModel
|
|||
this.extractFolderContentsToolStripMenuItem.Text = "Extract Folder Contents";
|
||||
this.extractFolderContentsToolStripMenuItem.Click += new System.EventHandler(this.ExtractFolderContentsToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(194, 6);
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
@ -676,6 +684,7 @@ namespace FModel
|
|||
private System.Windows.Forms.ToolStripMenuItem tweetToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
|
||||
private System.Windows.Forms.ToolStripMenuItem extractFolderContentsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ namespace FModel
|
|||
AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
|
||||
}
|
||||
}
|
||||
else { new UpdateMyConsole(Path.GetFileName(arCurrentUsedPak) + " is locked by another process.", Color.Red, true).AppendToConsole(); }
|
||||
else { new UpdateMyConsole("[FModel]" + Path.GetFileName(arCurrentUsedPak) + " is locked by another process.", Color.Red, true).AppendToConsole(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABa
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAbgBAQG4AQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAcABAQHAAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
using csharp_wick;
|
||||
using FModel.Parser.Items;
|
||||
using FModel.Parser.LocResParser;
|
||||
using FModel.Properties;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
namespace FModel
|
||||
|
|
@ -13,6 +14,7 @@ namespace FModel
|
|||
static class DrawText
|
||||
{
|
||||
private static string CosmeticSource { get; set; }
|
||||
private static string CosmeticSet { get; set; }
|
||||
private static string ShortDescription { get; set; }
|
||||
private static string CosmeticId { get; set; }
|
||||
private static string MaxStackSize { get; set; }
|
||||
|
|
@ -22,17 +24,18 @@ namespace FModel
|
|||
private static string HeroType { get; set; }
|
||||
private static string DefenderType { get; set; }
|
||||
private static string MinToMax { get; set; }
|
||||
private static JObject jo { get; set; }
|
||||
private static JObject wStatsjo { get; set; }
|
||||
private static JObject cSetsjo { get; set; }
|
||||
|
||||
public static void DrawTexts(ItemsIdParser theItem, Graphics myGraphic, string mode)
|
||||
{
|
||||
using (myGraphic)
|
||||
{
|
||||
SetTexts(theItem);
|
||||
|
||||
DrawDisplayName(theItem, myGraphic);
|
||||
DrawDescription(theItem, myGraphic);
|
||||
|
||||
SetTexts(theItem);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case "athIteDef":
|
||||
|
|
@ -81,6 +84,7 @@ namespace FModel
|
|||
private static void SetTexts(ItemsIdParser theItem)
|
||||
{
|
||||
CosmeticSource = "";
|
||||
CosmeticSet = "";
|
||||
ShortDescription = "";
|
||||
CosmeticId = "";
|
||||
MaxStackSize = "";
|
||||
|
|
@ -121,6 +125,14 @@ namespace FModel
|
|||
//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);
|
||||
}
|
||||
|
|
@ -261,10 +273,102 @@ namespace FModel
|
|||
//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))
|
||||
{
|
||||
string theSet = DrawCosmeticSet(CosmeticSet);
|
||||
if (!string.IsNullOrEmpty(theSet))
|
||||
{
|
||||
text += theSet;
|
||||
}
|
||||
}
|
||||
myGraphic.DrawString(text, new Font("Arial", 9), new SolidBrush(Color.White), new RectangleF(5, 455, 512, 42), FontUtilities.rightString);
|
||||
}
|
||||
}
|
||||
|
||||
private static string DrawCosmeticSet(string setName)
|
||||
{
|
||||
if (cSetsjo == null)
|
||||
{
|
||||
string oldKey = JohnWick.MyKey; //get the old key
|
||||
string oldGuid = ThePak.CurrentUsedPakGuid; //get the old guid
|
||||
JohnWick.MyKey = Settings.Default.AESKey; //set the main key to extract
|
||||
ThePak.CurrentUsedPakGuid = "0-0-0-0"; //fake the guid -> writeFile need this guid to get the mountPoint, otherwise it crashes
|
||||
|
||||
string extractedCosmeticsSetsPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["CosmeticSets"], "CosmeticSets");
|
||||
|
||||
JohnWick.MyKey = oldKey; //set the old key
|
||||
ThePak.CurrentUsedPakGuid = oldGuid; //set the old guid
|
||||
|
||||
if (extractedCosmeticsSetsPath != null)
|
||||
{
|
||||
if (extractedCosmeticsSetsPath.Contains(".uasset") || extractedCosmeticsSetsPath.Contains(".uexp") || extractedCosmeticsSetsPath.Contains(".ubulk"))
|
||||
{
|
||||
JohnWick.MyAsset = new PakAsset(extractedCosmeticsSetsPath.Substring(0, extractedCosmeticsSetsPath.LastIndexOf('.')));
|
||||
try
|
||||
{
|
||||
if (JohnWick.MyAsset.GetSerialized() != null)
|
||||
{
|
||||
string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString().TrimStart('[').TrimEnd(']');
|
||||
cSetsjo = JObject.Parse(parsedJson);
|
||||
return searchSetName(setName);
|
||||
}
|
||||
else { return ""; }
|
||||
}
|
||||
catch (JsonSerializationException)
|
||||
{
|
||||
return "";
|
||||
//do not crash when JsonSerialization does weird stuff
|
||||
}
|
||||
}
|
||||
else { return ""; }
|
||||
}
|
||||
else { return ""; }
|
||||
}
|
||||
else { return searchSetName(setName); }
|
||||
}
|
||||
private static string searchSetName(string setName)
|
||||
{
|
||||
string toReturn = "";
|
||||
|
||||
JToken setToken = cSetsjo.FindTokens(setName).FirstOrDefault();
|
||||
Parser.CosmeticSetsParser.CosmeticSetsParser cSetsParsed = Parser.CosmeticSetsParser.CosmeticSetsParser.FromJson(setToken.ToString());
|
||||
|
||||
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":
|
||||
JToken setNameTokenLocalized = SearchResource.jo.FindTokens("CosmeticSets").FirstOrDefault();
|
||||
string parsedJson = JToken.Parse(setNameTokenLocalized.ToString()).ToString().TrimStart('[').TrimEnd(']');
|
||||
JToken setNameToken = JObject.Parse(parsedJson).FindTokens(cSetsParsed.DisplayName.Key).FirstOrDefault();
|
||||
string translatedName = setNameToken == null ? cSetsParsed.DisplayName.SourceString : setNameToken.ToString();
|
||||
|
||||
JToken setDescriptionToken = SearchResource.jo.FindTokens("Fort.Cosmetics").FirstOrDefault();
|
||||
LocResParser dTokenParsed = LocResParser.FromJson(setDescriptionToken.ToString());
|
||||
if (dTokenParsed.CosmeticItemDescriptionSetMembershipNotRich != null)
|
||||
{
|
||||
toReturn = string.Format(dTokenParsed.CosmeticItemDescriptionSetMembershipNotRich, translatedName);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
toReturn = string.Format("\nPart of the {0} set.", cSetsParsed.DisplayName.SourceString);
|
||||
break;
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// draw text at bottom right
|
||||
/// </summary>
|
||||
|
|
@ -316,7 +420,7 @@ namespace FModel
|
|||
/// <param name="myGraphic"></param>
|
||||
private static void DrawWeaponStat(string weaponName, Graphics myGraphic)
|
||||
{
|
||||
if (jo == null)
|
||||
if (wStatsjo == null)
|
||||
{
|
||||
ItemIcon.ItemIconPath = string.Empty;
|
||||
string extractedWeaponsStatPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["AthenaRangedWeapons"], "AthenaRangedWeapons");
|
||||
|
|
@ -330,7 +434,7 @@ namespace FModel
|
|||
if (JohnWick.MyAsset.GetSerialized() != null)
|
||||
{
|
||||
string parsedJson = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString().TrimStart('[').TrimEnd(']');
|
||||
jo = JObject.Parse(parsedJson);
|
||||
wStatsjo = JObject.Parse(parsedJson);
|
||||
loopingLol(weaponName, myGraphic);
|
||||
}
|
||||
}
|
||||
|
|
@ -345,7 +449,7 @@ namespace FModel
|
|||
}
|
||||
private static void loopingLol(string weaponName, Graphics myGraphic)
|
||||
{
|
||||
foreach (JToken token in jo.FindTokens(weaponName))
|
||||
foreach (JToken token in wStatsjo.FindTokens(weaponName))
|
||||
{
|
||||
Parser.Weapons.WeaponStatParser statParsed = Parser.Weapons.WeaponStatParser.FromJson(token.ToString());
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using System.Drawing;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
static class LoadLocRes
|
||||
|
|
@ -63,20 +65,33 @@ namespace FModel
|
|||
/// <returns></returns>
|
||||
private static string getMyLocRes(string selectedLanguage)
|
||||
{
|
||||
if (ThePak.AllpaksDictionary != null && ThePak.AllpaksDictionary["Game_BR.locres"] != null)
|
||||
if (ThePak.AllpaksDictionary != null)
|
||||
{
|
||||
string oldKey = JohnWick.MyKey; //get the old key
|
||||
string oldGuid = ThePak.CurrentUsedPakGuid; //get the old guid
|
||||
if (ThePak.AllpaksDictionary.ContainsKey("Game_BR.locres"))
|
||||
{
|
||||
string oldKey = JohnWick.MyKey; //get the old key
|
||||
string oldGuid = ThePak.CurrentUsedPakGuid; //get the old guid
|
||||
|
||||
JohnWick.MyKey = Properties.Settings.Default.AESKey; //set the main key to extract
|
||||
ThePak.CurrentUsedPakGuid = "0-0-0-0"; //fake the guid -> writeFile need this guid to get the mountPoint, otherwise it crashes
|
||||
JohnWick.MyKey = Properties.Settings.Default.AESKey; //set the main key to extract
|
||||
ThePak.CurrentUsedPakGuid = "0-0-0-0"; //fake the guid -> writeFile need this guid to get the mountPoint, otherwise it crashes
|
||||
|
||||
string locResPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["Game_BR.locres"], "Game_BR.locres");
|
||||
string locResPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["Game_BR.locres"], "Game_BR.locres");
|
||||
|
||||
JohnWick.MyKey = oldKey; //set the old key
|
||||
ThePak.CurrentUsedPakGuid = oldGuid; //set the old guid
|
||||
JohnWick.MyKey = oldKey; //set the old key
|
||||
ThePak.CurrentUsedPakGuid = oldGuid; //set the old guid
|
||||
|
||||
return LocResSerializer.StringFinder(locResPath.Replace("zh-Hant", selectedLanguage));
|
||||
return LocResSerializer.StringFinder(locResPath.Replace("zh-Hant", selectedLanguage));
|
||||
}
|
||||
else
|
||||
{
|
||||
new UpdateMyConsole("[FModel] Localization File Not Found - Icon Language set to English", Color.DarkRed, true).AppendToConsole();
|
||||
new UpdateMyConsole("", Color.Black, true).AppendToConsole();
|
||||
|
||||
Properties.Settings.Default.IconLanguage = "English";
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
else { return ""; }
|
||||
}
|
||||
|
|
|
|||
67
FModel/Parser/Items/CosmeticSetsParser.cs
Normal file
67
FModel/Parser/Items/CosmeticSetsParser.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
// <auto-generated />
|
||||
//
|
||||
// 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("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<CosmeticSetsParser>(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 }
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,9 @@ namespace FModel.Parser.LocResParser
|
|||
|
||||
[JsonProperty("CompletionRewardFormat")]
|
||||
public string CompletionRewardFormat { get; set; }
|
||||
|
||||
[JsonProperty("CosmeticItemDescription_SetMembership_NotRich")]
|
||||
public string CosmeticItemDescriptionSetMembershipNotRich { get; set; }
|
||||
}
|
||||
|
||||
public partial class LocResParser
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 26 KiB |
45
README.md
45
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# FModel
|
||||
[](https://github.com/iAmAsval/FModel/releases)
|
||||
[](https://github.com/iAmAsval/FModel//releases/latest)
|
||||
[](https://github.com/iAmAsval/FModel//releases/latest)
|
||||
[](https://github.com/iAmAsval/FModel/blob/master/LICENSE)
|
||||
[](https://twitter.com/AsvalFN)
|
||||
[](https://discord.gg/JmWvXKb)
|
||||
|
|
@ -11,25 +11,25 @@
|
|||
### Prerequisites
|
||||
[.NET Framework 4.7.1](https://dotnet.microsoft.com/download/dotnet-framework/net471)
|
||||
### Download
|
||||
[](https://github.com/iAmAsval/FModel/releases/tag/2.4.1)
|
||||
### How does it works
|
||||
[](https://github.com/iAmAsval/FModel/releases/tag/2.4.1)
|
||||
### How To Use
|
||||
**1.** Once you start the executable, you'll be asked to set your path to your Fortnite .PAK files. Meanwhile a `FModel` subfolder will be created in your `Documents` folder.
|
||||

|
||||
|
||||
**2.** Restart the executable, go to the AES Manager and add you AES Keys, click **Load** and select your .PAK file
|
||||
**2.** Restart the executable, go to the AES Manager and add your AES Keys, click **Load** and select your .PAK file
|
||||
- It will parse all Assets contained in the selected .PAK file with their respective path
|
||||
|
||||
**3.** Navigate through the tree to find the Asset you want
|
||||
|
||||
**4.** Clicking on **Extract** will extract the selected Asset to your `Documents` folder, it will also try to serialize it and will display information about it
|
||||
- if the Asset is an **_ID_**:
|
||||
- Try to create an [Icon](https://i.imgur.com/etUcOEj.png) with **Name**, **Description**, **Rarity**, **Type** and the **Cosmetic Source**
|
||||
- if the Asset is an **_Item Definition_**:
|
||||
- Try to create an [Icon](https://i.imgur.com/re4aSuJ.png) with **Name**, **Description**, **Rarity**, **Type** and the **Cosmetic Source**
|
||||
- if the Asset is a **_Bundle Of Challenges_**:
|
||||
- Try to create an [Icon](https://i.imgur.com/pUVxUih.png) with all **Challenges' Description**, **Count** and the **Reward**
|
||||
- if the Asset is a **_Texture_**:
|
||||
- Try to display the Asset as PNG
|
||||
- if the Asset is a **_Sound_**:
|
||||
- Try to convert the Asset to OGG and play the sound
|
||||
- if the Asset is a **_Bundle Of Challenges_**:
|
||||
- Try to create an [Icon](https://i.imgur.com/pUVxUih.png) with all **Challenges' Description**, **Count** and the **Reward**
|
||||
- if the Asset is a **_Font_**:
|
||||
- Try to convert the Asset to OTF
|
||||
|
||||
|
|
@ -58,15 +58,11 @@ If issues occur when compiling the source code, make sure that the software is b
|
|||
If somehow FModel crashed due to permissions, please either disable Windows Defender or add and exception for FModel.exe.
|
||||
Also if you find this project useful, feel free to give it a :star: thank you :kissing_heart:
|
||||
### Features
|
||||
1. Extract
|
||||
2. Serialize (CTRL+F/G/I support)
|
||||
3. Filter & Search
|
||||
4. Create Cosmetics Icon
|
||||
5. Create Challenges Icon
|
||||
6. Merge Icons
|
||||
7. Backup current .PAK files
|
||||
8. Load difference between current .PAK files and backup file
|
||||
9. Load, Extract and Save Assets automatically between current .PAK files and backup file
|
||||
1. Read, Search, Extract, Serialize
|
||||
2. Icon Creation for various BR/STW Cosmetics or Challenges with language support
|
||||
3. Icon Merger
|
||||
4. Fortnite Api Authentication to automatically get Keys 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*
|
||||
- [AutoUpdater.NET](https://github.com/ravibpatel/AutoUpdater.NET)
|
||||
|
|
@ -78,28 +74,21 @@ Also if you find this project useful, feel free to give it a :star: thank you :k
|
|||
<table><tr><td align="center"><a href="https://github.com/SirWaddles"><img src="https://avatars1.githubusercontent.com/u/769399?s=200&v=4" width="100px;" alt="Waddlesworth"/><br /><sub><b>Waddlesworth</b></sub></a><br><a href="https://github.com/SirWaddles" title="Github">🔧</a></td><td align="center"><a href="https://github.com/MaikyM"><img src="https://avatars3.githubusercontent.com/u/51415805?s=200&v=4" width="100px;" alt="Maiky M"/><br /><sub><b>Maiky M</b></sub></a><br /><a href="https://github.com/MaikyM" title="Github">🔧</a><a href="https://twitter.com/MaikyMOficial" title="Twitter">🐦</a></td><td align="center"><a href="https://github.com/AyeTSG"><img src="https://avatars1.githubusercontent.com/u/49595354?s=200&v=4" width="100px;" alt="AyeTSG"/><br><sub><b>AyeTSG</b></sub></a><br><a href="https://github.com/AyeTSG" title="Github">🔧</a><a href="https://twitter.com/AyeTSG" title="Twitter">🐦</a></td><td align="center"><a href="https://github.com/ItsFireMonkey"><img src="https://avatars2.githubusercontent.com/u/38590471?s=200&v=4" width="100px;" alt="FireMonkey"/><br /><sub><b>FireMonkey</b></sub></a><br><a href="https://github.com/ItsFireMonkey" title="Github">🔧</a><a href="https://twitter.com/iFireMonkey" title="Twitter">🐦</a></td></tr></table>
|
||||
|
||||
|
||||
### Why FModel
|
||||
This project is mainly based on what [UModel](https://github.com/gildor2/UModel) can do, in a personalized way, if UModel doesn't work, as a temporary rescue solution.
|
||||
I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) instead if you wanna use something made professionally.
|
||||
### The History
|
||||
Basically i was bored and wanted to make something like [UModel](https://github.com/gildor2/UModel) but with a Fortnite Touch and more features.
|
||||
|
||||
I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) if you wanna use something made professionally.
|
||||
|
||||
## TODO
|
||||
- [ ] Take a look at memory usage
|
||||
- [ ] Code refactoring
|
||||
- [ ] 2FA support
|
||||
- [ ] Export Queue
|
||||
- [x] Translation support
|
||||
- [x] AES Manager
|
||||
- [x] Display support for .locres files
|
||||
- [x] Nintendo Switch PAKs
|
||||
- [x] Multithreading
|
||||
- [x] Stop button
|
||||
- [x] Auto update
|
||||
- [x] CTRL F, CTRL G, CTRL I for jsonTextBox
|
||||
- [x] STW Icons
|
||||
- [x] Update Mode
|
||||
- [x] Search through PAKs
|
||||
- [x] Improve speed
|
||||
- [x] Filter for the items ListBox
|
||||
- [x] Quest viewer or something
|
||||
- [x] Load all paks
|
||||
- [x] Load only difference between 2 paks version
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user