# Scripting Cyberpunk

This wiki hosts common information on scripting with Cyberpunk independent of implementation.

You have four options to write scripts for Cyberpunk:

* [REDmod](https://app.gitbook.com/s/4gzcGtLrr90pVjAWVdTc/for-mod-creators-theory/modding-tools/redmod)
* [Redscript](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/-McniwB8YOK2HnJ7SYg_/) (Swift-like)
* [Cyber Engine Tweaks](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/-MP5jWcLZLbbbzO-_ua1-887967055/) (Lua)
* [RED4ext](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/-MjhIjZ0BBsL6SCohtnf/) (C++)

You can also develop C# extensions for [RED4ext](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/-MjhIjZ0BBsL6SCohtnf/).

## How does stuff work in Cyberpunk?

### The executable

Most of the game is implemented in C++ and only accessible through the game's executable (.exe file). Fortunately, [RED4ext](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/-MjhIjZ0BBsL6SCohtnf/) and [Cyber Engine Tweaks](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/-MP5jWcLZLbbbzO-_ua1-887967055/) hook into that, and [Codeware](https://www.nexusmods.com/cyberpunk2077/mods/7780) provides and extends a common interface for both.

The hooks are dependent on **binary addresses**, which is why the [core mods](https://app.gitbook.com/s/4gzcGtLrr90pVjAWVdTc/for-mod-creators-theory/core-mods-explained) are version dependent (and why cracked games don't mod well).

### Scripts

Scripts are precompiled into `r6/cache/final.redscripts` . As the file extension suggests, they can be modded with redscript.

### The tweak database

Any **properties** of game items and characters are defined in the tweak database. You can learn more about it under [Cyberpunk 2077 Modding](https://app.gitbook.com/o/-MP5ijqI11FeeX7c8-N8/s/4gzcGtLrr90pVjAWVdTc/ "mention") -> [Tweaks](https://app.gitbook.com/s/4gzcGtLrr90pVjAWVdTc/for-mod-creators-theory/tweaks "mention")


---

# 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/scripting-cyberpunk/scripting-cyberpunk.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.
