返回模组列表
MapMarker
其他

MapMarker

作者:s0xxxv1

Mark and draw on your map with different colors. Singleplayer and multiplayer support (including mixed lobbies).

创建时间

2026年4月18日

更新时间

2026年4月25日

在 Nexus Mods 查看

详情介绍

此模组描述由作者在 Nexus Mods 上以英文提供。
Features
  • Mark map nodes with different colors.
  • Draw on the map with different colors.
  • Automatically mark nodes with pre-configured colors (Toggle).
  • Hide drawings on top of nodes (Toggle).
  • Unmark map nodes after visiting (Toggle).
  • Singleplayer support.
  • Multiplayer support w/ fallback for peers w/o MapMarker.
Multiplayer support includes lobbies containing both players with and without the mod. This mod, as far as I know, is the first that can send custom packets in a mixed lobby. If you're interested in how, check out the Nerd Stuff section!

Please don't hesitate to share any thoughts, comments, or concerns :)
Heavily inspired by mapmarks.

HOW TO USE
  • (Drag) Right-Click          ----> Mark/Recolor
  • (Drag) Double-Right-Click   ----> UnMark
  • Left-Click on Color Palette ----> Select Color
  • Press 'c'                   ----> Cycle Color
The color palette is on the map legend under the word 'Legend'.
The toggles for various settings are under ModConfig settings.

HOW TO INSTALL

Optional dependency for mod settings: ModConfig

Download MapMarker.zip
Extract the contents and move the MapMarker folder to -
    'C:\Program Files (x86)\Steam\steamapps\common\Slay the Spire 2\mods'
    [If you don't have a 'mods' folder, create one]

This what your directory should now look like:
- Slay the Spire 2
|   - mods
|   |   - MapMarker
|   |   |   - MapMarker.dll
|   |   |   - MapMarker.json
|   |   - ...
|   - ...

TODO

  • Remove mixed lobby support if it's too unreliable or if most users don't have a use for it.
  • Remove or rework drawing with colors if most users don't have a use for it.


NERD STUFF 

STS2's multiplayer serialization builds a type-ID table by enumerating the 49 hardcoded INetMessageSubtypes, then appending any mod-added INetMessage classes found via ReflectionHelper.GetSubtypesInMods<INetMessage>(). Both peers must have identical tables or deserialization breaks, so registering a custom message type crashes or desyncs lobbies where only some players have the mod. To solve this, we use steganography inside the existing MapDrawingMessage. We pack mark data into the quantized X/Y position fields of NetMapDrawingEvent structs preceded by a BeginLine at an off-screen position. On the receiving side, a Harmony prefix on NMapDrawings.HandleDrawingMessage checks if the first event matches that off-screen position; if so, it decodes the payload, routes it to RemoteMarkCoordinator, and returns false so no Line2D is created. Vanilla clients without the mod simply render an invisible line segment off-screen. This gives us a reliable mod-to-mod data channel for presence handshakes, mark paint/erase deltas, and more, all without touching the message registry.

I'm deliberately not abstracting the MapDrawingMessage byte-packing into a reusable library. As is, MapMarker's network footprint is pretty tiny; it only sends a couple sync frames when you mark/unmark a node, change color, or open the map. A typical act produces maybe 50 packets total. But an order of magnitude more packets from multiple mods could cause issues, especially for vanilla clients who have no choice in what they receive from the mods. It would be great to see MegaCrit add official support for mod-to-mod communication.