Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BFV & SWS profiles, Clean up casts #301

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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