In this page, you will be able to follow an small tutorials about making your own codex entry in JSON and play it with Cyberscript.
It will be an long but fully complete tutorial. At the end you will be able to see the described codex entry.
To start, you need:
- 📄 Text editor : VS code, Notepad (hard but possible) or Notepad ++ (my favorite). Along with Notepad++ you need a Json Plugin for it as well.
- ✍️ Knowing fundamentals of JSON (read it, it's easy 😀 ) here
- 💯 Read the fundamental about Cyberscript: Scripting Basics
- ✔ an JSON validator website (for be sure that your json is not malformatted, because it will not compile if) JSONlint
- 🧠 a Brain, that work not that bad :)
- 🥇 Cyberpunk Game with Cyberscript installed and working
- ⏲ Patience, you will discover a new thing. It require patience and trial and error before it works.
Ok now I will assume you have it all. let's start !
We assume here that you already create an mod folder
We will create .... codex entry!
📂 Setup the folder
First : in your mod folder, create a folder named "codex". It will contain every codex entry script of your mod. Logic !
In this folder, create a JSON text file, like for example : amazingcodex.json
Open it with your favorite text editor.
💀 Write the codex skeleton
Now we have a blank page. But don't worry, we will fill it step by step.
Let's talk about codex structure :
A codex is a text. :
- A tag : Cyberscript will know it by this.
- A title : the title of the codex in the list
- A description : the content of the codex
- locked : determine if the codex will be showed in the list or not ?
Now let's make it in JSON :
{
"tag":"amazingcodex",
"title":"Hello There !",
"description":"This is my \n custom codex entry !!! ",
"locked":false
}
Note that I use "\n", it means break line 😉
Codex are called through an extra data on quest (What are you talking about ?) or directly in Codex journal menu if unlocked , under CyberScript Section.
Copy your whole mod folder in (GOG or steam game folder)/Cyberpunk 2077/bin/x64/plugins/cyber_engine_tweaks/mods/cyberscript/mod/
so it should be in our case (GOG or steam game folder)/Cyberpunk 2077/bin/x64/plugins/cyber_engine_tweaks/mods/cyberscript/mod//myAmazingmod
the structure of the folder should be
├── 📃 desc.json
├── 📃 init.lua
├── 📁 libs
├── 📁 scripts
├── 📁 codex
└── 📃 amazingcodex.json
Select the mod "myAmazingmod" in cycle interact (What are you talking about ?)
then hit the key for use your interact. Dialog should show !