From 576cdb1b5c0ff261e71ff3cd5f2f4df6e938bad7 Mon Sep 17 00:00:00 2001 From: SavageCore Date: Sun, 13 Oct 2024 04:08:15 +0100 Subject: [PATCH] Release UE4SS mod (#98) --- .github/workflows/release-mod.yml | 37 +++++++++++++++++++++++++++++++ .vscode/settings.json | 6 +++++ README.md | 4 +++- ue4ss_mod/README.md | 20 +++++++++++++++++ ue4ss_mod/main.lua | 15 +++++++++++++ 5 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-mod.yml create mode 100644 ue4ss_mod/README.md create mode 100644 ue4ss_mod/main.lua diff --git a/.github/workflows/release-mod.yml b/.github/workflows/release-mod.yml new file mode 100644 index 0000000..a32c4c7 --- /dev/null +++ b/.github/workflows/release-mod.yml @@ -0,0 +1,37 @@ +name: Release CodeRevealer + +on: + push: + tags: + - v* + workflow_dispatch: + +jobs: + zip: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Create directory structure + run: | + mkdir -p CodeRevealer/Scripts + touch CodeRevealer/enabled.txt + cp ue4ss_mod/main.lua CodeRevealer/Scripts/main.lua + + - name: Zip files + run: | + zip -r CodeRevealer.zip CodeRevealer + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + draft: true + generate_release_notes: true + prerelease: false + files: | + CodeRevealer.zip + +permissions: + contents: write diff --git a/.vscode/settings.json b/.vscode/settings.json index fa64582..d3cb845 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -29,5 +29,11 @@ "less", "postcss", "scss" + ], + "Lua.diagnostics.globals": [ + "RegisterHook" + ], + "Lua.diagnostics.disable": [ + "undefined-global" ] } \ No newline at end of file diff --git a/README.md b/README.md index b86c667..33c2867 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,14 @@ # PD3 Vault Cracker -A tool to help you crack the vault in Payday 3. Enter your 2-4 digit code and it will tell you the possible combinations. Go get those no mask runs! +A website to help you crack the vault in Payday 3. Enter the 2-4 digits highlighted on the in-game keypad and it will tell you the possible combinations. Go get those no mask runs! Click [here](https://savagecore.github.io/pd3-vault-cracker/) to view it. Inspired by [this](https://www.reddit.com/r/paydaytheheist/comments/15jvvpq/payday_3_beta_vault_code_generator_from/) Reddit post. +There is also a [UE4SS](https://modworkshop.net/mod/47771) mod in the `ue4ss_mod` [folder](https://github.com/SavageCore/pd3-vault-cracker/tree/main/ue4ss_mod) of this repo, it prints the door/vault code to the console. + ## Development 1. Clone the repo diff --git a/ue4ss_mod/README.md b/ue4ss_mod/README.md new file mode 100644 index 0000000..59bab83 --- /dev/null +++ b/ue4ss_mod/README.md @@ -0,0 +1,20 @@ +# CodeRevealer + +> Prints the Payday 3 door/vault code combination to the UE4SS console. + +Thanks to [fm666venom](https://www.unknowncheats.me/forum/payday-3-a/614083-code-doors-vault.html) at UnknownCheats for the code. I'm just hosting it here as a standalone mod. + +## Installation + +1. Install [UE4SS](https://modworkshop.net/mod/47771). +2. Download the latest release of `CodeRevealer.zip` from the [releases](https://github.com/SavageCore/pd3-vault-cracker/releases/latest/download/CodeRevealer.zip). +3. Extract the contents of the archive to the mods folder `PAYDAY3\PAYDAY3\Binaries\Win64\Mods`. You should now have a CodeRevealer folder containing a blank `enabled.txt` file and a `Scripts` folder with the `main.lua` file. +4. Enable the console in UE4SS. To do this, edit the `UE4SS-settings.ini` file in the UE4SS folder and set either `ConsoleEnabled` or both `GuiConsoleEnabled` and `GuiConsoleVisible` to `1`. For example: + +```ini +ConsoleEnabled = 0 +GuiConsoleEnabled = 1 +GuiConsoleVisible = 1 +``` + +5. Start the game and a console window or GUI console should now launch alongside it. Once you start a heist, the door/vault code combination will be printed to the console. diff --git a/ue4ss_mod/main.lua b/ue4ss_mod/main.lua new file mode 100644 index 0000000..b266407 --- /dev/null +++ b/ue4ss_mod/main.lua @@ -0,0 +1,15 @@ +print("[CodeRevealer] Mod loaded\n") + +local lastLoggedCode = "" + +RegisterHook("/Script/Starbreeze.SBZCodeViewerInterface:UpdateCodeViewer", function(self, generatedCodes, trueCodeIndex) + -- Format the current code as a four-digit string + local currentCode = string.format("%04d", generatedCodes:get()[trueCodeIndex:get() + 1]) + + -- Check if the current code is different from the last logged code + if currentCode ~= lastLoggedCode then + print("\n[CodeRevealer] DOOR/VAULT CODE: " .. currentCode .. "\n\n") + + lastLoggedCode = currentCode + end +end)