Skip to content

Commit d093717

Browse files
committed
- Adjusted material calculations to allow for Hrothgar fur variants.
1 parent 25e95fd commit d093717

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

xivModdingFramework/Cache/XivDependencyGraph.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,18 @@ public async Task<List<string>> GetMaterialFiles(int materialVariant = -1)
558558
materials.Add(path);
559559
}
560560

561-
materialVariant = 1;
561+
if(Info.PrimaryId == XivRace.Hrothgar.GetRaceCodeInt())
562+
{
563+
// JK, Hrothgar actually have 5 material sets (that's how their fur pattern stuff is set)
564+
for (int i = 2; i <= 5; i++)
565+
{
566+
var mSet = i.ToString().PadLeft(4, '0');
567+
path = $"chara/human/c{primary}/obj/body/b{body}/material/v{mSet}/mt_c{primary}b{body}_a.mtrl";
568+
materials.Add(path);
569+
}
570+
}
571+
572+
materialVariant = -1;
562573
}
563574
else
564575
{

xivModdingFramework/Materials/FileTypes/Mtrl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,9 +1098,9 @@ public static async Task<int> GetMaterialSetId(IItem item)
10981098
public string GetMtrlFolder(XivDependencyRootInfo root, int materialSet = -1)
10991099
{
11001100
// These types have exactly one material set, but don't have an IMC file saying so.
1101-
if(root.SecondaryType == XivItemType.hair ||
1101+
if((root.SecondaryType == XivItemType.hair ||
11021102
root.SecondaryType == XivItemType.body ||
1103-
root.SecondaryType == XivItemType.tail )
1103+
root.SecondaryType == XivItemType.tail ) && materialSet <= 0)
11041104
{
11051105
materialSet = 1;
11061106
}

0 commit comments

Comments
 (0)