mirror of
https://github.com/4sval/FModel.git
synced 2026-03-24 02:34:36 -05:00
fixed QuestBundle_S9_Fortbyte_LoadingScreen + added Banner to the icon creation + crash fix
This commit is contained in:
parent
d7a7c117e4
commit
fe13e21bb8
|
|
@ -52,6 +52,7 @@ namespace FModel.Forms
|
|||
tweetText = richTextBox1.Text;
|
||||
}));
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
if (service == null)
|
||||
{
|
||||
service = new TwitterService(Properties.Settings.Default.tConsKey, Properties.Settings.Default.tConsSecret);
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ namespace FModel
|
|||
AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
|
||||
}
|
||||
}
|
||||
else { new UpdateMyConsole("[FModel]" + 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(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1016,6 +1016,10 @@ namespace FModel
|
|||
{
|
||||
CreateItemIcon(itemId[i], "ammo");
|
||||
}
|
||||
else if (itemId[i].ExportType == "FortBannerTokenType")
|
||||
{
|
||||
CreateItemIcon(itemId[i], "athIteDef"); //athIteDef because there's a cosmetic source
|
||||
}
|
||||
else if (questJson != null && (Settings.Default.createIconForSTWHeroes && (itemId[i].ExportType == "FortHeroType" && (questJson.Contains("ItemDefinition") || questJson.Contains("TestDefsSkydive") || questJson.Contains("GameplayPrototypes"))))) //Contains x not to trigger HID from BR
|
||||
{
|
||||
CreateItemIcon(itemId[i], "stwHeroes");
|
||||
|
|
@ -1134,7 +1138,7 @@ namespace FModel
|
|||
BundleDesign.drawBackground(bmp, bundleParser);
|
||||
}
|
||||
|
||||
if (BundleInfos.BundleData[0].rewardItemId != null && string.Equals(BundleInfos.BundleData[0].rewardItemId, "AthenaFortbyte", StringComparison.CurrentCultureIgnoreCase))
|
||||
if (BundleInfos.BundleData.Count > 0 && BundleInfos.BundleData[0].rewardItemId != null && string.Equals(BundleInfos.BundleData[0].rewardItemId, "AthenaFortbyte", StringComparison.CurrentCultureIgnoreCase))
|
||||
isFortbyte = true;
|
||||
|
||||
// Fortbytes: Sort by number
|
||||
|
|
@ -1398,7 +1402,7 @@ namespace FModel
|
|||
if (saveTheDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
pictureBox1.Image.Save(saveTheDialog.FileName, ImageFormat.Png);
|
||||
new UpdateMyConsole(ThePak.CurrentUsedItem, Color.DarkRed).AppendToConsole();
|
||||
new UpdateMyConsole(Path.GetFileNameWithoutExtension(saveTheDialog.FileName), Color.DarkRed).AppendToConsole();
|
||||
new UpdateMyConsole(" successfully saved", Color.Black, true).AppendToConsole();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ namespace FModel
|
|||
|
||||
DynamicKeysManager.serialize(token.ToString().ToUpper().Substring(2), item.thePak);
|
||||
|
||||
displayNewPaks(item.thePak);
|
||||
displayNewPaks(token.ToString().ToUpper().Substring(2), item.thePak);
|
||||
}
|
||||
else
|
||||
{
|
||||
DynamicKeysManager.serialize("", item.thePak);
|
||||
}
|
||||
}
|
||||
new UpdateMyConsole("", Color.Green, true).AppendToConsole();
|
||||
|
|
@ -84,12 +88,12 @@ namespace FModel
|
|||
/// if pakname not found that means the key is brand new and has to be added but in this case we just "print" it as a FYI to the user
|
||||
/// </summary>
|
||||
/// <param name="pakName"> the pak name </param>
|
||||
private static void displayNewPaks(string pakName)
|
||||
private static void displayNewPaks(string pakKey, string pakName)
|
||||
{
|
||||
if (_oldKeysList != null)
|
||||
{
|
||||
//display new paks that can be opened
|
||||
bool wasThereBeforeStartup = _oldKeysList.Where(i => i.thePak == pakName).Any();
|
||||
bool wasThereBeforeStartup = _oldKeysList.Where(i => i.theKey == pakKey).Any();
|
||||
if (!wasThereBeforeStartup)
|
||||
{
|
||||
new UpdateMyConsole(pakName, Color.Firebrick).AppendToConsole();
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using System.Windows.Forms;
|
|||
using System;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using FModel.Parser.LocResParser;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
|
|
@ -65,13 +66,30 @@ 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
|
||||
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)))
|
||||
if (myBundle.DisplayStyle.DisplayImage != null)
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
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)))
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
}
|
||||
else if (myBundle.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)))
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(Resources.unknown512, 282, 282), new Point(40, 0));
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
|
||||
//fill the rest
|
||||
toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.1)), new Rectangle(0, 271, myBitmap.Width, myBitmap.Height));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Newtonsoft.Json;
|
|||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
@ -84,24 +85,24 @@ namespace FModel
|
|||
string oldQuest = string.Empty;
|
||||
long oldCount = 0;
|
||||
|
||||
//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)
|
||||
{
|
||||
assetTypeToken = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name == "Token").FirstOrDefault();
|
||||
if (assetTypeToken != null)
|
||||
{
|
||||
isFortbyte = assetTypeToken.ItemPrimaryAssetId.PrimaryAssetName == "AthenaFortbyte";
|
||||
}
|
||||
}
|
||||
|
||||
for (int p = 0; p < questParser[x].Objectives.Length; p++)
|
||||
{
|
||||
long newCount = questParser[x].Objectives[p].Count;
|
||||
if (questParser[x].ObjectiveCompletionCount > 0)
|
||||
newCount = questParser[x].ObjectiveCompletionCount;
|
||||
|
||||
//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)
|
||||
{
|
||||
assetTypeToken = questParser[x].Rewards.Where(item => item.ItemPrimaryAssetId.PrimaryAssetType.Name == "Token").FirstOrDefault();
|
||||
if (assetTypeToken != null)
|
||||
{
|
||||
isFortbyte = assetTypeToken.ItemPrimaryAssetId.PrimaryAssetName == "AthenaFortbyte";
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
|
|
|||
|
|
@ -36,11 +36,10 @@ namespace FModel
|
|||
{
|
||||
_extractor = new PakExtractor(Settings.Default.PAKsPath + "\\" + ThePak.mainPaksList[i].thePak, Settings.Default.AESKey);
|
||||
}
|
||||
else { _extractor.Dispose(); break; }
|
||||
else { break; }
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_extractor.Dispose();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +67,6 @@ namespace FModel
|
|||
catch (Exception)
|
||||
{
|
||||
new UpdateMyConsole("0x" + pakKey + " doesn't work with " + ThePak.dynamicPaksList[i].thePak, Color.Red, true).AppendToConsole();
|
||||
_extractor.Dispose();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 64 KiB |
|
|
@ -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. Fortnite Api Authentication to automatically get Keys for Dynamic PAKs
|
||||
4. Automatic detection for Dynamic PAKs Keys
|
||||
5. Twitter Api Authentication to send Tweets from within FModel
|
||||
### What i'm using
|
||||
- [Fortnite Asset Parser](https://github.com/SirWaddles/JohnWickParse) - *C# Bind*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user