Textures, meshes and sounds
REDcode shows game files the way they look and sound, not only as data. Each viewer opens with a click, from your project or straight from Game Assets, with nothing to extract first.
Textures
A texture (.xbm) opens in the texture viewer: the image over a checkerboard, so you can see what’s transparent, with its size.
| Button | Does |
|---|---|
| Fit | Scales the image to the pane |
| 1:1 | One texture pixel per screen pixel |
| Pixels | Sharp, blocky scaling, to see single pixels |
The same viewer opens .dds and .tga files, which VS Code can’t show. In the Project view, PNG, JPG, BMP and TIFF open in it too, because a black texture is invisible in VS Code’s own preview on a dark theme. Elsewhere those keep VS Code’s preview and offer REDcode Texture under Open With….
To see a texture’s settings (its format, compression, flags), open it in the CR2W editor: see Editing game files. To change the picture, export it to PNG, edit it in any image editor, and import it back.
Meshes in 3D
A mesh (.mesh) opens on a 3D view inside the CR2W editor. Tree shows the file’s data; 3D goes back.
| To | Do |
|---|---|
| Orbit | Drag |
| Pan | Right-drag, or Shift-drag |
| Zoom | Mouse wheel |
| Fit the model in view | Frame |
- The toolbar picks the LOD, the level of detail. LOD 1 has the most detail.
- It also turns on and off the wireframe, the bounding box and the ground grid, and shows the triangle count and the size in metres.
- The list on the right turns each submesh on and off, with its material name and triangle count.
Good to know:
- Submeshes are coloured by material name, not textured. Textures on meshes come later.
- The view shows the saved file. Save to see your edits.
.glband.gltffiles, such as a mesh you exported to Raw, open in the same viewer.
Sounds
A sound file opens in the audio player. Most .wem files in the game are voice lines, in the localization folders. .opus files open in it too.
- The player shows the sound’s waveform. Click or drag on it to jump to a point.
- Play and Loop sit below it.
Spaceplays and pauses. - The toolbar shows the time, codec, channels and sample rate.
- Save… writes the sound to a file.
- Open in EDGEwave hands the sound to EDGEwave, the EDGE sound studio. See Working with other tools.
WAV, Ogg, MP3 and FLAC files keep VS Code’s own preview, and offer the player under Open With….
The game’s sound effects
The game’s sound effects aren’t separate files you can browse. About 73,000 sounds are packed together, with an index file that groups them into events, such as a gunshot or a door, each with a few variations.
REDcode: Browse Game Sounds, in the Game Assets ... menu, opens that index as a list.
- Type in the filter box to narrow the list by event name, tag or hash. All the words must match, for example
revol reload. - Click a row to play its first sound, or a number to play that variation.
- The arrow keys step through the list and play as they go.
- Copy Hash copies the hash of the sound that’s playing. Save… writes it as an
.opusfile. - Open in EDGEwave works here too.
Event names come from WolvenKit’s list of events for game version 1.6. It names about 10,900 of the 16,100 events that have sounds; the rest show only their hash.
Replacing a sound
You can export a voice line (.wem) to Ogg to listen to or edit elsewhere. Putting a changed sound back into the game isn’t possible from REDcode yet: WolvenKit’s library can’t import sounds, so Import from Raw doesn’t offer it. See Export and import.