Document not found (404)
+This URL is invalid, sorry. Please use the navigation bar or search to continue.
+ +diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..93872399 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Video** +If applicable, add a video to help illustrate your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. Windows] + - Version [e.g. 22] + +**Environment:** + - Launcher: [e.g. Steam] + - Game version [e.g. 1.61] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/support_consumable.md b/.github/ISSUE_TEMPLATE/support_consumable.md new file mode 100644 index 00000000..a0dfff5f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_consumable.md @@ -0,0 +1,27 @@ +--- +name: Support additional consumable +about: Request support for additional consumable. +description: This template is mostly used internally by developer. +title: 'support XXX' +labels: 'cross over, enhancement' +assignees: '' + +--- + +implement XXX addiction system, general guideline: + + + +## [MOD X](.) + + + + +- [ ] + +## [MOD Y](.) + + + + +- [ ] diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..1e82ffd7 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,53 @@ +name: Pages +on: + push: + branches: + - main + paths: + - ".github/**" + - "book/book.toml" + - "book/pages/**" + - "**.md" +env: + MDBOOK_VERSION: '0.4.37' + MDBOOK_CODEBLOCKS_VERSION: '0.1.14' + MDBOOK_ADMONISH_VERSION: '1.15.0' + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install mdbook + run: | + mkdir mdbook + curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Install mdbook-codeblocks + run: | + mkdir mdbook-codeblocks + curl -sSL https://github.com/Roms1383/mdbook-codeblocks/releases/download/v${{ env.MDBOOK_CODEBLOCKS_VERSION }}/mdbook-codeblocks-v${{ env.MDBOOK_CODEBLOCKS_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-codeblocks + echo `pwd`/mdbook-codeblocks >> $GITHUB_PATH + - name: Install mdbook-admonish + run: | + mkdir mdbook-admonish + curl -sSL https://github.com/tommilligan/mdbook-admonish/releases/download/v${{ env.MDBOOK_ADMONISH_VERSION }}/mdbook-admonish-v${{ env.MDBOOK_ADMONISH_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-admonish + echo `pwd`/mdbook-admonish >> $GITHUB_PATH + - name: Setup rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Deploy GitHub Pages + run: | + (cd book && mdbook build) + git worktree add gh-pages + git config user.name "Deploy from CI" + git config user.email "" + cd gh-pages + # Delete the ref to avoid keeping history. + git update-ref -d refs/heads/gh-pages + rm -rf * + mv ../book/site/html/* . + git add . + git commit -m "Deploy $GITHUB_SHA to gh-pages" + git push --force --set-upstream origin gh-pages diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 00000000..9328ebc6 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,32 @@ +name: Quality +on: + push: + paths: + - '.github' + - 'scripts/Addicted' + pull_request: + paths: + - '.github' + - 'scripts/Addicted' +env: + DOTNET_VERSION: '8.0.x' + REDSCRIPT_VERSION: '0.5.19' + REDSCRIPT_SRC: scripts/Addicted + +jobs: + redscript: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '${{ env.DOTNET_VERSION }}' + - name: Setup REDscript + run: C:\msys64\usr\bin\wget.exe https://github.com/jac3km4/redscript/releases/download/v${{ env.REDSCRIPT_VERSION }}/redscript-cli.exe + - name: Lint code + run: ./redscript-cli.exe lint --src ${{ env.REDSCRIPT_SRC }} + continue-on-error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..0ab00dbe --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,113 @@ +name: Release +on: + push: + branches: + - main + tags: + - "v*" + - "rc*" + - "beta*" + - "alpha*" +env: + WOLVENKIT_CORE_VERSION: '8.14.0' + WOLVENKIT_CLI_VERSION: '8.14.0' + DOTNET_VERSION: '8.0.x' + IS_DRAFT: ${{ startsWith(github.ref_name, 'beta') || startsWith(github.ref_name, 'alpha') }} + +jobs: + bundle-mod: + runs-on: windows-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Just + uses: extractions/setup-just@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '${{ env.DOTNET_VERSION }}' + - name: Setup WolvenKit CLI + run: | + C:\msys64\usr\bin\wget.exe https://github.com/WolvenKit/WolvenKit/releases/download/"${{ env.WOLVENKIT_CORE_VERSION }}"/"${{ env.WOLVENKIT_ARTIFACT }}" + 7z x "${{ env.WOLVENKIT_ARTIFACT }}" + dotnet tool install -g wolvenkit.cli + env: + WOLVENKIT_ARTIFACT: WolvenKit.Console-${{ env.WOLVENKIT_CLI_VERSION }}.zip + - name: Bundle files + run: just ci 'mod-windows' + env: + WK_CLI: cp77tools + - name: Zip files + uses: thedoctor0/zip-release@0.7.6 + with: + type: 'zip' + filename: 'Addicted-mod-windows-${{ github.ref_name }}.zip' + directory: ./mod-windows + path: . + recursive_exclusions: ${{ (env.IS_DRAFT && 'Debug.reds') || '' }} + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: mod-windows-${{ github.ref_name }} + path: mod-windows/Addicted-mod-windows-${{ github.ref_name }}.zip + if-no-files-found: error + bundle-translations: + runs-on: windows-latest + strategy: + matrix: + locale: + - en-us + - fr-fr + - es-es + - zh-cn + - pt-br + - it-it + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Just + uses: extractions/setup-just@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Bundle files + run: just bundle 'translation-${{ matrix.locale }}' "${{ matrix.locale }}" + - name: Zip files + uses: thedoctor0/zip-release@0.7.6 + with: + type: 'zip' + filename: 'Addicted-translation-${{ matrix.locale }}-${{ github.ref_name }}.zip' + directory: ./translation-${{ matrix.locale }} + path: . + - name: Upload translations + uses: actions/upload-artifact@v4 + with: + name: translation-${{ matrix.locale }}-${{ github.ref_name }} + path: translation-${{ matrix.locale }}/Addicted-translation-${{ matrix.locale }}-${{ github.ref_name }}.zip + if-no-files-found: error + release: + if: ${{ startsWith(github.event.ref, 'refs/tags') }} + runs-on: windows-latest + needs: [bundle-mod, bundle-translations] + steps: + - name: Download mod and translations + uses: actions/download-artifact@v4 + with: + path: release + merge-multiple: true + - name: Create release ${{ github.ref_name }} + uses: ncipollo/release-action@v1 + with: + artifacts: "release/*.zip" + draft: ${{ env.IS_DRAFT }} + token: ${{ secrets.GITHUB_TOKEN }} + artifactErrorsFailBuild: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c29064b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +**/*.env +**/*.log +**/.DS_Store + +/book/site +scripts/* +!scripts/Addicted +/archives/**/*.cpmodproj +/archives/**/*.zip +/archives/**/layout.xml +/archives/**/install_log.xml +/archives/**/packed +/archives/*.archive +/archives/*.xl + +/Addicted +/.VSCodeCounter +dump.redscripts +saved.json +/.installation +/medium +/community +/samples + +redscript-cli.exe +WolvenKit.CLI.exe +REDmodLog.txt diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 00000000..b5bfcf1c --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1,2 @@ +CHANGELOG.md +NEXUS.txt diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7da5912b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "Lua.runtime.version": "LuaJIT", + "Lua.workspace.preloadFileSize": 15360, + "Lua.workspace.library": [ + "C:\\Development\\cet-lua-b-1.18.0-211124" + ], + "redscript.gameDir": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Cyberpunk 2077", + "redHotTools.gameDir": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Cyberpunk 2077", + "workbench.colorCustomizations": { + "activityBar.background": "#1D331E", + "titleBar.activeBackground": "#29472A", + "titleBar.activeForeground": "#F8FBF8" + } +} \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 00000000..5b421b20 --- /dev/null +++ b/404.html @@ -0,0 +1,222 @@ + + +
+ + +This URL is invalid, sorry. Please use the navigation bar or search to continue.
+ +Here's a workflow for custom status effects icons which works !
+A good way to design in illustrator is to split each icon in a separate artboard, named after the final icon.
+++Each artboard can contain one or more layers for a single icon design.
+
Once happy with your icons:
+File > Export > Export for Screens
+export them e.g. to raw\addicted\gameplay\gui\widgets\healthbar
+ +If you chose to design on Illustrator:
+create a new document:
+create a black background layer "Background" and lock it
+import and position each of the previously generated PNG icons to your document
+create as many black backgrounds layers as there are icons, named after the icons
+++these are placeholders so that Inkatlas Utils plugin generate Part Mapping of 64x64 pixels, inside of the size of the inner icon's graphics
+
group all your icons layers together, and below all the placeholders together
+⚠️ if you use a Cloud document
+Then proceed:
+100
: raw\addicted\gameplay\gui\widgets\healthbar\atlas_addicted.xbm50
(for 1080p): raw\addicted\gameplay\gui\widgets\healthbar\atlas_addicted_1080p.xbmTools > Import Tool
+import both .tga as follow
+credits to IslandDancer on Discord
+ +right click on raw\addicted\gameplay\gui\widgets\healthbar\atlas_addicted.inkatlas.json then Convert from JSON
+double-check your .inkatlas to make sure everything looks as expected
+ +edit your YAML Tweak, e.g.
+UIIcon.NotablyWeakenedFirstAidWhiff:
+ $type: UIIcon_Record
+ atlasPartName: notably_first_aid_whiff
+ atlasResourcePath: addicted\gameplay\gui\widgets\healthbar\atlas_addicted.inkatlas
+
+use in your tweaks, e.g.
+BaseStatusEffect.NotablyWeakenedFirstAidWhiffV0:
+ $base: BaseStatusEffect.FirstAidWhiffV0
+ uiData:
+ $base: BaseStatusEffect.FirstAidWhiffV0_inline4
+ iconPath: NotablyWeakenedFirstAidWhiff
+
+Enjoy sweet and sharp icons !
+ + +let v: String = "Hello world";
+let v: CName = n"Debuff";
+let v: TweakDBID = t"BaseStatusEffect.BlackLaceV0";
+let v: ResRef = r"base\\gameplay\\gui\\common\\main_colors.inkstyle";
+let v: LocKey = l"MyMod-Setting-Desc";
+
+let v: String = NameToString(n"Debuff");
+let v: Bool = IsNameValid(n"Debuff");
+
+let v: TweakDBID = TDBID.None();
+let v: TweakDBID = TDBID.Create("Items.BlackLaceV0");
+let v: Bool = TDBID.IsValid(t"Items.BlackLaceV0");
+let v: Uint64 = TDBID.ToNumber(t"Items.BlackLaceV0");
+let v: String = TDBID.ToStringDEBUG(t"Items.BlackLaceV0");
+
+let v: String = ItemID.ToDebugString(someItemID);
+let v: Bool = ItemID.IsDefined(someItemID);
+let v: TweakDBID = ItemID.GetTDBID(someItemID);
+let v: ItemID = ItemID.FromTDBID(t"Items.FirstAidWhiffV0");
+
+let system: ICooldownSystem = Game.ICooldownSystem();
+let v: Int32 = system.GetCIDByItemID(someItemID);
+let v: Int32 = system.GetCIDByRecord(t"BaseStatusEffect.HealthBooster");
+
+let delay: DelayID = GameInstance.GetDelaySystem(player.GetGame()).DelayCallback();
+let defined: Bool = NotEquals(delay, GetInvalidDelayID());
+
+Sounds can be played like:
+let sound: CName = n"ono_v_effort_short";
+GameObject.PlaySoundEvent(this.player, sound);
+GameObject.StopSoundEvent(this.player, sound);
+
+Even further controlled with:
+let sound: CName = n"ono_v_effort_short";
+let event: ref<PlaySoundEvent> = new PlaySoundEvent();
+event.soundEvent = sound;
+GameObject.PlaySoundEvent(this.player, sound);
+// has ESoundStatusEffects
+// also has GetSoundName() / SetSoundName()
+event.SetStatusEffect(ESoundStatusEffects.DEAFENED);
+// later on
+GameObject.StopSoundEvent(this.player, event.soundEvent);
+
+Another way:
+let sound: CName = n"dry_fire";
+let event: ref<AudioEvent> = new AudioEvent();
+event.eventName = sound;
+this.player.QueueEvent(event);
+
+Because I always forget them 😅
+During development you will often have to:
+To make our lives easier, there's many terminal shortcuts commands at our disposal, via a justfile
:
first, install Just
++++
Just
is just a command runner, it makes running commands in the terminal easier, more maintainable and generally more enjoyable
list all available shortcuts:
+just
+
+
+generally speaking, while coding you will most likely be interested in the following commands:
+run once on install, to create folders if missing
+just setup
+
+copy files to game dir before launching game:
+just build
+
+copy files to game dir while game is running (excluding archive
, see below):
just rebuild
+
+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.archive
for WolvenKit archive, TweakXL tweaks
, REDscript scripts
and/or CET reload all mods
📦 mod release files can be found either in Github release or Nexus files alike.
+ℹ️ more infos at Github repo.
+Here are the steps required to get yourself started with this mod.
+Mandatory steps, in order:
+🎮 Cyberpunk
+++this doc assumes you installed it on Steam +but you can easily modify it for whichever game launcher
+
⚙️ CET
+++scripting engine, based on .lua
+
Home
)You can also watch these steps on video in YouTube, thanks to PerfectlyNormalBeast
.
Then, in any order:
+🧧 REDscript
+++additional supported programming language:
+.reds
🔴 RED4ext
+++relied upon by many mods, allow for extending scripting system
+
🔺 TweakXL
+++useful to create custom tweaks (modify TweakDB, REDengine 4 proprietary database)
+
🔺 ArchiveXL
+++useful to package archive (load custom resources without touching original game files)
+
🔺 Codeware
+++redscript dependency
+
🔺 Audioware
+++used to manage custom souds and subtitles
+
Only required if you use this mod's Optional files (audio files and subtitles). +Kindly note that Audioware itself requires both RED4ext and Codeware (see above).
+If you would like to contribute to this repo, +I would strongly recommend:
+🔺 Redscript IDE VSCode plugin
+++provides autocompletion in Visual Studio Code
+
🔺 RED Hot Tools
+++allows for archive, scripts and tweaks hot-reloading in-game
+
🔺 clipTester or SoundClipTester
+++useful to listen to all sounds in-game via CET console
+