Skip to content

Latest commit

 

History

History
341 lines (270 loc) · 50.7 KB

File metadata and controls

341 lines (270 loc) · 50.7 KB
description
All inclusive list of REDengine file formats

File Formats

Written & Published: April 10 2023 by @manavortex
Game version: 2.1

{% hint style="info" %} For an exhaustive list, see the W2RC File Format Table. {% endhint %}

.app (Appearance definition)

This file contains a list of appearances with their associated components. To load them, you require a root entity .ent. The .app files also contain extensive parameters for wounds and dismemberment, determining which meshes to use for different types of garment an NPC might be wearing, and even the physics behavior of these meshes.

{% content-ref url="appearance-.app-files/" %} appearance-.app-files {% endcontent-ref %}

Holds a list of components.

.ent (Entity)

Root entity

{% hint style="info" %} As of Phantom Liberty, there are duplicates of many .ent files in the filebase. Whenever you come across a duplicate, pick the one that has "ep1" in its name.1 {% endhint %}

The entry point for the game to display an NPC or prop. It is a collection of components that the entity is comprised of, determining their parameters or referencing the files that have said parameters. For instance, NPC .ent files have over a hundred components each, such as entAnimatedComponent (references the correct .anims, .animgraph and .rig files), entTemplateAppearance (references all .app files that are applicable to the entity) and entEffectSpawner (references all .effect files for decals or particles that the entity can spawn). Many of these components have configurable parameters, and the .ent file itself has many under the "entity" section. Many of these parameters, however, are merely the initial state of the entity and are modified in gameplay (such as the boolean isRagdolling).

From ArchiveXL item additions, this kind of file is usually called a root entity.

Mesh entity / Component entity

For player items, an .ent file can serve as a wrapper, splitting components out of the .app file by putting them in their own file.

{% content-ref url="entity-.ent-files/" %} entity-.ent-files {% endcontent-ref %}

Components

Not a file type but an internal data structure and part of .ent or .app files. Components are how the game adds anything to the in-game world, from pag3d data over player interaction prompts to explosion sounds.

{% content-ref url="components/" %} components {% endcontent-ref %}

.inkatlas (Texture mapping)

.mesh (3d object)

A 3d object, holding appearances, materials, and rigging. Meshes for inanimate objects also tend to contain the physics parameters of these objects, whereas NPC meshes tend to contain some garment parameters.

A mesh can have several submeshes, which can be displayed or hidden via chunkmasks.

.mi / .mt / .remt

A material definition for a shader. You can assign those to CMaterialInstance entries in your mesh and then define their qualities by changing their parameters.

{% hint style="info" %} For further detes on materials, see here.
For an explanation on .mi files, see here. {% endhint %}

Relevant properties:

Different per material — see parameters/[2] for a list of properties

e.g. BaseColor, Metalness, NormalStrength
or VectorField, FresnelColor, Albedo

.opusinfo/.opuspak (audio)

OpusPaks are collections of opus audio files, they are described by the sfx_container.opusinfo file. For more info see the Audio Files page:

{% content-ref url="audio-files.md" %} audio-files.md {% endcontent-ref %}

.streamingsector (world data)

This file holds world environment information and -properties. Due to its complexity, information is grouped on its sub-page.

{% content-ref url="the-whole-world-.streamingsector/" %} the-whole-world-.streamingsector {% endcontent-ref %}

.wem (audio)

A Wwise audio file, usually containing a voice-over or music. You can find more info on the Audio files page:

{% content-ref url="audio-files.md" %} audio-files.md {% endcontent-ref %}

.xbm (Texture)

A regular texture file. Can be exported to .png via WolvenKit, edited, and imported back into the game. The type of texture is often indicated at the end of the filename. For instance, diffuse textures are specified as "_d" and normals are specified as "_n".

{% hint style="info" %} If you stick to the game's naming schema, Wolvenkit will auto-detect the right import settings for you. {% endhint %}

Normal maps

Can be either blue or yellow (inverted), both exist. For a guide how to make your own, see here.

Cyberpunk normal maps are swizzled (a technique originally employed in DTX-5).

  • The red channel stores the X axis
  • The green channel stores the Y axis
  • The blue channel is empty, since the Z-data will be calculated from red and blue.

Texture Atlases

Texture atlases contain multiple textures that the game may choose at random (such as blood splatters, as seen in fx_blood_splatter_2x2_01_d.xbm) or play sequentially (as seen in splash_texture.atlas_n.xbm, used by the game for the blood puddle animation). Texture atlases won't always have "atlas" in their filename, but can still be quickly identified by the size of the grid. For instance, "3x3" in the filename means a grid of nine textures. In the asset browser, right-clicking on the file and selecting "Find Files Using This" will take you to files that allow further customization of how the game interacts with the grid.

Relevant properties:

IsGamma

Override in-game gamma (lighting)?

- Set to "false" for normals
- Set to "true" for diffuse/albedo and any parts of the UI

W2RC File Format Table

Extension Description Fully Parsed
actionanimdb Animation databases that rename and organize animations for use in scripts and other files such as animation graphs
acousticdata Audio
aiarch Pathfinding/AI
animgraph Animation and physics graphs, used for visual scripting of all animations associated to an entity, as well as physics behavior of dangling objects such as necklaces
anims Collections of individual animations and their data
app Mesh appearance configurations, as well as wound/dismemberment configurations
archetypes ?
areas Terrain related
audio_metadata ?
audiovehcurveset ?
behavior A.I. behavior graphs, can be used to influence NPC reactions to various stimuli
bikecurveset ?
bk2 Bink video
bnk Bink video
camcurveset Camera curve preset
cfoliage ?
charcustpreset Character editor preset
cminimap Minimap
community Quest related
conversations Cutscene related
cooked_mlsetup See mlsetup
cooked_anims See anims
cookedapp See app
credits Configuration for credits
cubemap 6-sided cube texture
curveset Determines the curve graph values of things such as fall damage and level scaling
devices ?
dtex ?
effect Master file for visual effects such as particles and decals. Holds parameters and has a second tab for editing the associated .particle file.
ent Entity, master file that contains all components and parameters of which an entity is comprised
env Environment definition
envparam ?
envprobe ?
es Behavior parameters for attacks, weapons and explosions. Highly influential on gameplay.
facialcustom ?
facialsetup ?
fb2tl ?
fnt Font
folbrush Foliage brush
foldest Destructible foliage element
fp ?
gamedef Game main configuration file
garmentlayerparams ?
genericanimdb Animation database that determines which animations should play based on various enum inputs (see associated .csv to see which parameter corresponds to what number)
gidata ?
gradient ?
hitrepresentation Hit detection for different body parts, as well as visual feedback based on whether the material is flesh, metal, cyberware, etc.
hp Hair profile
ies ?
inkanim UI animation
inkatlas UI texture atlas
inkcharcustomization UI character related
inkfontfamily UI font
inkfullscreencomposition UI
inkgamesettings UI settings
inkhud UI
inklayers UI
inkmenu UI
inkshapecollection UI
inkstyle UI
inktypography UI
inkwidget UI
interaction UI
journal Quest info
journaldesc Quest info
lane_connections ?
lane_polygons ?
lane_spots ?
lights ?
lipmap ?
location ?
locopaths ?
loot ?
mappins Pins on map
mesh Mesh/model, often containing physics settings (for inanimate objects) and some garment parameters (for NPCs)
mi Instanced external shaders/materials
mlmask Masks for multilayer supershader
mlsetup Setup file for multilayer supershader
mltemplate Template file for multilayer supershader
morphtarget Blend shapes/shape keys
mt Base shader
navmesh AI navigation meshes
null_areas ?
opusinfo Audio
opuspak Audio
particle Parameters for particles and decals, can be configured in the second tab of .effect files
phys Nvidia PhysX physics parameters, also present in many .mesh files
physicalscene Nvidia PhysX physics parameters, also present in many .mesh files
physmatlib Physics Material definitions. Governs bullet penetration, A.I. visibility through different materials, friction, etc., but tweaks to it are only partially applied in-game
poimappins Point of Interest Map pin
psrep ?
quest Quest
questphase Quest progression
regionset ?
remt Similar to mt, difference is unclear
reslist Resource list
rig Rig/skeleton for animation, definition of bone groups and ragdoll physics
scene Cutscene
scenesversions Cutscene versioning
smartobject ?
smartobjects ?
sp Skin profile
spatial_representation ?
streamingquerydata Terrain
streamingsector The world in manageable pieces
streamingsector_inplace Terrain
streamingworld Links all the sectors
terrainsetup Terrain
texarray Multiple textures
traffic_collisions ?
traffic_persistent ?
voicetags ?
w2mesh Leftover mesh file with RED3 extension
w2mi Leftover mi file with RED3 extension
workspot ?
xbm Texture
xcube Texture

Generic Format

<explanation>

Generic FIle Format Table

Extension Description
csv Standard CSV file, spreadsheets containing definitions for various parameters and enums that are used in other files
wem Audio file

Archive Format

File Structure

Name Type/Size Info
Header Header See specification of Header below.
Custom Data Custom Data WolvenKit only. See specification of custom data below.
Files data Raw file data
File List File List See specification of file list below.

Header

Name Type/Size Info
Magic char[4] Constant: "RDAR"
Version uint32 Currently 12
IndexPosition uint64 Offset of beginning of file list
IndexSize uint32 Size of file list
DebugPosition uint64 Always 0
DebugSize uint32 Always 0
Filesize uint64 Size of file (excluding Filesize)
CustomDataLength uint32 WolvenKit only

Custom Data (WolvenKit)

The following data only applies for archives created with WolvenKit

Name Type/Size Info
Magic char[4] Constant: "LXRS"
Version uint32 Currently 1
Size int32 Size of uncompressed data
ZSize int32 Size of compressed data
PathCount int32 Number of custom paths
PathStrings zstring[PathCount] Custom file paths

File List

Name Type/Size Info
FileTableOffset uint32 Always 8
FileTableSize uint32
CRC uint64 Checksum of ???
FileEntryCount uint32 Number of files
FileSegmentCount uint32 Number of file segments
ResourceDependencyCount uint32 Number of resource dependencies
FileRecords File Record[FileEntryCount] See specification of file record below.
FileSegments File Segment[FileSegmentCount] See specification of file segment below.
ResourceDependencies uint64[ResourceDependencyCount]

File Record

Name Type/Size Info
NameHash64 uint64 FNV1A64 hash of the filename
Timestamp int64 Windows filetime of file creation
NumInlineBufferSegments uint32 Number of inline buffers
SegmentsStart uint32 Index of the first file segment
SegmentsEnd uint32 Index of the last file segment
ResourceDependenciesStart uint32 Index of the first resource dependency
ResourceDependenciesEnd uint32 Index of the last resource dependency
SHA1Hash uint8[20] SHA1 hash of the file

File Segment

Name Type/Size Info
Offset uint64 Offset of the data
ZSize uint32 Size of compressed data
Size uint32 Size of uncompressed data

Footnotes