diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj
index 9c5804a3..d93e65b7 100644
--- a/FModel/FModel.csproj
+++ b/FModel/FModel.csproj
@@ -250,6 +250,7 @@
+
diff --git a/FModel/Forms/About.Designer.cs b/FModel/Forms/About.Designer.cs
index 32286cbf..a92c7b02 100644
--- a/FModel/Forms/About.Designer.cs
+++ b/FModel/Forms/About.Designer.cs
@@ -110,9 +110,9 @@
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(53, 124);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(277, 13);
+ this.label4.Size = new System.Drawing.Size(241, 13);
this.label4.TabIndex = 11;
- this.label4.Text = "• Asval • Waddlesworth • AyeTSG • FireMonkey • Maiky M";
+ this.label4.Text = "• Waddlesworth • Maiky M • AyeTSG • FireMonkey";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// About
diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs
index 5bdeb555..e2451ba2 100644
--- a/FModel/MainWindow.cs
+++ b/FModel/MainWindow.cs
@@ -120,7 +120,22 @@ namespace FModel
for (int i = 0; i < yourPaKs.Count(); i++)
{
string arCurrentUsedPak = yourPaKs.ElementAt(i); //SET CURRENT PAK
- if (!Utilities.IsFileLocked(new System.IO.FileInfo(arCurrentUsedPak)))
+ string arCurrentUsedPakGuid = ThePak.ReadPakGuid(Settings.Default.PAKsPath + "\\" + Path.GetFileName(arCurrentUsedPak)); //SET CURRENT PAK GUID
+
+ if (arCurrentUsedPakGuid == "0-0-0-0")
+ {
+ ThePak.mainPaksList.Add(new PaksEntry(Path.GetFileName(arCurrentUsedPak), arCurrentUsedPakGuid));
+ AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
+ }
+ if (arCurrentUsedPakGuid != "0-0-0-0")
+ {
+ ThePak.dynamicPaksList.Add(new PaksEntry(Path.GetFileName(arCurrentUsedPak), arCurrentUsedPakGuid));
+ AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
+ }
+
+ //IT'S TRIGGERED WHEN FORTNITE IS RUNNING BUT FILES CAN BE READ AND I WANT IT TO BE TRIGGERED WHEN FILE IS FULLY LOCKED AND CAN'T BE USED AT ALL
+ //aka while you're updating the game
+ /*if (!Utilities.IsFileLocked(new System.IO.FileInfo(arCurrentUsedPak)))
{
string arCurrentUsedPakGuid = ThePak.ReadPakGuid(Settings.Default.PAKsPath + "\\" + Path.GetFileName(arCurrentUsedPak)); //SET CURRENT PAK GUID
@@ -135,7 +150,7 @@ namespace FModel
AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
}
}
- else { AppendText(Path.GetFileName(arCurrentUsedPak) + " is locked by another process.", Color.Red, true); }
+ else { AppendText(Path.GetFileName(arCurrentUsedPak) + " is locked by another process.", Color.Red, true); }*/
}
}
}
@@ -473,6 +488,12 @@ namespace FModel
}));
}
}
+ else
+ {
+ AppendText("Canceled! ", Color.Red);
+ AppendText("All pak files loaded...", Color.Black, true);
+ return;
+ }
if (File.Exists(App.DefaultOutputPath + "\\Result.txt"))
{
@@ -543,7 +564,7 @@ namespace FModel
//ADD TO DICTIONNARY
RegisterPaKsinDict(null, true);
- if (!File.Exists(App.DefaultOutputPath + "\\FortnitePAKs.txt"))
+ if (new System.IO.FileInfo(App.DefaultOutputPath + "\\FortnitePAKs.txt").Length <= 0)
{
UpdateConsole("Can't read .PAK files with this key", Color.FromArgb(255, 244, 66, 66), "Error");
}
@@ -1285,7 +1306,6 @@ namespace FModel
DrawText.DrawTexts(theItem, g, specialMode);
- UpdateConsole(theItem.DisplayName.SourceString, Color.FromArgb(255, 66, 244, 66), "Success");
if (autoSaveImagesToolStripMenuItem.Checked || updateModeToolStripMenuItem.Checked)
{
bmp.Save(App.DefaultOutputPath + "\\Icons\\" + ThePak.CurrentUsedItem + ".png", ImageFormat.Png);
diff --git a/FModel/Methods/AESManager/DynamicKeysManager.cs b/FModel/Methods/AESManager/DynamicKeysManager.cs
index db2773f9..a6fb4300 100644
--- a/FModel/Methods/AESManager/DynamicKeysManager.cs
+++ b/FModel/Methods/AESManager/DynamicKeysManager.cs
@@ -1,6 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
+using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
diff --git a/FModel/Methods/ChallengeGenerator/BundleInfos.cs b/FModel/Methods/ChallengeGenerator/BundleInfos.cs
index 5f3e2863..e9a67d4e 100644
--- a/FModel/Methods/ChallengeGenerator/BundleInfos.cs
+++ b/FModel/Methods/ChallengeGenerator/BundleInfos.cs
@@ -113,10 +113,17 @@ namespace FModel
if (questParser[x].ObjectiveCompletionCount > 0)
newCount = questParser[x].ObjectiveCompletionCount;
+ //fortbyte check
bool isFortbyte = false;
- var assetTypeToken = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name == "Token").FirstOrDefault();
- if (assetTypeToken != null)
- isFortbyte = assetTypeToken.ItemPrimaryAssetId.PrimaryAssetName == "AthenaFortbyte";
+ 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)
+ {
+ assetTypeToken = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name == "Token").FirstOrDefault();
+ if (assetTypeToken != null)
+ {
+ isFortbyte = assetTypeToken.ItemPrimaryAssetId.PrimaryAssetName == "AthenaFortbyte";
+ }
+ }
if (newQuest != oldQuest && newCount != oldCount)
{
diff --git a/FModel/Methods/IconGenerator/DrawText.cs b/FModel/Methods/IconGenerator/DrawText.cs
index 2e19d009..b0f5cfd3 100644
--- a/FModel/Methods/IconGenerator/DrawText.cs
+++ b/FModel/Methods/IconGenerator/DrawText.cs
@@ -71,7 +71,7 @@ namespace FModel
}
///
- /// find a better way to handle errors
+ /// todo: find a better way to handle errors
///
///
private static void SetTexts(ItemsIdParser theItem)
@@ -366,17 +366,21 @@ namespace FModel
{
foreach (JToken token in jo.FindTokens(weaponName))
{
- var statParsed = Parser.Weapons.WeaponStatParser.FromJson(token.ToString());
+ Parser.Weapons.WeaponStatParser statParsed = Parser.Weapons.WeaponStatParser.FromJson(token.ToString());
Image bulletImage = Resources.dmg64;
myGraphic.DrawImage(ImageUtilities.ResizeImage(bulletImage, 15, 15), new Point(5, 500));
+ DrawToLeft(" " + statParsed.DmgPb, myGraphic); //damage per bullet
Image clipSizeImage = Resources.clipSize64;
myGraphic.DrawImage(ImageUtilities.ResizeImage(clipSizeImage, 15, 15), new Point(52, 500));
-
- DrawToRight("Reload Time: " + statParsed.ReloadTime + " seconds", myGraphic);
- DrawToLeft(" " + statParsed.DmgPb, myGraphic); //damage per bullet
myGraphic.DrawString(" " + statParsed.ClipSize, new Font(FontUtilities.pfc.Families[0], 13), new SolidBrush(Color.White), new Point(50, 500));
+
+ Image reload = Resources.reload64;
+ myGraphic.DrawImage(ImageUtilities.ResizeImage(reload, 15, 15), new Point(50 + (statParsed.ClipSize.ToString().Length * 7) + 47, 500)); //50=clipsize text position | for each clipsize letter we add 7 to x | 47=difference between 2 icons
+ myGraphic.DrawString(statParsed.ReloadTime + " seconds", new Font(FontUtilities.pfc.Families[0], 13), new SolidBrush(Color.White), new Point(64 + (statParsed.ClipSize.ToString().Length * 7) + 47, 500)); //64=50+icon size (-1 because that wasn't perfectly at the position i wanted)
+
+ DrawToRight(weaponName, myGraphic);
}
}
diff --git a/FModel/Methods/IconGenerator/Translations/LoadLocRes.cs b/FModel/Methods/IconGenerator/Translations/LoadLocRes.cs
index 12f0bad5..b8c2c81e 100644
--- a/FModel/Methods/IconGenerator/Translations/LoadLocRes.cs
+++ b/FModel/Methods/IconGenerator/Translations/LoadLocRes.cs
@@ -41,6 +41,7 @@ namespace FModel
if (ThePak.AllpaksDictionary != null && ThePak.AllpaksDictionary["Game_BR.locres"] != null)
{
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
@@ -48,6 +49,7 @@ namespace FModel
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
return LocResSerializer.StringFinder(locResPath.Replace("zh-Hant", selectedLanguage));
}
diff --git a/FModel/Methods/IconGenerator/Translations/SearchResource.cs b/FModel/Methods/IconGenerator/Translations/SearchResource.cs
index 4818606a..0d2f976c 100644
--- a/FModel/Methods/IconGenerator/Translations/SearchResource.cs
+++ b/FModel/Methods/IconGenerator/Translations/SearchResource.cs
@@ -9,7 +9,14 @@ namespace FModel
private static JObject jo { get; set; }
private static string oldLanguage = Properties.Settings.Default.IconLanguage;
- public static string getTranslatedText(string theNamespace)
+ ///
+ /// for most (if not all) of our translations there's no namespace so we just have to find the key in the string
+ /// once found, we only take the part between this key and we parse to get out LocResText
+ /// To improve speed, we check if the language has change or if JObject has never been loaded
+ ///
+ ///
+ ///
+ public static string getTranslatedText(string theKey)
{
string toReturn = string.Empty;
string newLanguage = Properties.Settings.Default.IconLanguage;
@@ -19,7 +26,8 @@ namespace FModel
parsedJsonToCheck = JToken.Parse(LoadLocRes.myLocRes).ToString().TrimStart('[').TrimEnd(']');
jo = JObject.Parse(parsedJsonToCheck);
}
- foreach (JToken token in jo.FindTokens(theNamespace))
+
+ foreach (JToken token in jo.FindTokens(theKey))
{
LocResParser LocResParse = LocResParser.FromJson(token.ToString());
if (LocResParse.LocResText != null)
diff --git a/FModel/Properties/Resources.Designer.cs b/FModel/Properties/Resources.Designer.cs
index 0629a9b4..597c3dfb 100644
--- a/FModel/Properties/Resources.Designer.cs
+++ b/FModel/Properties/Resources.Designer.cs
@@ -240,6 +240,16 @@ namespace FModel.Properties {
}
}
+ ///
+ /// Recherche une ressource localisée de type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap reload64 {
+ get {
+ object obj = ResourceManager.GetObject("reload64", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Recherche une ressource localisée de type System.Drawing.Bitmap.
///
diff --git a/FModel/Properties/Resources.resx b/FModel/Properties/Resources.resx
index 3061a705..c04b08ba 100644
--- a/FModel/Properties/Resources.resx
+++ b/FModel/Properties/Resources.resx
@@ -217,4 +217,7 @@
..\Resources\clipSize64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\reload64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/FModel/Resources/reload64.png b/FModel/Resources/reload64.png
new file mode 100644
index 00000000..1420f33d
Binary files /dev/null and b/FModel/Resources/reload64.png differ
diff --git a/README.md b/README.md
index bc93da00..de64b781 100644
--- a/README.md
+++ b/README.md
@@ -74,10 +74,10 @@ Also if you find this project useful, feel free to give it a :star: thank you :k
- [Find & Replace for ScintillaNET](https://www.nuget.org/packages/snt.ScintillaNet.FindReplaceDialog/)
- [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)
### Contributors
-| **Waddlesworth** | **AyeTSG** | **FireMonkey** | **Maiky M** |
+| **Waddlesworth** | **Maiky M** | **AyeTSG** | **FireMonkey** |
| :---: | :---: | :---: | :---: |
-| [](https://github.com/SirWaddles) | [](https://github.com/AyeTSG) | [](https://github.com/ItsFireMonkey) | [](https://github.com/MaikyM) |
-| `https://github.com/SirWaddles` | `https://twitter.com/AyeTSG` | `https://twitter.com/FireMonkeyFN` |`https://twitter.com/MaikyMOficial` |
+| [](https://github.com/SirWaddles) | [](https://github.com/MaikyM) | [](https://github.com/AyeTSG) | [](https://github.com/ItsFireMonkey) |
+| `https://github.com/SirWaddles` | `https://twitter.com/MaikyMOficial` | `https://twitter.com/AyeTSG` | `https://twitter.com/FireMonkeyFN` |
### Why FModel
This project is mainly based on what [UModel](https://github.com/gildor2/UModel) can do, in a personalized way, in case 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 professionnaly.
@@ -86,7 +86,6 @@ I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) instea
- [ ] Code refactoring
- [ ] 2FA support
- [ ] Export Queue
- - [ ] Nintendo Switch sound files
- [x] Translation support
- [x] AES Manager
- [x] Display support for .locres files