Mimesis

Details

Last Updated
yesterday
First Uploaded
yesterday
Downloads
8.6K
Likes
1
Size
58KB
Dependency string
Rxflex-MorePlayers-1.2.0
Dependants

Categories

MorePlayers Mod for MIMESIS

Remove the 4-player limit in MIMESIS multiplayer sessions.

Version Game MelonLoader Status

๐Ÿ“– Description

This mod patches the multiplayer player limit in MIMESIS, allowing more than 4 players to join a single session. The mod uses HarmonyX patches to modify server-side validation checks.

Default limit: 4 players
Modified limit: 999 players (effectively unlimited)

How It Works

The mod patches multiple validation points:

  1. Network Layer: FishySteamworks.Server.ServerSocket - Steam networking limits
  2. Room Validation: VRoomManager.EnterWaitingRoom - Server-side room entry checks
  3. Member Count: VWaitingRoom.GetMemberCount() - Player count validation

โš ๏ธ Important: While the mod removes the technical limit, the actual number of players depends on:

  • Host's network bandwidth and latency
  • Steam P2P connection capabilities
  • Game performance (more players = more resource usage)

๐ŸŽฏ Who Needs This Mod?

โœ… ONLY THE HOST needs to install this mod!

The mod patches server-side validation that happens on the host's game instance. Players joining the lobby do NOT need to install the mod.

Installation:

  • Host (lobby creator): โœ… Must install mod
  • Joining players: โŒ No mod needed

This makes it easy to play with friends - only the person hosting needs the mod!


๐Ÿš€ Quick Start

1. Download MorePlayers.dll
2. Place in: <MIMESIS>/Mods/MorePlayers.dll
3. HOST creates lobby (mod installed)
4. Friends join (NO mod needed)
5. Enjoy 5+ player sessions! ๐ŸŽ‰

๐Ÿ“Œ Remember: Only the HOST (lobby creator) needs the mod installed!


โœจ Features

  • โœ… Removes 4-player limit
  • โœ… Patches server-side player count validation
  • โœ… Logging for debugging
  • โœ… No game file modifications required
  • โœ… Easy to install and uninstall

๐Ÿ“‹ Requirements

  • MIMESIS (Steam version)
  • MelonLoader v0.6.1 or higher
  • Windows OS
  • .NET Framework 4.7.2 or higher

๐Ÿ”ง Installation

Step 1: Install MelonLoader

  1. Download the latest MelonLoader installer from GitHub Releases
  2. Run the installer and select your MIMESIS installation folder:
    • Default Steam location: C:\Program Files (x86)\Steam\steamapps\common\MIMESIS
    • Or right-click MIMESIS in Steam โ†’ Manage โ†’ Browse local files
  3. Click Install
  4. Launch the game once to let MelonLoader initialize (game will close automatically)

Step 2: Install the Mod

  1. Download MorePlayers.dll from Releases
  2. Copy MorePlayers.dll to your MIMESIS Mods folder:
    <MIMESIS_Install_Folder>/Mods/MorePlayers.dll
    
  3. Launch the game

Verify Installation

Check if the mod loaded successfully:

  1. Navigate to <MIMESIS_Install_Folder>/MelonLoader/Latest.log
  2. Look for these lines:
    [MorePlayers] MorePlayers Mod Loaded!
    [MorePlayers] Applying Harmony patches...
    [MorePlayers] Harmony patches applied successfully!
    

๐ŸŽฎ Usage

Once installed, the mod works automatically:

  1. Host a game - The player limit is now 999
  2. Check the log - When creating a lobby, you'll see:
    [MorePlayers] SetMaximumClients(4) called, setting to 999 instead
    [MorePlayers] GetMaximumClients() called, returning 999
    
  3. Invite players - You can now have more than 4 players in your session!

๐Ÿ” How It Works

The mod uses HarmonyX to patch multiple server-side methods:

Active Patches (6 total)

  1. GetMaximumClients() - Prefix patch returns 999
  2. SetMaximumClients() - Prefix patch prevents setting limit < 999
  3. ServerSocket Constructor - Postfix sets _maximumClients = 999
  4. ServerSocket Methods - IL Transpiler replaces field reads
  5. EnterWaitingRoom() - IL Transpiler (attempts to replace constant 4)
  6. GetMemberCount() - Prefix patch returns 0 to bypass >= 4 check โญ KEY PATCH

Key Innovation - PATCH 6

Instead of trying to modify the check if (count >= 4), we make GetMemberCount() return 0:

// Original code:
if (vwaitingRoom.GetMemberCount() >= 4) { /* block player */ }

// With our patch:
if (0 >= 4) { /* never executes! */ }

Target Classes:

  • FishySteamworks.Server.ServerSocket
  • VRoomManager
  • VWaitingRoom

๐ŸŽฎ Testing the Mod

Expected Behavior

When the 5th player tries to join your lobby:

  1. In the log you should see:

    [PATCH 6] GetMemberCount() called - actual: 4, returning: 0 (to bypass >= 4 check)
    
  2. Player successfully joins instead of getting "Lobby Full" error

  3. You can repeat for 6th, 7th, 8th+ players

How to Test

  1. Host creates lobby (host must have mod installed)
  2. 4 players join (no mod needed for them)
  3. 5th player attempts to join (watch the log!)
  4. Check results:
    • โœ… Success: Player joins, log shows PATCH 6 messages
    • โŒ Failed: Player blocked, send me the full log

Verifying Installation

Check MelonLoader/Latest.log for:

MorePlayers Mod v1.0.3 - Initializing...
SUCCESS: All Harmony patches applied!
Active patches:
  [1] GetMaximumClients() - Prefix
  [2] SetMaximumClients() - Prefix
  [3] Constructor - Postfix
  [4] Transpiler - IL Code Modification
  [5] EnterWaitingRoom - Transpiler (VRoomManager)
  [6] DISABLED (was causing crashes)

[PATCH 6] Target found: VWaitingRoom.GetMemberCount()
[PATCH 6] Will return max(actualCount, 0) to bypass >= 4 check

If you see this, the mod is loaded correctly! โœ…

๐Ÿ› Troubleshooting

Mod doesn't load (0 Mods loaded)

Check:

# Verify the file exists
Test-Path "<MIMESIS_Folder>/Mods/MorePlayers.dll"

Solutions:

  • Ensure MelonLoader is properly installed
  • Unblock the DLL: Right-click โ†’ Properties โ†’ Check "Unblock" โ†’ Apply
  • Make sure the file is in the correct Mods folder
  • Restart the game

Harmony patch errors in log

If you see errors like:

HarmonyLib.HarmonyException: Patching exception in method...

Possible causes:

  • Game was updated and code structure changed
  • Conflict with another mod
  • Corrupted mod file

Solutions:

  • Download the latest version of the mod
  • Try disabling other mods temporarily
  • Check the Issues page

Game crashes on startup

  1. Remove the mod temporarily:
    del "<MIMESIS_Folder>/Mods/MorePlayers.dll"
    
  2. Check the last lines in MelonLoader/Latest.log before the crash
  3. Report the issue with the log file

Players still can't join after 4

Possible reasons:

  • Steam P2P connection limits
  • Host's network configuration (NAT, firewall)
  • Additional client-side checks (not yet patched)
  • Game server browser limitations

Check the log for messages like:

[MorePlayers] GetMaximumClients() called, returning 999

If you see this, the mod is working, but there might be other limitations.

๐Ÿ—๏ธ Building from Source

Prerequisites

  • Visual Studio 2019+ or MSBuild
  • .NET Framework 4.7.2 SDK

Build Steps

  1. Clone the repository:

    git clone https://github.com/yourusername/mimesis-moreplayers.git
    cd mimesis-moreplayers
    
  2. Copy game assemblies to Libs/ folder:

    Libs/
    โ”œโ”€โ”€ Assembly-CSharp.dll      (from MIMESIS_Data/Managed)
    โ”œโ”€โ”€ UnityEngine.dll
    โ”œโ”€โ”€ UnityEngine.CoreModule.dll
    โ”œโ”€โ”€ netstandard.dll
    โ”œโ”€โ”€ MelonLoader.dll          (from MelonLoader/net35)
    โ””โ”€โ”€ 0Harmony.dll
    
  3. Build the project:

  • MSBuild.exe MorePlayers.csproj /p:Configuration=Release
    
    
  1. Output will be in Output/MorePlayers.dll

๐Ÿ“ Changelog

Version 1.0.5 (Current) - UI Crash Fix! ๐Ÿ›ก๏ธ

CRITICAL FIX:

  • [PATCH 11] UI Bounds Checking - Prevents crashes with 5+ players
    • Problem: UI has only 4 slots โ†’ crashes when 5+ players join
    • Solution: Cyclic slot usage - 5th player uses slot 0, 6th uses slot 1, etc.
    • Impact: No more crashes! Game stable with unlimited players
  • Code Cleanup: Removed all commented-out patches, clean code structure
  • All Patches: 11 total (9 core + 3 UI protection)

Version 1.0.5 - Results Screen Fix! ๐ŸŽฏ

CRITICAL FIX:

  • [PATCH 10] โญ DeathMatchPlayerResult Array Expansion
    • Problem: Results screen doesn't show after match with 5+ players
    • Cause: Arrays hardcoded to size 4: new DeathMatchPlayerResult[4]
    • Solution: Expands all result arrays from 4 to 999 slots
    • Impact: Results screen now works with unlimited players!

How it works:

  • Scans all methods working with DeathMatchPlayerResult[]
  • Finds IL code creating arrays: ldc.i4.4; newarr DeathMatchPlayerResult
  • Replaces size 4 with 999 using IL Transpiler
  • Covers: ResultScreen, ScoreBoard, DeathMatch, and all ReluProtocol classes

All Patches (10 total): Network (1-4), Rooms (5, 8), Validation (6, 7), Steam (9), Results (10)

Version 1.0.4 - BREAKTHROUGH! ๐Ÿš€

CRITICAL FIXES based on working mod:

  • [PATCH 7] โญโญ CanEnterChannel() - THE PRIMARY validation method!
    • This is the REAL check that decides if players can join
    • Patches both VWaitingRoom and MaintenanceRoom
  • [PATCH 5 & 8] โญ Set _maxPlayers = 999 in rooms
    • We were missing this critical field!
    • VWaitingRoom and MaintenanceRoom now have correct limit
  • [PATCH 9] โญ Steam Lobby Creation
    • Replaces hardcoded 4 with 999 in SteamInviteDispatcher.CreateLobby()
    • Steam lobby now created with 999 slots

Why This Version Will Work:

  • Found and adapted code from a WORKING BepInEx mod
  • Patches the ACTUAL validation method (CanEnterChannel)
  • Sets the ACTUAL limit field (_maxPlayers)
  • Patches the ACTUAL Steam lobby creation

All Patches (9 total): Network layer (1-4), Room setup (5, 8), Validation (6, 7), Steam (9)

Version 1.0.3

  • CRITICAL FIX: Added patch for VWaitingRoom.GetMemberCount()
  • This was the main blocker preventing 5+ players from joining
  • Improved patch strategy: instead of modifying constants, intercepts the count check
  • Enhanced logging in English for easier debugging
  • Disabled aggressive global scanner that caused crashes
  • All patches: 6 total (5 active + 1 safety disabled)

Version 1.0.2

  • Added patch for VRoomManager.EnterWaitingRoom
  • Enhanced logging system

Version 1.0.1

  • Improved logging (English)
  • Added transpiler patches

Version 1.0.0

  • Initial release

๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

โš ๏ธ Disclaimer

  • This mod is not affiliated with or endorsed by the developers of MIMESIS
  • Use at your own risk
  • Online multiplayer modifications may violate terms of service
  • The mod author is not responsible for any issues, bans, or data loss
  • Always backup your save files before using mods

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Credits

๐Ÿ“ž Support


Enjoy playing with more friends! ๐ŸŽฎ

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.