forked from WolvenKit/WolvenKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Fileformats
rfuzzo edited this page May 7, 2019
·
11 revisions
This is a multiplexed video file which means multiple files have been compressed into one file. There is always an m2v file and some adx files. The m2v file is the video and the adx files are the sound. Adx files can be converted to wav.
https://github.com/Traderain/Wolven-kit/blob/master/W3Edit.Scaleform/CriUsmStream.cs
- They can be opened with normal text editors
- First line: Start of the subtitle (miliseconds)
- After that each line: (start in ms), (end in ms), text
These are normal excel sheet and can be opened with any text editor or microsoft excel.
These are normal xml files and can be opened with any text editor.
4 bytes for id (String), usually CPSW
4 bytes for version (Number), usually A2 00 00 00 or A3 00 00 00
2 bytes for key1 (Number), part of the language key
variable amount of bytes for wavecr2w pair count
for each wemcr2w pair:
4 bytes for language specific id (Number)
4 bytes for some other id (Number)
4 bytes for absolute offset (Number), points at (a) down below
4 bytes of zeros
4 bytes of (wem size + 12) (Number) (c)
4 bytes of zeros
4 bytes for absolute offset (Number), points at (b) down below
4 bytes of zeros
4 bytes of cr2w size (Number) (d)
4 bytes of zeros
2 bytes for key2 (Number), part of the language key
for each wemcr2w pair:
4 bytes for wem size (Number) (a)
c - 12 bytes for wem (raw data)
4 bytes for duration in seconds (Float)
4 bytes of 04 00 00 00
d bytes for cr2w (raw data) (b)
public static byte[] Magic = { (byte)'C', (byte)'S', (byte)'3', (byte)'W' };
public static long Version = 1;
public static UInt32 Unknown1 = 0x00000000;
public static UInt32 Unknown2 = 0x00000000;
public long InfoOffset;
public long FileCount;
public long NamesOffset;
public long NamesSize;
public static UInt32 Unk3 = 1;
public static long DataOffset = 0x30;
public long buffsize;
public long checksum;
// COMPRESSED FILES (each file has a header, the compressed bytes and (optionally) mipmaps
--------------------------------
public UInt32 CachedZSizeNoMips; //NOTE not counting appended mipmaps
public UInt32 CachedSizeNoMips;
public byte CachedMipsCount; //NOTE count of appended mipmaps
public byte[CompressedSize] CompressedBytes;
// (OPTIONAL) MipMaps (appended are any mipmaps, length = rest + (256 * PageCount) as entries: )
public byte Rest;
public UInt32 PageCount;
public UInt16 dim1; //Width or Height
public UInt16 dim2; //Heightor Width
public byte[length] CompressedMipmapBytes;
//INFOTABLE
--------------------------------
// MipMapsOffsetTable (4 bytes per entry * total mipmaps count):
public Uint32 MipmapOffset; //NOTE MipMap offset is relative, counted from the beginning of the compressed file's offset
// NamesTable (variable bytes per entry):
public Cr2wString RelativeFilename; //NOTE (string, ended by nullbyte)
// EntryinfoTable (52 bytes per entry * entries):
public Int32 Hash;
public Int32 PathStringIndex;
public UInt32 PageOffset;
public UInt32 ZSize;
public UInt32 Size;
public UInt32 BaseAlignment;
public UInt16 BaseWidth;
public UInt16 BaseHeight;
public UInt16 TotalMipsCount;
public UInt16 SliceCount;
public Int32 MipOffsetIndex;
public Int32 MipsCount;
public Int64 TimeStamp;
public Int16 Type;
public Int16 IsCube;
//FOOTER (const 32 bytes)
--------------------------------
public UInt64 Crc; //NOTE FNV1a64 over the Infotable (MipsOffsetTable, Namestable and EntryInfoTable)
public UInt32 UsedPages;
public UInt32 EntryCount;
public UInt32 StringTableSize;
public UInt32 MipEntryCount;
public byte[4] IDString = { (byte)'H', (byte)'C', (byte)'X', (byte)'T' };
public UInt32 Version= 6;
- Home
- Getting Started
- WolvenKit Documentation
- WolvenKit Tutorials
- RedEngine Documentation