Skip to content

Commit 1f82bb7

Browse files
committed
- Fixed incorrect log message when cloning UV data.
- Fixed shared tail materials sometimes referencing the wrong folder. - Fixed Racial tree having incorrect parents for some races.
1 parent a5be1a2 commit 1f82bb7

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

xivModdingFramework/General/Enums/XivRace.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private static void CheckTree()
131131
});
132132
dict.Add(XivRace.Roegadyn_Male, new XivRaceNode()
133133
{
134-
Parent = dict[XivRace.Hyur_Highlander_Male],
134+
Parent = dict[XivRace.Hyur_Midlander_Male],
135135
Race = XivRace.Roegadyn_Male,
136136
Children = new List<XivRaceNode>(),
137137
HasSkin = true
@@ -191,7 +191,7 @@ private static void CheckTree()
191191
});
192192
dict.Add(XivRace.Roegadyn_Female, new XivRaceNode()
193193
{
194-
Parent = dict[XivRace.Hyur_Highlander_Female],
194+
Parent = dict[XivRace.Hyur_Midlander_Female],
195195
Race = XivRace.Roegadyn_Female,
196196
Children = new List<XivRaceNode>()
197197
});

xivModdingFramework/Materials/FileTypes/Mtrl.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@ private async Task<List<TexTypePath>> GetTexNames(IEnumerable<string> texPathLis
934934
// Helper regexes for GetMtrlPath.
935935
private readonly Regex _raceRegex = new Regex("(c[0-9]{4})");
936936
private readonly Regex _weaponMatch = new Regex("(w[0-9]{4})");
937+
private readonly Regex _tailMatch = new Regex("(t[0-9]{4})");
937938
private readonly Regex _skinRegex = new Regex("^/mt_c([0-9]{4})b([0-9]{4})_.+\\.mtrl$");
938939
/// <summary>
939940
/// Resolves the MTRL path for a given MDL path.
@@ -996,6 +997,17 @@ public string GetMtrlPath(string mdlPath, string mtrlName, int mtrlVariant = 1)
996997
mdlPath = mdlPath.Replace(mdlMatch.Groups[1].Value, mtrlMatch.Groups[1].Value);
997998
}
998999

1000+
mdlMatch = _tailMatch.Match(mdlPath);
1001+
mtrlMatch = _tailMatch.Match(mtrlName);
1002+
1003+
// Both items have tail model information in their path, and the weapons DON'T match.
1004+
if (mdlMatch.Success && mtrlMatch.Success && mdlMatch.Groups[1].Value != mtrlMatch.Groups[1].Value)
1005+
{
1006+
// Replacing the tail reference in the main path with the one from the MTRL.
1007+
// Needless to say, this only happens with tail items.
1008+
mdlPath = mdlPath.Replace(mdlMatch.Groups[1].Value, mtrlMatch.Groups[1].Value);
1009+
}
1010+
9991011
var mdlFolder = Path.GetDirectoryName(mdlPath);
10001012
mdlFolder = mdlFolder.Replace("\\", "/");
10011013

xivModdingFramework/Models/Helpers/ModelModifiers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ public static void CloneUV2(TTModel model, Action<bool, string> loggingFunction
697697
loggingFunction = NoOp;
698698
}
699699

700-
loggingFunction(false, "Clearing UV2...");
700+
loggingFunction(false, "Cloning UV1 to UV2...");
701701
foreach (var m in model.MeshGroups)
702702
{
703703
foreach (var p in m.Parts)

0 commit comments

Comments
 (0)