1. =========================================
  2. == I want to create a settings package ==
  3. =========================================
  4. Creating a settings package can be useful if you are leading a mod collection to be deployed to numerous users and you want to customize the default settings of the mod for all your users.
  5. Of course your users will still be able to set the settings they want but the settings package will override the mod default settings.
  6. =================================================
  7. 1- Download and install WolvenKit (https://wiki.redmodding.org/wolvenkit/getting-started/download)
  8. =================================================
  9. Follow the instructions on this page to install and configure WolvenKit properly before creating your mod.
  10. Especially the last paragraph for setting game path: https://wiki.redmodding.org/wolvenkit/getting-started/download#first-launch-tl-dr
  11. =================================================
  12. 2- Create a new mod project
  13. =================================================
  14. Open WolvenKit and create a new project. I recommend you to use the name you will want to use when publishing your mod on Nexusmods. Set version to 1 as you will have to update your mod if this mod evolves and add new settings for example.
  15. =================================================
  16. 3- Download the settings package template from Nexusmods
  17. =================================================
  18. Go into the mod page on Nexusmods and head to the miscellaneous files section. You will see the settings package template to download as a ZIP file.
  19. This ZIP file contains a REDS file which is using redscript format. This is a simple text file you can edit with a text editor like Notepad, Sublime Text, or Visual Studio Code.
  20. In order not to collide with another mod I would recommand you to use a unique name that is unlikely to collide with another mod.
  21. For example you can use your nickname, and a random alphanumeric string.
  22. REDS files must be placed in a specific folder of the game in order to be executed. To automatically create the folder hierarchy use the menu: File -> New File
  23. Then select "Scripts" on the left, and choose "Redscript file type" on the right.
  24. Give your file a unique name. Generally it is the same name as your mod / project.
  25. Now the file has been created, you must overwrite it with the template REDS file or replace its content.
  26. =================================================
  27. 4- How does this settings package data work ?
  28. =================================================
  29. The file is a redscript file and as such it uses a scripting language.
  30. What you must do is replacing the values at the end of the lines starting with "public let".
  31. Each of these lines is a setting field with a default value. Example:
  32. public let enterBehavior: EEnterBehavior = EEnterBehavior.StartEngine;
  33. ................^...............^..............................^
  34. ................|...............|..............................|
  35. ...........field name.......type name........................value
  36. This setting defines the default behavior of vehicles when the player gets in as the driver.
  37. It uses a enumerated type called "EEnterBehavior". The current value being used is "StartEngine".
  38. The other values are defined into the EVS script file you can find in your game folder: Cyberpunk 2077\r6\scripts\Enhanced Vehicle System\Enhanced Vehicle System.reds
  39. Search for the enum type definition using CTRL+F.
  40. All enum types are defined at the top of the file.
  41. Here is the definition:
  42. enum EEnterBehavior {
  43. KeepCurrentState = 0,
  44. PowerOn = 1,
  45. StartEngine = 2
  46. }
  47. This means that you can use any of these values: KeepCurrentState, PowerOn or StartEngine.
  48. You must respect character case.
  49. Types whose name starts with "E" is a convention to say that it is a enumerated type.
  50. If the type is "Bool" you must use either "true" or "false" value.
  51. If the type is "Int32" you must use integer numbers. You shall respect value limits (min, max, step) defined on the previous lines.
  52. If the type is "Float" you must use floating point numbers like 0.0, 0.1, 0.001, 2.5...
  53. =================================================
  54. 6- Install your settings package into the game
  55. =================================================
  56. Now you have set everything you can install your settings package mod into the game by clicking on "Install Mod" in the menu bar.
  57. If you have a modal window with a redscript compilation error when you start the game, it means that your modifications do not respect the scripting langage rules.
  58. So you have to fix them and try again.
  59. The compilation errors will be written in: Cyberpunk 2077\r6\logs\redscript_rCURRENT.log
  60. This log file is overwritten on each game launch.
  61. Important: you cannot install two settings packages at the same time or the game either won't start or the mods won't work.