Skip to content

Commit a812145

Browse files
committed
Update 2.3.1.2
2 parents df677f5 + e92d4f7 commit a812145

File tree

5 files changed

+58
-18
lines changed

5 files changed

+58
-18
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/General/Enums/XivRace.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,19 @@ private static void CheckTree()
314314
Children = new List<XivRaceNode>()
315315
});
316316

317+
dict.Add(XivRace.NPC_Male, new XivRaceNode()
318+
{
319+
Parent = dict[XivRace.Hyur_Midlander_Male],
320+
Race = XivRace.NPC_Male,
321+
Children = new List<XivRaceNode>()
322+
});
323+
dict.Add(XivRace.NPC_Female, new XivRaceNode()
324+
{
325+
Parent = dict[XivRace.Hyur_Midlander_Female],
326+
Race = XivRace.NPC_Female,
327+
Children = new List<XivRaceNode>()
328+
});
329+
317330

318331
tree = dict[XivRace.Hyur_Midlander_Male];
319332
}

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
}

xivModdingFramework/Models/DataContainers/EquipmentParameter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ public enum EquipmentParameterFlag
195195
// Byte 2 - Leg
196196
EnableLegFlags = 16,
197197
Bit17 = 17,
198-
Bit18 = 18,
199-
LegHideHalfboot = 19,
198+
LegHideShortBoot = 18,
199+
LegHideHalfBoot = 19,
200200
Bit20 = 20,
201201
LegShowFoot = 21,
202202
Bit22 = 22,

xivModdingFramework/Mods/RootCloner.cs

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,18 @@ public static async Task CloneRoot(XivDependencyRoot Source, XivDependencyRoot D
136136
var iCat = destItem.SecondaryCategory;
137137
var iName = destItem.Name;
138138

139+
140+
var files = newModelPaths.Select(x => x.Value).Union(
141+
newMaterialPaths.Select(x => x.Value)).Union(
142+
newAvfxPaths.Select(x => x.Value)).Union(
143+
newTexturePaths.Select(x => x.Value));
144+
145+
var allFiles = new HashSet<string>();
146+
foreach (var f in files)
147+
{
148+
allFiles.Add(f);
149+
}
150+
139151
if (ProgressReporter != null)
140152
{
141153
ProgressReporter.Report("Getting modlist...");
@@ -150,9 +162,19 @@ public static async Task CloneRoot(XivDependencyRoot Source, XivDependencyRoot D
150162
var dPath = Destination.Info.GetRootFolder();
151163
foreach (var mod in modlist.Mods)
152164
{
153-
if (mod.fullPath.StartsWith(dPath))
165+
if (mod.fullPath.StartsWith(dPath) && !mod.IsInternal())
154166
{
155-
await _modding.DeleteMod(mod.fullPath, false);
167+
if (Destination.Info.SecondaryType != null || Destination.Info.Slot == null)
168+
{
169+
// If this is a slotless root, purge everything.
170+
await _modding.DeleteMod(mod.fullPath, false);
171+
}
172+
else if(allFiles.Contains(mod.fullPath) || mod.fullPath.Contains(Destination.Info.Slot))
173+
{
174+
// Otherwise, only purge the files we're replacing, and anything else that
175+
// contains our slot name.
176+
await _modding.DeleteMod(mod.fullPath, false);
177+
}
156178
}
157179
}
158180

@@ -348,24 +370,18 @@ public static async Task CloneRoot(XivDependencyRoot Source, XivDependencyRoot D
348370
// Here we're going to go through and edit all the modded items to be joined together in a modpack for convenience.
349371
modlist = await _modding.GetModListAsync();
350372

351-
var files = newModelPaths.Select(x => x.Value).Union(
352-
newMaterialPaths.Select(x => x.Value)).Union(
353-
newAvfxPaths.Select(x => x.Value)).Union(
354-
newTexturePaths.Select(x => x.Value));
355-
356-
var allFiles = new HashSet<string>();
357-
foreach (var f in files)
358-
{
359-
allFiles.Add(f);
360-
}
361373

362374

363375
var modPack = new ModPack() { author = "System", name = "Item Copy - " + srcItem.Name, url = "", version = "1.0" };
364376
foreach (var mod in modlist.Mods)
365377
{
366378
if (allFiles.Contains(mod.fullPath))
367379
{
368-
mod.modPack = modPack;
380+
// Don't claim common path items into our modpack.
381+
if (!mod.fullPath.StartsWith(CommonPath))
382+
{
383+
mod.modPack = modPack;
384+
}
369385
}
370386
}
371387

0 commit comments

Comments
 (0)