This is the main page for Tweaks category, it includes topics like TweakDB and TweakXL.
This is the landing page for the Tweaks section of the wiki. It doesn't contain any information on its own, but you can explore its subcategories in the menu bar or use the links at the bottom of the page to browse them.
Check #tweak-modding-guides for a collection of guides on this topic
TweakDB is a database from REDengine 4 designed for readonly in-game access. It contains static information about characters, items, AI behavior, etc.
TweakXL is a modding tool and a framework to create mods that modify TweakDB, a proprietary database of REDengine 4, containing essential information about game entities and behavior.
Created: Mar 18 2024 by @Bioskop Last documented update: Mar 24 2024 by
How to read the game's tweak database
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.
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!
By browsing the TweakDB, you can inspect the game's database and change properties in real time.
To inspect the TweakDB, you have three options. This page will document each of them.
To explore the game's existing records, check #browsing-the-.tweak-files (requires the REDmod DLC)
To fuck around and find out, check #editing-values-with-cyber-engine-tweaks
To create new tweak files, read #the-wolvenkit-tweak-browser
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.
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.
For an example on how to do this, check #step-2-choose-the-weapon-and-create-an-override from the New Iconic Weapon: Step by Step guide.
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.
.tweak
filesYou need the REDmod DLC for this.
In your game directory , find the subfolder tools\redmod\tweaks
("tweak folder"):
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:
Notepad++ (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.
An IDE (e.g. Visual Studio Code (free), IntelliJ):
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.
Agent Ransack (free) A command line search interface
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:
The example uses IntelliJ to look up a weapon record — Visual Studio Code is functionally identical.
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 #wilsons-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:
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
:
… 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.
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.
Published: Jan 13 2024 by Last documented edit: Jan 13 2024 by
For documentation of the , please refer to the wiki.
The easiest way to create tweaks is to use the . This will generate tweak files for you which contain the current record's properties, whether they're directly defined or inherited from other records.
If you search for WilsonWeaponModAbility
in the Wolvenkit , you will find something like this:
This is the same tweak you'd find in the , but it's much easier to read and understand.
Which kinds of tweak records exist? How are they defined? What do they mean?
Created: Jan 13 2024 by manavortex Last documented update: Jan 13 2024 by manavortex
This page is a work in progress, as the tweak database is huge and barely-documented. If you have any information that needs to be in here, please don't hesitate to sign up as an editor and start contributing!
If you just want a quick overview of a certain type of tweak, you can check Cheat Sheet: Tweaks instead.
If you want to learn how to make tweaks instead, check How to YAML: Tweak modding basics
This page lists types of tweak records with their properties and lists of occurrences in the wild. They are grouped by type.
Please keep entries in the following format (you can copy e.g. #effector below):
A wrapper of #prereq with additional finetuning.
For more information on this, check the New Iconic Weapon: Step by Step guide (#creating-a-custom-condition)
An effector is the tweak version of an if-condition
: it is using #conditions or #prereqs before triggering its effect.
For more information on this, check the New Iconic Weapon: Step by Step guide: #wilsons-iconic-iron #designing-effectors
The prerequisite for e.g. an #effector.
You can find a full list under Cheat Sheet: Prereqs
For more information on this, check the New Iconic Weapon: Step by Step guide (#creating-a-custom-prereq)
This type of record adds a quality to an item, modifying its stats.
Set an item's quality via statModifier. To
Qualities in descending order:
These entries will start with BaseStats., e.g. BaseStats.ReloadTimeBonus
.
Unless specified otherwise, these are numeric (multipliers/additions).
You can find a full list under Cheat Sheet: Base Stats, and a list of weapon stats with explanations under Cheat Sheet: Weapon BaseStats
If you would rather look at guides instead, check the following links, or use the wiki's search function:
How to change an NPC's record with Redscript: TweakXL: Changing game records
Weapon properties and their explanations: The second half of New Iconic Weapon: Step by Step
Cyberpunk 2077 uses a single static database file, which registers and defines gameplay elements.
You can find it under \r6\cache\tweakdb.bin
This file is not meant to be human-readable.
To create a new gameplay item, mod developers must add to the Tweak DB.
See the child page Browsing the tweak database
TweakDB is only a huge list of records - entries defining everything that you can interact with in the game, from NPCs over weapons to (perhaps most familiar to most) clothing items.
You can see existing entries by browsing the .tweak under Cyberpunk 2077tools\redmod\tweaks
(use a text editor such as Notepad++).
A flat is a key-value pair used by records.
characterType
is the name of the property, wheras NPCType.Human
is the assigned value.
In this case, the syntax indicates an enum.
The Tweak DB can be interacted with using Cyberpunk's official REDmod, or numerous community solutions such as TweakXL, CET, and redscript.
Via tweak file: TweakXL
Via script: Cyber Engine Tweaks / redscript / Cyberpunk's official REDmod
For an explanation of the TweakDB, see
The following is a diagram which maps the relationship between game files for use with TweakXL and Archive XL:
What are Prereq_Record and what's their purpose in-game?
Prereqs is the mechanism used in the tweaks to express conditions, exactly as you would in code with:
The primary reason prereqs exist is to allow you to customize a condition's values in tweaks. You could do this all in code, of course, but for "repetitive yet not identical" conditions it turns out being actually very convenient.
In WolvenKit it looks like so:
For example, taking a random Prereq with state from WolvenKit:
Property name | Property explanation |
---|---|
Effector name | Effector explanation |
---|---|
Property name | Property explanation |
---|---|
Effector name | Effector explanation |
---|---|
A record is a collection of key-value pairs. Its nature is defined by the property $type. You can browse existing records in Wolvenkit's , or use CET's Tweak Editor to look at the values in-game.
Created: May 07 2024 by Last documented update: May 07 2024 by
All prereqs are of type (or of any type that inherit from it).
Prereqs are typically used in conjunction with , , and some other types of tweak records. They contain the logic which decides whether e.g. the effector should be applied or not.
All work similarly to : they have an associated class which must be defined in scripts (and you can also create your own). This class name is specified with the property prereqClassName
(its full name, including the module
where it lives) and must be of type (or any type that inherits from it).
In short the holds the values, while the describes the logic.
can also sometimes keeps (and caches) a persistent state of type (or any type inheriting from it). Internally it might e.g. listen to a and update the condition when a given value changes. It allows the game to keep listening to a condition for a short span of time, instead of constantly recreating and deleting the same Prereq over and over again. It's typically used for stats and skills checks.
Kindly note that there's not (always) an(y) indicator whether the Prereq comes with a state or is stateless, but you can check for it in :
Created: Mar 18 2024 by Bioskop Last documented update: Mar 24 2024 by
This page links to those guides on our wiki that involve tweak editing. For a collection of all dedicated Tweak guides, please check ->
The list below has been created by hand. If you find anything that's missing here, please and start editing!
Adding items is a somewhat involved process. Regardless of what you want to do, you should try to understand the basic structure:
Linking icons and in-game items:
invert
trigger when the condition is not met?
onlyOncePerShot
Limit this to one procc per bullet?
type
A #prereq — not the same as $type
!
attackType
finetuning of type
Perks.IsHitTargetAlive_inline2
Is the current target alive?
Perks.HitIsBodyPartHead_inline0
Is the current hit a headshot?
prereqRecord
a #prereq to check if the effector should become active
unitThreshold
a lower bound for the condition
percentMult
for a multiplier: multiply by percentage (0.25 => 125%)
value
the numeric value (1.5 => 150%)
MultiplyDamageWithVelocity
Will multiply damage by percentMult
(if the velocity is > unitThreshold
)
MultiplyDamage
Will multiply damage by value