Skip to content

Commit

Permalink
Update v3.0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunaretic committed Jul 5, 2024
2 parents 442ddfe + fe521f0 commit 94c1281
Show file tree
Hide file tree
Showing 23 changed files with 830 additions and 21 deletions.
4 changes: 2 additions & 2 deletions FFXIV_TexTools/FFXIV_TexTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<AssemblyTitle>FFXIV_TexTools</AssemblyTitle>
<Product>FFXIV_TexTools</Product>
<Copyright>Copyright © 2024</Copyright>
<AssemblyVersion>3.0.2.7</AssemblyVersion>
<FileVersion>3.0.2.7</FileVersion>
<AssemblyVersion>3.0.3.0</AssemblyVersion>
<FileVersion>3.0.3.0</FileVersion>
<LangVersion>9.0</LangVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<UseWPF>true</UseWPF>
Expand Down
7 changes: 7 additions & 0 deletions FFXIV_TexTools/Helpers/ModpackUpgrader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ public static async Task UpgradeModpackPrompted(bool includePartials = true)

public static async Task<WizardData> UpgradeModpack(string path, bool includePartials = true)
{
if (Directory.Exists(path))
{
path = Path.GetFullPath(Path.Combine(path, "meta.json"));
}

var data = await WizardData.FromModpack(path);
var textureUpgradeTargets = new Dictionary<string, EndwalkerUpgrade.UpgradeInfo>();
Expand All @@ -96,6 +100,7 @@ public static async Task<WizardData> UpgradeModpack(string path, bool includePar
{
foreach (var g in p.Groups)
{
if (g == null) continue;
foreach (var o in g.Options)
{
if (o.StandardData != null)
Expand Down Expand Up @@ -130,6 +135,7 @@ public static async Task<WizardData> UpgradeModpack(string path, bool includePar
{
foreach (var g in p.Groups)
{
if (g == null) continue;
foreach (var o in g.Options)
{
if (o.StandardData != null)
Expand Down Expand Up @@ -165,6 +171,7 @@ public static async Task<WizardData> UpgradeModpack(string path, bool includePar
{
foreach (var g in p.Groups)
{
if (g == null) continue;
foreach (var o in g.Options)
{
if (o.StandardData != null)
Expand Down
2 changes: 2 additions & 0 deletions FFXIV_TexTools/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
</MenuItem>

<MenuItem Header="Dawntrail Upgrades">
<MenuItem Header="About Upgrades" Click="AboutUpgrades_Click"/>
<MenuItem Header="Upgrade Modpack" Click="UpdateModpack_Click"/>
<MenuItem x:Name="PenumbraUpgradeButton" Header="Upgrade Penumbra Library" Click="UpdatePenumbra_Click"/>
<MenuItem Header="Index Texture Creator" Click="IndexTextureCreator_Click"/>
<MenuItem Header="Hair Texture Converter" Click="HairTextureConverter_Click"/>
<MenuItem Header="Eye Diffuse Creator" Click="IrisDiffuseCreator_Click"/>
Expand Down
18 changes: 18 additions & 0 deletions FFXIV_TexTools/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using FFXIV_TexTools.Views.Simple;
using FFXIV_TexTools.Views.Textures;
using FFXIV_TexTools.Views.Transactions;
using FFXIV_TexTools.Views.Upgrades;
using FFXIV_TexTools.Views.Wizard;
using FolderSelect;
using ForceUpdateAssembly;
Expand Down Expand Up @@ -350,6 +351,11 @@ public MainWindow(string[] args)
this.DataContext = mainViewModel;
InitializeComponent();

#if !DEBUG
PenumbraUpgradeButton.IsEnabled = false;
#endif


var fileVersion = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion;

// Clear out the debug message shown in the xaml designer.
Expand Down Expand Up @@ -2097,5 +2103,17 @@ private void IrisDiffuseCreator_Click(object sender, RoutedEventArgs e)
EyeDiffuseCreator.ShowWindow(this);

}

private void AboutUpgrades_Click(object sender, RoutedEventArgs e)
{
var wind = new DawntrailUpgradeHelpWindow() { Owner = this };
wind.Show();
}

private void UpdatePenumbra_Click(object sender, RoutedEventArgs e)
{
var wind = new PenumbraLibraryUpgradeWindow() { Owner = this };
wind.ShowDialog();
}
}
}
66 changes: 66 additions & 0 deletions FFXIV_TexTools/Models/PenumbraUpgradeStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using Newtonsoft.Json.Converters;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using xivModdingFramework.Helpers;
using FFXIV_TexTools.Helpers;
using System.Diagnostics;

namespace FFXIV_TexTools.Models
{
public class PenumbraUpgradeStatus
{
[JsonConverter(typeof(StringEnumConverter))]
public enum EUpgradeResult
{
NotStarted,
InProgress,
Failure,
Success,
}

public Dictionary<string, EUpgradeResult> Upgrades = new Dictionary<string, EUpgradeResult>();

public async Task<EUpgradeResult> ProcessMod(string baseDir, string targetDir, string mod)
{
var source = Path.GetFullPath(Path.Combine(baseDir, mod));
var target = Path.GetFullPath(Path.Combine(targetDir, mod));

if (source != target) {
IOUtil.RecursiveDeleteDirectory(target);
}

Directory.CreateDirectory(target);

var res = EUpgradeResult.Failure;
try
{
await ModpackUpgrader.UpgradeModpack(source, target);
res = EUpgradeResult.Success;
} catch (Exception ex)
{
if (source != target)
{
IOUtil.RecursiveDeleteDirectory(target);
IOUtil.CopyFolder(source, target);
}

res = EUpgradeResult.Failure;
Trace.WriteLine("Modpack Upgrade Failure for Penumbra Mod: " + mod);
Trace.WriteLine(ex);
}

await IOUtil.CompressWindowsDirectory(target);

if (Upgrades.ContainsKey(mod))
{
Upgrades[mod] = res;
}
return res;
}
}
}
154 changes: 154 additions & 0 deletions FFXIV_TexTools/Views/Controls/DawntTrailUpgradeDisclaimer.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<UserControl x:Class="FFXIV_TexTools.Views.Controls.DawntTrailUpgradeDisclaimer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FFXIV_TexTools.Views.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2">
<Grid>
<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="80"/>
<RowDefinition/>
</Grid.RowDefinitions>

<Label HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontWeight="Bold" FontStyle="Italic">
Dawntrail Upgrade Disclaimer
</Label>

<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontStyle="Italic" TextAlignment="Center">
Dawntrail upgrades are not perfect 1:1 translations, and do not affect all mod types.
<LineBreak/>The following is a list of different mod types, and how they will be affected.
</TextBlock>

<Grid x:Name="TypesGrid" Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" FontWeight="Bold">Mod Type</Label>
<Label Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" FontWeight="Bold">Estimated Success</Label>
<Label Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" FontWeight="Bold">Notes</Label>
</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right">Monster/Minion/Mount:</Label>
<Label Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Foreground="Green">~99%+</Label>
<Label Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic"></Label>
</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right">Equipment:</Label>
<Label Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Foreground="Green">~90-95%</Label>
<Label Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic">Texture-only mods are not upgraded, but may still work in some cases.</Label>
</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right">Hair:</Label>
<Label Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" Foreground="Green">~90%+</Label>
<Label Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic">Single-texture mods are not upgraded.</Label>

</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="3" HorizontalAlignment="Right">Iris/Eyes:</Label>
<Label Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" Foreground="DarkOrange">~60-75%</Label>
<Label Grid.Column="2" Grid.Row="3" HorizontalAlignment="Left" Foreground="DarkOrange" FontStyle="Italic">ALUM and Catchlight Mods cannot be upgraded.</Label>

</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right">Faces:</Label>
<Label Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" Foreground="Red">0%</Label>
<Label Grid.Column="2" Grid.Row="4" HorizontalAlignment="Left" Foreground="Red" FontStyle="Italic">Must be manually updated.</Label>

</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="5" HorizontalAlignment="Right">Body Textures:</Label>
<Label Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Foreground="Red">0%</Label>
<Label Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left" Foreground="Red" FontStyle="Italic">Must be manually updated. *Tattoo mods may be OK in some cases.</Label>

</Grid>
</Border>

<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="7">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right">Other Mods:</Label>
<Label Grid.Column="1" Grid.Row="6" HorizontalAlignment="Left" Foreground="Gray">N/A</Label>
<Label Grid.Column="2" Grid.Row="6" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic">Other mods do not need to use this tool.</Label>

</Grid>
</Border>
</Grid>


</Grid>
</Border>
</UserControl>
28 changes: 28 additions & 0 deletions FFXIV_TexTools/Views/Controls/DawntTrailUpgradeDisclaimer.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace FFXIV_TexTools.Views.Controls
{
/// <summary>
/// Interaction logic for DawntTrailUpgradeDisclaimer.xaml
/// </summary>
public partial class DawntTrailUpgradeDisclaimer : UserControl
{
public DawntTrailUpgradeDisclaimer()
{
InitializeComponent();
}
}
}
4 changes: 2 additions & 2 deletions FFXIV_TexTools/Views/Controls/ItemInfoDisplay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<TextBlock x:Name="SetLabel" Text="Set: e0123" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="SlotLabel" Text="Slot: Head(met)" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="VariantLabel" Text="Variant: 5" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="MaterialSetLabel" Text="Material Set: 3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="MaterialSetLabel" Text="Material Version: 3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</UniformGrid>
<GroupBox Grid.Row="2" Grid.RowSpan="3" Header="Race Information">
<Grid x:Name="RacialGrid">
Expand All @@ -51,7 +51,7 @@
<GroupBox Grid.Column="1" Grid.Row="2" Header="Items in Variant (Identical Items)">
<ListBox x:Name="SameVariantBox"></ListBox>
</GroupBox>
<GroupBox Grid.Column="1" Grid.Row="3" Header="Items with same Material Set">
<GroupBox Grid.Column="1" Grid.Row="3" Header="Items with same Material Version">
<ListBox x:Name="SameMaterialBox"></ListBox>
</GroupBox>
<GroupBox Grid.Column="1" Grid.Row="4" Header="Items with same Model">
Expand Down
4 changes: 2 additions & 2 deletions FFXIV_TexTools/Views/Controls/ItemInfoDisplay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ public async Task AsyncInit()
var mSet = await Imc.GetMaterialSetId(_item, false, tx);
if (mSet > 0)
{
MaterialSetLabel.Text = $"Material Set: {mSet._()}".L();
MaterialSetLabel.Text = $"Material Version: {mSet._()}".L();
} else
{
MaterialSetLabel.Text = $"Material Set: --".L();
MaterialSetLabel.Text = $"Material Version: --".L();
}

var races = XivRaces.PlayableRaces;
Expand Down
1 change: 0 additions & 1 deletion FFXIV_TexTools/Views/Controls/ItemSelectControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,6 @@ private void CategoryTree_Selected(object sender, System.Windows.RoutedPropertyC
return;
}


if (RawItemSelected != null) {
RawItemSelected.Invoke(item, element.Root);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public ColorsetFileControl()
TileUnknownBox.TextChanged += ValueChanged;
AnisotropyBlendingBox.TextChanged += ValueChanged;
ShaderTemplateBox.TextChanged += ValueChanged;

WetnessBox.TextChanged += ValueChanged;

FresnelAlbedoBox.TextChanged += ValueChanged;
FresnelUnknownBox.TextChanged += ValueChanged;
Expand Down
Loading

0 comments on commit 94c1281

Please sign in to comment.