You are viewing a potentially older version of this package. View all versions.
naccel_inc-RoundsPatchworkPlus-1.1.3 icon

RoundsPatchworkPlus

Universal stability patchwork engine for ROUNDS modpacks. Eliminates bullet passing/ghosting, reload NRE freezes, duplicate category crashes, Photon desyncs, and AI bugs.

Date uploaded a week ago
Version 1.1.3
Download link naccel_inc-RoundsPatchworkPlus-1.1.3.zip
Downloads 33
Dependency string naccel_inc-RoundsPatchworkPlus-1.1.3

This mod requires the following mods to function

BepInEx-BepInExPack_ROUNDS-5.4.1901 icon
BepInEx-BepInExPack_ROUNDS

BepInEx pack for ROUNDS. Preconfigured and ready to use.

Preferred version: 5.4.1901

README

ROUNDS Patchwork Plus

ROUNDS Mod Version Tested

ROUNDS Patchwork Plus is the all-in-one universal compatibility, crash prevention, and stability patchwork engine for ROUNDS.

It silently intercepts, resolves, and suppresses hundreds of game-breaking crashes, NullReferenceExceptions, Photon network RPC desyncs, coroutine failures, and cross-mod incompatibilities common to heavily modded ROUNDS lobbies.


โšก What's New in v1.1.3 (Main Menu Freeze & Crash Fixes)

  • ๐Ÿ›ก๏ธ Definitive Main Menu Freeze Fix:
    • Completely overrides UnboundLib.Utils.CardManager.FirstTimeStart() with a crash-proof implementation using case-insensitive HashSet category deduplication and safe dictionary indexers (dict[key] = val).
    • Fixes fatal ArgumentException: An item with the same key has already been added. Key: Root caused by duplicate mod category registrations (Root Core Modual, etc.).
    • Adds an automatic Canvas Watchdog Coroutine: if an external mod crashes during card menu initialization, the watchdog forcefully dismisses stuck fullscreen cardMenuCanvas objects after 1.2s, guaranteeing the main menu is never blocked by invisible overlays.
  • ๐Ÿ—‚๏ธ Empty Category Boundary Guard:
    • Automatically filters out empty registered categories (Count == 0) in ToggleCardsCategoriesManager, preventing ArgumentOutOfRangeException crashes.
  • ๐Ÿงน Clean Initialization Dictionaries:
    • Pre-clears scrollViews and cardObjs in both ToggleCardsMenuHandler and SandboxImprovements.CardSpawnMenuHandler prior to card instantiation.

๐Ÿš€ Key Stability Features & Intercepted Incompatibilities

๐Ÿ›ก๏ธ Bullet Ghosting & Damage Interception Fix (CPCCore + PerformanceImprovements)

  • When using performance optimization mods that send synthetic raycasts with null colliders (PerformanceImprovements), CPCCore crashed with NullReferenceException inside ProjectileHit.Hit.
  • This caused bullets to pass right through players without dealing damage or triggering on-death explosions.
  • ROUNDS Patchwork Plus safely intercepts null colliders and wraps ProjectileHit.Hit with a safety finalizer, guaranteeing bullets always deal damage, trigger effects, and destroy properly.

โฑ๏ธ Anti-Slow-Motion Watchdog (TimeHandler.timeStop / gameOverTime)

  • Exceptions during bullet hit processing or round-end coroutines frequently corrupted hitstop and slow-motion curves, leaving Time.timeScale locked near zero.
  • The built-in watchdog monitors battle progress: if timeStop or gameOverTime stays frozen for longer than expected during an active round, the engine automatically smoothly restores normal time (timeStop = 1.0f).

๐Ÿ”ซ Reload Trigger NRE Cascade Elimination (DuringReloadTrigger)

  • Modded cards with reload triggers frequently threw hundreds of NullReferenceException errors per second inside DuringReloadTrigger.Update() when referencing uninitialized weapons.
  • Safely intercepts uninitialized GunAmmo and weapon handlers, eliminating main-thread render lag and restoring smooth 60+ FPS.

๐Ÿค– Smart Bot Navigation & Teleport / Portal Awareness (AIMovementModule)

  • Prevents bot AI from freezing or breaking on custom maps with teleporters, portals, or disconnected platforms (e.g. Root_Maps).
  • Bots dynamically detect teleporter entrances when opponents are separated across portals or voids and step into them.
  • Adds obstacle raycasting to automatically jump over walls and pits, with an anti-stuck watchdog to un-wedge trapped bots.

โฉ Ultra-Fast Round & Point Transitions

  • Eliminates the 5-second artificial lag between points and rounds: accelerates PlayerSpotlight fade durations to 0.15s, speeds up map entrance animation curves, and bypasses player readiness stall loops.

๐Ÿ‘ฅ EveryonePicks + RoundsWithBots Simultaneous Bot Card Picking

  • Eliminates the 25โ€“45s screen freeze where bots took over the interactive draft loop (IsLocalPlayer(bot) == true).
  • Bots pick simultaneously in the background with a realistic 1.0โ€“1.8s delay using RoundsWithBots weighted AI (botCardPickerAI.PickCard), respecting category blacklists (NotForBots).
  • Updates the on-screen PickBoard to READY in real time and automatically applies bot card upgrades via ModdingUtils.Utils.Cards.RPCA_AssignCard / ApplyCardStats.Pick.

๐Ÿ›ก๏ธ RayHitReflect, Photon RPC, & Coroutine Resilience

  • RayHitReflect / CareenMono Collision Fixes: Dynamically initializes missing MoveTransform and ProjectileHit references, eliminating 80+ frame NREs in CosmicRounds.
  • Photon RPC Network Desync Protection: Prevents ProjectileHit.RPCA_DoHit crashes from invalid/orphaned Photon view IDs.
  • PCE SuperJumpEffect OnUpdate Protection: Stops 119+ frame NREs when dead or inactive players trigger PCE card effects.
  • Explosion Missing Spawner Guard: Automatically provides fallback spawner contexts for Explosion.DoExplosionEffects (fixes 59+ explosion NREs).
  • MapTransition & PlayerManager Coroutine Safety: Intercepts coroutine exceptions during round end and map transition, cleanly terminating destroyed player movements (yield break) without stalling the match.
  • Leaver & Disconnect Resilience: Prevents crashes in RWF.AssignPlayerID and SetPlayerSpriteLayer.Start when players disconnect mid-round.
  • Twitch Shutdown Freeze Fix (RoundsWithViewers): Silences NREs and eliminates the forced 500ms synchronous main-thread sleep in RWV.OnDestroy() when playing without an active Twitch connection.

๐Ÿ“ฆ Compatibility

Works seamlessly with any mod combination:

  • CosmicRounds
  • Player-Customization-Extended (PCE)
  • Rounds With Friends (RWF)
  • EveryonePicks
  • UnboundLib
  • Performance_Improvements
  • CPCCore / CPC Crafter
  • Cards+ / CardsPlusPlugin
  • DemonicPact
  • ModdingUtils
  • Will's Wacky Cards (WWC)
  • StatRevealMod
  • ModernStatsHUD
  • RoundsDashLoader
  • RoundsPatchFpsFix

๐Ÿ› ๏ธ Installation

  1. Install via r2modman or Thunderstore Mod Manager.
  2. Alternatively, place RoundsPatchworkPlus.dll, manifest.json, and icon.png into your BepInEx plugins folder: BepInEx/plugins/naccel_inc-RoundsPatchworkPlus/

CHANGELOG

Changelog

[1.1.7] - 2026-10-27

Fixed & Improved

  • StickFightMaps & MapsExtended 1.4.2 Compatibility (MissingMethodException Fix):
    • Fixed 130+ repeated MissingMethodException: void MapsExt.MapsExtended.OnPhotonMapObjectInstantiate errors when spawning custom physics map objects (boxes, hinges, chains). In MapsExtended 1.4.2, OnPhotonMapObjectInstantiate was replaced with AddPhotonInstantiateListener. Added a prefix patch on BossSlothPhysicsObject.Start that dynamically invokes the modern listener, properly restoring box scaling and hinge physics.
  • DeckCustomization NewGUI NullReferenceException Guard:
    • Fixed NullReferenceException in DeckCustomization.NewGUI when UnboundLib GUI building runs on a destroyed or closed menu GameObject. Added null check and exception finalizer.
  • ASK (Aidan Scyye Keyanlux) RarityException Elimination:
    • Suppressed early RarityException during ASK.Main.Awake and deferred CodRarity = RarityUtils.GetRarity("Call of Duty") to ASK.Main.Start, ensuring all custom cards receive their rarity after RarityLib finishes registration.
  • Inactive Bullet Coroutine Guard (Bullet_Base(Clone)):
    • Added hierarchy active check in ProjectileHit.AddPlayerToHeld to prevent Coroutine couldn't be started because the game object 'Bullet_Base(Clone)' is inactive! when blocks or deflections trigger on disabled bullets.
  • WillsWackyManagers 200 KB Curse Log Flood Silenced:
    • Patched CurseManager.CanDrawCursesCondition and disabled extremeDebugging = true, eliminating thousands of redundant console log lines per card draft.

[1.1.0] - 2026-10-26

Fixed

  • CPCCrafter ProjHitPatch.Prefix NRE Elimination (400+ Crashes Silenced):
    • Fixed persistent NullReferenceException in CPCCrafter.Patches.ProjHitPatch.Prefix when projectiles hit objects without a Player component (e.g. walls, crates, shields, destructible boxes). Added safety prefix and finalizer to safely pass through standard vanilla hit handling.
  • GameModeManager Hook Null Return Safety (MapShffuler Fix):
    • Fixed [GAMESTART HOOK] [MapShffuler] threw exception: NullReferenceException caused by MapShffuler returning (IEnumerator)null on GameStart. Wrapped GameModeManager.AddHook and AddOnceHook to safely substitute empty enumerators when any mod returns null from a hook.
  • InfinityStones GauntletVisualEffect.Start NRE Elimination:
    • Fixed NullReferenceException when GauntletVisualEffect.Start() was triggered in the main menu or outside an active card pick phase with an unassigned player.
  • Menu Transform child out of bounds Fix:
    • Added lightweight placeholder children during lazy card visual setup so ToggleCardsMenuHandler.ChangeCardColumnAmountMenus and ToggleCardsCategories.StartPostfix querying cardTransform.GetChild(2) never throw out of bounds.
  • RootCore & RarityMenu KeyNotFoundException Guard:
    • Added guards for RootCore.Patches.ToggleCardsMenuPatch and ToggleCardsMenuPatchNew to prevent crashes when the "Root" category is not present in category tabs.
  • RWF GameMode Namespace Correction:
    • Corrected RWF.GameModes.RWFGameMode type resolution for round transition hooks.

[1.0.9] - 2026-10-26

Added & Optimized

  • Smart Bot Navigation & Teleport / Portal Awareness (AIMovementModule):
    • Fixed an issue where Bot AI broke completely and bots stood frozen in place on custom maps featuring teleporters, portals, or disconnected platforms (e.g. Root_Maps).
    • In vanilla RoundsWithBots, AIMovementModule.PathfindPlayer() silently returned whenever TargetNode == null without issuing any movement or jump commands. Because the nav scanner only traces continuous walkable ground lines, bots failed to generate paths across portals or disconnected islands.
    • Implemented dynamic fallback navigation (RunBotSmartFallbackNavigation):
      • Automatically discovers and caches active teleporter entrances (Root_Maps.Scripts.Portal and custom map triggers). When opponents are unreachable via normal ground path, bots navigate directly into the nearest teleporter entrance.
      • Added dynamic obstacle raycasting: bots detect walls, ledges, and gaps and automatically jump to bridge voids.
      • Implemented a stuck watchdog: if a bot's position remains static while trying to move for > 0.35s, it triggers un-wedge jumps and horizontal reverse hops.
  • Ultra-Fast Round & Point Transitions (Eliminates 5-Second Delay):
    • Eliminated artificial transition lag between rounds and points in both RoundsWithFriends and vanilla:
      • Patched RWF.UI.PlayerSpotlight.FadeIn and FadeOut: capped fade durations from 1.0โ€“1.5s down to 0.12โ€“0.18s with zero delay, removing the lingering dark screen.
      • Patched RWFGameMode.DoRoundStart & DoPointStart: ensured active players are marked ready (isPlaying = true), completely bypassing the multi-frame blocking wait loop.
      • Patched PointVisualizer: accelerated point counter ball movements (timeToMove, timeToScale) by 2x.
      • Patched MapTransition: accelerated map entrance animation curve from 0.8s down to 0.35s.
    • Transitions between rounds and points are now snappy and immediate.

[1.0.8] - 2026-10-26

Added & Optimized

  • Instant Main Menu Loading & Lazy Card Visual Engine (Eliminates 30-60s Freeze):
    • Fixed severe main menu freeze ("Not Responding") in large modpacks with 1,000+ cards caused by ToggleCardsMenuHandler (UnboundLib) and CardSpawnMenuHandler (SandboxImprovements).
    • Previously, both menus fired at 0.5s after boot and synchronously cloned 2,000+ full card GameObject prefabs (complete with particle systems, audio, canvases, and physics) in a single blocking frame on the main thread.
    • Implemented an intelligent lazy visual pipeline: card visual instantiation is deferred during batch menu initialization while the menu canvas or category containers are inactive. When a player actively opens a category or searches for cards, visuals are generated on demand frame-by-frame with zero UI stutter.
    • Completely eliminates the 30-60 second main menu hang.

Fixed

  • GearUpCards FixSoundEffect.Awake NRE Elimination:
    • Fixed a NullReferenceException inside FixSoundEffect.Awake() which crashed the menu card generation pipeline when instantiating GearUP card prefabs in the menu.
    • Added FixSoundEffect_Awake_Prefix and exception finalizer to verify that gun != null and SoundVolumeManager.Instance.audioMixer is fully initialized before attempting to query audio groups.
  • ZomC-Cards DoubleViEffect.Start NRE Elimination:
    • Fixed a NullReferenceException inside ZomC_Cards.MonoBehaviours.DoubleViEffect.Start() when card prefabs or standalone effects are instantiated without parent projectile references (GetComponentInParent<ProjectileHit>()).
    • Added DoubleViEffect_Start_Prefix and exception finalizer to safely skip unparented instances.
  • CardChoice Color Theme Null Safety:
    • Added null safety guards for CardChoice.GetCardColor and CardChoice.GetCardColor2 to prevent NullReferenceExceptions during menu card styling when CardChoice.instance or theme arrays are uninitialized.

Fixed

  • CosmicRounds FireballMono & HolyFireMono Frame Update NRE: Fixed a continuous NullReferenceException occurring every frame on fireball projectiles. Projectiles were missing player contexts because FireballMono called GetComponent<Player>() on projectiles where no Player component exists. Added FireballMono_Update_Prefix and exception finalizer to dynamically recover player references from ProjectileHit.ownPlayer and validate player.data.currentCards before processing.
  • CosmicRounds MistletoeMono Start & DoHitEffect NRE: Added safety prefix and finalizer for CR.MonoBehaviors.MistletoeMono.Start and DoHitEffect. Dynamically initializes missing ProjectileHit and guards against unparented/orphaned mistletoe components or non-player collision targets.
  • Explosion.Explode NRE Elimination: Fixed NullReferenceException in Explosion.Explode() caused by spawned.spawner == null during team check evaluation (spawned.spawner.gameObject). Added Explosion_Explode_Prefix to provide valid fallback spawner references and wrapped Explosion.Explode with a safety finalizer.
  • Bot Detection Reflection Caching & HarmonyX Warning Suppression: Corrected namespace lookup for BotsManager to RoundsWithBots.Handlers.BotsManager and cached all bot reflection types/methods statically. Completely eliminates thousands of [Warning: HarmonyX] AccessTools.TypeByName: Could not find type named RoundsWithBots.BotsManager log warnings.
  • Bot Interception Log De-duplication: Replaced per-frame logging in EveryonePicks_IsLocalPlayer_Prefix with a per-phase unique set (_loggedBotIntercepts). Each bot is now cleanly logged exactly once per drafting phase.

[1.0.6] - 2026-10-26

Fixed

  • Human Player False Bot Classification Fix (IsBotPlayer):
    • Fixed a critical bug where keyboard/mouse human players were mistakenly classified as bots because their input device (playerActions.Device) was null (standard for InControl keyboard/mouse bindings) and vanilla base player prefabs contain the inactive PlayerAI component.
    • Added strict Human Host Immunity (playerID == 0 / host player is never treated as a bot unless explicitly registered by CharacterDataExtension.IsBot == true).
    • Removed faulty device == null and PlayerAI name checks. Bot detection now strictly checks CharacterDataExtension.IsBot, BotsManager.BotList, PlayerAIBase/AdvancedBotAI, ModdingUtils.isAIMinion, and [BOT] nametags.
    • Human player now reliably receives the interactive draft screen and gets to choose their cards properly.
  • Bot AI Context & Duplicate Card Selection Fix (ChooseCardForBot):
    • Fixed an issue where RoundsWithBots's WeightedCardsPicker.PickCard threw NullReferenceException because CardChoice.instance.pickrID did not match the bot's playerID during evaluation.
    • Automatically sets CardChoice.instance.pickrID = bot.playerID during AI card scoring and restores it cleanly in finally.
    • Replaced hardcoded fallback return pool[0] with distinct randomized candidate hands per bot (System.Random(Guid.NewGuid().GetHashCode() ^ bot.playerID)). Bots and humans no longer receive duplicate index 0 cards.

[1.0.5] - 2026-10-26

Fixed

  • EveryonePicks Bot Patch Binding Resolution: Fixed a reflection issue in ModSafetyFixesPatch where GetMethod(..., BindingFlags.NonPublic) failed to locate public patch methods for EveryonePicks.State.IsLocalPlayer, SeedPickers, and ApplyRow. Switched to AccessTools.Method and added explicit verification logging.
  • Multi-Layered Bot Detection Engine (IsBotPlayer): Expanded bot detection to 6 independent fallbacks: CharacterDataExtension.IsBot, InputDevice.Null check, PlayerAIBase / AIMovementModule component scan, BotsManager.BotList query, ModdingUtils.isAIMinion, and [BOT] tag detection.
  • Plugin Loading Order (Soft Dependencies): Added BepInDependency soft-ordering for EveryonePicks (com.redredrain.rounds.simulpicks) and Rounds With Bots (com.aalund13.rounds.roundswithbots), guaranteeing all classes are loaded before patch registration.
  • AiPickCard Coroutine Suppression: Added ref IEnumerator __result returning an empty enumerator to BotCardPickerHandler_AiPickCard_Prefix, safely neutralizing the vanilla sequential bot card picker.

[1.0.4] - 2026-10-26

Added & Fixed

  • EveryonePicks + RoundsWithBots Simultaneous Bot Card Picking: Added seamless integration between EveryonePicks and RoundsWithBots for simultaneous draft phases with bots:
    • Zero Screen Hijack / No 25s Freeze: In vanilla EveryonePicks, local bots were treated as local human players (IsLocalPlayer(bot) == true), causing them to enter localQueue and freeze the screen for 25โ€“45 seconds per bot while waiting for human input. IsLocalPlayer now recognizes bots and exempts them from the local interactive screen queue.
    • Simulated Background AI Picking: EveryonePicks.State.SeedPickers triggers background simulated card picks for entitled bots with a realistic human-like 1.0โ€“1.8s thinking delay.
    • Weighted AI Decision Engine: Bots evaluate card candidates through RoundsWithBots.Handlers.BotCardPickerHandler.PickerAI.cardPickerAI.PickCard(hand), respecting configured bot weapon/stat synergies and category blacklists (NotForBots).
    • Real-Time PickBoard Updates: Picks are immediately reported to EveryonePicks (StoreResult, StoreSessionDone, StoreStatus), turning the bot's entry on the PickBoard to <color=green>READY</color> in real time.
    • Guaranteed Card Stat Application: In ApplyRow, offline bots and skipped picks are directly assigned their chosen cards via ModdingUtils.Utils.Cards.RPCA_AssignCard and ApplyCardStats.Pick, ensuring bot card stats and card bar icons apply properly.
    • Zero Sequential Conflicts: Vanilla sequential AiPickCard coroutine in RoundsWithBots is automatically suppressed when EveryonePicks is running a draft phase.
  • Menu Safety & Cascade Navigation Fix (GoBack.Update): Fixed a menu desync where pressing Escape or gamepad Action2 while navigating submenus or options triggered GoBack on every menu page simultaneously. Added active page hierarchy verification (ListMenu.instance.selectedPage == page) so only the currently focused menu page processes the back action.

[1.0.3] - 2026-10-26

Fixed

  • StatRevealMod Vanilla & Additive Stat Preservation: Fixed a major bug in StatRevealMod where vanilla cards and custom cards with flat stat values (such as +0.25s, +0.5s Reload Time) were erroneously replaced with +0% because the mod only checked multiplier ratios (gun.reloadTime == 1.0). Now:
    • Flat reload additions (gun.reloadTimeAdd) are preserved and displayed accurately in seconds (e.g., +0.25s, +0.5s).
    • Unchanged multiplier stats (delta is 0%) return null instead of +0%, preserving the card author's original descriptions and vanilla stat texts.
    • Zero-delta ammo (gun.ammo == 0) returns null instead of overwriting with +0.
    • Fractional decimal stats (e.g. +0.5%, +12.5%) retain their exact decimal precision.

[1.0.2] - 2026-10-26

Fixed

  • RoundsWithBots Pathfinding NRE Spam: Silenced and safely guarded AIPathfindModule.AttemptPathfindToTarget and Update(). Prevents continuous hundreds-per-second NRE log spam when bot target or terrain path nodes are null/unmapped.
  • CosmicRounds StarMono VFX NRE: Fixed NullReferenceException in StarMono.<Attack>b__0 when projectiles are destroyed before the 1-frame delayed sprite initialization callback fires.
  • Runtime Framework Standardization: Standardized project output to netstandard2.0 matching Unity 2018.4's native Mono CLR.

[1.0.1] - 2026-10-26

Fixed

  • StatRevealMod Decimal Truncation: Fixed a critical rounding flaw where fractional stat bonuses (such as +0.5% or other decimals) were rounded down to +0% or 0 by StatRevealMod due to banker's rounding ToString("0"). Now dynamically hooks StatCalculator.GetStatValue to preserve decimal precision up to 2 decimal places (0.##) when fractional (e.g., +0.5%, +12.5%) while cleanly rendering whole numbers (+50%).

[1.0.0] - 2026-10-25

Initial Release

  • ROUNDS Patchwork Plus: Universal compatibility and bugfix patchwork engine for modpacks.
  • Added dynamic component initialization for RayHitReflect.DoHitEffect and CareenMono (eliminates 80+ NREs).
  • Added Photon RPC view ID sanitization and finalizer on ProjectileHit.RPCA_DoHit.
  • Added inactive & dead player guard on PCE.MonoBehaviours.SuperJumpEffect.OnUpdate (eliminates 119+ NREs).
  • Added missing spawner fallback & exception suppression for Explosion.DoExplosionEffects (eliminates 59+ NREs).
  • Added coroutine MoveNext() finalizer on MapTransition.Move and PlayerManager.Move for smooth match progression without freezes.
  • Added player disconnect resilience patches (SetPlayerSpriteLayer, EmpowerStopBlockObjectFollow, ReloadTigger, UnboundLib.DisableCard).
  • Zero hard dependencies; fully isolated soft-detection for all patches.