Zurück zu Mods
Auf Nexus Mods ansehen

Sonstiges
MapMarker
von s0xxxv1
Mark and draw on your map with different colors. Singleplayer and multiplayer support (including mixed lobbies).
Erstellt
18. Apr. 2026
Aktualisiert
25. Apr. 2026
Beschreibung
Diese Beschreibung wird vom Mod-Autor auf Nexus Mods auf Englisch bereitgestellt.
Features
Please don't hesitate to share any thoughts, comments, or concerns :)
Heavily inspired by mapmarks.
HOW TO USE
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
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.
- 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.
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 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.