Published: Feb 24, 2025 by AkiwayLast update: Feb 24, 2025 by AkiwayCredits: @keanuWheeze for creating 90% of the scripts shared in this pages.
This page and its subpages contain ressources to guides about making scriped interactions for the player, for Cyberpunk 2077.
For the following, we can distinguish 2 types of interactions : devices and workspots.
Device like interaction will trigger a more-or-less simple code, eg : Open the wardrobe menu, Toggle a streamingsector variant, Open the Appearance menu, etc...
Workspot interaction involve animations and/or props, eg : Sleep on a bed, Sit on a chair, Smoke a cigarette, Drink a beer, etc...
The next tutorials will show you how to get interactions to work without Lua or CET knowledge, but if you want to understand more about it, you can find a dedicated wiki about Cyber Engine Teaks here.
If you're using Visual Studio Code, you can get proper information on the games / CETs functions and methods using the CET Lua Lib.
Download the template
For the following tutorials, you will need this template. It provides a bunch of utilities to make diverses things, beyond just interaction scripts.
You will probably not use all those files, but they can be usefull depending on your needs.
archive
└─ base
└─ gameplay
└─ devices
└─ arcade_machines // Contains entities used to play workspot animations
resources
└─ bin
└─ x64
└─ plugins
└─ cyber_engine_tweaks
└─ mods
└─ {YourModName}
└─ init.lua // Your main file
└─ tween // Library used to ease transitions between animations (https://github.com/kikito/tween.lua)
└─ modules
└─ devices // Device interactions "ready-to-use"
└─ template // Device template that can be extended
└─ external // Game related utilities maintained in external repositories
└─ utils // Lua/CET utilities
└─ workspots // Workspot interactions "ready-to-use"
└─ template // Workspot template that can be extended
└─ interactions.lua // List of interactions you add to the world
└─ variants.lua // Variants and settings logic
└─ variantSettings.lua // List of settings and variants