Scripted interactions
This page will gather knowledge and guides about scripted interactions in Lua.
Last updated
Was this helpful?
This page will gather knowledge and guides about scripted interactions in Lua.
Last updated
Was this helpful?
Published: Feb 24, 2025 by Last update: Feb 24, 2025 by Credits: @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...
You want to add workspots for NPCs ? Check this guide : Placing AISpot Nodes
You want to change V's animations ? Check this section : Animations -> Editing V's Actual In Game Animations
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.
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.
Thanks to @keanuWheeze for making most of the scripts.
Here is a breakdown of the its content:
Device interactions :
Apprearance
Mesh swap (template)
Custom door
Workspot interactions :
Sit (template)
Bench
Couch
Lean (rail)
Sleep
Coffee
Drink
Shower
Lua kit for CET : Cron, GameUI and more by @psiberx
Tween library for smooth transitions by @kikito