githubEdit

Browsing the tweak database

How to read the game's tweak database

Summary

Published: Jan 13 2024 by mana vortex Last documented edit: Jan 13 2024 by mana vortex

This page tells you how to browse the TweakDB. If you don't know what that is, you might want to read TweakDB: Game database first.

circle-info

If you're looking for all tweak database entries of the type XYZ, you might be lucky to find a list under Cheat Sheet: Tweaks. If there isn't one, please make one once you have found what you're looking for!

Introduction

By browsing the TweakDB, you can inspect the game's database and change entity properties in real time.

To inspect the TweakDB, you have three options. This page will document each of them.

circle-info

A big part of tweak modding is exploration — poking through tweaks until you find just the right thing to copy or change, or looking for something specific in hundreds of files.

Editing values with Cyber Engine Tweaks

You can do this directly in your game. Changes will not persist if you restart, and sometimes you may have to reload for them to become active, but this is the fastest and most comfortable way to fuck around and find out.

circle-info

For documentation of the TweakDB Editor, please refer to the Cyber Engine Tweaks wiki.

The Wolvenkit Tweak Browser

The easiest way to create tweaks is to use the Wolvenkit Tweak Browser. This will generate tweak files for you which contain the current record's properties, whether they're directly defined or inherited from other records.

circle-info

For an example on how to do this, check New Iconic Weapon: Step by Step from the New Iconic Weapon: Step by Step guide.

Example: Using the Wolvenkit Tweak browser

If you search for WilsonWeaponModAbility in the Wolvenkit Tweak Browser, you will find something like this:

As it's next to impossible to understand the item's structure like this, check the next section about Browsing the .tweak files and Example: browsing .tweak files.

Browsing the .tweak files

circle-info

You need the REDmod DLC for this.

In your game directory Cyberpunk 2077, find the subfolder tools\redmod\tweaks ("tweak folder"):

If these folders are missing, make sure that you have a valid REDmod REDmod

These folders contain a bunch of .tweak files, which you can open with a text editor of your choice. If you don't have one yet, here are your options:

  1. Notepad++arrow-up-right (free) This is fastest, and you can use this text editor for a lot of Cyberpunk modding. Press the hotkey Ctrl+Shift+F (Edit -> Find in Files) and search under the tweak folder.

  2. An IDE (e.g. Visual Studio Codearrow-up-right (free), IntelliJarrow-up-right): This is the most comfortable. Simply open the tweak folder and use the built-in search (hotkey for VSCode: Ctrl+Shift+F) to find your way along the files.

  3. Agent Ransackarrow-up-right (free) A command line search interface

Searching .tweak files with powershell

If you're just looking for occurrences of a certain string (e.g. all vendors), you can run the following powershell script from the tweaks directory:

Example: browsing .tweak files

circle-info

The example uses IntelliJ to look up a weapon record — Visual Studio Codearrow-up-right is functionally identical.

circle-info

This was initially a part of New Iconic Weapon: Step by Step, where you can also find explanations of various weapon properties.

In this example, we want to learn about Wilson's iconic gun and the effects of its WeaponMod. Check Wilson's iconic iron for the integrated version, or start searching:

Press Ctrl + Shift + F to open up the search dialog box and search for Preset_Lexington_Wilson.

You will find it in the following path:

Preset_Lexington_Wilson, but in .tweak format.

This is the same tweak you'd find in the Tweak Browser, but it's much easier to read and understand.

To follow this weapon's iconic weapon mod, find the section where it is defined:

This will take us to iconic_mods.tweak. The file holds WilsonWeaponModAbility with a bunch of statModifiers:

chevron-righticonic_mods.tweak -> WilsonWeaponModhashtag

… which aren't too different from the weapon modifiers. Let's ignore them for now and focus on the interesting part:

Searching for this will take us to mods_abilities.tweak, which holds the information we care about.

chevron-rightmods_abilities.tweakhashtag

For an explanation of these properties, refer to Types of tweak records -> Effector.

To see how this file would look in the Tweak Browser (and why browsing the .tweak files is superior), check Example: Using the Wolvenkit Tweak browser.

Last updated