Closed paoloambrosio closed 1 year ago
Extracting pak files is very easy with PCarsTools. It would have to be published as a library though. License is the same as this project.
Pakfiles\BOOTFLOW.bff
and Pakfiles\PHYSICSPERSISTENT.bff
.Pakfiles\BOOTFLOW.bff
from other bootfiles. According to madmaxx, this is always the same file in all bootfiles. Some are repacked files from the original pak archive, but others are not. Maybe they are from PC2?
Pakfiles\BOOTFLOW.bff
:gui\login.bspr
gui\login001.dds
gui\login002.dds
render\materials\dynamicterraindebugrender.bmt
render\materials\meshvisualisation.bmt
Pakfiles\BOOTFLOW.bff
but different:gui\login000.dds
from PC2! The original one has Reiza.gui\background_frontend_branded.dds
from PC2gui\jp-antipiracy.dds
gui\menu_splash_load.bgui
text\splash.tdb
vehicles\_data\effects\backfire\*.bmt
... WHY?Pakfiles\PHYSICSPERSISTENT.bff-remove
.The original Pakfiles\BOOTFLOW.bff
uses ZLib compression, so it does not require Oodle. The one in the bootfiles instead uses Mermaid.
The new Pakfiles\BOOTFLOW.bff
must be there because the Madness Engine looks for it, but it can be a completely empty bff (with no files inside)!!!
" KAP"
uint32: 1 << 11 | 1
int32: 0
byte[12]
byte[0x100]: BOOTSPLASH\0...\0
uint32: 0
uint32: 0
uint32: 0
byte[8]
byte: 0
byte: 0
byte[2]
using System;
using System.IO;
using System.Text;
namespace BootfileCreator
{
internal class Program
{
private const string fileTag = " KAP";
private const uint version = 1 << 11 | 1;
private const uint fileCount = 0;
private const string fileName = "BOOTSPLASH";
private const uint tocEntrySize = 16; // Required or PCarsTools will fail
private const uint crc = 0;
private const uint extInfoSize = 0x308; // Required for cert size even with no encryption
private const byte flags = 0;
private const byte encryptionType = 0;
static void Main(string[] args)
{
var writer = new BinaryWriter(File.Create("EMPTY.bff"));
writer.Write(fileTag.ToCharArray());
writer.Write(version);
writer.Write(fileCount);
writer.Write(new byte[12]);
writer.Write(fileName.ToCharArray());
writer.Write(new byte[0x100-fileName.Length]);
writer.Write(tocEntrySize);
writer.Write(crc);
writer.Write(extInfoSize);
writer.Write(new byte[8]);
writer.Write(flags);
writer.Write(encryptionType);
writer.Write(new byte[2]);
writer.Write(new byte[tocEntrySize]);
writer.Write(new byte[extInfoSize]);
}
}
}
If any mod has config to be applied and no
__bootfiles*
"mod" has been installedPakfiles\BOOTFLOW.bff
andPakfiles\PHYSICSPERSISTENT.bff
Pakfiles\BOOTFLOW.bff
archive with no filesPakfiles\PHYSICSPERSISTENT.bff-remove
filevehicles\_data\effects\backfire\*.bmt
__bootfiles_generated
Still relevant for tracks after AMS2 1.5, but not for cars (see development update):