RELEASED NPC Map Locations Mod 2.2.2

Shows NPC locations on map. Uses a more accurate map page for more accurate tracking!

Tags:
  1. Marose

    Marose Master Chief

    Yes! That's what was happening. So I guessed it had something to do with the fact that I changed the sprites, and I restored the original ones and the mod now works perfectly, but we won't be able to change the sprites then?
     
    • Bouhm

      Bouhm Big Damn Hero

      What do you mean by that? The NPCMarker sprites do not replace any of the original game sprites, it simply adds new sprites.

      In the future, I'm gonna try to see if there's a way to crop just the heads grom the original game sprites so there is no extra files necessary. It'll look less clean than the sprites I cropped myself but it'll be less hassle.
       
        Last edited: Mar 28, 2016
      • alinelrene

        alinelrene Void-Bound Voyager

        Doesn't work for me, when pressing M for Map, only my character icon shown.
        Game version 1.06
        SMAPI 0.39.2
        Resolution 4K (Loaded with GeDoSaTo downsampling)

        Oh also I should mention other mods that I'm using (which isn't a problem or conflicting with each other):
        CJBCheatMenu
        CJBItemSpawner
        InstantGeode
        SmartMod
        StardewCJ
        NoSoilDecay
         
        • Bouhm

          Bouhm Big Damn Hero

          Just released a pretty sizable update.

          - NPC tracking more accurate, by creating even more partitions and doing all the tedious calculations. I ditched the idea of altering the map page to better scale with the game map because I don't think people want to be bothered to download the map to replace the default map page.

          - On the note of not being bothered to download extra things, you no longer have to download NPCMarkers! This means you can delete the NPCMarkers stuff in your Content/Characters folder if you had it previously. I found a way to crop the ingame sprites and use those as markers instead. It doesn't look as clean, but the benefit is now any npc sprite modifications also show on the markers.

          - Bug fixes. Should address a lot of bugs people had earlier. Added better methods to catch and circumvent errors.

          - Code optimizations.

          NOTE: Don't use SMAPI 0.39.3 yet. It is not backwards compatible. Wait for a stable release.

          Try using the updates I just pushed and let me know if you still get an error. Also include the error log from your console if any. Thanks!

          I'm probably not gonna reply since it's really late here and I need to sleep x_x
           
            Last edited: Mar 29, 2016
            Marose, carnage157, curi0 and 2 others like this.
          • alinelrene

            alinelrene Void-Bound Voyager

            Thanks it's working now! Time to continue gifting those villagers.:lickitung:
             
            • dem0z

              dem0z Star Wrangler

              Great work so far, however if i just press E to open inventory this gets spammed in the console but the mod is working though.
              anyways i thought you should know.

              Code:
              [18:37:18] An exception occured in XNA UpdateTick: System.NullReferenceException: Object reference not set to an instance of an object.
                 at NPCMapLocations.NPCMapModMain.getMarkers(Object sender, EventArgs e) in C:\Users\Brian\Documents\Projects\SVMods\NPCMapLocationsMod\SMAPI\MapMod\MapMod.cs:line 81
                 at System.EventHandler.Invoke(Object sender, EventArgs e)
                 at StardewModdingAPI.Events.GameEvents.InvokeUpdateTick()
               
              • Bouhm

                Bouhm Big Damn Hero

                Thanks for letting me know! That's strange, I thought I handled most of the "NullReference" errors. Does it happen consistently? I can't reproduce the error myself. Anyway, I'll push an update for a fix in the next half hour.
                 
                • dem0z

                  dem0z Star Wrangler

                  Does not happen often, it's just sometimes it does and i don't know what triggers it, could be one of the other mods i have, sorry. :)
                   
                  • mangosix0

                    mangosix0 Void-Bound Voyager

                    I Lovely this mod. But, If i open the map, serious crash occurs when Robin working in barn.. TT
                     
                    • Marose

                      Marose Master Chief

                      Yes, I know, I use mods like Diverse Stardew Valley or Anime Style portraits and I just did what I said, deleted the mod and replaced it with the originals and then it worked. I don't know why did that happen and I know it wasn't supposed to happen but that's how it happened... lmao

                      Downloading the update btw :)
                       
                      • Bouhm

                        Bouhm Big Damn Hero

                        New update! More bug fixes and a new feature to show where NPCs are when they are stacked in one location. Once a stable version of SMAPI 0.39.3+ is out, I'll be able to make the final update of fixing the render layers so that the NPC markers are covered by the hover texts, and after more testing and bug fixes finally roll out a stable version.

                        Screenshots of the new feature:
                        1.png 2.png 3.png 4.png

                        I thought of making it behave like a tooltip and move with the mouse, but it was just too busy with the map location tooltips and was covering too much stuff. So I placed it out of the way in the bottom left corner.


                        Don't apologize! When I said "I thought I handled all the NullReferences," I was thinking to myself. I didn't mean to sound like I was doubting the legitimacy of the bug. Besides, the error log never lies, there WAS a problem with the code :p I derped. But it's fixed now :). It should actually handle all NullReferences now (hopefully).

                        Thanks for pointing out exactly the reason why it crashed, I was able to fix it easily thanks to the detail about Robin. I forgot to add the farm buildings for the map, so it should all be working now!

                        Ohh, gotcha. Hopefully there won't be compatibility issues with other mods with this way of rendering NPC markers :)


                        I won't be replying for a few hours, ended up staying up late again testing this update and need to sleep. So hopefully no bugs...
                         
                          Last edited: Mar 30, 2016
                          Marose and dem0z like this.
                        • Yunix

                          Yunix Big Damn Hero

                          I was just about to get the new Update of your Mod... uhm... does this version dont need the ".../Content/Characters/NPCMarkers"-Folder
                          anymore or did you just forgot to add it at this download?
                           
                          • Bouhm

                            Bouhm Big Damn Hero

                            Hi! In one of the updates, I made it so the mod just crops the ingame sprites to create the markers so yes, you don't need it anymore. This ends up making the markers look less clean, but in the long run it's better for if people gets mods that change NPC sprites, so that the NPC marker would also change, or if mods that add new NPCs so that those would have NPC markers without me having to manually crop and update. Plus, one less thing to download when using the mod :)
                             
                            • Yunix

                              Yunix Big Damn Hero

                              Oh... okay... i was realy like the nice heads... If i keep the NPCMarkers, will it use them instead? I prefer to have a little more work then less clean icons. :lod: I belive its my german blood that forces me to ask that :wtf:
                               
                              • Bouhm

                                Bouhm Big Damn Hero

                                Haha it's not just you, I was sad to not have cleaner looking icons. The cropping method doesn't work well when playing with game zoom, but I figured it was for the better.

                                -----

                                I'd like to note that SMAPI 0.39.3+ now scales with game zoom level on its own and does a much better job of antialiasing re-sized sprites, so it's a lot less ugly.
                                 
                                  Last edited: Mar 31, 2016
                                • dem0z

                                  dem0z Star Wrangler

                                  I updated to SMAPI 39.4 and seems that it broke the zoom in relation to the map and if i zoom out to 100% it's a temporary fix for it, however seems it broke a lot of rendering.
                                   
                                  • Bouhm

                                    Bouhm Big Damn Hero

                                    Yeah, SMAPI 0.39.3, 0.39.4, and 0.39.5 are not backwards compatible with new changes. Currently I already have it updated for 0.39.5 but I wanted to add more changes before updating, since most people are still using 0.39.2 (if they are using other mods that haven't been updated for 0.39.3 and above yet). I'll push the updated one for 0.39.5

                                    Updated version for SMAPI 0.39.5 is out. Should work with 0.39.4 as well, and don't use SMAPI 0.39.3.
                                     
                                      Last edited: Mar 31, 2016
                                    • dem0z

                                      dem0z Star Wrangler

                                      Thanks, somehow i didn't see the disclaimer about not updating (silly me), Working great now. :D
                                       
                                      • Bouhm

                                        Bouhm Big Damn Hero

                                        So this is going to be the final update (assuming no bugs) before releasing a stable version. :D
                                        THESE CHANGES ARE ONLY ON THE SMAPI 0.39.5+ VERSION.
                                        If you have other mods that still only work on 0.39.2 and still want to use them, you'll have to wait for those to get updated to the latest SMAPI.

                                        Changes:
                                        - Fixed layering (NPC markers are now below tooltips)
                                        - Changed location of name tooltips and made them dynamic

                                        So instead of the names being on the bottom left corner, they now follow the mouse:
                                        1.png

                                        If there's no location tooltip, it goes to the bottom right of the mouse (because it looks weird hovering to the right side of the cursor)
                                        2.png

                                        And adjusts when you hover over a location
                                        3.png

                                        I did another update and now it looks like this, but I don't know which one people would prefer.
                                        4.png

                                        Neat! However, if people prefer to have it on the bottom left corner instead, then I can revert this change. I just wanted to make it a little bit more consistent to how tooltips appear in the game.

                                        --------


                                        Errr I'm gonna make a poll for which one people prefer.
                                         
                                          Last edited: Mar 31, 2016
                                        • dem0z

                                          dem0z Star Wrangler

                                          Great to hear it's ready for a stable version :D , and from my perspective the new method for the tooltips is much better.
                                           

                                          Share This Page