Mods / Global Player Map Markers

Tags: #Utility
Author: sSasha
Side: Both
Created: May 28th at 5:11 AM
Last modified: May 30th at 11:19 AM
Downloads: 7503
Follow Unfollow 74

Latest release (for Vintage Story 1.20.11, outdated):
globalplayermapmarker_1.2.1.zip  1-click install


Description:

 

In Vintage Story, player markers on the map disappear after a certain distance. This isn't an intentional design choice of the map, and is instead a consequence of server optimization. The server only sends entity data to clients that are within a certain distance of one another, and vanilla map markers rely on an active entity to apply the correct position and rotation data to the map marker.

 

This mod fixes this issue by tracking the position and rotation of every active client on the server and sending it to each client periodically. This packet is an array of 62 byte elements, with one element for each online player. This packet is only sent once every second, so shouldn't cause any lag.

 

When the map attempts to render a map marker for a player who has an unloaded entity, this mod renders its own custom map marker instead. This map marker utilizes a dummy entity built with the position and rotation information sent by the server, so it has all the features of a regular player map marker.

 

Due to the infrequent communication interval, the map marker itself only updates once every second. This is done for optimization purposes, as you don't really need to know the exact position and rotation of someone 5000 blocks away from you, and instead just want to know their general location.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.2.1 globalplayermapmarker 6955 May 30th at 11:19 AM globalplayermapmarker_1.2.1.zip 1-click install

Fix remote player names not showing up because I accidentally removed the code and forgot to add it back in.

1.2.0 globalplayermapmarker 45 May 30th at 10:33 AM globalplayermapmarker_1.2.0.zip 1-click install

Fixed map markers not automatically switching between one another when players move in/out of range, requiring the client to open and close the map to update them.

Fixed server crash when a player leaves due to their map component not being disposed.

Fixed map markers not automatically appearing when a player joins, requiring the client to open and close the map to update them.

Fixed map markers not automatically disappearing when a player leaves, requiring the client to open and close the map to update them.

Some other fixes that I probably forgot (im tired)

1.2.0-pre.2 globalplayermapmarker 28 May 30th at 9:46 AM globalplayermapmarker_1.2.0-pre.2.zip 1-click install

Mod rewrite. No longer crashes when player leaves server. Players markers swap between modded and vanilla automatically.

1.2.0-pre.1 globalplayermapmarker 34 May 29th at 6:57 AM globalplayermapmarker_1.2.0-pre.1.zip 1-click install

Attempt at fixing the map markers not transitioning between one another until you open and close the map.

1.1.0 globalplayermapmarker 348 May 28th at 6:03 PM globalplayermapmarker_1.1.0.zip 1-click install

Reduced packet size by changing the network packet from a List of ProtoContract classes to an Array of ProtoContract structs.

Map markers for distant players should now display their username.

1.0.0 globalplayermapmarker 93 May 28th at 5:12 AM globalplayermapmarker_1.0.0.zip 1-click install

Initial release.


13 Comments (oldest first | newest first)

💬 Valkyrja, Oct 19th at 3:35 PM

Is there a way to change the color of the marker?

💬 Rhyagelle, Sep 2nd at 12:04 PM

Hello! It seems to be working just fine! Thank you for sharing the mod with us! :)

💬 sSasha , Sep 1st at 5:26 AM

Rhyagelle
I have not tested on the official v1.21.0 release, however, I did test it on the beta pre-release and it worked fine. Feel free to let me know if you run into any issues!

💬 Rhyagelle, Aug 30th at 1:26 AM

Does this work on v1.21.0?

💬 SaturnSky, Jun 2nd at 9:44 PM

LOVE this, thank you!

💬 sSasha , May 30th at 10:33 AM

v1.2.0 has been released which should fix all known issues with the mod. Enjoy! If you find any others, let me know.

💬 sSasha , May 30th at 4:10 AM

F0x06

Thanks for testing the pre-release!

 

It looks like my custom map component isn't being properly disposed of when a player disconnects. I'm currently in the middle of rewriting the mod to fix all of the issues. Feel free to move back to the stable release or stay on pre-release, it's up to you.

💬 F0x06, May 29th at 10:19 PM

Hi, my game crashed when my friend disconnected from the server

 

Game Version: v1.20.11 (Stable)
29.05.2025 23:08:47: Critical error occurred in the following mod: globalplayermapmarker@1.2.0-pre.1
Loaded Mods: aculinaryartillery@1.2.5, chiseltools@1.14.18, bovinae@0.2.4, capreolinae@1.2.9, manidae@1.0.16, vombatidae@0.4.2, hangingoillamps@1.0.3, harvestice@1.0.0, millwright@1.2.1, plainsandvalleys@1.0.11, prospecttogether@2.0.3, resinlogextract@1.0.0, sortablestorage@2.3.1, temporal_gears_stack@1.0.0, game@1.20.11, animalcages@3.2.2, egocaribautomapmarkers@4.0.2, betterfirepit@1.1.6, carryon@1.8.0, commonlib@2.6.1, cooperativecombatrework@1.0.0, danatweaks@3.4.1, expandedfoods@1.7.4, firewoodtosticks@1.0.0, foodshelves@2.1.1, fromgoldencombs@1.8.12, globalplayermapmarker@1.2.0-pre.1, improvedhandbookrecipes@1.1.3, inworldroofing@2.1.0, moreanimals@1.4.1, petai@3.4.3, spawnhighlight@1.2.0, statushudcont@3.2.6, tabletopgames@2.10.4, creative@1.20.11, survival@1.20.11, cats@3.2.0, extraoverlays@1.5.0, playercorpse@1.11.1, stonequarry@3.4.3, wolftaming@3.0.6
System.Collections.Generic.KeyNotFoundException: The given key 'WEFKQ9uXwLihFt3upSqlR8Q+' was not present in the dictionary.
at GlobalPlayerMapMarker.RemotePlayerMapComponent.Render(GuiElementMap map, Single dt) in C:\Users\User\Documents\Programming\vintagestory\GlobalPlayerMapMarker\GlobalPlayerMapMarker\RemovePlayerMapComponent.cs:line 28
at GlobalPlayerMapMarker.GlobalPlayerMapLayer.Render(GuiElementMap mapElem, Single dt) in C:\Users\User\Documents\Programming\vintagestory\GlobalPlayerMapMarker\GlobalPlayerMapMarker\GlobalPlayerMapLayer.cs:line 162
at Vintagestory.GameContent.GuiElementMap.RenderInteractiveElements(Single deltaTime) in VSEssentials\Systems\WorldMap\GuiElementMap.cs:line 62
at Vintagestory.API.Client.GuiComposer.Render(Single deltaTime) in VintagestoryApi\Client\UI\GuiComposer.cs:line 718
at Vintagestory.API.Client.GuiDialog.OnRenderGUI(Single deltaTime) in VintagestoryApi\Client\UI\Dialog\GuiDialog.cs:line 398
at Vintagestory.GameContent.GuiDialogWorldMap.OnRenderGUI(Single deltaTime) in VSEssentials\Systems\WorldMap\GuiDialogWorldMap.cs:line 352
at Vintagestory.Client.NoObf.GuiManager.OnRenderFrameGUI(Single deltaTime) in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 318
at Vintagestory.Client.NoObf.ClientEventManager.TriggerRenderStage(EnumRenderStage stage, Single dt) in VintagestoryLib\Client\Util\ClientEventManager.cs:line 188
at Vintagestory.Client.NoObf.ClientMain.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 996
at Vintagestory.Client.GuiScreenRunningGame.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 242
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 695
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 670
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 334
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 130
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

💬 Ensorcelled, May 29th at 9:34 AM

Thank you for your time and answer. Looks like I have another mod to incorporate into my server. Nice.

💬 sSasha , May 29th at 2:51 AM

Ensorcelled

Yes. The map markers from this mod inherit the vanilla player map marker class, so they should always have the same functionality. This also means that if a mod changes how the vanilla player map markers work, the map markers from this mod should also reflect those changes.

💬 Ensorcelled, May 28th at 8:54 PM

Does this show player marker direction on mini map like regular ranged map markers?
If not, could it?

💬 tRead, May 28th at 5:27 PM

Thanks!  People ask for this all the time.

💬 sSasha , May 28th at 10:24 AM

Few issues I've identified so far:

   Player names on the mod's map markers don't work, simply showing as 'Player'. I tried feeding the player UID to the marker in the hopes of fixing that, but it didn't work. Will have to investigate. Fixed in v1.1.0

   When you come back in range of a player the vanilla map markers are not reinitialized until you open and close your map, likely due to a marker with the same UID already existing. Fixed in V1.2.0

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом