IronNest Coop - Multiplayer Mod for IRON NEST: Heavy Turret Simulator
Version 2.2.1
============================================================================

A peer-to-peer co-op mod: play together over Steam. One player hosts
a lobby, the others join with a short lobby code. Up to 5 players.

Requirement: IRON NEST: Heavy Turret Simulator installed via Steam.

IMPORTANT: every player must run the SAME mod version. If someone joins with a
different version, the mod refuses the connection and shows a note in the panel.


============================================================================
  INSTALLATION - choose ONE of the two options
============================================================================

--- Option A: Standalone package (recommended - everything included) ---

This download already contains BepInEx (the mod loader) AND the mod itself.
You do not need to install anything else.

1. Open the game folder:
   In Steam, right-click "IRON NEST" -> Manage -> Browse local files.
   (Typically: <Steam>\steamapps\common\IRON NEST Heavy Turret Simulator\)

2. Copy the COMPLETE contents of this package into that folder.
   Afterwards "winhttp.dll" and the "BepInEx" folder must sit right next to
   "Iron Nest Heavy Turret Simulator.exe".

3. Start the game normally through Steam.
   ON THE FIRST LAUNCH, wait a few minutes: a black console window shows the
   progress while BepInEx generates its files once. After that the game starts
   normally every time.

To uninstall: delete "winhttp.dll" from the game folder (this disables
everything), or additionally delete the "BepInEx" and "dotnet" folders.


--- Option B: DLL only (you already have BepInEx installed) ---

Use this if you already run a working BepInEx setup. This download
contains only the mod itself:  IronNestCoop.Core.dll

Required loader:  BepInEx 6 for IL2CPP (64-bit), a bleeding-edge (BE) build.
                  Built and tested against  6.0.0-be.785.

   - BepInEx 5 does NOT work. BepInEx 5 only supports Mono games; iron nest is a
     Unity IL2CPP game, so a BepInEx 5 install will simply not load this mod.
   - It must be the IL2CPP, win-x64 build of BepInEx 6.
   - Where to get it:
       * Official bleeding-edge builds: builds.bepinex.dev
         (pick "BepInEx-Unity.IL2CPP-win-x64", ideally build 6.0.0-be.785).
       * Or the community build on Nexus (IRON NEST -> "BepInEx 6.0.0").

Install:
1. Make sure BepInEx 6 is installed and has been started at least once, so the
   BepInEx folders already exist in the game directory.
2. Copy "IronNestCoop.Core.dll" into:
       <game folder>\BepInEx\plugins\
3. Start the game. The mod panel appears at the top-left.

To uninstall: delete "IronNestCoop.Core.dll" from BepInEx\plugins\.


============================================================================
  HOW TO PLAY
============================================================================

In-game a small panel appears at the TOP-LEFT ("IronNest Coop v2.2.1").
Everything is done from that panel - there are no hotkeys.

Hosting a lobby:
   1. Click "Create Lobby".
   2. The panel then shows  "ID (Hex): <code>"  - that is your lobby code.
   3. Share that short code with the players who want to join.

Joining a lobby:
   1. Type the host's lobby code into the "Lobby ID (Hex)" field
      (digits 0-9 and letters A-F).
   2. Click "Join ID" (or press Enter).
   3. Once connected you appear in the player list and the panel shows
      "Guest - connected".

As a guest you can move around the menu right away; the game itself takes over
control once a mission starts. To leave, click "Leave Lobby".

Host moderation (host only):
   Next to every other player the host has two buttons:
   - "Kick" = remove the player and block them for THIS lobby session. They can
              rejoin after you create a new lobby.
   - "Ban"  = remove the player and block them PERMANENTLY. The ban is saved to
              BepInEx\config\IronNestCoop_bans.txt and also applies to your
              future lobbies. Delete that file (or the single line) to lift it.


============================================================================
  WHAT IS SYNCHRONISED
============================================================================

Mission:
   - When the HOST starts a mission, every guest loads the same one and spawns
     in. Ending a mission returns everyone to the menu.
   - Join BEFORE the host starts a mission. Joining while a mission is already
     running is NOT supported: it is technically possible, but the late joiner
     will end up with parts of the game state out of sync.

Turret / guns:
   - Aiming (rotation + elevation) both ways; levers and handles move along.
   - Station actions: change magazine, load shell, powder charges, reload lever.
   - Firing is host-authoritative: the host distributes the exact firing values
     (angle, elevation, charge, shell) so impacts are identical for everyone.
   - Doors, firing stand and hatches are synchronised.
   - Paint applied to a shell before loading is shown to the other players.

Artillery computer / clipboard:
   - Calculated fire-mission cards appear for ALL players with identical data
     (distance, bearing, elevation, charge, shell, target-type image).
   - Any player can calculate cards; checking a card off is synchronised
     (deleting is intentionally not).

Supply console:
   - Ammunition (per gun, left/right), powder charges and requisition points.
   - Repositioning the Iron Nest; reconnaissance plane.
   - Purchases take effect for everyone, no matter who buys.

Players:
   - Soldier avatar (steel helmet + gas mask) with a name tag.
   - Up to 5 players per lobby.


============================================================================
  WHAT IS NOT SYNCHRONISED (on purpose)
============================================================================

   - Music is intentionally NOT synced, so each player can decide for
     themselves whether they want to listen to music or not.
   - Drawings and markings on the map table are NOT synced, so everyone can
     work undisturbed. Only the 3D map pieces are synced, so all players refer
     to the same target numbers.
   - On the artillery computer, only the generated cards are synced (not the
     inputs), so several players can work at the same time, independently of
     one another.


============================================================================
  KNOWN LIMITATIONS
============================================================================

   - The typewriter texts from "High Command" and "Field Reports" are sent by
     the host, so they appear in the host's language for every player.


============================================================================
  THIRD-PARTY CREDITS
============================================================================

The standalone package includes BepInEx (https://github.com/BepInEx/BepInEx),
licensed under the GNU Lesser General Public License v2.1 (LGPL-2.1).
BepInEx is not modified. Source code is available at the link above.


Have fun, and see you on the turret!
