Skip to content

Commit c4c75a9

Browse files
authored
patterns: Add a pattern for Roblox .pack files (#435)
* Added the .pack format * Clarified some fields by changing the naming
1 parent 7278a22 commit c4c75a9

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
128128
| NTFS | | [`patterns/fs/ntfs.hexpat`](patterns/fs/ntfs.hexpat) | NTFS (NT File System) |
129129
| OGG | `audio/ogg` | [`patterns/ogg.hexpat`](patterns/ogg.hexpat) | OGG Audio format |
130130
| ORP / ORS | | [`patterns/orp.hexpat`](patterns/orp.hexpat) | OpenRGB profile format |
131+
| PACK | | [`patterns/roblox_pack.hexpat`](patterns/roblox_pack.hexpat) | Roblox shader archive format |
131132
| PAK | | [`patterns/xgspak.hexpat`](patterns/xgspak.hexpat) | Exient XGS Engine Pak files |
132133
| PCAP | `application/vnd.tcpdump.pcap` | [`patterns/pcap.hexpat`](patterns/pcap.hexpat) | pcap header and packets |
133134
| PcapNG | `application/vnd.tcpdump.pcap` | [`patterns/pcapng.hexpat`](patterns/pcapng.hexpat) | pcapng header and packets |

patterns/roblox_pack.hexpat

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#pragma author marduk.ru
2+
#pragma description Roblox .pack shader archive format
3+
#pragma magic [ 52 42 58 53 ] @ 0x00
4+
5+
import std.string;
6+
import hex.core;
7+
import type.magic;
8+
9+
struct Header {
10+
type::Magic<"RBXS"> magic;
11+
u32 fileCount;
12+
};
13+
14+
struct FileIndex {
15+
char name[0x40];
16+
u128 md5Hash;
17+
u32 offset;
18+
u32 size;
19+
u64 reserved;
20+
21+
u8 file[size] @ offset;
22+
23+
#ifdef __IMHEX__
24+
hex::core::add_virtual_file(name, file);
25+
#endif
26+
} [[name(name)]];
27+
28+
struct RBXPack {
29+
Header header;
30+
FileIndex files[header.fileCount];
31+
};
32+
33+
RBXPack pack @ 0x0;
116 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)