Skip to content

Commit

Permalink
BFV & SWS profiles (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicDreamsOfCode authored Aug 27, 2023
1 parent ae033f8 commit 4f1662e
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 61 deletions.
4 changes: 3 additions & 1 deletion FrostyCmd/FrostyCmd.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@
<None Include="Banners\PVZ3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="Banners\SWS.png" />
<None Include="Banners\SWS.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="ThirdParty\libfbxsdk.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
115 changes: 58 additions & 57 deletions FrostyCmd/ProfileCreator.cs

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion FrostyModSupport/Actions/ManifestBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,10 @@ public ManifestBundleAction(List<ModBundleInfo> bundles, FrostyModExecutor paren

long startPos = writer.Position;

writer.Write(0x9D798ED5, Endian.Big);
if (ProfilesLibrary.DataVersion != (int)ProfileVersion.Battlefield5) //bfv changed the bundle magic for some reason
writer.Write(0x9D798ED5, Endian.Big);
else
writer.Write(0x8C6E84DD, Endian.Big);
writer.Write(bundleObj.GetValue<DbObject>("ebx").Count + bundleObj.GetValue<DbObject>("res").Count + bundleObj.GetValue<DbObject>("chunks").Count, Endian.Big);
writer.Write(bundleObj.GetValue<DbObject>("ebx").Count, Endian.Big);
writer.Write(bundleObj.GetValue<DbObject>("res").Count, Endian.Big);
Expand Down
9 changes: 8 additions & 1 deletion FrostyModSupport/FrostyModExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,14 @@ private void WriteArchiveData(string catalog, CasDataEntry casDataEntry)
casEntry.FileInfo.size = info.Data.Length;
}

casEntry.FileInfo.file = new ManifestFileRef(casEntry.FileInfo.file.CatalogIndex, true, casIndex);
if (ProfilesLibrary.DataVersion == (int)ProfileVersion.Battlefield5)
{
casEntry.FileInfo.file = new ManifestFileRef(casEntry.FileInfo.file.CatalogIndex, false, casIndex);
}
else
{
casEntry.FileInfo.file = new ManifestFileRef(casEntry.FileInfo.file.CatalogIndex, true, casIndex);
}
}

currentCasStream.Write(info.Data, 0, info.Data.Length);
Expand Down
Binary file modified FrostyPlugin/Shaders.bin
Binary file not shown.
3 changes: 3 additions & 0 deletions FrostySdk/FrostySdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@
<Content Include="Profiles\StarWarsSDK.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Profiles\SWSSDK.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FrostyHash\FrostyHash.vcxproj">
Expand Down
Binary file modified FrostySdk/Profiles.bin
Binary file not shown.
Binary file added FrostySdk/Profiles/SWSSDK.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Plugins/MeshSetPlugin/FrostyMeshSetEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ private void FBXCreateSkin(FbxScene scene, MeshSetSection section, FbxNode actor
if (boneWeights[j] > 0.0f)
{
int subIndex = boneIndices[j];
if (ProfilesLibrary.DataVersion != (int)ProfileVersion.Battlefield5 && ProfilesLibrary.DataVersion != (int)ProfileVersion.StarWarsBattlefrontII && ProfilesLibrary.DataVersion != (int)ProfileVersion.PlantsVsZombiesBattleforNeighborville || ProfilesLibrary.DataVersion == (int)ProfileVersion.StarWarsSquadrons)
if (ProfilesLibrary.DataVersion != (int)ProfileVersion.Battlefield5 && ProfilesLibrary.DataVersion != (int)ProfileVersion.StarWarsBattlefrontII && ProfilesLibrary.DataVersion != (int)ProfileVersion.PlantsVsZombiesBattleforNeighborville || ProfilesLibrary.DataVersion != (int)ProfileVersion.StarWarsSquadrons)
subIndex = boneList[subIndex];

// account for proc bones
Expand Down

0 comments on commit 4f1662e

Please sign in to comment.