# TweakXL: Changing game records

## Summary

**Last documented edit**: Feb 09 2024 by [mana vortex](mailto:undefined)

Changing item stats happens by making changes via **TweakXL** or **REDmod** in the [TweakDB: Game database](/cyberpunk-2077-modding/for-mod-creators-theory/tweaks/tweaks.md).

{% hint style="info" %}
You can find more information about this on the [TweakXL github's wiki page](https://github.com/psiberx/cp2077-tweak-xl/wiki/YAML-Tweaks).
{% endhint %}

## Guides about this:

{% content-ref url="/pages/b7sbz1wcnWb3Y5dTHP8K" %}
[Adding stats, modifiers, and mod slots](/cyberpunk-2077-modding/modding-guides/items-equipment/editing-existing-items/adding-stats-and-modifiers.md)
{% endcontent-ref %}

{% content-ref url="/pages/wKj0dUcdh5peQ3l2DGRi" %}
[Changing vendor inventory](/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/tweakxl/tweakxl-changing-game-records/changing-vendor-inventory.md)
{% endcontent-ref %}

{% content-ref url="/pages/13W3tMsFsLq9JadDqpxW" %}
[Changing NPCs - Tweak edit (REDMod)](/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/tweakxl/tweakxl-changing-game-records/changing-npcs-tweak-edit-redmod.md)
{% endcontent-ref %}

{% content-ref url="/pages/9GcEh2c9jE9KP3lsDmlP" %}
[New Iconic Weapon: Step by Step](/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items/weapons/new-iconic-weapon-step-by-step.md)
{% endcontent-ref %}

## How to edit tweaks?

You can change tweaks with

* REDMod (see [Changing NPCs - Tweak edit (REDMod)](/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/tweakxl/tweakxl-changing-game-records/changing-npcs-tweak-edit-redmod.md))
* Cyber Engine Tweaks (see Scissor's tutorial ([Google Doc](https://docs.google.com/document/d/1pPN_RiluE-4PwGWOxdEVOegfBEaEsd5APHndr82FdPo/edit)))
* TweakXL (see [Changing vendor inventory](/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/tweakxl/tweakxl-changing-game-records/changing-vendor-inventory.md))

{% hint style="info" %}
If possible, you should stick to TweakXL for editing tweaks.
{% endhint %}

<details>

<summary>Why? What's the pros and cons for each?</summary>

[psiberx says](https://discord.com/channels/717692382849663036/953004282142163014/1177462646937763850):

it's mostly preference but there are real advantages of TweakXL:

* proper record creation and cloning with all properties
* proper hot reload with rolling back to initial state, and not just reapplying your mod changes on top of previous run
* it's much faster when used for declarative tweaks and even for scripts (I did some optimizations for CET which reduced loading times 20x, but it needs more; for reference if we convert just the existing clothing mods to CET it'll increase game launch time in minutes)
* easier to work with arrays
* can create new stats

REDMod can do the same, but doesn't offer you [hot reload](/cyberpunk-2077-modding/for-mod-creators-theory/modding-tools/redhottools/rht-hot-reload.md) features.

</details>

## Removing properties

If you want to **safely delete** a record property, set its value to **None**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/tweakxl/tweakxl-changing-game-records.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
