Setting up Redscript and VSCode
How to configure your setup
Created by HJHughJanus on github, moved here for better maintainability
1. Install redscript
Download redscript from github:
The zip file will contain the following folders:
Extract it directly into your directory, so that the folders merge with the ones already there.
Start the game so that redscript can set itself up.
Check the folder
Cyberpunk 2077\r6\logs
: if redscript has done its thing, you will now see a file namedredscript_rCURRENT.log
You can now put your redscript mods into Cyberpunk 2077\r6\scripts
and they will be automatically loaded when the game starts.
2. Setting up VSCode
Download and install VSCode.
After starting it, click on the Extensions icon in the left menu bar:
Search for
redscript
and install theRedscript Syntax Highlighting
extension. Do not close the tab yet.
Download the redscript extension from github:
In VSCode, click the … symbol in the topright of the extension manager and select
Install from VSIX…:
Navigate the file picker to your downloads folder and install the file from step 4.
Your extension manager will now show both addons as installed. If it does not, restart VSCode.
Click on the cog menu next to redscript-ide-vscode:
Set up the path to your cyberpunk install in VS Code preferences.
Save the settings
3. Testing the tools
You need to restart VSCode before the redscript language server will start working
Create a mod development folder somewhere (example:
D:\Cyberpunk\redscript_modding
)Inside the folder, create a plain text file with a
.reds
extension (e.g.MyMod.reds
)Open VSCode and click
Open Folder
, then point it at your mod development folder from step 1On the left, you should see the file you created in step 2. Open it and paste the following (incorrect) code snippet:
Save the file (Hotkey:
Ctrl+S
).You should see an error, because
bool
should beBool
.Hover your cursor over the error, you should see something like this:
Correct the code:
Save again — everything should work now.
If you want to make a redscript mod, you can check out How to create a hook (originally by HJHughJanus on github)
Last updated