LustyMap

In-game map and minimap GUI

Total Downloads: 48,870 - First Release: Sep 8, 2015 - Last Update: Dec 29, 2017

5/5, 163 likes
  1. yes i have the same now and its not work. here is the log :(

    it is possible that the permissions on the ftp storage not correct?

    the log is now:

    Code:
    [LustyMap] Error whilst retrieving the map image from file storage: An exception was thrown by the type initializer for System.Drawing.GDIPlus
    If you are running linux you must install LibGDIPlus using the following line: "sudo apt install libgdiplus", then restart your system for the changes to take affect
    [LustyMap] [Error] Unable to load the map image from file storage. This may be caused by slow processing of the images being uploaded to your server. Wait for 5 minutes and reload the plugin.
    If this problem persists after multiple attempts then unload the plugin and delete your ImageData.json data file or run the 'resetmap' command
    [LustyMap] Error whilst retrieving the map image from file storage: An exception was thrown by the type initializer for System.Drawing.GDIPlus
    If you are running linux you must install LibGDIPlus using the following line: "sudo apt install libgdiplus", then restart your system for the changes to take affect
    [LustyMap] [Error] Unable to load the map image from file storage. This may be caused by slow processing of the images being uploaded to your server. Wait for 5 minutes and reload the plugin.
    If this problem persists after multiple attempts then unload the plugin and delete your ImageData.json data file or run the 'resetmap' command
    [LustyMap] Error whilst retrieving the map image from file storage: An exception was thrown by the type initializer for System.Drawing.GDIPlus
    If you are running linux you must install LibGDIPlus using the following line: "sudo apt install libgdiplus", then restart your system for the changes to take affect
    [LustyMap] [Error] Unable to load the map image from file storage. This may be caused by slow processing of the images being uploaded to your server. Wait for 5 minutes and reload the plugin.
    If this problem persists after multiple attempts then unload the plugin and delete your ImageData.json data file or run the 'resetmap' command
    [LustyMap] [Warning] Generating the main map
    [LustyMap] [Warning] Main map generated successfully!
    [LustyMap] [Warning] Generating the mini-map
    [LustyMap] [Warning] Mini map generated successfully!
    and the config is now:

    Code:
    {
      "Friend Options": {
        "Allow custom friend lists from other plugins": true,
        "Enable clans support": true,
        "Enable friends support": true
      },
      "Map - Complex Options": {
        "Enable the complex map": true,
        "Force complex zoom mode": false,
        "Forced zoom number (1, 2 or 3)": 1
      },
      "Map - Main Options": {
        "Enable AFK tracking": true,
        "Hide event players": true,
        "Map image options": {
          "Beancan.io API key (if applicable)": "",
          "Custom map filename": "map",
          "Use custom map": true
        },
        "Map update time (seconds)": 1.0,
        "Open map on for player's when they connect": true,
        "Show map compass": true
      },
      "Map - Mini Options": {
        "Enable the minimap": true,
        "Minimap docked on the left side of the screen": true,
        "Minimap horizontal scale": 1.0,
        "Minimap offset from side of the screen": 0.0,
        "Minimap offset from top of the screen": 0.0,
        "Minimap vertical scale": 1.0
      },
      "Marker Options": {
        "Show all players": false,
        "Show cars (un-occupied only)": true,
        "Show caves": false,
        "Show debris": false,
        "Show friends and clanmates": true,
        "Show helicopters": true,
        "Show marker names": true,
        "Show monuments": true,
        "Show planes": true,
        "Show self": true,
        "Show supply drops": true,
        "Show tanks": true,
        "Show vending machines (public broadcast only)": true
      },
      "Spam Options": {
        "Allowed time between map changes": 3,
        "Amount of time a users map will be disabled": 120,
        "Attempts before disabling the users map": 10,
        "Attempts before warning the user they are spamming": 5,
        "Enable spam monitoring": true
      }
    }
     

    Attached Files:

  2. I'm not sure sorry what i told you is just what i did to fix it
     
  3. Hi I am having a issue getting the map to work on Linux
    i already have libgdiplus installed and have restarted the system but it still gives the error

    (13:56:52) | [LustyMap] [Warning] Map generation successful! Downloading map image to file storage. Please wait!

    (13:56:52) | [LustyMap] Error whilst retrieving the map image from file storage: An exception was thrown by the type initializer for System.Drawing.GDIPlus

    If you are running linux you must install LibGDIPlus using the following line: "sudo apt install libgdiplus", then restart your system for the changes to take affect

    (13:56:52) | ExType: TypeInitializationException

    (13:56:52) | Web request callback raised an exception (DllNotFoundException: gdiplus.dll)

    at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)

    at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0

    (13:56:52) | Image batch (LustyMap) has been stored successfully

    This is what it says if i try to install libgdiplus again. I am using yum not apt

    root@server /home/rust$ yum install libgdiplus 127 ↵
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base: ftp.usf.edu
    * epel: mirror.cogentco.com
    * extras: mirror.jax.hugeserver.com
    * remi: mirror.team-cymru.org
    * remi-php56: mirror.team-cymru.org
    * remi-safe: mirror.team-cymru.org
    * updates: repos.mia.quadranet.com
    Package libgdiplus-2.10-9.el7.x86_64 already installed and latest version
    Nothing to do


    Thanks!
     
  4. INFO FOR CentOS7 users !
    Installing the "LibGDIPlus"
    ** Linux Users ** The map splitter requires LibGDIPlus to be installed on your system.
    For Ubuntu users ->
    Code:
    sudo apt install libgdiplus
    Here is how to do this with CentOs 7 / Should work with RHEL too.
    1. You have to have epel-release installed.
      Code:
      sudo yum install epel-release
    2. When you have epel installed install "libgdiplus-devel"
      Code:
      sudo yum install libgdiplus-devel
    3. After installing the "libgdiplus-devel" you have to make symbolic link to fix the issue with library missing / having wrong file name for file "libpcre.so.3" binary file, Which make is unable to work.
      Make this symbolic link ( basicly we just fake the name for libpcre.so to be libpcre.so.3, We use sysmolic link so that this does not effect the other system. )
      Code:
      sudo ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
    4. reboot your system is possible, not sure if it works with out the reboot, ofc you can try, but if it's possible to reboot do
      Code:
      reboot
      /
      Code:
      sudo reboot
    Hope this helps CentOS7 users.
    I had issues by my self, but i toot some time and find way to fix the issue.

    Enjoy - Vis25 -
     
    Last edited by a moderator: Jan 30, 2018
  5. Is there anyway to make complexmode work?
     
  6. how to remove the position which shows under Lustymap?
     
  7. Hi,

    I also found out that map only works if you force the zoom lvl to stay at max out ( maybe it was lvl 3 ? ).
    ( You complexmode is enabled and users are free to choose zoom lvl, map does not render ( maybe LustyMap does not have the image, i havent had the time to find out the issue yet. ) but map works at max zoom out. ).

    Are you using CentOs 7 ?

    I try to resolve the issue when I have time, maybe to morrow.
    Best regards,
    _-Vili-_
    [DOUBLEPOST=1517298614][/DOUBLEPOST]
    Hi sir, read my post.
    If you are not on CentOs 7 you have to check if my solution works, but even if your not running CentOS you probably have the same issue, but I can't be 100% sure if my symbolic link file names are same for you.
    Directory "lib", and also be "lib32" in some systems, i have not used fedora for long time so can't say, but in RedHat it should be named lib.
    I mean the symbolic link creating ->
    Code:
    sudo ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
    Maybe give it try, it fixed my issue, but still i have only been able to make map work when it's max zoomed out.
    Let me know it it helped you.
    Let me know what OS are you running CentOS, RedHat or Fedora ?

    Here is my post ->
    Best regards,
    _-Vis-_
    Finland
     

  8. Hey thanks for your help. Did what you said and it no longer says its not installed but gives a new error.
    and i am on CentOs7.

    Thanks.

    (11:48:16) | [LustyMap] Map reset Confirmed! Creating a new image load order with ImageLibrary

    (11:48:16) | [LustyMap] [Warning] Icon images have not been found. Uploading images to file storage

    (11:48:16) | [LustyMap] [Warning] Attempting to contact beancan.io to download your map image!

    (11:48:16) | [ImageLibrary] Starting order LustyMap

    (11:48:17) | [LustyMap] [Warning] Map generation successful! Downloading map image to file storage. Please wait!

    (11:48:17) | [LustyMap] [Warning] Attempting to split and store the complex mini-map. This may take a while, please wait!

    (11:48:17) | [LustyMap] [Warning] Starting complex map split (6x). Please wait!

    (11:48:17) | Web request callback raised an exception (ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter])

    at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0

    at System.Drawing.Bitmap.SetResolution (Single xDpi, Single yDpi) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:SetResolution (single,single)

    at Oxide.Plugins.LustyMap+MapSplitter.ResizeImage (System.Drawing.Image image, Int32 pixels) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap+MapSplitter.SplitMap (System.String imageId, Int32 amount) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap.AttemptSplit (Int32 attempts) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap.DownloadMap (System.String url) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap.<GetMapURL>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0

    at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00000] in <filename unknown>:0

    (11:48:18) | Image batch (LustyMap) has been stored successfully

    (11:48:18) | [ImageLibrary] Starting order LustyMap - Map Image

    (11:48:18) | Image batch (LustyMap - Map Image) has been stored successfully
     
  9. Great to hear that your map works now, and nice to hear that people are using CentOS here.

    I try to resolve your problem, i have no such problem so can't tell you strait that what to do.
    If you got time let me know about following things.
    1. Log you posted, does it come when you run oxide.load "LustyMap" or when ?
    2. Try to run - > oxide.reload "LustyMap" let me know the output.

    Have nice day Linux fellow !

    Best regards,
    _-Vis-_
     
    Last edited by a moderator: Jan 30, 2018
  10. Well it still doesnt work. do you know what the new error i am getting means?

    It will make a map but it says NO IMAGE FOUND.

    (11:48:16) | [LustyMap] Map reset Confirmed! Creating a new image load order with ImageLibrary

    (11:48:16) | [LustyMap] [Warning] Icon images have not been found. Uploading images to file storage

    (11:48:16) | [LustyMap] [Warning] Attempting to contact beancan.io to download your map image!

    (11:48:16) | [ImageLibrary] Starting order LustyMap

    (11:48:17) | [LustyMap] [Warning] Map generation successful! Downloading map image to file storage. Please wait!

    (11:48:17) | [LustyMap] [Warning] Attempting to split and store the complex mini-map. This may take a while, please wait!

    (11:48:17) | [LustyMap] [Warning] Starting complex map split (6x). Please wait!

    (11:48:17) | Web request callback raised an exception (ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter])

    at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0

    at System.Drawing.Bitmap.SetResolution (Single xDpi, Single yDpi) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:SetResolution (single,single)

    at Oxide.Plugins.LustyMap+MapSplitter.ResizeImage (System.Drawing.Image image, Int32 pixels) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap+MapSplitter.SplitMap (System.String imageId, Int32 amount) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap.AttemptSplit (Int32 attempts) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap.DownloadMap (System.String url) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.LustyMap.<GetMapURL>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0

    at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00000] in <filename unknown>:0

    (11:48:18) | Image batch (LustyMap) has been stored successfully

    (11:48:18) | [ImageLibrary] Starting order LustyMap - Map Image

    (11:48:18) | Image batch (LustyMap - Map Image) has been stored successfully
     
    Last edited by a moderator: Jan 30, 2018
  11. Sorry sir.
    I edited my response but you maybe did not notice :D
    I will try to find way to sold your issue.


     
  12. is there anyway to remove this from LustyMap?
     

    Attached Files:

  13. yes, theres an option in the config file to disable the compass.
     
  14. thank you
     
  15. It comes when oxide.reload LustyMap or resetmap. So it is loading it now but with no image. looks like its something not working with loading the complex map. the full screen keybinding map opens fine.

    Load gives
    (13:11:32) | Added '// Reference: System.Drawing' in plugin 'LustyMap'
    (13:11:33) | LustyMap and ImageLibrary were compiled successfully in 1833ms
    (13:11:33) | Unloaded plugin ImageLibrary v2.0.20 by Absolut & K1lly0u
    (13:11:33) | LustyMap plugin is waiting for requirements to be loaded: ImageLibrary
    (13:11:34) | Loaded plugin ImageLibrary v2.0.20 by Absolut & K1lly0u
    (13:11:34) | [LustyMap] [Warning] Validating imagery
    (13:11:34) | [LustyMap] [Warning] Generating the main map
    (13:11:34) | [LustyMap] [Warning] Main map generated successfully!
    (13:11:34) | [LustyMap] [Warning] Generating the mini-map
    (13:11:34) | [LustyMap] [Warning] Mini map generated successfully!
    (13:11:34) | [LustyMap] [Warning] Generating the complex map. This may take a few moments, please wait!
    (13:11:34) | [LustyMap] [Warning] Complex map generated successfully!
    (13:11:34) | Loaded plugin LustyMap v2.1.39 by Kayzor / k1lly0u
     
  16. Hi,
    I was able to recreate your issues it comes if configuration of option "Enable the complex map" is set to TRUE.
    If you want your mini map to work ( at least part of it ( unzoomed mode ) ), disable this option.

    Code:
    "Enable the complex map": true
    to
    "Enable the complex map": false
    It makes Lusty map to load only the full size map image to mini map, which works for me at least.
    Ofc this is not how the plugin should work, so i try to find the issue.
    Always happy to help Linux fellows.

    Best regards,
    _-Vis-_
     

  17. Yah i did get it working with complex set to false. which helps at least its a start. if you have any idea about getting complex to work let me know.

    Thanks!
     
  18. Yeah, i am stubborn so that if you give me puzzle is hard for me to give up :D
    Here is what i found so for.
    This is my first time reading c++ code, so there is lot to do, but i have codeing background so it helps lot.

    error ->
    (01:57:55) | Web request callback raised an exception (ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter])
    is caused by this.

    system.drawing function -> SetResolution
    gets called to bitmap which will late become cut from big map image ( full size map ).
    function get 2 arguments.
    VerticalResolution of the piece of full size map image.
    HorizontalResolution of the piece of full size map image.

    For some reason these values are 0, when map is tried to be cut in to the pieces. ( for zooming ( complex map ) ).
    Here is some log out put, and how the log was captured.


    Code:
    (01:57:54) | [LustyMap] [Warning] Map generation successful! Downloading map image to file storage. Please wait!
    (01:57:55) | [LustyMap] [Vis_debug] HorizontalResolution of bitmap of image : 96
    (01:57:55) | [LustyMap] [Vis_debug] VerticalResolution of bitmap of image :96
    (01:57:55) | [LustyMap] [Warning] Attempting to split and store the complex mini-map. This may take a while, please wait!
    (01:57:55) | [LustyMap] [Warning] Starting complex map split (6x). Please wait!
    (01:57:55) | [LustyMap] [Vis_debug] HorizontalResolution of image : img.HorizontalResolution
    (01:57:55) | [LustyMap] [Vis_debug] VerticalResolution of image : img.VerticalResolution
    (01:57:55) | [LustyMap] [Vis_debug] HorizontalResolution of bitmap of image : 0
    (01:57:55) | [LustyMap] [Vis_debug] VerticalResolution of bitmap of image :0
    (01:57:55) | Web request callback raised an exception (ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter])
    Logging was done like this ->

    Code:
                public byte[] ResizeImage(Image image, int pixels)
                {
                   
                    var destRect = new Rectangle(0, 0, pixels, pixels);
                    var destImage = new Bitmap(pixels, pixels);                //-> here write the log
                    instance.PrintError( $"[Vis_debug] HorizontalResolution of bitmap of image : {image.HorizontalResolution}" );
                    instance.PrintError( $"[Vis_debug] VerticalResolution of bitmap of image :{image.VerticalResolution}" );
                   
                    //this function gets bouth arguments as 0 ( causes the error ) 0 == null
                    destImage.SetResolution(image?.HorizontalResolution ?? pixels, image?.VerticalResolution ?? pixels);
                   
                    using (var graphics = System.Drawing.Graphics.FromImage(destImage))
                    {
                        graphics.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy;
                        graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                        graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                        graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                        graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
                        using (var wrapMode = new System.Drawing.Imaging.ImageAttributes())
                        {
                            wrapMode.SetWrapMode(System.Drawing.Drawing2D.WrapMode.TileFlipXY);
                            graphics.DrawImage(image, destRect, 0, 0, image?.Width ?? pixels, image?.Height ?? pixels, GraphicsUnit.Pixel, wrapMode);
                        }
                    }
                    System.Drawing.ImageConverter converter = new System.Drawing.ImageConverter();
                    byte[] array = (byte[])converter.ConvertTo(destImage, typeof(byte[]));
                    return array;              
                }
            }
    I will do my best, ill continue tomorrow.
     

  19. Okey, so after all everthing is pointing to this.
    These lines of code don't do what they shut be doing.
    Code:
    System.Drawing.Graphics graphic = System.Drawing.Graphics.FromImage(cutPiece);
    graphic.DrawImage(img, new Rectangle(0, 0, width * 3, height * 3), new Rectangle((width * column) - width, (height * row) - height, width * 3, height * 3), GraphicsUnit.Pixel);
    graphic.Dispose();
    colCount++;
    If i understand correctly they are drawing temporary image of bit map that was taken from the full size map ?
    and after that the bit map is given for ->

    Code:
    byte[] array = ResizeImage(cutPiece, 256);
    Here the code fails like i said in my last post, because the image drawn from the bitmap does not have HorizontalResolution / VerticalResolution.

    I made some test and i was able to make the map split process work, map its not centered 100% right, i don't know it that is issue with my fix, or with the plugin it self, cause never used it before CentOs, so haven't seen it work right.
    I attached screen shot of my map here too.

    Here is my fixed version for CentOs 7 of Lusty map plugin.
    It's all so attached to this post.

    Few disclaimers.
    Plugin it self is ofc not made by me i just added these lines of code.
    So all credits for the creators of lusty map plugin ( oxidemod.org user k1lly0u ).
    So i don't take any credits for creating or maintaining this plugin.
    Use it with your own risk :D
    Code:
    //CentOs 7 fix, by Vis 31.01.2018
    if( cutPiece.VerticalResolution == 0 && cutPiece.HorizontalResolution == 0 )
    {
        instance.Puts( "[ INFO ] Problem detected, applying fix by Vis" );
        cutPiece.SetResolution( width / amount, height / amount );
    }

    Hope it helps you out for while, it try to improve it if possible, i don't have lot time today, and c++ is 100% new thing for me :D

    Best regards,
    _-Vis-_
    [DOUBLEPOST=1517383361][/DOUBLEPOST]

    I maybe will send message to plugin developer k1lly0u
    To add something like this to the real plugin, but ofc would have to make lot of testing first so its 100% fail proof on other systems too etc.
    Let me know about your experiences.

    Best regards,
    _-Vis-_
    Finland
     

    Attached Files:


  20. So replace your LustyMap.cs plugin file under oxide/plugins/ with my LustyMap.cs file.
    If plugin does not reload by it self, do oxide.reload "LustyMap".
    After that mapreset, and you should see that there is lot of lines coming in to the console like this.
    "[ INFO ] Problem detected, applying fix by Vis"

    Problem is caused by libgdiplus package is so out dated for CentOS.
    Package is made for momo project / Windows, and there is little to no usage for it normally on linux server platform, so no one has compiled new version of package.
    Ubuntu has lot more users, so someone has compiled the new version of package and in this plug in the old version is not really supported.
    Ubuntu libgdiplus package versio - 4.2-1 - released end of 2015.
    CentOS 7 epel libgdiplus package versio - 2.10-9 - released 2011.

    I will try to compile new package of libgdiplus for CentOS 7, That is in same version with Ubuntu.
    That should enable CentOS users to use this plug in reliably and with out shady fixes.

    It may take few days time, and I am kind of busy at the moment, but hopefully I can get it done and make it work.

    Best regards,
    _-Vis-_
    Finland