REPO_JP-ShuffleUpgrade icon

ShuffleUpgrade

A mod that shuffles all players' upgrades, working with host-only installation.ホストのみの導入で動作する全てのプレイヤーのアップグレードをシャッフルするMOD

By REPO_JP
Last updated 15 hours ago
Total downloads 48
Total rating 1 
Categories Mods Upgrades Server-side
Dependency string REPO_JP-ShuffleUpgrade-1.0.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2304 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2304

README

ShuffleUpgrade


Overview

ShuffleUpgrade automatically reshuffles all players' upgrades when the team enters the shop

Every shop visit can completely change each player’s role, creating new team dynamics every round
Instead of everyone slowly becoming identical, players naturally develop strengths and weaknesses, encouraging cooperation and adaptive gameplay

Depending on the selected shuffle mode, upgrades may be redistributed while keeping balance, completely randomized, or entire player builds may be swapped

If the result feels too chaotic, the last shuffle can be reverted instantly using the /undo command

This mod is designed to keep runs fresh while ensuring every player remains useful


Features

  • Automatic upgrade shuffle when entering shop
  • Four different shuffle modes
  • Player bias system that creates strengths and weaknesses
  • ChaosRandom imbalance control
  • Safety clamp to prevent excessive upgrade values
  • Selectable upgrade inclusion
  • Deterministic shuffle via fixed seed optional
  • /undo command to restore previous state
  • Multiplayer-safe execution host-only optional
  • Detailed logging options

Shuffle Modes

PreserveTypeTotalsRandom

  • Keeps total amount of each upgrade type
  • Redistributes values between players
  • Maintains overall balance

FullRandomKeepGrandTotal(Default)

  • Keeps overall upgrade total only
  • Allows completely new player builds

ReassignWholeBuilds

  • Entire upgrade builds are swapped between players
  • No player keeps their original build

RandomPattern

  • Randomly selects one of the enabled shuffle modes

ChaosRandom System

ChaosRandom introduces controlled imbalance

Instead of pure randomness

  • Each player gains natural strengths
  • Each player also gains weaknesses
  • Every player remains functional

Higher values increase specialization intensity


Undo System

Command

/undo

Restores the upgrades to the state before the most recent shuffle

Safety checks ensure

  • Player list must match
  • Multiplayer host restrictions can be enforced
  • Only valid shuffle states can be restored

Configuration

Config file

BepInEx/config/jp.repo.shuffleupgrade.cfg

Key options

  • Enable or disable mod
  • Host-only execution in multiplayer
  • Shuffle trigger timing
  • Shuffle interval every N shop visits
  • Shuffle mode selection
  • ChaosRandom intensity
  • Upgrade inclusion toggles
  • Maximum upgrade clamp values
  • Logging verbosity
  • Undo permissions and history size

Technical Details (Programmer Perspective)

The mod hooks shop entry detection via runtime polling using SemiFunc.RunIsShop and level readiness checks

Upgrade redistribution pipeline

  1. Build player upgrade snapshots from StatsManager
  2. Resolve shuffle mode
  3. Generate bias profiles per player
  4. Calculate distribution targets
  5. Apply safety clamps
  6. Apply delta upgrades through PunManager
  7. Synchronize stats using SemiFunc.StatSyncAll
  8. Store undo snapshot

Bias profiles generate weighted distributions ensuring

  • No player becomes useless
  • At least one strong specialization per player
  • Controlled imbalance scaling via ChaosRandom

Mode implementations

  • Mode 0 Per-upgrade total preservation with weighted redistribution
  • Mode 1 Global total preservation with player quota balancing
  • Mode 2 Derangement permutation no self-assignment
  • Mode 3 Random candidate selection

All upgrade changes are applied using delta operations to maintain multiplayer synchronization stability


Compatibility

May conflict with mods modifying

  • Player upgrades
  • StatsManager upgrade storage
  • PunManager upgrade RPC calls
  • Shop transition logic

概要

ShuffleUpgrade はショップ到達時に全プレイヤーのアップグレードを自動でシャッフルするMODです

ショップに入るたびにプレイヤーの役割が変化し、毎ラウンド異なるチーム構成が生まれます
全員が同じビルドに収束するのではなく、それぞれに強みと弱みが生まれるため、協力や状況対応が重要になります

シャッフル方式によってはバランスを維持した再分配、完全ランダム化、プレイヤー構成そのものの入れ替えなどが行われます

結果が気に入らない場合は /undo コマンドで直前状態へ戻すことができます

常に新鮮なプレイ体験を維持しつつ、誰も役立たずにならない設計になっています


主な機能

  • ショップ入場時の自動アップグレードシャッフル
  • 4種類のシャッフルモード
  • プレイヤーごとの強み・弱み生成システム
  • ChaosRandomによる偏り強度調整
  • 最大値安全クランプ
  • シャッフル対象アップグレード選択
  • 固定シード対応 任意
  • /undo による復元
  • マルチプレイ安全設計 ホスト限定任意
  • 詳細ログ機能

シャッフルモード

PreserveTypeTotalsRandom

  • 各アップグレード総量を維持して再分配

FullRandomKeepGrandTotal(デフォルト)

  • 全体総量のみ維持し完全再構成

ReassignWholeBuilds

  • プレイヤー構成を丸ごと入れ替え

RandomPattern

  • 有効化されたモードからランダム選択

ChaosRandom システム

完全ランダムではなく

  • 各プレイヤーに得意分野を生成
  • 同時に弱点も生成
  • 全員が役割を持つ状態を維持

値を上げるほど個性差が強くなります


Undo機能

/undo

で直前のシャッフル状態を復元します

安全確認

  • プレイヤー構成一致チェック
  • ホスト限定設定対応
  • 有効な履歴のみ復元

技術詳細(開発者向け)

ショップ判定は SemiFunc.RunIsShop を用いた状態監視で検出します

処理フロー

  1. StatsManagerから現在値取得
  2. 実行モード決定
  3. プレイヤー偏りプロファイル生成
  4. 目標分配計算
  5. 最大値クランプ
  6. PunManager経由で差分適用
  7. StatSyncAll同期
  8. Undo履歴保存

ChaosRandomにより

  • 最低1つの強み保証
  • 極端な無力化防止
  • 重み付き再分配

デルタ適用方式によりPhoton同期破綻を回避しています