Skip to content

H7ModEngine 0.2.0 — Online multiplayer is back

Choose a tag to compare

@Whaileee Whaileee released this 06 Nov 22:03
· 5 commits to main since this release
46c2f8a

Heroes VII's Online menu works again. Ubisoft's online services are shut down, so H7ModEngine now ships with
OnlineLobby, a bundled mod that hosts games over the game's own LAN code and lists them in a free community
lobby. Mods also get a networking API.

Install / update

  1. Download dinput8.dll below.
  2. Put it in <Game>\Binaries\Win64\. Replace the old one if you're updating.
  3. Start the game. The engine unpacks its bundled mods (ModManager, DebugConsole, OnlineLobby) into
    <Game>\H7ModEngine\ and keeps your settings.

Every player in a game needs this version. 0.1.x can still browse and join, but can't host on the public lobby,
and shows 0.2.0 games as "Differs".

Online multiplayer

Hosting: Multiplayer → Online → Create, then set up the game as usual.

  • Your PC is the server and other players connect straight to it. No game traffic goes through any server.
  • The mod opens UDP and TCP port 27015 on your router through UPnP and lists the game in the online lobby.
  • Before listing it, the lobby checks that your PC is reachable and really is the one hosting.
  • If something would stop players from reaching you, you get a popup saying what to change: the router port, or
    Windows Firewall.
  • Starting the game or leaving the lobby takes it off the list.

Joining: Multiplayer → Online → Join.

  • The browser lists open games: Host | Map | Players | Version | Status, with the map picture and the game's
    settings (turns, skills).
  • Status is "Compatible", or names what differs from your game: game version, engine version, edition
    (base or modded), community content in CookedPC (by pack and version), or gameplay mods.
  • Joining a game that differs asks first and lists the differences. Mismatched content can make a game go out of
    sync, so join anyway at your own risk.
  • Refresh reloads the list.

Safety:

  • Verified hosts only: the lobby lists a game only after the host's PC answers a check proving it holds that
    game's secret. A listing can't point you at someone else's computer.
  • No downloads: your game no longer downloads packages from a host.
  • No redirects: if a host tries to send your game to a different address, you're disconnected instead (setting
    Block redirects).
  • Limits: the lobby limits how many games and registrations come from one address, and abusive address
    ranges can be banned.

Settings (Mods → OnlineLobby):

  • UPnP: open the ports on your router automatically.
  • Show mismatched games: list games that differ from yours.
  • Block redirects

The lobby address is in H7ModEngine.ini under [Online] LobbyUrl. You can run your own lobby: see
H7Lobby.

If players can't join your game

  • Ports: forward UDP and TCP 27015 to your PC in your router if UPnP is off or unsupported. The popup
    names your PC's local address.
  • Windows Firewall: allow Might & Magic Heroes VII (MMH7Game-Win64-Shipping.exe) for Private and Public
    networks in Windows Defender Firewall → Allow an app through firewall. Windows may ask once the first time
    you host.
  • Shared internet address: some internet providers share one public address between customers, and then
    nobody can reach your PC from outside. Play over a virtual LAN (Tailscale, ZeroTier, Radmin VPN) and use the
    LAN menu instead.
  • H7ModEngine\logs\engine.log says which port the game listens on and what the firewall allows.

For modders

New API (reference: API docs):

  • h7.http.request / get / post / cancel: HTTPS requests on background threads; the callback runs on the game
    thread.
  • h7.json.encode / decode / array / null
  • h7.net.upnp_add / upnp_remove / local_ip: router port mapping and this PC's LAN address.
  • h7.net.udp_ports / firewall_check: the game's open UDP ports and Windows Firewall's verdict.
  • h7.net.set_lan_host: point a server-browser entry at any host, joinable through the game's own join.
  • h7.net.responder_start / responder_stop: the online lobby's host check.
  • h7.crypto.sha256 / hmac_sha256 / random_hex
  • h7.game_content(fn): community content packs in CookedPC with version hashes.
  • h7.version is "0.2.0".

Other changes

  • The engine retries its startup calibration for up to a minute instead of disabling mods when the game loads
    slowly.
  • If your router sends a garbled reply, UPnP retries once.

Known issues

  • A full online match between two PCs has been played in one direction only. In the other direction, joining
    timed out on the host's side; this release adds the checks to diagnose it. Please report problems with both
    players' engine.log.
  • Heroes VII's own multiplayer desync bugs are not fixed yet. docs/DESYNC.md describes the plan.
  • Third-party firewalls and antivirus suites aren't checked; only Windows Defender Firewall is.

H7ModEngine is an unofficial fan project, not affiliated with or endorsed by Ubisoft.

🤖 Generated with Claude Code