Jump to content

unpack crp cities skylines 2 files


Recommended Posts

  • Engineers
Posted
//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Mask: 
//  ID Bytes: 
//   History: 
//------------------------------------------------
char Sign[4];
uint16 Version;
ubyte CRPRStrLen;
char CRPResourceName[CRPRStrLen];
byte Null[5];
ubyte StrLen;
char TrackName[StrLen];
uint32 ResourceCount;
uint32 DataBaseOffset;

struct
{
    uint32 Unknown_0;
    ubyte StrLen;
    char ResourceName[StrLen];
    ubyte MD5StrLen;
    char MD5[MD5StrLen];
    uint32 Unknown_1;
    uint32 ResourceOffset; // + DataBaseOffset
    uint32 Unknown_2;
    uint32 ResourceSize;
}TOC[ResourceCount]<optimize=false>;

 

  • Like 1
  • Engineers
Posted

You can easily convert it to the qbms code.

##############################
get BaseFileName basename

idstring "CRAP"
get Version ushort
get CRPRStrLen ubyte
getdstring CRPResourceName CRPRStrLen
getdstring Dummy 0x5
get StrLen ubyte
getdstring TrackName StrLen
get ResourceCount uint32
get DataBaseOffset uint32

for i = 0 < ResourceCount
	get Unknown_0 uint32
	get StrLen ubyte
	getdstring ResourceName StrLen
	get MD5StrLen ubyte
	getdstring MD5 MD5StrLen
	get Unknown_1 uint32
	get ResourceOffset uint32
	get Unknown_2 uint32
	get ResourceSize uint32
	math ResourceOffset + DataBaseOffset
	
	string Name p "%s/%s.dat" TrackName ResourceName
	log Name ResourceOffset ResourceSize
next i

The first file is some kind of TOC, second are data and rest are PNG's with some metadata on start.

Posted

I just tried the extraction using QuickBMS. I copied the code and created a BMS file; I opened it in Notepad, deleted everything inside, and pasted your code. Then I followed the standard procedure, but an error popped up and it wouldn't extract. I think I must have done something wrong, so could you please tell me how to successfully extract the files and convert the meshes to FBX or OBJ? Thanks again.

  • Engineers
Posted (edited)

Which error popped up?

Extraction works as expected for Tokyo 1%002E1v.crp:

Quote

  offset   filesize   filename
--------------------------------------
  00000148 149163921  Tokyo 1.1v\Tokyo 1.1v_Data.dat
  08e410d9 390148     Tokyo 1.1v\Tokyo 1.1v_SteamPreview.dat
  08ea04dd 153497     Tokyo 1.1v\Tokyo 1.1v_Snapshot.dat
  08ec5c76 211125     Tokyo 1.1v\Tokyo 1.1v.dat

edit: got a structure from the biggest .dat file:

blender_5UiMzpnetL.thumb.png.0a4f309b5365e318282cf857a9c3e029.png

 

blender_BNkCvdJFou.png

Edited by shak-otay

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...