Mods / LiveMap

Category: #Other #QoL #Utility
Author: BillyGalbreath
Side: Server
Created: Mar 15th at 12:31 AM
Last modified: May 30th at 6:09 PM
Downloads: 917
Follow Unfollow 65

Latest file for Various v1.19.x:
livemap-0.0.9.zip 1-click install


Warning!

 

This is a work in progress mod. It is far from being ready. I'm posting it up now so I can get some early feedback.

This is not released. It's not in beta, or even alpha. This is extremely early dev access for testing only.

 

-------------------------------------------------------------------------------------------------------------

 

Check out my server's map for a live example at https://vs.pl3x.net/map/

 

-------------------------------------------------------------------------------------------------------------

 

Installation:

  • drop the "livemap.zip" into your "Mods" directory
    • or any other directory you set your server up to load mods from
  • start (or restart) your server
    • pay attention to any errors that may happen on startup. most common one is port already in use.
  • examine and edit the "livemap.json" config file in your "ModConfig" directory
    • saving the file will cause the mod to automagically reload with the new values
  • an admin must run the colormap command at least once from their client
    • /livemap colormap
    • the admin must have LiveMap installed on their client for this to work!
  • an admin can now do a fullrender using the server command from the client or server
    • /livemap fullrender
    • this will queue up all your world's generated regions for the renderer.
  • wait... no really, this might take awhile depending on how big your world is
    • note: a fullrender may lag your server a bit while it's in progress if you dont have many available cpu cores/threads. this is only temporary lag and will end when the fullrender finishes
    • you can use the "/livemap status" command to view the current state of the renderers
  • after this is all done the map will automatically re-render regions that have changed when the world saves
    • these auto renders are quick and should not cause any noticable lag (if any at all)
  • the map will be viewable at your server's url/ip at the port you specified in the config
    • you can setup your own reverse proxy to remove the port or add https support

 

-------------------------------------------------------------------------------------------------------------

 

Commands:

Note: All commands (except the first one for the url) require the `root` privilege (aka, op/admin).

  • /livemap
    • Get a link to the livemap
  • /livemap apothemrender <apothem> [center]
    • Queue up generated regions in range around a position/player for renderer. This does not generate new land
    • Aliases:
      • /livemap rangerender <apothem> [center]
      • /livemap radiusrender <apothem> [center]
    • Arguments:
      • <apothem> the range (in blocks) to render
      • [center] the center position (local coordinates)
  • /livemap colormap
    • Sends a request to your client to generate a new colormap. This requires LiveMap mod to also be installed on your client. Your client will generate a new colormap and then send it back to the server
  • /livemap fullrender
    • Queue up all generated regions in the entire world for renderer. This does not generate new land
  • /livemap status
    • View current renderer status
    • Aliases:
      • /livemap progress
  • /livemap reload
    • Reload the mod configuration from disk

 

-------------------------------------------------------------------------------------------------------------

 

F.A.Q.

  • Why is my map blank? I only see a blue background.
    • The map can only show regions that have been rendered. Regions only get rendered when they are saved. Run a fullrender to render all the world's regions that have been generated.
    • If you still don't see any tiles generating, then you likely forgot to generate a colormap. Do this first before running the fullrender.
  • I only see a small part of the world. There are holes or missing chunks in the map!
    • The map cannot render chunks that do not exist. Try the "/wgen pregen" command to generate more chunks, or have your players explore the world more.
  • The mod is erroring/crashing on startup. Please Halp!
    • This could be for a number of reasons. Check your server log to find out more information. The most common possible issues are:
      • The port you configured is already in use. Just pick another, or free up the port before use.
      • The port you picked is a reserved port (1-1024). You will need elevated permissions to use these ports, which is highly discouraged (for security reasons). Instead, use a higher port and setup a reverse proxy to route to a lower one.
      • Your OS has overly sensitive security restrictions (looking at you, Windows Server) and requires _any_ port usage to have elevated permissions. See previous bullet for recommendations.
  • Why not use HTTPS mode?
    • It isn't as easy as just flipping a switch. HTTPS mode requires additional setup of an SSL certificate, and it is not a trivial task. For those that know what they are doing, there is always the option for external web server or a reverse proxy where you can setup your own SSL certs and use HTTPS mode.
  • What about feature X or issue Y or suggestion Z?
    • This mod is still in the very early stages of development, so nothing is certain yet. Just give me some time ^_^

 

-------------------------------------------------------------------------------------------------------------

 

Dev builds can be obtained on my Jenkins CI server

https://ci.pl3x.net/job/VS-LiveMap/

 

API and other information can be found on the Github hosted wiki

https://github.com/BillyGalbreath/VS-LiveMap/wiki

 

Report bugs and issues to the Github hosted issue tracker

https://github.com/BillyGalbreath/VS-LiveMap/issues

 

If you would like to support me, every little bit helps

https://github.com/sponsors/billygalbreath

https://patreon.com/billygalbreath

https://ko-fi.com/billygalbreath

 

-------------------------------------------------------------------------------------------------------------

 

Todo

  • easier installation and setup
  • built-in renderers:
    • basic
    • sepia
  • addon renderers:
    • prospecting chunks
    • temporal stability heatmap
  • renderer picker
  • customizable sepia colors
  • lots of zoom levels
  • better snow ignoring
  • option to slow render process down for weak/limited servers
  • built-in markers
    • players
    • spawn
    • claims
    • translocators
    • traders
  • custom markers
    • json api
    • c# api
    • commands
    • signs
    • meta blocks (maybe?)
  • render progress
    • server side output
    • client side hud element
    • command output on demand status
  • click player in sidebar to follow them on map
  • player current/max count in sidebar
  • show/hide players (via command, spectator mode, underground, etc)
  • friendly urls
  • css themes
    • theme picker
  • context menu
    • center on point
    • copy/paste coordinates
    • share location
    • go to spawn
    • go to coordinates

 

-------------------------------------------------------------------------------------------------------------

 

Remember, I build these mods for myself and my family. Not you. I owe you nothing. I just like sharing what I've built with others for free. You will receive minimal to no support when using any of my mods.

 

-------------------------------------------------------------------------------------------------------------

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v0.0.9 332 May 30th at 6:09 PM Show livemap-0.0.9.zip Install now
v0.0.8 71 May 27th at 8:58 PM Show livemap-0.0.8.zip Install now

21 Comments (oldest first | newest first)

💬 Murples, Jul 1st at 8:40 PM

sooooo i'm probably being extremely stupid but i am completely stumped, i've gotten everything to work and can access the website but i cannot get the /livemap colormap command to do anything, and as a result can't use fullrender to actually see the livemap, just have the blank blue background, it'd be massively helpful if i could get some help w/ this


EDIT: NEVERMIND I WAS RIGHT I AM JUST AN IDIOT IT WORKS NOW

 

💬 John2022FR, Jun 27th at 1:42 PM

What is that exemple world seed please?

💬 DUCATISLO, May 30th at 6:43 PM

based

💬 Ovadex, May 23rd at 4:08 AM

Decided to try one of the dev builds after all. Just having trouble figureing out how to get the map to render. As you mentioned the instructions are different now but I haven't been able to deduce them lol

Whenever you've got a moment. :)

 

(edit)
Nevermind. I didn't think to check the configlib menu and found the colormap generate option.

💬 Ovadex, May 16th at 8:50 AM

No problem BillyGalbreath

I'll probably just cruise with the current version till you have the next one cooked up. As is it's really helpful for searching the map for things to investigate. Much faster than the in game map. :)

💬 BillyGalbreathAuthor, May 16th at 7:38 AM

Sorry about that Ovadex,

The released version on this site doesnt contain the player markers yet. You can get dev builds from https://ci.pl3x.net/job/VS-LiveMap/ but the installation instructions are very different than what's posted here (it's actually easier now).

Hopefully soon I'll have the newer stuff cleaned up enough for another test build/release and I'll update the docs to reflect the changes.

💬 Ovadex, May 16th at 12:34 AM

Really awesome work!  I'm having trouble getting player markers working. There are no layers on the map and while trying to figure out what to put in players.json I'm drawing a bit of a blank. There's nothing on the wiki about what's needed so if anyone has had better luck than I, I'd greatly appreciate any help.

💬 Retroficient, May 12th at 3:19 AM

BillyGalbreath 

So I'm getting this error block when loading the mod on my server. 

11.5.2024 20:14:19 [Error] [livemap] An exception was thrown when trying to load assembly:
11.5.2024 20:14:19 [Error] [livemap] Exception: Assembly with same name is already loaded
at System.Runtime.Loader.AssemblyLoadContext.<LoadFromPath>g____PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16* ilPath, UInt16* niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Vintagestory.Common.ModAssemblyLoader.LoadFrom(String path) in VintagestoryLib\Common\API\ModAssemblyLoader.cs:line 34
at Vintagestory.Common.ModContainer.<>c__DisplayClass36_0.<LoadAssembly>b__0(String path) in VintagestoryLib\Common\API\ModContainer.cs:line 455
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
at Vintagestory.Common.ModContainer.LoadAssembly(ModCompilationContext compilationContext, ModAssemblyLoader loader) in VintagestoryLib\Common\API\ModContainer.cs:line 454

No current livemap.yml file is being generated. Unable to do any commands in game.

💬 Carolusclen, Apr 17th at 9:23 AM

hey, me again, I noticed a cool feature of your map mod.

if you pregen the map using /wgen pregen [radius]

your map mod will actually gen those chunks even though they have not been visited. this is really cool :D

💬 Carolusclen, Apr 15th at 12:25 PM

😂so get this
I created a powershell script with an interface to create markers
the script saves the marker file it creates to a google drive share
my server has a scheduled task that runs every so often and copies the marker files to the location in the map and modifies the settings file to account for the name hahaha
so now my friends can add markers to the map 🤣

💬 Carolusclen, Apr 15th at 7:17 AM

So apparently I am not good at reading -.-
I see you have a wiki link, will look at that :D
ignore me

💬 Carolusclen, Apr 15th at 7:16 AM

I noticed that you might add markers to the map at some point
however I did see in the config file you had me look at that there is a marker section
is it at all possible to add markers manually or is that whole function not availble?
I noticed on your server map you had a little house icon for the spawn point :P

💬 Carolusclen, Apr 15th at 1:59 AM

BillyGalbreath
That worked. the modifying the x,y values for the map :D
and also, I was so use to games adding firewall entries automatically when they prompt for the changes to be made that I didnt realise this isnt an app, its a mod haha.
After actually adding the new ports into my firewall, it all worked. see..... knew it was something dumb I did..... or didnt do in this case haha.

But yeah, after adjusting the values, its all working perfectly now :D
If I come across anything else weird, ill let you know. keep it up, I love Dynmap for minecraft and this is that for VS <3

💬 BillyGalbreathAuthor, Apr 14th at 9:29 PM

Hey Carolusclen! I'm glad you decided to give this mod a try in such early stages of development ^_^

The first thing you listed is out of my control. This mod can only start a service, it can't guarantee that service can be reached. That part is on you. ;)

As for the second, the blue is the expected background color of the map (I changed it to blue because I find it much better than just black or grey). If after doing a fullrender you still dont see your tiles, it is likely because your world size is something non-default. Since this mod is in such early stages of development, I have not got around to programming such features yet. All is not lost, though! \o/ There is a file you can hand edit to set any customizations you have made to your world, such as the size and spawn points. This is where I have set the default values that the map uses. You just have to edit them to your own values to match your world.

ModData/_world-id_/LiveMap/web/data/settings.json

Be careful what parts of this file you edit. It was not designed to be hand edited, but I also haven't got around to programming the part of the mod that creates/updates this file for you.

Size should match your world size that you set when you created your world. Spawn will look a bit weird, and that's because it uses absolute positions. Normally players will never see these absolute positions, and instead see a relative position where spawn is always 0,0. This is that setting that tells the map where your spawn actually is so it knows where to set 0,0 at.

After you set these two things you should be able to see the tiles in the browser as expected.

In the future the mod will take care of all this for you. I'm sorry I haven't got around to doing that part yet. I know its a super important part to making this mod usable.

💬 Carolusclen, Apr 14th at 8:27 AM

hey, amazing idea and I will really like to get this to work.

I have followed everything, and it creates all the needed files and such.
the part I am stuck on is a few things

1) portforward does not want to work for some reason, but localhost on the server works fine. (I will deal with this but thought Id mention it) could be something stupid I have done
2) when I go to the page, its not black like someone else mentioned. its a weird dark blue color. textured color.
although the map has finished generating and I have done it a few times, the map itself does not want to load the terrain.
I have also set up a different web server (wamp) and that does the same thing, page loads the blue textured background with no terrain.

is this something I am doing wrong? any ideas?

Thanks for the mod and help when\if you have a chance :D

💬 BillyGalbreathAuthor, Apr 8th at 3:17 PM

IAmJade

Everything should be working fine for you. Unfortunately, the security concerns for some operating systems is outside the scope of this project. There are many workarounds for it, such as running VS in admin mode, or allowing the url in netsh, etc. My recommendation for anyone experiencing issues with the built in web server if to run their own 3rd party server, like Apache, Nginx, or Caddy. The built in web server is really only provided as a convenience for those that it is able to work for. My personal setup is running the built in web server on Linux os, so there were no security concerns there. I also have an Apache server running in front of it, which is allowing me to reverse proxy a secure HTTPS address on port 443 to the private HTTP port of the built in server. You honestly don't even need to run the built in web server, which is hy there is an option to turn it off in the config. All you have to do is point your 3rd party web server to the web directory the mod installed. This sounds like the best option for you since you are using Windows os. I hope to have some instructions and examples about all this up on the wiki eventually.

As for the black screen, this is normal until you have fully run a fullrender on the world. The data to make the map is rather heavy to process, so it doesnt do the whole thing on it's own. Depending on your map size it could take a few seconds up to a few hours. To give you an idea, my server linked above does a fullrender in about 20 minutes. Currently there is no output to the console/log/game about the progress of the fullrender, other than some debug output which you can enable in the livemap.yml config file.

💬 Jade1, Apr 8th at 2:28 AM

Line 44 in webserver.cs - doesn't that need to allow for localhost and a secure domain? Like I think need to add https too in case someone runs it on a public secure domain? Anyway, atm, I'm trying to get Windows 10 firewall to allow this to execute and this line is the failure point in SP mode. FWIW, this discusses the pain point https://stackoverflow.com/questions/4019466/httplistener-access-denied/

Following the suggestion in the SO post, when I run VS game in admin mode after having opened port localhost:8080 a map interface appears. However, all I see is a blank (black) map that says Vintage Story LiveMap in the bottom right. Unfortunately, the map isn't updating or getting populated with data from the game instance.

I wish you well with this endeavor. It will be a fun tool once it is all working. :)

💬 LittleJoe, Apr 2nd at 9:15 PM

Very excited to see where this goes! I started looking into making a map site with leaflet, but imho, interfacing with the game is the harder part and is a bit too complicated for my current understanding of C#, lol... 

💬 Ernie, Apr 1st at 4:21 PM

Wow that looks amazing!  Can't wait to try it.

💬 RogueRaiden, Mar 31st at 3:26 PM

heck yeah, dude

💬 MadGnome, Mar 31st at 2:00 PM

Billy, this looks amazing man!  Watching your progress with this very eagerly

(edit comment delete)