diff --git a/.gitignore b/.gitignore
index e33c0562..0c2c68e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ archive/packed/
.installation/
dump.redscripts
*.env
+medium/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..23e085a4
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,28 @@
+# How to ?
+
+Hi! I'd love to have your contributions!
+
+## đ Bugs report
+
+Testing game mods is time-consuming so you might not realize it, but a good way to support this mod is simply to report any bug found by simply filing a [Github issue](https://github.com/cyb3rpsych0s1s/4ddicted/issues).
+
+## đĄ Suggestions
+
+If you want to suggest a feature, please open a [Github Discussion](https://github.com/cyb3rpsych0s1s/4ddicted/discussions) and let's talk about it!
+
+I'm welcome to suggestions as long as they match with my own vision of the mod: being lore-friendly and immersive.
+
+> Also I'm doing this on my free time without any retribution, so be respectful of my time and temper your expectations :)
+
+## đ§âđģ Contribute
+
+If you want to contribute: everything from setting up your dev environment and more is already described in the [book](https://cyb3rpsych0s1s.github.io/4ddicted/)! See *Installation*, *Manifest* and *CLI* sections.
+
+The contribution process is the same as for any other repositories:
+
+- fork this repo
+- create a new branch
+- commit your changes
+- open a PR on this repo from your fork
+
+If you have any question, please reach out to me [in Discord](https://discordapp.com/users/610210802426707991) and introduce yourself :)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..5a040350
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+# MIT License
+
+Copyright (c) 2023 Romain Kelifa
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index d000e098..6d074a04 100644
--- a/README.md
+++ b/README.md
@@ -1,52 +1,11 @@
# Addicted
-![build](https://github.com/cyb3rpsych0s1s/4ddicted/actions/workflows/quality.yml/badge.svg) ![book](https://github.com/cyb3rpsych0s1s/4ddicted/actions/workflows/pages.yml/badge.svg)
+[![build](https://github.com/cyb3rpsych0s1s/4ddicted/actions/workflows/quality.yml/badge.svg)](https://github.com/cyb3rpsych0s1s/4ddicted/actions) [![book](https://github.com/cyb3rpsych0s1s/4ddicted/actions/workflows/pages.yml/badge.svg)](https://cyb3rpsych0s1s.github.io/4ddicted/) ![download](https://img.shields.io/github/v/release/cyb3rpsych0s1s/4ddicted?display_name=tag&include_prereleases&label=Download)
-An amplifier mod based on core game consumables, and optionally on community mods `Toxicity` (not yet compatible with `WE3D - Drugs in Night City`).
+An amplifier mod for [Cyberpunk 2077](https://www.cyberpunk.net/) based on core game consumables.
-Basically adds a chance to become addicted to substances too frequently consumed, like MAXdoc and the likes, offering additional debuffs and effects in an immersive way.
+## description
-## Play
+Basically adds a chance to become addicted to consumables too frequently consumed, like MAXdoc and the likes, offering additional debuffs and effects in an immersive way.
-Just download the latest release and install like any other mod.
-
-## Contribute
-
-To ease development, a `justfile` is available with the following commands:
-
-- first, install [Just](https://just.systems/man/en/chapter_4.html?highlight=brew#packages)
-- then you can list all available commands:
-
- ```sh
- just
- ```
-
-- generally speaking, while coding you will most likely be interested in these commands:
- - run once on install, to create folders if missing
-
- ```sh
- just setup
- ```
-
- - copy files to game dir *before launching game*:
-
- ```sh
- just build
- ```
-
- - copy files to game dir *while game is running* (excluding `archive`, see below):
-
- ```sh
- just rebuild
- ```
-
-### âšī¸ Coding process
-
-1. build:
- - `archive` can only be reloaded from Wolvenkit GUI's Hot Reload (RED Hot Tools required) while game is running.
- - `tweaks`, `scripts` and `mods` can be just copied over to game files.
-2. refresh:
- - once done, click in CET console:`archive` for WolvenKit archive, TweakXL `tweaks`, REDscript `scripts` and CET `reload all mods`
-3. remember that depending on what you changed reloading a save is necessary, or the game itself sometimes.
-
-A lot more informations can be found in the [book](https://cyb3rpsych0s1s.github.io/4ddicted).
+A lot more informations can be found in the [book](https://cyb3rpsych0s1s.github.io/4ddicted/).
diff --git a/justfile b/justfile
index f0d75bf2..1a684278 100644
--- a/justfile
+++ b/justfile
@@ -141,7 +141,7 @@ read:
# đī¸ book with live hot reload
draft:
- mdbook watch
+ mdbook watch --open
# đ assemble book (for release in CI)
assemble:
diff --git a/pages/SUMMARY.md b/pages/SUMMARY.md
index 2a63a8cc..f2af4227 100644
--- a/pages/SUMMARY.md
+++ b/pages/SUMMARY.md
@@ -1,25 +1,28 @@
# Summary
+Welcome to Addicted notebook !
+
## Contribute / Learn
- [Install](./install.md)
+- [Manifest](./manifest.md)
+- [CLI](./cli.md)
- [Wiki](./wiki.md)
-- [Cheatsheet](./cheatsheet/summary.md)
- - [primitives](./cheatsheet/primitives.md)
- - [sounds](./cheatsheet/sounds.md)
- - [custom icons](./cheatsheet/icons.md)
-- [Patterns](./patterns/summary.md)
- - [Systems](./patterns/systems.md)
- - [Callbacks](./patterns/callbacks.md)
- - [Events](./patterns/events.md)
- - [Blackboards](./patterns/blackboards.md)
- - [StatListeners](./patterns/statlisteners.md)
- - [Effectors](./patterns/effectors.md)
-- [Troubleshooting](./troubleshooting.md)
+ - [Cheatsheet](./cheatsheet/summary.md)
+ - [primitives](./cheatsheet/primitives.md)
+ - [sounds](./cheatsheet/sounds.md)
+ - [custom icons](./cheatsheet/icons.md)
+ - [Patterns](./patterns/summary.md)
+ - [Systems](./patterns/systems.md)
+ - [Callbacks](./patterns/callbacks.md)
+ - [Events](./patterns/events.md)
+ - [Blackboards](./patterns/blackboards.md)
+ - [Listeners](./patterns/listeners.md)
+ - [Effectors](./patterns/effectors.md)
+ - [Troubleshooting](./troubleshooting.md)
## Archives
-- [Game infos](./info.md)
- [Travelog](./travelog/summary.md)
- [2023-01-21](./travelog/2023-01-21.md)
- [2023-01-22](./travelog/2023-01-22.md)
@@ -28,5 +31,9 @@
- [2023-01-27](./travelog/2023-01-27.md)
- [2023-01-29](./travelog/2023-01-29.md)
- [2023-01-30](./travelog/2023-01-30.md)
-- [Initial concept](./concept.md)
-- [Handbook notes](./notes.md)
+ - [2023-01-31](./travelog/2023-01-31.md)
+ - [2023-02-03](./travelog/2023-02-03.md)
+ - [2023-02-04](./travelog/2023-02-04.md)
+ - [2023-02-06](./travelog/2023-02-06.md)
+ - [2023-02-07](./travelog/2023-02-07.md)
+ - [2023-02-10](./travelog/2023-02-10.md)
diff --git a/pages/cli.md b/pages/cli.md
new file mode 100644
index 00000000..4c4bc3df
--- /dev/null
+++ b/pages/cli.md
@@ -0,0 +1,42 @@
+# CLI
+
+To ease development, a `justfile` is available with the following commands:
+
+- first, install [Just](https://just.systems/man/en/chapter_4.html?highlight=brew#packages)
+- then you can list all available commands:
+
+ ```sh
+ just
+ ```
+
+ This is more or less what you should get:
+
+ ![just recipes](./pictures/just-recipes.png)
+
+- generally speaking, while coding you will most likely be interested in these commands:
+ - run once on install, to create folders if missing
+
+ ```sh
+ just setup
+ ```
+
+ - copy files to game dir *before launching game*:
+
+ ```sh
+ just build
+ ```
+
+ - copy files to game dir *while game is running* (excluding `archive`, see below):
+
+ ```sh
+ just rebuild
+ ```
+
+## âšī¸ Coding process
+
+1. build:
+ - `archive` can only be reloaded from Wolvenkit GUI's Hot Reload (RED Hot Tools required) while game is running.
+ - `tweaks`, `scripts` and `mods` can be just copied over to game files.
+2. refresh:
+ - once done, click in CET console:`archive` for WolvenKit archive, TweakXL `tweaks`, REDscript `scripts` and CET `reload all mods`
+3. remember that depending on what you changed reloading a save is necessary, or the game itself sometimes.
diff --git a/pages/concept.md b/pages/concept.md
deleted file mode 100644
index 62940d3d..00000000
--- a/pages/concept.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Initial concept
-
-## Gameplay
-
-Whenever:
-
-- V consumes substance `T: Addictive` over `4ddicted_daily_consumption_threshold` time(s) a day
-- V consumes substance `T: Addictive` unremittingly for `4ddicted_consecutive_days_duration`
-
-V might get a chance to increase his/her `4ddicted_addiction_threshold` for consumed `T: Addictive`.
-It should be suggested by e.g. some message on screen of V talking to himself/herself like:
-
-- oh damn I like it
-- what would I do without this sh*t
-- I already feel like I want another one
-
-or any kind of sentence really, that actually indicates to the player that his/her V is slipping toward addiction.
-visual effects would be even better, but not sure if game has something that can be reused this way.
-
-*update* actually there's already `Status effects icons` and probably `Cold blood` is an appropriate one. `Stunned` could be useful too.
-
-Being dependent introduces new buf and debuf in-game.
-For example, given V becomes addicted to MAXdoc, one could imagine:
-
-- V does not heal back as much as (s)he used to when consuming
-- V does get an extended duration for MAXdoc's `REF` debuf
-- V does not heal back as much as (s)he used to from sleeping
-
-e.g. addiction thresholds should probably be 3:
-
-1. consuming a MAXdoc restores 10% less health
-2. consuming a MAXdoc restores 15% less health
- `REF` debuf now lasts for way longer
-3. consuming a MAXdoc restores 30% less health
- `REF` debuf now lasts until sleep
- `REF` gets a malus of (a reasonable amount?) while addiction lasts
- sleep restores 50% less health
-
-Of course different substances should yield different side effects.
-
-Recovering from addiction should be a related and interesting gameplay.
-
-- V should spend extensive time weaning off from the substance `T: Addictive`: the higher his/her threshold, the harder to wean off
-- during abstinence, V should get worse debuf and side effects in general, that gets worse at first when weaning off, but that slightly vanish over time
-- on relapse, V should get temporary better buf
-- in general going from addiction to abstinence or relapse : it's always easier to fall again than to get past it
-- if possible, interesting animations could be reused from game natives : maybe the character will puke, or randomly pass out during the hardest first step in his/her way to abstinence
-
-## Even crazier ideas
-
-Combined with `Kiroshi Opticals - Crowd Scanner`:
-
-randomly add addiction details for NPCs in InfoComp, which can come in the form of:
-
-- medical file
-- antecedents
-- events
-- etc
-
-Effects could be entirely ignored with `Detoxifier` cyberware. Very good idea especially since this item can only be acquired with Fingers, depending on the outcome of the story mission, and is a pricey one. `Synaptic Accelerator` cyberware could increase the chances of getting addict, unless of `Rare` or `Legendary` levels. `Biomonitor` cyberware could display more accurate infos about addiction on screen. `Nanorelays` cyberware might also be a potential modifier here. `Cataresist` cyberware should also help fight the addiction off. Also `Syn-lungs` cyberware could potentially influence wearing off at least inhaled drugs. Same with `Bioplastic Blood Vessels`, `Blood Pump`, and the likes for injected drugs.
diff --git a/pages/handbook/20221129_005424.jpg b/pages/handbook/20221129_005424.jpg
deleted file mode 100644
index b01298b0..00000000
Binary files a/pages/handbook/20221129_005424.jpg and /dev/null differ
diff --git a/pages/handbook/20221129_005439.jpg b/pages/handbook/20221129_005439.jpg
deleted file mode 100644
index c4d75eaa..00000000
Binary files a/pages/handbook/20221129_005439.jpg and /dev/null differ
diff --git a/pages/handbook/20221129_005451.jpg b/pages/handbook/20221129_005451.jpg
deleted file mode 100644
index b8fe82ae..00000000
Binary files a/pages/handbook/20221129_005451.jpg and /dev/null differ
diff --git a/pages/handbook/20221129_005501.jpg b/pages/handbook/20221129_005501.jpg
deleted file mode 100644
index 6e3d475c..00000000
Binary files a/pages/handbook/20221129_005501.jpg and /dev/null differ
diff --git a/pages/handbook/20221129_005512.jpg b/pages/handbook/20221129_005512.jpg
deleted file mode 100644
index 148a7cd3..00000000
Binary files a/pages/handbook/20221129_005512.jpg and /dev/null differ
diff --git a/pages/info.md b/pages/info.md
deleted file mode 100644
index 187b4308..00000000
--- a/pages/info.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# infos
-
-list of addictive consumables:
-
-## base game
-
-### drugs
-
-#### bounce back
-
-
-
-#### black lace
-
-
-
-#### health booster
-
-
-
-#### capacity booster
-
-
-
-#### stamina booster
-
-
-
-### alcool
-
-found in varieties in-game.
-
-## WE3D - Drugs of Night City
-
-(\w*)_(\w*)
-
-```lua
-BlackLace_Description = "Sometimes you just wanna feel like a badass motherfucker."
-RainbowPoppers_Description = "Offensive luck enhancer."
-Glitter_Description = "One of Night City's most popular. Tastes like candy, makes you feel like candy."
-FR3SH_Description = "For when your brain's getting a little slow."
-SecondWind_Description = "Chrome getting a bit tired? 'Course not. It's chrome."
-Locus_Description = "When you slice people's heads off and wanna see them fly a little farther."
-Evade_Description = "Defensive luck enhancer."
-BeRiteBack_Description = "One of the few drugs NC has to offer that might actually increase your lifespan."
-Juice_Description = "Created by the Animals so they could turn into, well, ya know."
-Rara_Description = "Once a celebration of independence, Rara is now used to fight for it."
-Ullr_Description = "Balance incarnate."
-ArasakaReflexBooster_Description = "Don't waste a single neuron."
-
-PurpleHaze_Description = "So strong everyone's vision gets blurry."
-Donner_Description = "Back when athletes had real lungs, Donner was a necessity for every marathoner out there."
-IC3C0LD_Description = "Netrunning requires a cool focus. Don't take calm for granted."
-SyntheticBlood_Description ="Blood is one of the most important things in the world to us. So why not carry some extra?"
-RoaringPhoenix_Description = "Used by Tyger claw chefs to quickly chop up sushi. And sometimes people."
-Cleanser_Description = "When you can't afford that new chrome to keep you safe against acid rain, jam this into your abdomen."
-GrisGris_Description = "Makes vital organs stick out like big balloons, just ready to be popped."
-Superjet_Description = "Just make sure you come down."
-Deimos_Description = "Sometimes the badass motherfucker wants to feel like you."
-Aspis_Description = "Exhaustion is an illusion."
-Brisky_Description = "Few things have a clearer link to cyberpsychosis..."
-Karanos_Description = "A drug netrunners agree was better off not existing."
-```
-
-### a cool guide on the lore of drugs in 2077
-
-[The use of Cyberpunk drugs wiki guide and thoughts](https://www.unfinishedman.com/the-use-of-cyberpunk-drugs-wiki-guide-and-thoughts/) actually gives good insights for gameplay ideas.
diff --git a/pages/install.md b/pages/install.md
index 1225f6c5..fb92fe04 100644
--- a/pages/install.md
+++ b/pages/install.md
@@ -1,68 +1,55 @@
# Install
+Here are the steps required to get you a decent working development environment for this mod.
+
Mandatory steps, in order:
-1. Cyberpunk: install on Steam
-2. CET: install on your computer
+1. đŽ Cyberpunk
+ > this doc assumes you installed it on Steam
+ > but you can easily modify it for whichever game launcher
+
+2. âī¸ CET
> scripting engine, based on .lua
1. download [latest CET release](https://github.com/yamashi/CyberEngineTweaks/releases/latest)
2. download [latest Cybercmd release](https://github.com/jac3km4/cybercmd/releases/latest)
3. unzip both at the root of your game folder
-3. CET: configure in-game
- 1. Launch the game and bind the CET menu key (e.g. `Home`)
- 2. Quit the game to configure the other mods
+ 4. configure in-game
+ 1. Launch the game and bind the CET menu key (e.g. `Home`)
+ 2. Quit the game to configure the other mods
+
+You can also watch these steps on video in YouTube, thanks to `PerfectlyNormalBeast`.
+
+[![Installing CET, Redscript, Mod](https://img.youtube.com/vi/klxa3hPTCHk/0.jpg)](https://www.youtube.com/watch?v=klxa3hPTCHk)
Then, in any order:
-1. REDscript: install on your computer
- > additional supported programming language: .reds
+1. 𧧠REDscript
+ > additional supported programming language: `.reds`
1. download [latest REDscript release](https://github.com/jac3km4/redscript/releases/latest)
2. unzip at the root of your game folder
-2. RED4ext: install on your computer
+
+2. đ´ RED4ext
> relied upon by many mods, allow for extending scripting system
1. make sure that [Visual C++ Redistributable 2022](https://aka.ms/vs/17/release/vc_redist.x64.exe) is installed
2. download [latest RED4ext release](https://github.com/WopsS/RED4ext/releases/latest)
3. unzip at the root of your game folder
-3. RED Hot Tools: install on your computer
+
+3. đē RED Hot Tools
> allows for archive, scripts and tweaks hot-reloading
1. download [latest RED Hot Tools release](https://github.com/psiberx/cp2077-red-hot-tools/releases/latest)
2. unzip at the root of your game folder
-4. TweakXL: install on your computer
+
+4. đē TweakXL
> useful to create custom tweaks (modify TweakDB, REDengine 4 proprietary database)
1. download [latest TweakXL release](https://github.com/psiberx/cp2077-tweak-xl/releases/latest)
2. unzip at the root of your game folder
-5. ArchiveXL: install on your computer
+
+5. đē ArchiveXL
> useful to package archive (load custom resources without touching original game files)
1. download [latest ArchiveXL release](https://github.com/psiberx/cp2077-archive-xl/releases/latest)
2. unzip at the root of your game folder
-6. clipTester or SoundClipTester: install on your computer
+
+6. đē clipTester or SoundClipTester
> useful to listen to all sounds in-game via CET console
1. download [from Nexus](https://www.nexusmods.com/cyberpunk2077/mods/1977?tab=files)
2. unzip at the root of your game folder
-
-## manifest
-
-At the current time of this writing:
-
-| Tools | versions|
-|--------------------------|---------|
-| WolvenKit | 8.8.1 |
-| CET | 1.21.0 |
-| RED4ext | 1.9.0 |
-| REDscript | 0.5.10 |
-| RED Hot Tools | 0.4.5 |
-| TweakXL | 1.1.1 |
-| ArchiveXL | 1.3.5 |
-| clipTester | ? |
-| cybercmd | 0.0.6 |
-| Native Settings UI | 1.92 |
-| mod_settings | 0.0.10 |
-
-| Mods | versions| compatibility |
-|--------------------------|---------|---------------|
-| Status Bar Bug Fixes | 9jan23 | â
|
-| Toxicity | 5jan23 | â
|
-| WE3D Drugs of Night City | 14jan23 | â |
-| Wannabe Edgerunner | 5jan23 | â
|
-
-updated on 14jan23.
diff --git a/pages/manifest.md b/pages/manifest.md
new file mode 100644
index 00000000..c7346c3b
--- /dev/null
+++ b/pages/manifest.md
@@ -0,0 +1,28 @@
+# Manifest
+
+At the current time of this writing the project is being developed with:
+
+| Tools | versions|
+|--------------------------|---------|
+| WolvenKit | 8.8.1 |
+| CET | 1.21.0 |
+| RED4ext | 1.9.0 |
+| REDscript | 0.5.10 |
+| RED Hot Tools | 0.4.5 |
+| TweakXL | 1.1.1 |
+| ArchiveXL | 1.3.5 |
+| clipTester | ? |
+| cybercmd | 0.0.6 |
+| Native Settings UI | 1.92 |
+| mod_settings | 0.0.10 |
+
+It also has been tested with these other mods:
+
+| Mods | versions| compatibility |
+|--------------------------|---------|---------------|
+| [Status Bar Bug Fixes](https://www.nexusmods.com/cyberpunk2077/mods/4316) | 9jan23 | â
|
+| [Toxicity](https://www.nexusmods.com/cyberpunk2077/mods/4317) | 5jan23 | â
|
+| [WE3D Drugs of Night City](https://www.nexusmods.com/cyberpunk2077/mods/4407) | 14jan23 | â |
+| [Wannabe Edgerunner](https://www.nexusmods.com/cyberpunk2077/mods/5646) | 5jan23 | â
|
+
+updated on 14jan23.
diff --git a/pages/notes.md b/pages/notes.md
deleted file mode 100644
index f055356d..00000000
--- a/pages/notes.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Notes
-
-From little handbook.
-
-
-
-
-
-
diff --git a/pages/patterns/blackboards.md b/pages/patterns/blackboards.md
index 43197416..25356505 100644
--- a/pages/patterns/blackboards.md
+++ b/pages/patterns/blackboards.md
@@ -1,9 +1,7 @@
# Blackboards
-// TODO: DOUBLE CHECK
-
-Blackboards act as a global storage for variables.
-Other parts of the code can get, set or listen to blackboard entries to be notified of changes.
+Blackboards act as global variables.
+Other parts of the code can get, set or listen to blackboard definitions to be notified of changes.
*used in: effectors, components, prereq state, systems, ink game controllers, managers..*
diff --git a/pages/patterns/callbacks.md b/pages/patterns/callbacks.md
index ced6946a..ff48c74b 100644
--- a/pages/patterns/callbacks.md
+++ b/pages/patterns/callbacks.md
@@ -2,7 +2,7 @@
Callbacks are another asynchronous mechanism.
-> credits to DJ_Kovrik
+> credits to `DJ_Kovrik`
```swift
public class EdgerunningSystem extends ScriptableSystem {
@@ -24,7 +24,7 @@ public class PlaySFXCallback extends DelayCallback {
// its method Call will automatically get called
public func Call() -> Void {
GameObject.PlaySoundEvent(this.player, this.sfxName);
- E(s"Run \(this.sfxName) sfx");
+ LogChannel(n"DEBUG", s"Run \(this.sfxName) sfx");
}
}
```
diff --git a/pages/patterns/effectors.md b/pages/patterns/effectors.md
index 4e7b047c..03b130c1 100644
--- a/pages/patterns/effectors.md
+++ b/pages/patterns/effectors.md
@@ -2,12 +2,12 @@
Or simply put, adding custom logic at runtime to statically defined status effects.
-Looking at `BaseStatusEffect.BerserkPlayer` in its 2nd `packages`,
-then down in its `effectors` first entry,
-there's `BaseStatusEffect.BerserkPlayerSFXEffector` which `effectorClassName` is `PlaySFXEffector`.
+Looking at `BaseStatusEffect.BerserkPlayer` in WolvenKit,
+in its 2nd `packages` then down in its `effectors`'' first entry,
+there's a `BaseStatusEffect.BerserkPlayerSFXEffector` whose `effectorClassName` is `PlaySFXEffector`.
-If searching in game sources, there's indeed a `PlaySFXEffector` (which extends `Effector`/`IScriptable`),
-which seems to allow for tweaking e.g. the effect at runtime based on conditions:
+Looking into game sources, there's indeed a `PlaySFXEffector` (which extends `Effector`/`IScriptable`),
+which allows for tweaking e.g. the effect at runtime based on conditions:
```swift
public class PlaySFXEffector extends Effector {
@@ -24,3 +24,9 @@ public class PlaySFXEffector extends Effector {
}
}
```
+
+Here's another example with similarly designed status effect, `ElectrocutedSFX`, in WolvenKit:
+
+![Electrocuted PlaySFXEffector](./pictures/RED-SFX-effectors.png)
+
+Some experiments can be found in the [travelog entry from 2023-02-10](./../travelog/2023-02-10.md).
diff --git a/pages/patterns/events.md b/pages/patterns/events.md
index 738f976f..f67d6d5e 100644
--- a/pages/patterns/events.md
+++ b/pages/patterns/events.md
@@ -2,7 +2,6 @@
Events are another asynchronous mechanism.
It's more often than not used to notify other parts of the code.
-> *something is **happening***
## Tickable events
@@ -10,7 +9,7 @@ Tickable events are events whose progression can be tracked.
Only work on `Entity`, so usually `PlayerPuppet`.
The benefit of `TickableEvent` is that you get its state and progress available.
-> During my own experiments, I wasn't able to call it on a custom class which extends Entity.
+> During my own experiments, I wasn't able to call it on a custom class which extends `Entity`.
```swift
// define your event
@@ -22,14 +21,13 @@ public class System extends ScriptableSystem {
private final func OnPlayerAttach(request: ref) -> Void {
let player: ref = GetPlayer(this.GetGameInstance());
if IsDefined(player) {
- E(s"initialize system on player attach");
+ LogChannel(n"DEBUG", s"initialize system on player attach");
this.player = player;
let evt: ref = new ProgressionEvent();
// tick repeatedly for 3 seconds
GameInstance.GetDelaySystem(this.player.GetGame()).TickOnEvent(this.player, evt, 3.);
- this.RefreshConfig();
- } else { F(s"no player found!"); }
+ } else { LogError(s"no player found!"); }
}
}
@@ -46,7 +44,7 @@ protected cb func OnProgressionEvent(evt: ref) -> Bool {
Regular events can be delayed asynchronously too.
-> credits to Lyralei on Discord.
+> credits to `Lyralei` on Discord.
```swift
@addField(PlayerPuppet)
@@ -86,7 +84,7 @@ protected cb func OnHandlingEvent(evt: ref) -> Void {
## Regular events
-> credits to Lyralei on Discord.
+> credits to `Lyralei` on Discord.
Here `QueueEvent` generally means *it's gonna be played as soon as possible*.
diff --git a/pages/patterns/statlisteners.md b/pages/patterns/listeners.md
similarity index 73%
rename from pages/patterns/statlisteners.md
rename to pages/patterns/listeners.md
index 4cbb3ce2..b858eb53 100644
--- a/pages/patterns/statlisteners.md
+++ b/pages/patterns/listeners.md
@@ -1,11 +1,17 @@
-# Stats listeners
+# Listeners
-Detoxifier (a.k.a `ToxinCleanser`) grants:
+A listener, as its name suggests, allows to listen for changes.
-`gamedataStatType.PoisonImmunity`
-`gamedataStatType.HasPoisonImmunity`
+There's different kinds of listeners, for example a `ScriptStatsListener` allows to listen for changes on stats, namely `BaseStats` in the code. The game contains numerous stats, let's look at an example.
-example from the sources for `gamedataStatType.AutoReveal`:
+[Detoxifier](https://cyberpunk.fandom.com/wiki/Detoxifier) (a.k.a `ToxinCleanser`) grants the following stats:
+
+- `gamedataStatType.PoisonImmunity`
+- `gamedataStatType.HasPoisonImmunity`
+
+Note: `gamedataStatType` is used in TweakDB with `BaseStats`, this can be observed in `RPGManager` in the sources.
+
+Another example from the sources with `gamedataStatType.AutoReveal`:
```swift
public class AutoRevealStatListener extends ScriptStatsListener {
@@ -47,6 +53,8 @@ public class PlayerPuppet extends ScriptedPuppet {
}
```
+There are different kinds of listeners:
+
- `ScriptStatsListener` âĄī¸ `BaseStats`
- `ScriptStatPoolsListener` âĄī¸ `BaseStatPools`
- ...
diff --git a/pages/patterns/pictures/RED-SFX-effectors.png b/pages/patterns/pictures/RED-SFX-effectors.png
new file mode 100644
index 00000000..3845116a
Binary files /dev/null and b/pages/patterns/pictures/RED-SFX-effectors.png differ
diff --git a/pages/patterns/summary.md b/pages/patterns/summary.md
index ef943d4a..ca357a43 100644
--- a/pages/patterns/summary.md
+++ b/pages/patterns/summary.md
@@ -6,5 +6,5 @@ The core game system already contains mechanics that can be leveraged to impleme
- [Callbacks](./callbacks.md)
- [Events](./events.md)
- [Blackboards](./blackboards.md)
-- [StatListeners](./statlisteners.md)
+- [Listeners](./listeners.md)
- [Effectors](./effectors.md)
diff --git a/pages/patterns/systems.md b/pages/patterns/systems.md
index 1ff88c6a..7aa8321f 100644
--- a/pages/patterns/systems.md
+++ b/pages/patterns/systems.md
@@ -7,7 +7,7 @@ useful to coordinate whole gameplay.
Persistence allow to persist values on game saves.
```swift
-public enum Case {
+enum Case {
On,
Off,
}
@@ -36,13 +36,12 @@ public class System extends ScriptableSystem {
## Requests
-Requests are an asynchronous mechanism.
+Requests are systems' asynchronous mechanism.
It's more often than not used to convey an action.
-> *something is **requested***
### Delayed requests
-Requests can be delayed asynchronously.
+Requests can also be delayed asynchronously.
```swift
public class DoSomethingRequest extends ScriptableSystemRequest {
diff --git a/pages/pictures/just-recipes.png b/pages/pictures/just-recipes.png
new file mode 100644
index 00000000..275cc6d9
Binary files /dev/null and b/pages/pictures/just-recipes.png differ
diff --git a/pages/screenshots/black-lace.png b/pages/screenshots/black-lace.png
deleted file mode 100644
index 7cc97687..00000000
Binary files a/pages/screenshots/black-lace.png and /dev/null differ
diff --git a/pages/screenshots/bounce-back.png b/pages/screenshots/bounce-back.png
deleted file mode 100644
index d8c61e12..00000000
Binary files a/pages/screenshots/bounce-back.png and /dev/null differ
diff --git a/pages/screenshots/capacity-booster.png b/pages/screenshots/capacity-booster.png
deleted file mode 100644
index 6ddd4d55..00000000
Binary files a/pages/screenshots/capacity-booster.png and /dev/null differ
diff --git a/pages/screenshots/health-booster.png b/pages/screenshots/health-booster.png
deleted file mode 100644
index d7705019..00000000
Binary files a/pages/screenshots/health-booster.png and /dev/null differ
diff --git a/pages/screenshots/stamina-booster.png b/pages/screenshots/stamina-booster.png
deleted file mode 100644
index bbb75a30..00000000
Binary files a/pages/screenshots/stamina-booster.png and /dev/null differ
diff --git a/pages/travelog/2023-01-24.md b/pages/travelog/2023-01-24.md
index 8ebac8a9..9906a381 100644
--- a/pages/travelog/2023-01-24.md
+++ b/pages/travelog/2023-01-24.md
@@ -53,12 +53,15 @@ custom central HUD
- 1080p: 320x256
- 720p: 216x152
-width 1080p -> 720p: `320 / 80 * 54 = 216` (not the same ratio)
-height 1080p -> 720p: `256 / 64 * 38 = 152` (not the same ratio)
+note:
+
+- width 1080p -> 720p: `320 / 80 * 54 = 216` (not the same ratio)
+- height 1080p -> 720p: `256 / 64 * 38 = 152` (not the same ratio)
based on width:
-216/8 = 27
-640/8 = 80
-27/80 = 0.3375
-640*0.3375 = 216
-or 640/100*33.75
+
+- 216/8 = 27
+- 640/8 = 80
+- 27/80 = 0.3375
+- 640*0.3375 = 216
+- or 640/100*33.75
diff --git a/pages/travelog/2023-01-25.md b/pages/travelog/2023-01-25.md
index 99cf5f8e..9721d4bc 100644
--- a/pages/travelog/2023-01-25.md
+++ b/pages/travelog/2023-01-25.md
@@ -9,12 +9,12 @@ So it turns out I had to fork and modify [InkAtlas Utils](deadlymustard/inkatlas
The JSON format for the *.inkatlas* file, a.k.a `WKitJsonVersion` has changed (now in `0.0.3`).
Also, as a side note:
-- the TGA gets flipped horizontally while it does seem to be the case in WKit anymore.
+- the TGA gets flipped while it doesn't seem to be the case in WolvenKit anymore.
> just manually flip it vertically in Photoshop
- the `atlasPartName` normalizing function doesn't replace the `-` with `_` as assumed.
> just manually search and replace the atlasPartName in IDE
- the `ArchiveFileName` isn't set in the `Header`.
- > just copy/paste absolute location of the *.inkatlas* file
+ > just copy/paste absolute location of the *.inkatlas* file ?
### More troubleshooting
diff --git a/pages/travelog/2023-01-27.md b/pages/travelog/2023-01-27.md
index 01fb9ca0..497b44e5 100644
--- a/pages/travelog/2023-01-27.md
+++ b/pages/travelog/2023-01-27.md
@@ -58,10 +58,10 @@ public class AddictedSystem extends ScriptableSystem {
}
```
-But... wait ! This wouldn't compile, since maybe left shift `<<` and right shift `>>` might not be supported in REDscript operators.
+But... wait ! This wouldn't compile, since maybe left shift `<<` and right shift `>>` might not be supported in [REDscript operators](https://wiki.redmodding.org/redscript/language/native-types#operators).
Well, so we're gonna have to do the calculation manually: for example `a >> b` is equivalent to dividing `a` by `2 ^ b`.
-So let's also look at Blackboard supported types.
+So let's also look at [Blackboard](https://jac3km4.github.io/cyberdoc/#16758) supported types.
oh... turns out there's a `BlackboardID_Uint` and `BlackboardID_Int` ^^
- u32, see [Rust playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=15c30ec8ddb6a5cc2dbfb926baa5da75)
diff --git a/pages/travelog/2023-01-30.md b/pages/travelog/2023-01-30.md
index 51582177..2de91227 100644
--- a/pages/travelog/2023-01-30.md
+++ b/pages/travelog/2023-01-30.md
@@ -120,7 +120,7 @@ Hey, results seem much better !
- `ATooltipData`
- `InteractionsHubGameController`
-Also, DJ_Kovrik to the rescue:
+Also, `DJ_Kovrik` to the rescue:
![recommendations for widgets](pictures/ArchiveXL-spawn-and-attach-controller.png)
diff --git a/pages/travelog/2023-01-31.md b/pages/travelog/2023-01-31.md
index 614b0bff..eb139b9d 100644
--- a/pages/travelog/2023-01-31.md
+++ b/pages/travelog/2023-01-31.md
@@ -74,7 +74,9 @@ and boom !
Nice :)
+Some additional informations in [follow-up](./2023-02-03.md).
+
### credits
-- psiberx
-- DJ_Kovrik
+- `psiberx`
+- `DJ_Kovrik`
diff --git a/pages/travelog/2023-02-03.md b/pages/travelog/2023-02-03.md
index 6aaee34c..5512f458 100644
--- a/pages/travelog/2023-02-03.md
+++ b/pages/travelog/2023-02-03.md
@@ -5,7 +5,7 @@
super useful quote from psiberx:
> you're editing `packageData`, so you have two options:
-> 1 - move your changes to package, and nuke `packageData` for future convenience
+> 1 - move your changes to `package`, and nuke `packageData` for future convenience
> 2 - use async widget spawning
note: async widget spawning âĄī¸ inkGameController.AsyncSpawnFromExternal() (see [cyberdoc](https://jac3km4.github.io/cyberdoc/#18366))
@@ -25,6 +25,6 @@ So all in all, what did I have to do ?
- fix a couple of inconsistencies, because every once in a while some siblings widgets would have the same `CName`. makes you wonder why the `inkText` at the correct path is either `null` or nothing gets updated on screen (e.g. `Blood_HPanel`).
- play biomonitor sounds.
-Honestly if I had a week to allocate to this, I'd probably rewrite the widget and its animations from scratch.
+Honestly if I had a (couple of ?) week(s ?) to allocate to this, I'd probably rewrite the widget and its animations from scratch.
I'd reuse all the assets from the original .inkwidget, simplify its widgets tree, then split the .inkanim into reusable chunks of animation.
I'd probably store all the key positions of all the main frame and design the whole thing to be able to get played chained, separately or be able to jump from non-consecutive segments.
diff --git a/pages/travelog/2023-02-04.md b/pages/travelog/2023-02-04.md
index 117ee47e..51a78fc0 100644
--- a/pages/travelog/2023-02-04.md
+++ b/pages/travelog/2023-02-04.md
@@ -21,6 +21,8 @@ and later on added:
>
> those are fundamental, others derive from them
+What I discovered way later is that for example texts in biomonitor's chemicals report (the one which displays for Sandra Dorset: hydroxyzine, tramadol, bupropion, etc) are animated with an [inkLogicController](https://jac3km4.github.io/cyberdoc/#34517) which manages an [inkAnimTextValueProgress](https://jac3km4.github.io/cyberdoc/#104202) (a.k.a [inkanimTextValueProgressInterpolator](https://nativedb.red4ext.com/inkanimTextValueProgressInterpolator) in the natives) to animate the text's value over time.
+
## Informations about inkMask
Some inks **cannot** be created and run in scripts, as for example `inkMask`.
diff --git a/pages/travelog/2023-02-10.md b/pages/travelog/2023-02-10.md
index 65d611fc..d4a7c423 100644
--- a/pages/travelog/2023-02-10.md
+++ b/pages/travelog/2023-02-10.md
@@ -4,7 +4,7 @@
Let's imagine we want a migraine status effect which would last for 15 minutes, while playing a looping SFX for the first 10 seconds, then a fade out SFX for the next 25 seconds and stop. Here's how to quickly roll it:
-credits to RMK on Discord for pointing out `Prereqs.DurationPrereq` !
+credits to `RMK` on Discord for pointing out `Prereqs.DurationPrereq` !
```yml
# this effector kicks in first and play first sound
@@ -63,7 +63,7 @@ BaseStatusEffect.Migraine:
## Create interaction for biomonitor dismissal
-All credits to: keanuWheeze on Discord
+All credits to: `keanuWheeze` on Discord
Create simple interaction:
diff --git a/pages/travelog/summary.md b/pages/travelog/summary.md
index 3dc276b9..1b9f17cb 100644
--- a/pages/travelog/summary.md
+++ b/pages/travelog/summary.md
@@ -2,11 +2,16 @@
A little travel blog in modding land.
-- [2023-01-21](./travelog/2023-01-21.md)
-- [2023-01-22](./travelog/2023-01-22.md)
-- [2023-01-24](./travelog/2023-01-24.md)
-- [2023-01-25](./travelog/2023-01-25.md)
-- [2023-01-27](./travelog/2023-01-27.md)
-- [2023-01-29](./travelog/2023-01-29.md)
-- [2023-01-30](./travelog/2023-01-30.md)
-- [2023-01-30](./travelog/2023-01-31.md)
+- [2023-01-21](./2023-01-21.md)
+- [2023-01-22](./2023-01-22.md)
+- [2023-01-24](./2023-01-24.md)
+- [2023-01-25](./2023-01-25.md)
+- [2023-01-27](./2023-01-27.md)
+- [2023-01-29](./2023-01-29.md)
+- [2023-01-30](./2023-01-30.md)
+- [2023-01-31](./2023-01-31.md)
+- [2023-02-03](./2023-02-03.md)
+- [2023-02-04](./2023-02-04.md)
+- [2023-02-06](./2023-02-06.md)
+- [2023-02-07](./2023-02-07.md)
+- [2023-02-10](./2023-02-10.md)
diff --git a/pages/troubleshooting.md b/pages/troubleshooting.md
index b7ea4e76..884cd9ff 100644
--- a/pages/troubleshooting.md
+++ b/pages/troubleshooting.md
@@ -2,12 +2,12 @@
## clean cache
-from dddzzzkkk on Discord:
+credits to `dddzzzkkk` on Discord:
> basically to fix your issue i think you have to delete the files in the r6\cache\modded folder, delete r6\cache\final.redscripts, rename r6\cache\final.redscripts.bk to r6\cache\final.redscripts, redeploy your REDmods, THEN launch the game
## Press [None] to continue
-DJ_Korvrik : reinstall your Input Loader or delete Cyberpunk 2077\engine\config\platform\pc\input_loader.ini.
+credits to `DJ_Korvrik` : reinstall your Input Loader or delete Cyberpunk 2077\engine\config\platform\pc\input_loader.ini.
## "anchor" variables
diff --git a/pages/wiki.md b/pages/wiki.md
index 6e9bff8c..6f9f3ef8 100644
--- a/pages/wiki.md
+++ b/pages/wiki.md
@@ -1,13 +1,14 @@
# wiki
-## browse packages and classes
-
-[Cyberpunk Tweaks](https://cdpr-modding-documentation.github.io/Cyberpunk-Tweaks/)
+First, a handful of reminders / tips.
## lua VS reds
Cyber Engine Tweaks (CET) and REDscript both offer access to the game API.
+- CET uses .lua files.
+- REDscript uses .reds files.
+
```lua
---@param self PlayerPuppet
Observe('PlayerPuppet', 'OnGameAttached', function(self)
@@ -25,40 +26,30 @@ protected cb func OnGameAttached() -> Bool {
}
```
-## callbacks
+## debug
-credits: @psiberx - discord â 08/23/2022
-there are 3 kinds of events / callbacks
+Since:
-1. based on method name
-to handle the event you just have to define function with the right signature and name
-it's called by name just like any other function
-for example, OnInitialize() in widgets controllers
-2. based on event classes inherited from redEvent
-to listen for this event you have to define function that has event flag and takes exactly one argument of the type of the event class
-it's auto wired during some initialization step (don't remember exact moment)
-it can be triggered using methods like QueueEvent()
-for example, OnHit(evt : handle:gameeventsHitEvent)
-(there's also gameScriptableSystem with gameScriptableSystemRequest working in similar way)
-3. callback managers
-different types have their own functions to register and unregister listeners
-the signature of the listener is always fixed, and you have to know it
-you have to define a listener function and register it providing target object and name of the listener method
-I think this is the type based on native callbacks, they store `Callback` instances (wrapping target object with the method name) and invoke them
-for example, blackboards `RegisterListenerBool(id : gamebbScriptID_Bool, object : handle:IScriptable, func : CName, fireIfValueExist : Bool)`
+- any CET method can be called from in-game CET console
+- CET can call any REDscript method
-## events
+This is how to debug own's code, e.g. :
-- event has to be created in the class that owns it (e.g. player)
-- use `QueueEvent` for normal event, use `DelayEvent` for delayed one (see `DelaySystem`)
+- create a method on PlayerPuppet in .reds
+- launch a game session
+- open CET console
-more info on discord in #redscript-snippet (thanks @Lyralei)
+### quickly call methods
-## in-game time vs IRL
+from in-game CET console, e.g.:
-1 min in-game is 10 real seconds.
+```lua
+GameObject.PlaySoundEvent(Game.GetPlayer(),"q101_sc_03_heart_loop" )
+GameObject.StopSoundEvent(Game.GetPlayer(),"q101_sc_03_heart_loop" )
+GameObject.BreakReplicatedEffectLoopEvent(Game.GetPlayer(),"q101_sc_03_heart_loop" )
+```
-## quickly seed inventory with items
+### quickly seed inventory with items
```lua
Game.AddToInventory("Items.FR3SH", 1)
@@ -67,41 +58,29 @@ Game.AddToInventory("Items.FirstAidWhiffV0", 10)
Game.AddToInventory("Items.BlackLaceV0", 10)
```
-## quickly call methods
-
-```lua
-GameObject.PlaySoundEvent(Game.GetPlayer(),"q101_sc_03_heart_loop" )
-GameObject.StopSoundEvent(Game.GetPlayer(),"q101_sc_03_heart_loop" )
-GameObject.BreakReplicatedEffectLoopEvent(Game.GetPlayer(),"q101_sc_03_heart_loop" )
-```
-
-### autocompletion
-
-REDscripts functions annotated with `@if` conditional compilation macros won't be evaluated.
-Quickest way to check if it works is to trigger autocompletion on `this` inside any function.
-
### hot reload
Requires latest CET from Discord, at the moment.
Beware of start-up only scripts in your tests: needs to load or start a new game of course.
Red Hot Tools can also watch for changes: beware of autosave.
-## create status/settings for mod
+### REDscript
-```lua
- -- reuse existing entry to create one's status effect
- TweakDB:CloneRecord("BaseStatusEffect.Toxicity", "BaseStatusEffect.Drugged")
- -- ...
- TweakDB:SetFlat("Items.HealingToxicityObjectActionEffect.statusEffect", "BaseStatusEffect.Toxicity")
-```
+#### default method return values
-```lua
- -- reuse existing icon to create one's
- TweakDB:CloneRecord("UIIcon.acid_doused", "UIIcon.regeneration_icon")
- TweakDB:SetFlat("UIIcon.acid_doused.atlasPartName", "acid_doused")
+credits to `psiberx` on discord.
+
+```swift
+public static func NoRetInt() -> Int32 {} // returns 0
+public static func NoRetCName() -> CName {} // returns n"None"
+public static func NoRetStruct() -> SimpleScreenMessage {} // returns empty instance
+public static func NoRetArray() -> array {} // returns empty array
```
-but actually the truth is that it's far more convenient and maintainable with [YAML Tweaks](https://github.com/psiberx/cp2077-tweak-xl/wiki/YAML-Tweaks).
+#### conditional compilation
+
+REDscripts functions annotated with `@if` conditional compilation macros won't be evaluated.
+Quickest way to check if it works is to trigger autocompletion on `this` inside any function.
## native status effects
@@ -110,18 +89,14 @@ All the status effects can be found [there](https://cyberpunk.fandom.com/wiki/Cy
## native animations
Animations can be handled with [WolvenKit](https://wiki.redmodding.org/cyberpunk-2077-modding/modding/redmod/quick-guide#animation-modding).
+
[Change and potentially replace animations](https://wiki.redmodding.org/cyberpunk-2077-modding/developers/guides/quest/how-to-remove-an-animation-and-potentially-replace-it).
-## default method return values
+## in-game time vs IRL
-credits to psiberx on discord.
+1 min in-game is 10 real seconds.
-```swift
-public static func NoRetInt() -> Int32 {} // returns 0
-public static func NoRetCName() -> CName {} // returns n"None"
-public static func NoRetStruct() -> SimpleScreenMessage {} // returns empty instance
-public static func NoRetArray() -> array {} // returns empty array
-```
+credits to `Lyralei` on discord.
## glossary