arrow-left

All pages
gitbookPowered by GitBook
1 of 10

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Exporting .xbm

REDmod can export REDengine .xbm files to several raw formats for editing.

dds: DirectDraw Surface bmp: Windows Bitmap jpg: Joint Photographics Experts Group tga: Truevision Targa png: Portable Network Graphics

XBM PARAMETERS

    -bitmap-mipmap=<uint>           - mipmap selection

    -bitmap-source=<bool>           - export uncooked file (default = false)

    -bitmap-flip=<bool>             - flip texture (default = false)

    -bitmap-gamma=<bool>            - forced gamma setting (default = false)
redmod resource-export -depot="M:\" -input="base\test\example.xbm" -output="M:\base\test\example.png" -bitmap-flip=true
circle-exclamation

you can also export textures using the wolvenkit gui (recommended)

Exporting Resources to Raw Formats

REDmod can export .mesh, .w2mesh, .xbm, rsvg and .svg files using the resource-export command.

redmod resource-export -depot=<depot> -input=<resource-path> -output=<file> -<optional parameters>

PARAMETERS

    -depot=<depot>                  - directory-path to the depot (e.g. "C:\depot")

    -input=<resource-path>          - resource path of the file to export (relative to depot)

    -output=<file>                  - absolute path to the output file

REDmod

Using Redmod to create mods.

circle-info

if you're looking for how to use REDmod to install and manage mods as a user, click

REDmod is a command line tool developed by CDPR and Yigsoft, which allows us to interact with game files in a variety of ways.

Modules for mod creators:

hashtag
Folder Structure

When creating a REDmod, there is a certain file structure that you need to follow to ensure that it can be used by others. You will want to have a folder that is the name of the mod and in this folder you will have a file named info.json. Whether you are doing Animation Modding, Script Modding, TweakDB Modding, Audio Modding, or other mods (archive mods), you will also need to have at least one subfolder for the mod files to go into. This subfolder should be located on the same level as the info.json file, and be nested directly inside the folder with the mod name.

An example REDmod might look something like this:

When sharing you mod, you would package the folder that is the name of the mod. You could also package the mods folder with the "mod folder", but it is not necessary and it is assumed one might have other mods in their mods folder anyways.

hashtag
info.json

For a REDmod to be recognized and loaded by the game engine, you must include an info.json file. This file sits in the root folder of the mod's folder at the same level as the subfolders containing your modded files. There are two required entries and a few optional entries that can be in this json file. At minimum a name field and a version field are needed:

In the above:

  • The name field is the mod's name and should generally be the same as the folder the info.json file sits in.

  • The version field is the mod's version. The version should generally use "Semantic Versioning"

  • The description field is optional for all mods, but it is generally suggested one should include it so other tools have something to display for a given mod.

  • The customSounds field is semi-optional. It is required for .

INFO - Semantic Versioning is a method of versioning where each number gives meaning for a release based on their position. It uses the format MAJOR.MINOR.PATCH where a MAJOR release change is one which will break workflows, MINOR could break a workflow but is generally safe and might introduce deprecations, and a PATCH is a small non breaking change that all users on the same MAJOR and MINOR can update to without any issues.

here
resource-export  - Export REDengine files to raw format for editing
resource-import  - Import raw files to REDengine formats for use in your mod
animation-import - import .re animation files to an animset
util-hash        - Hashes paths/string with given hash algorithm
help             - Displays helpful info about the other avaliable modules (use -h or -help on any command)
 * root_folder
 * | -📁 mods
 * | |-📁 <Mod Name>
 * | | |-📁 archives
 * | | |-📁 scripts
 * | | |-📁 tweaks
 * | | |-📁 customSounds
 * | | |-📄 info.json
{
    "name": "MODNAME",
    "description": "Description for the mod.",
    "version": "1.0.0",
    "customSounds":    [ ]
}
Audio Modding

Exporting .mesh/.w2mesh

Using REDmod to export .mesh and .w2mesh files to .fbx format

Optional Parameters for meshes

-lod=<uint>           - Defines mesh's lod to be exported
-mesh-skinning=<bool> - export skinning (armature data) default is false

Example Command:

redmod resource-export -depot="M:\" -input="base\test\example.mesh" -output="M:\base\test\example.fbx" -lod=1 -mesh-skinning=true
circle-info

You can also export to .fbx with REDmod through the Wolvenkit GUI!

Importing Raw Files to REDengine

using the import and resource-import commands

Redmod can be used to import a large variety of files into REDengine formats for use in your mods.

Red Engine Format
Raw Format

.fnt (font)

.ttf: TrueType font

.otf: OpenType font

.cff: Compact Font Format

.regionset (Texture Region Set)


redmod resource-import -depot=<depot> -input=<relative path to file to be imported> -output=<absolute path to the new redengine file>

.json: Texture region set definition.

.mesh (Mesh)

.xml: Speed Tree XML Resource File .smd: Source Mesh Data

.fbx: Autodesk FBX

.curveset (Curve Set)

.csv Comma Separated Value Table

.mlsetup (MultiLayer Setup file)

.json: MultiLayer Setup JSON File .mlsetup: MultiLayer Setup File

.genericanimdb (Generic anim database)

.csv: csv file

.cubemap (Cubemap)

.dds: DirectDraw Surface

.bmp: Windows Bitmap

.jpg: Joint Photographics Experts Group .tga: Truevision Targa

.png: Portable Network Graphics

.exr: OpenEXR

.rig (Rig)

.re CDPR proprietary format

.ies (IES Light Profile Data Resource)

.ies: IES light profile

.mlmask (Multilayer Mask)

.tiff: Tagged Image File Format

.tif: Tagged Image File Format

.json: JSON

.rsvg (SvgResource)

.svg: SVG Resource definition file

.xbm (Bitmap Texture)

.dds: DirectDraw Surface

.bmp: Windows Bitmap

.jpg: Joint Photographics Experts Group .tga: Truevision Targa

.png: Portable Network Graphics

.tiff: Tagged Image File Format

.tif: Tagged Image File Format

.exr: EXR

.cube: Cube LUT

Animation Modding

hashtag
Animation Modding - WolvenKit Integration

The REDmod animation import tool can be used as a Plugin in WolvenKitarrow-up-right.

  • Add the .re animation file you wish to import to your /Raw folder in your mod project

  • Add the .anims animation set file from the game with the Asset Browser

  • Click View > Import/Export tool

  • In the Import/Export tool, navigate to Import: a list of all .re animation file in your /Raw folder will appear

  • Double click the entry to change the import options:

    • Select the .anims animation set file to import from the dropdown

    • Select the animation name you wish to override from the dropdown

  • Click process

INFO - It is best to name .re animation correctly even if you replace an existing animation, because the imported animation will always have the filename of the .re file.

INFO - You need to have the .rig file used by the .anims animationset present in your WolvenKit project.

hashtag
Animation Modding - Manually

See also: Import Command

The import command imports an .re animation file into an existing .anims animation set file.

Optional parameters include specifying an existing animation name to rename inside the animset file (otherwise the filename of the .re animation file is used) or specifying a different output path (default is overwrite).

INFO - It is best to name .re animation correctly even if you replace an existing animation, because the imported animation will always have the filename of the .re file.

INFO - You need to have the .rig file used by the .anims animationset present in your depot path.

REDmod: Tweaks

To make a tweak mod in REDmod:

  1. make a new mod and create a new folder here: <Cyberpunk 2077>/mods/MODNAME/tweaks

  2. copy the .tweak file(s) you want to change from <Cyberpunk 2077>/tools/redmod/tweaks ❗ preserving the folder structure!

  3. add a info.json file to <Cyberpunk 2077>/mods/MODNAME/tweaks with some mod info

✅ Done. To test, launch the game with REDmod.

Script Modding

To make a script mod in REDmod:

  1. make a new mod and create a new folder here: <Cyberpunk 2077>/mods/MODNAME/scripts

  2. copy the .script file(s) you want to change from <Cyberpunk 2077>/tools/redmod/scripts

{
    "name": "MODNAME",
    "description": "Description for the tweak mod.",
    "version": "1.0.0",
    "customSounds":    [ ]
}
❗
preserving the folder structure!
  • add an info.json file to <Cyberpunk 2077>/mods/MODNAME/scripts with some mod info

  • ✅ Done. To test, launch the game with REDmod.

    {
        "name": "MODNAME",
        "description": "Description for the script mod.",
        "version": "1.0.0",
        "customSounds":    [ ]
    }

    Importing Animations

    redmod import -gameRoot=<depot> -inputPath=<file> -animset=<resource-path> [options]

    hashtag
    Synopsis

    hashtag
    Description

    The import command imports an .re animation file into an existing .anims animation set file.

    Optional parameters include specifying an existing animation name to rename inside the animset file (otherwise the filename of the .re animation file is used) or specifying a different output path (default is overwrite).

    INFO - It is best to name .re animation correctly even if you replace an existing animation, because the imported animation will always have the filename of the .re file.

    hashtag
    Arguments

    • -gameRoot=<path>

      directory-path to the depot for animset and output (e.g. C:\modding\depot)

    INFO - this is the base depot from which relative <resource-paths> are loaded

    INFO - You need to have the .rig file used by the .anims animationset present in your depot path.

    • -inputPath=<file>

      absolute path to the animation .re file

    • -animset=<resource-path>

    INFO - resource path must start with base\ (e.g. base\animations\npc\generic_characters\male_average\open_world\generic_male_average__stand__rh_cane_lh_cigar__01.anims)

    hashtag
    Options

    • -outputPath=<resource-path>

      resource .anims file name to write, default is to overwrite the input animset (resource path must start with base\)

    • -animationRename=<name>

    INFO - the imported animation will always have the filename of the .re file even if you specify the animationRename parameter.

    • -?|-h|--help

      Prints out a description of how to use the command.

    hashtag
    Examples

    • redmod import -gameRoot="E:\modding\depot" -input="E:\raw files\animtest1\macarena_long (1).re" -animset=base\animations\npc\generic_characters\male_average\open_world\generic_male_average__stand__rh_cane_lh_cigar__01.anims -output=base\out\new_test.anims -animationRename=stand__rh_cane_lh_cigar__01__smoke__02"

      Imports the animation file E:\raw files\animtest1\macarena_long (1).re into the animset file E:\modding\depot\base\animations\npc\generic_characters\male_average\open_world\generic_male_average__stand__rh_cane_lh_cigar__01.anims and replaces the animation with the name stand__rh_cane_lh_cigar__01__smoke__02 with the name macarena_long (1). The result is saved to to E:\modding\depot\base\out\new_test.anims.

    Audio Modding: Redmod

    hashtag
    Audio Modding - WolvenKit Integration

    The REDmod sound import tool can be used in a project.

    • Add the .wav

    Arguments:
      -gameRoot=<depot>
      -inputPath=<file>
      -animset=<resource-path>
    
    Options:
      -outputPath=<resource-path>
      -animationRename=<name>
      -h, --help 
    resource .animset file to use

    parameter representing the old name of animation to be replaced by the new animation (default is the filename of the .re animation file)

    sound files you wish to import to your
    /customSounds
    folder in your mod project
  • Click Tools > Sound Modding Tool

  • In the Sound Modding Tool, choose which event to mod from the list of game sound events

  • Adjust the parameters in the bottom right

  • Click Save

  • hashtag
    Audio Modding - Manually

    Place raw .wav audio files inside <Cyberpunk 2077>/mods/<name>/customSounds. Include a info.json file with your mod (<Cyberpunk 2077>/mods/<name>/customSounds/info.json) where you sepcify how to use your custom sounds.

    hashtag
    Example

    hashtag
    Parameters

    • name - the game audio event to override

    • type - the sound type. Options are:

      • mod_skip: do not play this sound event

      • mod_sfx_2d: will be played without any positions / attenuation

      • mod_sfx_city: has a longer attenuation that is suitable for city sounds

      • mod_sfx_low_occlusion: has a long attenuation that isn't occluded much e.g. a VO or quest sound that you don't want to be muffled

      • mod_sfx_occlusion: medium attenuation with normal occlusion

      • mod_sfx_radio: needs to be tuned to a broadcast channel (e.g. radio)

      • mod_sfx_room: has a shorter attenuation suitable for something that can be heard across a room

      • mod_sfx_street: has a medium attenuation, good for something to be heard down a street

      • mod_sfx_ui: for menu and ui sound replacement

    • file - the .wav file to use (inside /customSounds)

    • gain and pitch

    WolvenKitarrow-up-right
    {
      "name": "newmodtest",
      "version": "1.0.0",
      "customSounds": [
        {
          "name": "amb_bl_eq_medical_electronics_small",
          "type": "mod_skip"
        },
        {
          "name": "w_gun_revol_power_overture_fire_suppressor",
          "type": "mod_skip"
        },
        {
          "name": "w_gun_npc_dian_reload",
          "type": "mod_sfx_2d",
          "file": "are_you_sure_about_that.wav",
          "gain": 1.0,
          "pitch": 0.1
        }
      ]
    }