全站通知:

CRAP File Format

阅读

    

2023-11-30更新

    

最新编辑:Lu_23333

阅读:

  

更新日期:2023-11-30

  

最新编辑:Lu_23333

来自城市:天际线WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索
页面贡献者 :
xl123071
Lu_23333
施工中:欢迎协助编辑本页,请参考帮助:编辑帮助帮助:编辑规范。请从以下方面协助编辑:
  • 需要翻译

《城市:天际线》使用名为“Colossal Raw Asset Package (.crp)”的内部文件格式来存储各种数据。本文件旨在对文件格式进行深入的技术解释。

CRP Header

This is the start of any .crp file.

Type Description
byte[4] CRP File Signature. Equal to "CRAP"
uint16 File format version Currently equals 6.
pstr Package name Encoded using UTF-8.
pstr Author Name The package author's name, encrypted. TODO
uint32 Package version TODO
pstr Main Asset Name A string representing the title of the main asset in this package. Encoded using UTF-8.
uint32 File Count The number of files contained in this package.
uint64 Data Offset The location in this file where the file data starts. This is added to each file's individual offset, and is usually right after the end of the crp header.
asset_entry[file_count] Asset Entires A list of asset entries. The length of this list is defined by the File Count above.

Following the CRP header and until the end of file exists space where each asset file resides.

Asset Entry

Much like a ZIP archive file, the CRP header contains meta data about each individual file, such as it's name and offset, for efficient file seeking and reading.

Type Description
pstr Name Name of the asset file. Encoded using UTF-8.
pstr Checksum The asset's checksum, encoded in ASCII hexadecimal. TODO.
uint32 Type This determines what type of asset this is, and how it should be parsed. See the Asset Types table below.
uint64 Offset The offset, in number of bytes, of where this asset is located in the CRP. This is added to the offset in the CRP header.
uint64 Size The size of the file, in bytes.

Additional asset metadata is located at the beginning of the file's data.

Asset Types

Value Description
1 Object
2 Material
3 Texture
4 Static Mesh
50 Text
51 Assembly
52 Data
53 Package
80 Locale
100 User
101 Save Game
102 Custom Map
103 Custom Asset
104 Color Correction (LUT)
105 District Style
106 Map Theme
107 Map Theme Map
108 Scenario
说明

本文内容长期有效,适用任何游戏版本。

本页内容最初译自官方Wiki:CRAP File Format,经双方编辑后内容可能与来源不同。