Skip to content

Commit 64c22b9

Browse files
Add PMP Atch Manipulations + throw on TTMP export
1 parent fcfc724 commit 64c22b9

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

xivModdingFramework/Mods/FileTypes/PmpManipulation.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace xivModdingFramework.Mods.FileTypes
2525
[JsonSubtypes.KnownSubType(typeof(PMPEqdpManipulationWrapperJson), "Eqdp")]
2626
[JsonSubtypes.KnownSubType(typeof(PMPGmpManipulationWrapperJson), "Gmp")]
2727
[JsonSubtypes.KnownSubType(typeof(PMPRspManipulationWrapperJson), "Rsp")]
28+
[JsonSubtypes.KnownSubType(typeof(PMPAtchManipulationWrapperJson), "Atch")]
2829
[JsonSubtypes.KnownSubType(typeof(PMPGlobalEqpManipulationWrapperJson), "GlobalEqp")]
2930
public class PMPManipulationWrapperJson
3031
{
@@ -168,6 +169,23 @@ public override string GetNiceName()
168169
return base.GetNiceName() + " - " + Manipulation.SubRace + " " + Manipulation.Attribute;
169170
}
170171
}
172+
public class PMPAtchManipulationWrapperJson : PMPManipulationWrapperJson
173+
{
174+
[JsonProperty(Order = 2)]
175+
public PMPAtchManipulationJson Manipulation = new PMPAtchManipulationJson();
176+
public override object GetManipulation()
177+
{
178+
return Manipulation;
179+
}
180+
public override void SetManipulation(object o)
181+
{
182+
Manipulation = o as PMPAtchManipulationJson;
183+
}
184+
public override string GetNiceName()
185+
{
186+
return base.GetNiceName() + " - " + Manipulation.Race + " " + Manipulation.Gender + " " + Manipulation.Type + " [" + Manipulation.Index + "]";
187+
}
188+
}
171189
public class PMPGlobalEqpManipulationWrapperJson : PMPManipulationWrapperJson
172190
{
173191
[JsonProperty(Order = 2)]
@@ -793,6 +811,29 @@ public static List<PMPRspManipulationJson> FromRgspEntry(RacialGenderScalingPara
793811
}
794812

795813
}
814+
public class PMPAtchManipulationJson
815+
{
816+
public struct PMPAtchEntry
817+
{
818+
public string Bone;
819+
public float Scale;
820+
821+
public float OffsetX;
822+
public float OffsetY;
823+
public float OffsetZ;
824+
825+
public float RotationX;
826+
public float RotationY;
827+
public float RotationZ;
828+
}
829+
830+
public PMPAtchEntry Entry;
831+
public PMPGender Gender;
832+
public PMPModelRace Race;
833+
public string Type;
834+
public int Index;
835+
}
836+
796837
public class PMPGlobalEqpManipulationJson
797838
{
798839
public GlobalEqpType Type;

xivModdingFramework/Mods/WizardData.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ protected override bool CheckHasData()
8787
"Est",
8888
"Gmp",
8989
"Rsp",
90+
"Atch",
9091
"GlobalEqp"
9192
};
9293

@@ -496,6 +497,12 @@ public async Task<ModOption> ToModOption()
496497
};
497498
mo.Mods.Add(path, mData);
498499
}
500+
501+
if (manips.OtherManipulations.Count > 0)
502+
{
503+
var manip0 = manips.OtherManipulations[0];
504+
throw new InvalidDataException("TTMP Does not support " + manip0.Type + " manipulations.");
505+
}
499506
}
500507

501508

0 commit comments

Comments
 (0)