SotAMapper - shows items of interest and tracks player location on map

Discussion in 'Player Created Resources' started by coder1024, Sep 3, 2016.

Thread Status:
Not open for further replies.
  1. mdsota152

    mdsota152 Avatar

    Messages:
    763
    Likes Received:
    2,047
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Virginia
    Yup, know how that works... :) our GIS software does the same thing. Until some data gets added it does not know the full extent to display at. No easy workaround unless you 'assume' what the min/max values will be. We can do this now at the office since we know the extent of our County and can use that each time as a starting point.
     
    Bom, Time Lord, FrostII and 1 other person like this.
  2. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    That's definitely a good idea, I've added it to the feature requests list to possibly look at that for a future version. In order to do it right, I think you'd need to have the image along with a .csv calibration file for that image. The .csv file would have a series of calibration lines, where each line would have the XYZ world /loc AND the 2D pixel XY value in the image. Basically it would map a world location to a pixel location on the image, so you'd need to stand at a known point on the image and get the /loc and put that together with the pixel location which goes with it. I think you'd want 2 such lines and with that the app could then scale and align the image right behind the map data and it should line up. This would also mean the image would need to be drawn to scale to the actual data otherwise things still wouldn't line up right. If its just an artistic approximation it may not align correctly to the real data.
    Yes, with known boundaries it helps :) See the background image comment above. Any thoughts on that? I think what I'm saying is correct that we just need a couple calibration points and we can then correctly locate the image with the data. As I said, this assumes the image is correct in terms of scale.
     
    Bom, Time Lord and FrostII like this.
  3. Browncoat Jayson

    Browncoat Jayson Legend of the Hearth

    Messages:
    6,337
    Likes Received:
    14,097
    Trophy Points:
    153
    If it was possible to use something like SotAMap's images, then its designed to be scaled according to the in-game /loc, since that is what is used to design them. Assuming there would be a hidden /loc where the top left corner of the image starts, and everything else basically draws on top of that. At least then it would be a map that everyone is familiar with...
     
    Link_of_Hyrule, Bom, Epiphany and 3 others like this.
  4. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    good point, those images must have some calibration information somewhere to align them to the markers.
     
  5. mdsota152

    mdsota152 Avatar

    Messages:
    763
    Likes Received:
    2,047
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Virginia
    If you need help with this let me know. I did it with the overland map image for Birko and myself to adjust it to fit the real x,y values from the game. I've got the software to play with it if need be. Just need a good image to start with and then just find some points in game to relate back to the image. (see the image I rectified)
     
    Link_of_Hyrule, Bom, Epiphany and 4 others like this.
  6. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    It occurs to me that, while the entering messages ("Entering Own's Head from Hidden Vale") in the chat log only have the area name not the map name, the /loc output has both. So any given /loc command does establish which map is being used by a given area. So...

    1) the app could build up the association over time from the /loc command
    2) I could create a file and also put in manual associations to start with (to which the app could add as it runs?)

    Then it could use an "Entering" log message to pick the right map and you wouldn't necessarily (as long as it already knew the association) need a new /loc command result.
     
    Bom, Time Lord, lollie and 1 other person like this.
  7. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    Of course, what would really be nice would be if SotA wrote out the same data to CurrentPlayerData.txt in the game folder that it does with the /loc command. Then the app could just pull from that one place and always know which map you were on along with your location. I've requested this and Berek indicated they were looking into it, so hopefully that makes its way in there at some point :)
     
  8. FrostII

    FrostII Bug Hunter

    Messages:
    5,337
    Likes Received:
    10,353
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Pacific Northwest
    @coder1024
    How difficult is it to "turn" a map 90 degrees CW ?
    Should I wait to map areas or will my data points (/loc added spots) be true after the CW rotation ?
    (Really anxious to begin mapping all my fav areas).... ;)
     
    Bom, Time Lord and coder1024 like this.
  9. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    The rotation should only affect how it renders the data. As long as you're entering the /loc for items as reported by the game (or using the Add button which does that for you) then your data file should be good. The rotation won't change those values, rather, it'll be an extra line you put somewhere in the map file, like ROTATE_AXIS or something, and when the app sees that it'll render the data rotated.

    So you should be safe to continue mapping stuff out. Now, if portalarium eventually changes the maps themselves so they're no longer rotated, then the actual data would have to be corrected. Its possible, in that case, I could add a button which would allow you to pick a map file and it could reverse all the values for you.

    So I think you're ok continuing on :)
     
    Bom, FrostII, cartodude and 1 other person like this.
  10. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    New version just released!

    This fixed a really hard to track down issue due to how I was parsing date/time from the log file. Many thanks to lollie for testing multiple test versions and patience in getting me the details and getting this sorted out!!!

    This version also helps (though more is to come) with building maps.

    Code:
    2016.09.19, v1.4
    - data updates
    - when using the Add button to add a new map item, the min/max extents of the
      data are re-computed so the rendering doesn't get wonky as you add items when
      building a new map
    - empty map file is now tolerated and handled correctly, this allows running
      the app with an empty map file and adding all items using the Add button and
      now (for real this time!) never having to manually enter any coordinates
    - fixed a bug with date/time parsing from log file entries which prevented
      it from working on a machine whose date/time locale was not compatible
      by default with the format used in the SotA log file
    
     
    Bom, FrostII, cartodude and 3 others like this.
  11. lollie

    lollie Avatar

    Messages:
    493
    Likes Received:
    1,552
    Trophy Points:
    55
    Gender:
    Female
    Location:
    Brittany
    So happy to finally see the map :) GJ!
     
    Bom, FrostII, Time Lord and 1 other person like this.
  12. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    Glad its working for you now! :)
     
    Time Lord and lollie like this.
  13. lollie

    lollie Avatar

    Messages:
    493
    Likes Received:
    1,552
    Trophy Points:
    55
    Gender:
    Female
    Location:
    Brittany
    Found another bug - unsure of issue.

    After I left one map, the app kind of silently "crashed" and got stuck on that last map I was on (this map had 41 marks on the map), even if I quit the game I found that one map would still load upon loading SotAMapper (and this is with me not even running the game). Only thing that worked was removing the map, and this fixed SotAMapper and the map issue, maps loaded as normal.

    I have even tried making a whole completely new file that the same map name (with zero entries, just has the name and nothing in the file), and this also causes SotAMapper to load the (now empty) map up (again while out of the game even). So I can't put a map with this name back into the maps folder.

    Also tried deleting SotAMapper from desktop where its folder is, then unzipping 1.4 again and with the map file of that name that came packaged in the zip file inside the maps folder, the bug persists and that map loads once again as above. Again, removing that map file is the only option.

    Not sure what the issue is with this map. Only happened after being on it a while and placing the 41 entries using the Add button.
     
    Last edited: Sep 19, 2016
    Bom, FrostII, coder1024 and 1 other person like this.
  14. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    Just sent you an Email.
     
    Time Lord and lollie like this.
  15. mdsota152

    mdsota152 Avatar

    Messages:
    763
    Likes Received:
    2,047
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Virginia
    Another suggestion:
    - if you ever decide to change the data format, consider adding an extra field for the symbol. This way the Name can be used for the label but the symbol can be used to display it. This would allow for things like listing all the towns in Novia with different symbols for type (npc, prt, pot, etc) without having to build a different symbol for each name. Or for labeling adventure scenes but symbolizing them based on tier.

    :) +100... thanks again for your great tool.
     
    Bom, FrostII, coder1024 and 2 others like this.
  16. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    sounds like a good idea! :)
     
  17. FrostII

    FrostII Bug Hunter

    Messages:
    5,337
    Likes Received:
    10,353
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Pacific Northwest
    @coder1024
    What have you found regarding "rotating" incorrect scenes ? Can you do it ?
    Here's an example currently, where North is South and East is West.

    [​IMG]
     
    Bom, Time Lord and coder1024 like this.
  18. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    Yes, that is definitely doable and it shouldn't be too difficult either. Will hopefully get that in soon!
     
    FrostII, Bom, cartodude and 1 other person like this.
  19. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    ok, so I have the rotation thing working. Based on the feedback here, it looks like there are at least the below two coordinate systems in use. The first one is where north is +X and west is +Z, that's the one used by the maps I initially added. The second one has north as +Z and east as +X, this is, for example, the Novia map and others.

    Code:
            //
            //       X
            //       |
            //       |
            //  Z----*
            //
            XZ_NorthWest,
    
            //
            //  Z
            //  |
            //  |
            //  *----X
            //
            ZX_NorthEast
    
    So I've updated the map reading code so it now checks for one of the below lines in the map file. If neither are present, it defaults to XZ_NorthWest. Its easy to tell which one you're on by turning on /loctrack and watching how the numbers change.

    Code:
    MapCoordSys,XZ_NorthWest
    MapCoordSys,ZX_NorthEast
    
    So, if you just add, MapCoordSys,ZX_NorthEast to the Novia file it rotates and displays correctly! Will put out a new release shortly.
     
    FrostII, Bom, cartodude and 2 others like this.
  20. coder1024

    coder1024 Avatar

    Messages:
    501
    Likes Received:
    537
    Trophy Points:
    75
    Gender:
    Male
    Just posted v1.5! This addresses the map rotation issue. For a map like Novia, where the data renders rotated 90 degs counter clockwise from where it should be, you can add the below line to the map .csv file and it should fix the problem. I've already added this to the Novia map which is included with SotAMapper.

    Code:
    MapCoordSys,ZX_NorthEast
    
    Release notes...
    Code:
    2016.09.19, v1.5
    - added support for specifying one of two coordinate systems in a map file to
      address the issue of maps being incorrectly rotated
    
     
    FrostII, Bom, Duke Gréagóir and 2 others like this.
Thread Status:
Not open for further replies.