-
Notifications
You must be signed in to change notification settings - Fork 0
Developing
This page containg info and tips you should know if you want to develop and contribute to this mod.
-
localizations/- Simplified language files for the mod. Every effect must have at least english translation. -
scripts/cet/- CET scripts providing configuration UI. -
scripts/redscript/- RedScripts handling core mod logic and effects. -
src/- Red4ext plugin in Rust providing native extensions. -
WolvenKit/- WolvenKit project with assets, AXL, etc. Used for packaging the resulting mod.
Also when developing you might encounter a git-ignored folders libs containing stuff your IDE might need to provide you suggestions, and target which is where Rust compiler stores it's things.
You should have some stuff ready before you start developing:
- Windows, text editor, git, patience.
- PowerShell and ability to run it's scripts.
- Red-CLI - Recommended!
- Red Hot Tools (RHT) Recommended!
- Rust (only needed for developing native extensions).
Also your "text editor" should have support for releveant languages, especially Redscript) if you plan to change redscripts. For more info see the Preparation section.
Note
Your code has to be properly formated (and runnable of course) when submitting a PR!
If you're not modifying native extensions, you don't need Rust. Instead, download the latest chaosmod2077.dll build from the Build GitHub Action:
- Open workflow runs and pick "Build"
- Click the name of the newest one with green check.
- Scroll down and download
chaosmod2077.dll. - Create the folder structure
target\build\debug\in the project and put the DLL there.
Now you can develop and test without building the Rust components.
When developing this mod, this is the workflow that works for me, you can adapt it for yourself when contributing effects or anything else. This uses the requirements mentioned above.
- Helpful setup for developing CET stuff in VSCode is on wiki.
- For RedScript in various IDEs:
- Install RedScript extension.
- Run the
.\download-libs.ps1script.
- If you changed natives (Rust) run
cargo build. - If you changed translations or added effects:
- Run the
.\convert-translations.ps1script. You might get asked about installing WolvenKit CLI. - Open the WolvenKit project and just press Install*.
- Run the
- Run
red-cli installto install the scripts. - Start Cyberpunk and test!
*: You can also do the WolvenKit part last and press "Install and Load Save".
Tip
If the game is already running, reloading scripts via RHT usually suffices. Effect metadata won't update, but runtime changes will.
Warning
Avoid running in a development environment. It can cause issues when pressing Install in WolvenKit, requiring manual cleanup.red-cli bundle
There is a few CET console commands that can help you with effect development:
-
ChaosMod_StartEffect("EffectId")- Triggers a specific effect by its ID (even if Chaos Mod is disabled).
-
ChaosMod_StopAllEffects()- Stops all running effects (even if Chaos Mod is disabled).
-
ChaosMod_ListAllEffects()- Lists all available effects in Game Log.
-
ChaosMod_ResetRegistry()- Empties the registry, unregistering all effects.