Concrete, copy-paste-ready recipes for the most common Cyberpunk 2077 mod types. Each recipe chains MCP tool calls (with example arguments) and ends with a verification.
| If you want to… | Recipe | Needs |
|---|---|---|
| Change a stat/field of an existing item | 1. Weapon / item tweak | TweakXL, tweakdb.bin |
| Add behavior with REDscript (hook a game method) | 2. REDscript mod | redscript |
| Add an item/appearance/resource via ArchiveXL | 3. Appearance / item | ArchiveXL |
| Ship a mod in the official REDmod format | 4. REDmod | REDmod DLC (redMod.exe) |
| Translate UI strings (items, etc.) | 5. Localization | TweakXL, tweakdb.bin |
| Replace a texture (retexture) | 6. Texture replacement | an image editor |
| Understand/audit an existing mod | 7. Analyzing a mod | the mod to inspect |
| Edit a quest/codex/journal entry | 8. Quest/codex journal | a mod project (source/archive) |
- All tools return a JSON
{ ok, status, summary, produced, warnings, errors, log }. Success is judged onproduced/ok, not on the content of thelog. - Paths must be absolute (Windows:
C:\...). In the examples, the game folder is written<GAME>(e.g.C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077). - Before any recipe, verify that the CLI is operational with
wk_status. - Tools whose arguments carry default values (e.g.
pattern,verbose) may be omitted.
Goal: modify a stat of an existing weapon (here: the magazine capacity of the
Lexington) without touching the game files, via a .tweak hot-loaded by TweakXL.
-
generate_tweak_template— generate the.tweak.pattern:"override_field"parametersJson:{"recordId":"Items.Preset_Lexington_Default","field":"magazineCapacity","value":24}outputFile:C:\mods\lexington_mag\lexington.tweak
"Increase a numeric stat" variant:
pattern="boost_stat"with{"recordId":"Items.Preset_Lexington_Default","stat":"damage","value":150}."New item derived from an existing one" variant:
pattern="new_record"with{"newId":"MyMod.SuperLexington","baseId":"Items.Preset_Lexington_Default","overrides":"{\"magazineCapacity\":48}"}. -
validate_tweak— verify that each key actually exists in the TweakDB (except new records declaring$baseor$type).tweakFile:C:\mods\lexington_mag\lexington.tweaktweakdbBin:<GAME>\r6\cache\tweakdb.bin
-
install_tweak— copy to<GAME>\r6\tweaks\.tweakFile:C:\mods\lexington_mag\lexington.tweakgamePath:<GAME>
Verification: validate_tweak returns status: "success" and an empty list of
unknown keys; install_tweak returns installedPath pointing into r6\tweaks.
TweakXL loads the file at the next launch, with no rebuild.
Goal: extend a game method (e.g. PlayerPuppet.OnGameAttached) without
replacing it, via a generated REDscript starter then syntactically verified.
-
scaffold_mod— create the REDscript skeleton.parentFolder:C:\modsmodName:MyHookkind:"redscript"dependencies(optional):"redscript"
Produces
C:\mods\MyHook\r6\scripts\MyHook\MyHook.redsalready containing a@wrapMethod(PlayerPuppet)onOnGameAttachedthat callswrappedMethod(), plus aMOD_MANIFEST.json.Targeted alternative:
generate_redscript_templatewithpattern="wrap_method"to produce a single parameterized.reds. -
(edit) — adapt the body of the method in the
.reds. -
lint_script— syntactic + semantic analysis (real parser, 0 false positives calibrated).scriptFile:C:\mods\MyHook\r6\scripts\MyHook\MyHook.reds
Checks in particular that the annotation targets a class and that a
@wrapMethodcallswrappedMethod(). -
Deployment: copy
r6\scripts\...to<GAME>\r6\scripts\...(the "classic" redscript is loaded directly; in the REDmod pipeline, see recipe 4).
Verification: lint_script returns status: "success" (or "partial" with mere
warnings), errors: [], and a non-null declarations/parsedDeclarations.
lint_script does NOT perform type checking (external resolution = scc).
Goal: declare a factory record (or a resource patch / sounds /
localization) via an ArchiveXL .xl file.
-
scaffold_archivexl— generate the starter.xl.outputFolder:C:\mods\MyAppearancemodName:MyAppearancekind:"factory"(others:"customSounds","localization","resource")
Produces
C:\mods\MyAppearance\MyAppearance.xl. Forfactory, it references aMyAppearance\factory.csv; forresource, it pre-fills aresource: patch:block; etc. -
(edit) — complete the
.xl(paths of the.app/CSV) and prepare the associated resource files. -
validate_xl— validate the YAML and the top-level sections.xlFile:C:\mods\MyAppearance\MyAppearance.xl
Recognized sections:
customSounds,resource,factories,localization,animations. An unknown section generates a warning (status: "partial"), a malformed YAML an error (status: "error"). -
Deployment: place the
.xlin<GAME>\archive\pc\mod\next to the mod's archive (ArchiveXL reads the.xlfiles of this folder).
Verification: validate_xl returns status: "success", errors: [] and lists the
expected sections.
Goal: produce a mod in REDmod format (archives + scripts + tweaks), then
install and officially deploy it via redMod.exe.
-
create_redmod_project— create themods/<name>/structure.parentFolder:C:\modsmodName:MyRedmoddescription:"My first REDmod"version:"1.0.0"
Creates
C:\mods\MyRedmod\withinfo.json+ subfoldersarchives/,scripts/,tweaks/,customSounds/. -
(filling) — drop the
.archivefiles intoarchives/, the.redsintoscripts/, the.tweakintotweaks/. -
pack_redmod(optional, distribution) — produce a distributable.zip.modSourceFolder:C:\mods\MyRedmodoutputPath:C:\dist
The
.zipincludes theMyRedmod/folder (withinfo.json); the end user decompresses it into<GAME>\mods\. -
install_redmod— recursive copy to<GAME>\mods\<name>\.modSourceFolder:C:\mods\MyRedmodgamePath:<GAME>
-
deploy_redmod— runs<GAME>\tools\redmod\bin\redMod.exe deploy(compiles the scripts + applies the tweaks of installed REDmods).gamePath:<GAME>
Verification: install_redmod returns a produced in <GAME>\mods\<name>;
deploy_redmod returns exit=0 in its summary. (The REDmod DLC must be installed,
otherwise redMod.exe is not found.) You can confirm with list_installed_mods
(gamePath = <GAME>) which should list the mod in redMods.
Goal: extract the translatable strings from the TweakDB, translate them, then
build a .tweak that overrides displayName / localizedDescription / etc.
-
extract_localization— extract the translatable fields to a JSON{recordId: {field: value}}.tweakdbPath:<GAME>\r6\cache\tweakdb.binoutputJson:C:\mods\loc_fr\strings.jsonfilter(optional):"Items."to target only items.
-
(edit) — translate the values in
strings.json(keep the structure{recordId: {field: "Translation"}}). -
build_localization— build the TweakXL.tweakfrom the translated JSON.translationsJson:C:\mods\loc_fr\strings.jsonoutputTweak:C:\mods\loc_fr\loc_fr.tweaklang(informative):"fr-fr"
-
install_tweak— copy to<GAME>\r6\tweaks\.tweakFile:C:\mods\loc_fr\loc_fr.tweakgamePath:<GAME>
Verification: build_localization returns recordCount/fieldCount > 0 and
status: "success". (Limitation: it only covers TweakDB UI strings; audio
subtitles .opusinfo are not concerned.)
Goal: extract a game texture, edit it as PNG, reimport it, pack it
into a .archive and install it.
-
uncook— extract + convert the texture into an editable image.archivePath:<GAME>\archive\pc\content\basegame_4_gamedata.archive(or the archive containing the target texture)outputPath:C:\work\uncookedpattern:"*.xbm"(or a specific texture path)textureFormat:"png"
(To only extract without converting:
extract_fileswith the samearchivePath/outputPath/pattern.) -
(edit) — modify the PNG in an image editor, keeping the relative tree
base\...produced byuncook. -
import_raw— reimport the PNG into REDengine CR2W.path:C:\work\uncooked(file or folder)outputPath:C:\work\cooked
The folder structure
base\...must be preserved (= the game path of the resource). -
pack_archive— pack the folder into a.archive(Kraken compression).folderPath:C:\work\cookedoutputPath:C:\dist
-
install_mod— copy the archive into<GAME>\archive\pc\mod\.archivePath:C:\dist\cooked.archivegamePath:<GAME>
Verification: each step returns a non-empty produced (uncook → image,
import_raw → CR2W, pack_archive → .archive); install_mod returns the destination
path in archive\pc\mod. Confirm with list_installed_mods or
mod_summary on the produced archive.
Goal: understand what a mod does, its dependencies, where a target is referenced, and what it actually changes relative to the base game.
-
mod_summary— compact synthesis (accepts a.archiveOR a REDmod folder).modPath:C:\mods\SomeMod\SomeMod.archive(orC:\mods\SomeRedmodwithinfo.jsonat the root)
For an archive: number of files + breakdown by extension. For a REDmod:
info.json, content ofarchives//scripts//tweaks//customSounds/, top-level keys of the.tweakand declarations of the.reds. -
analyze_dependencies— deduce the required frameworks (redscript, RED4ext, ArchiveXL, TweakXL, Codeware, Audioware, etc.).modPath:C:\mods\SomeRedmodgamePath(optional):<GAME>— indicates for each dependency whether it isinstalledorMISSING.
-
find_references— find all textual references to a target in the mod's sources (.reds,.tweak,.xl,.yaml,.lua,.json,.csv).target:"Items.Preset_Lexington_Default"searchFolder:C:\mods\SomeRedmodmaxResults(optional):200
(To search in the game's
.archivefiles, usefind_in_archivesinstead.) -
diff_mod_vs_base— semantic diff of an overridden file against its base version (fields added / removed / changed).modArchive:C:\mods\SomeMod\SomeMod.archivegameFilePath:base\path\to\file.appgamePath:<GAME>(locates the base inarchive\pc\content)baseArchive(optional): a specific base archive to short-circuit the search.
Verification: mod_summary/analyze_dependencies return status: "success"
("partial" if dependencies are missing); find_references returns a matchCount and the
matches list (file:line); diff_mod_vs_base summarizes added/removed/changed.
If diff_mod_vs_base does not find the file in the base, it is probably a file
added by the mod (not an override).
The journal (base\journal\cooked_journal.journal) is a standard CR2W, so editable
via the generic pipeline — but its JSON weighs ~70 MB (28,000+ entries). You
navigate it first, then edit only the targeted entry.
Goal: modify a specific entry (quest, contact, codex, e-mail…).
- Locate:
find_in_archives(pattern: "*.journal",archivesFolder: <GAME>\archive\pc\content) →base\journal\cooked_journal.journal(inbasegame_4_gamedata.archive). - Extract to JSON:
read_game_file(archivePath= the archive,gameFilePath: base\journal\cooked_journal.journal). The returned content is truncated; note thejsonFilefield (the full JSON on disk). - Map:
inspect_journal(jsonFile) → total entries, breakdown by$type, top-level categories (quests,codex,contacts,briefings…). - Target:
find_journal_entry(jsonFile,query,field∈id|type|title). E.g.field:"id", query:"holofixer_used_1"orfield:"type", query:"gameJournalContact". Returns the exact JSON path of each entry (e.g.Data.RootChunk.entry.Data.entries[3].Data.entries[1].Data). - Edit the
jsonFileat that path (modify the entry's fields). - Rewrite:
write_game_file(jsonFile, identicalgameFilePath,modArchiveFolder= the project'ssource/archive) → CR2W rebuilt. - Pack/install:
pack_archive→install_mod.
Verification: inspect_journal confirms total/types; the CR2W .journal produced by
write_game_file is non-empty (a few MB); diff_mod_vs_base confirms what changed.
wk_status: to call first (CLI availability + cache stats).detect_conflicts(gamePath=<GAME>): spots two mods providing the same game file.lint_mod: global lint of a mod folder.package_mod(sourceFolderat the game layoutarchive/,r6/,mods/...→outputZip): produces a distributable.zip(Nexus / manual install) with/separators.check_requirements(gamePath=<GAME>): inventories the installed frameworks.