### Install Dependencies with Winget and .NET CLI Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Installs required tools like Git, .NET SDKs, and Resource Hacker using winget. Also installs the ilspycmd .NET global tool and clones the mod repository. Runs once on startup. ```powershell function installDependencies() { # Installs winget from GitHub releases if not present # Then installs these packages in parallel via winget: $dependencies = @( "Git.Git" "Microsoft.DotNet.SDK.7" "Microsoft.DotNet.Framework.DeveloperPack_4" "Microsoft.DotNet.DesktopRuntime.3_1" "AngusJohnson.ResourceHacker" ) $dependencies | Foreach-Object { Start-Job -Arg $_ -ScriptBlock { param($dep) winget install $dep --no-upgrade --silent --accept-source-agreements --accept-package-agreements }} | Wait-Job | Out-Null # Installs ilspycmd decompiler as a .NET global tool dotnet tool install --global ilspycmd --version 7.1.0.6543 # Clones or updates the community mod repository # Destination: ./AxiomVergeMods/ git clone -q "https://github.com/MaragonMH/AxiomVergeMods.git" "AxiomVergeMods" # On subsequent runs: git -C "AxiomVergeMods" pull } ``` -------------------------------- ### Install ps2exe Module Source: https://github.com/maragonmh/axiomvergemods/blob/main/README.md Install the ps2exe module, which is required for building the executable from the PowerShell script. ```powershell Install-Module ps2exe ``` -------------------------------- ### Detect Installed Game Copies Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Scans standard Steam and Epic Games paths for Axiom Verge 1 and 2. Caches game binaries and creates UI buttons for detected installations. Detects beta builds based on version info. ```powershell function loadGames() { # Checks these default install locations: $supportedGames = @{ "AV1-Steam" = "C:/Program Files (x86)/Steam/steamapps/common/Axiom Verge" "AV2-Steam" = "C:/Program Files (x86)/Steam/steamapps/common/Axiom Verge 2" "AV1-Epic" = "C:/Program Files/Epic Games/AxiomVerge1" "AV2-Epic" = "C:/Program Files/Epic Games/AxiomVerge2" } foreach ($game in $supportedGames.Keys.Where{ Test-Path $supportedGames[$_] }) { $gameData = [GameData]::new($game, $supportedGames[$_]) # GameData reads ProductVersion from AxiomVerge*.exe VersionInfo # Beta detection: PreRelease flag OR AV1 Steam revision > 0 # $gameData.IsBeta -> true/false # $gameData.Gameversion -> e.g. "1.58.0.0" # Caches a copy to AV-Sources/AV1-Steam-Original/ or AV1-Steam-Beta/ Copy-Item $gameData.GamePath "AV-Sources/$game-Original" -Recurse -Force # Creates a sidebar button for the game createPageButton $gameData.GameIdentifier $gameData $true } } ``` -------------------------------- ### Compile PowerShell Script to Executable with ps2exe Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Compiles the AVModPackager.ps1 script into a standalone .exe using ps2exe. Embeds the git tag as the application version. Requires the ps2exe module to be installed. ```powershell # Install ps2exe module Install-Module ps2exe # Read the current git release tag for versioning $version = git tag --points-at HEAD # e.g. $version = "1.0.0" # Compile to Windows executable (no console window, DPI-aware) Invoke-ps2exe .\AVModPackager.ps1 .\AVModPackager.exe ` -noConsole ` -DPIAware ` -version $version ` -credentialGUI # Run the packager (optionally with a fork URL for developer mode) .\AVModPackager.exe .\AVModPackager.exe "https://github.com/YourUsername/AxiomVergeMods.git" ``` -------------------------------- ### packageMod Function Source: https://context7.com/maragonmh/axiomvergemods/llms.txt The primary user-facing function for building a mod package. It validates the package name, resolves mod installation order, initializes the git repository, applies each mod using `applyMod`, and finally compiles the patched game using `buildPackage`. ```powershell # UI Flow: # 1. Select a game from the left sidebar (e.g. "AV1-Steam") # 2. Check mods to include (e.g. "Init", "QoLMod") # 3. Enter a package name in the footer input (e.g. "MyMods") # 4. Click "Package" # What packageMod does internally: function packageMod() { $packageName = "MyMods" # sanitized from footer input # Validates name (cannot start with "AV", cannot be "AxiomVergeMods", "Saves", "Mod", or "") # Creates directory: ./MyMods/ New-Item $packageName -ItemType Directory Set-Location $packageName # Bootstraps git repo with decompiled game source initializeRepository $packageName $gamePath "AV1-Steam" # Resolves dependency order: Init must come before QoLMod # Applies each mod's patch history as git commits applyMod $initModData "MyMods" applyMod $qolModData "MyMods" # Merges all mod branches and compiles buildPackage "AV1-Steam" # Output: "Your build succeeded" dialog } # Result structure: # MyMods/ # Dev/ <- decompiled + patched C# source # AxiomVerge.exe <- rebuilt patched executable # Saves/ <- save file directory # .avmod <- installed mod manifest ``` -------------------------------- ### ModData Object Structure Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Defines the structure for storing mod information, including description, author, patch, game, platform, mod name, version, dependencies, conflicts, installation status, history, and package name. This object is populated from .avmod XML files. ```powershell $modData = [ModData]::new( "Adds wall-jumping and keyboard weapon switching", # Description "refrigerat0r", # Author "", # Patch (latest version) "AV1", # Game "Steam", # Platform "QoLMod", # Modname "1.2.0.0", # Modversion @("Init"), # Dependencies @(), # Conflicts $false, # Installed $modHistory, # Full history (XmlElement[]) "" ) ``` -------------------------------- ### Initialize Repository for Modding Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Sets up a new git repository for modding a specific game by cloning the base repository, creating an orphan branch, decompiling game files, and configuring the build environment. This function is typically called automatically by `packageMod`. ```powershell # Internal usage — triggered via packageMod or directly for developer setup # Step 1: Fork https://github.com/MaragonMH/AxiomVergeMods on GitHub # Step 2: Pass your fork URL as the argument when launching AVModPackager .\AVModPackager.exe "https://github.com/YourUsername/AxiomVergeMods.git" # What initializeRepository does internally: function initializeRepository($repositoryName, $gamePath, $gameIdentifier, $forkedRepo = "") { # Clones forked or base repository into current directory git clone -q $forkedRepo . # Creates an orphan branch for the game (e.g. "AV1-Steam") git checkout -q --orphan $gameIdentifier git rm -rf . # Copies game files and decompiles the executable # ilspycmd output: Dev/ directory with full C# source ilspycmd "AxiomVerge.exe" -o "Dev" -p -lv CSharp7_3 # Configures csproj to output directly to game directory # Commits and tags: e.g. "AV1-Steam-1.0.0.0" git commit -m "Initialized Repo" git tag "$gameIdentifier-1.0.0.0" HEAD } # Result: a Dev/ directory with full decompiled C# source ready for modification # Navigate to: YourPackageName/Dev/OuterBeyond/Source/ ``` -------------------------------- ### buildPackage Function Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Merges all mod branches into the base game branch and compiles the patched C# source using `dotnet build`. Provides user feedback on build success or failure. Requires git, .NET SDK, ilspycmd, and ResourceHacker. ```powershell function buildPackage($gameIdentifier) { # Checkout the base game branch (e.g. "AV1-Steam") git checkout -q $gameIdentifier # Get all branches that include this commit (= all installed mod branches) $branches = git branch --format "% (refname:short)" --contains $gameIdentifier # e.g. $branches = @("Init", "QoLMod", "UniqueSaves") # Merge all mod branches into base if ($branches) { git merge $branches } # Compile the patched C# source back into an executable dotnet build "Dev" # User feedback if ($LASTEXITCODE -ne 0) { displayInfoBox "Your build failed" } else { displayInfoBox "Your build succeeded" } } # Prerequisite tools (auto-installed by installDependencies): # - git # - dotnet SDK 7 + .NET Framework 4 Developer Pack # - ilspycmd 7.1.0.6543 # - ResourceHacker (for icon extraction) ``` -------------------------------- ### Build AVModPackager Executable Source: https://github.com/maragonmh/axiomvergemods/blob/main/README.md Create the AVModPackager executable from the PowerShell script. This command uses git tags for versioning and includes a credential GUI. ```powershell $version = git tag --points-at HEAD Invoke-ps2exe .\AVModPackager.ps1 .\AVModPackager.exe -noConsole -DPIAware -version $version -credentialGUI ``` -------------------------------- ### Package Mod with Fork URL Source: https://github.com/maragonmh/axiomvergemods/blob/main/README.md Use this command in PowerShell to package a mod using your forked repository URL. Ensure you are in the application's directory. ```powershell .\AVModPackager.exe ``` -------------------------------- ### Applying a Mod Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Applies a mod's patch history sequentially to a git repository. This involves checking out a branch, decoding the patch, applying it, committing, and tagging the release. Handles partial and total failures with user feedback. ```powershell # Internal call during packageMod — applies each version sequentially: # 1. Creates branch from dependency tag: git checkout -b QoLMod Init # 2. For each version in history (sorted by Modversion): # - Decodes patch: [Encoding]::Unicode.GetString([Convert]::FromBase64String($_.Patch)) # - Applies: git apply temp --whitespace=nowarn # - Commits: git commit -m "Release" # - Tags: git tag "QoLMod-1.2.0.0" applyMod $modData "MyPackage" ``` -------------------------------- ### AVMod File Format Definition Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Defines the structure of an `.avmod` XML file, which describes a mod package including its metadata, target game, and a Base64-encoded git diff patch. ```xml QoLMod refrigerat0r Adds wall-jumping, bound dash, and keyboard weapon switching. Release AV1 Steam 1.2.0.0 1.58.0.0 Init ZABpAGYAZgA... ``` -------------------------------- ### Apply Mod Patch History Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Applies a mod's version history as sequential git commits to a branch. It decodes Base64 patches, applies them using `git apply`, and creates version tags. Includes retry logic with fuzzy matching for patch failures. ```powershell # Takes a ModData object and applies its full version history as sequential git commits on a dedicated branch. # Each version entry in $modData.History is decoded from Base64, written as a git diff, and applied with `git apply`. # Version tags are created per commit (e.g., `QoLMod-1.2.0.0`). # On patch failure, it retries with fuzzy matching (`-C 1 --recount --reject`) and notifies the user. ``` -------------------------------- ### Validate and Auto-Resolve Mod Selection Source: https://context7.com/maragonmh/axiomvergemods/llms.txt Called when mods are checked/unchecked. Validates dependencies, conflicts, and game version requirements. Automatically enables missing dependencies or resets all mods if validation fails, showing an error. ```powershell function adjustMods() { # Collects all checked mods and their declared dependencies/conflicts # Auto-enables missing dependencies (if available in mod list) # Example: User checks "QoLMod" which depends on "Init" # -> "Init" is automatically checked # -> If Init is not in the mod list: all mods unchecked, error shown: # "Aborting. Not all required dependencies could be enabled # Missing Dependencies: Init" # Conflict example: ModA conflicts with ModB, both selected # -> All mods unchecked, error shown: # "Your mod selection has conflicts # Conflicts: ModB" # Game version check: # If selected mods require Gameversion 1.58.0.0 but installed is 1.50.0.0: # -> All mods unchecked, error shown: # "Your gameversion is outdated... # Current Gameversion: 1.50.0.0 # Required Gameversion: 1.58.0.0" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.