> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/redscript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/redscript/getting-started/how-to-start-redscripting.md).

# How to start REDscripting

### Summary <a href="#summary" id="summary"></a>

Created: Apr 02 2024 by [mana vortex](mailto:undefined)\
Last documented edit: Jul 21 2026 by [Zhincore](mailto:undefined)

## How to start?

Simply open your IDE and create an empty project.

It is **discouraged** to develop directly in the game's folder, you should create your projects outside of the game, as usual for any language. ~~(But no one’s stopping you for experiments)~~

Now simply create a text file with the .reds extension, for example `MyMod.reds`. Then you're ready to code!

In REDscript we are usually *injecting* code using [hook annotations](/redscript/language/hook-annotations.md). There is no "main" function, however, you can use [*scriptable classes*](/redscript/references-and-examples/scriptable-systems.md) to run your code, too.

{% code title="Example of basic hooking:" overflow="wrap" %}

```swift
@wrapMethod(DamageSystem)
private func ProcessLocalizedDamage(hitEvent: ref<gameHitEvent>) {
    Log("Yay, my custom code!");
    wrappedMethod(hitEvent);
}
```

{% endcode %}

This code wraps a method in the game's `DamageSystem` class, which allows us to run our code! The original method still runs thanks to the special `wrappedMethod` call, so we didn't break the game (yet).

If you wanna see more examples of REDscript see [REDscript in 2 minutes](/redscript/getting-started/how-to-start-redscripting/redscript-in-2-minutes.md):

{% content-ref url="/pages/jT9p9v7fHb4aStauQRkE" %}
[REDscript in 2 minutes](/redscript/getting-started/how-to-start-redscripting/redscript-in-2-minutes.md)
{% endcontent-ref %}

## Developing a mod

For starters it should be enough to copy-paste your script(s) into the `Cyberpunk 2077\r6\scripts` folder. You can hot-reload all scripts without restarting the game using RedHotTools:

{% content-ref url="/spaces/4gzcGtLrr90pVjAWVdTc/pages/6Zcm0ORxkeoVugZzYDiY" %}
[RHT: Hot Reload](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/modding-tools/redhottools/rht-hot-reload)
{% endcontent-ref %}

When your mod grows, you probably want to give it more structure, have proper folders in your project, maybe add a [Red4Ext plugin](https://docs.red4ext.com/) or a [CET integration](https://wiki.redmodding.org/cyber-engine-tweaks/). \
Before it all falls down on your head, consider using the `red-cli` tool which can not only bundle all your scripts together but also install them for you while you develop:

{% embed url="<https://github.com/rayshader/cp2077-red-cli>" %}

## Where to go next?

Depends on what you want to do!

You probably want to explore more of what REDscript does:

{% content-ref url="/pages/-MfrXir5wmJniky9mdkr" %}
[Language Reference](/redscript/language/native-types.md)
{% endcontent-ref %}

If you want to interact with the game, you mostly want to hook up:

{% content-ref url="/pages/KziycbURgur7yFmUKkEr" %}
[How to create a hook](/redscript/getting-started/how-to-create-a-hook.md)
{% endcontent-ref %}

Also checkout notable libraries, maybe they can help you towards your goal:

{% content-ref url="/pages/ZF2BpND67OhMgGwksfW9" %}
[Libraries](/redscript/references-and-examples/libraries.md)
{% endcontent-ref %}
