SOTA-Placemarker

Discussion in 'Player Created Lua Script Repository' started by Rafael, Jun 7, 2020.

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

    Rafael Avatar

    Messages:
    6
    Likes Received:
    22
    Trophy Points:
    3
    Description
    A placemarker add-on for Shroud of the Avatar game.
    This script works only in the Shroud of the Avatar (SOTA) game.

    GitHub: https://github.com/gitsome-code/SOTA-Placemarker

    Purpose
    Placemarker allows players to save locations of interest and get the distance to a chosen saved location.

    Installation
    Place the contents of the download folder from the GitHub repo into your game's Lua folder

    [Your Game's Datapath]\Portalarium\Shroud of the Avatar\Lua

    For example

    C:\Users\Rafael\AppData\Roaming\Portalarium\Shroud of the Avatar\Lua

    In-game setup
    1. Open the game's chat console.
    2. Create a new tab, or select an existing tab.
    3. Click the gear icon and ensure `Lua` is checkmarked.

    Placemarker's functions can be run by clicking on the buttons, but there are some commands that must be issued through the console.

    Typed commands must be entered into the Local chat channel. Keep in mind, local chats are visible to other players and saved in the logs.

    Type commands in local chat
    "!pmhelp": for list of commands
    "!pmsave": saves placemarks on your screen to a file
    "!pmload": loads placemarks from file
    "!mark some label": to manually enter a labelled placemark
    "/lua unload": removes all addons
    "/lua reload": reloads addons

    Button functions
    "Mark": record without label
    "X": delete row from on-screen table
    "T": track distance to that placemark
    "&": append a single row to the data file
    "Clear": clear on-screen data table. Will not affect saved file
    "Vis": toggle visibility of on-screen data table
    "Save": overwrite and save data file with on-screen data. Be careful
    "Load": clear on-screen data table and load places from file. Be careful
    "Size -": decreases the size of all text and GUI elements
    "Size +": increases the size of all text and GUI elements
     
  2. FrostII

    FrostII Bug Hunter

    Messages:
    5,890
    Likes Received:
    11,039
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Pacific Northwest
    @Rafael
    Prior to downloading/installing your "Placemarker" script, may I ask what unit of "measurement" is used and how knowing the distance would assist us - given that actual maps are so few and far between ?
     
  3. Rafael

    Rafael Avatar

    Messages:
    6
    Likes Received:
    22
    Trophy Points:
    3
    The units of measurement are unknown, but they are still informative. The Shroud API reports the player's X, Y, Z coordinates relative to the extent of the scene. It simply provides a floating point number that corresponds to the location on the Cartesian plane of the scene. Placemarker determines the Euclidean distance between the player's current X, Y, Z location and the placemark's recorded X, Y, Z. The distance updates on every frame, so as the player is traveling, the distance of unknown units to the placemark is recalculaed. Therefore, one can see if they are going towards or away from their chosen placemark and adjust course as necessary. Basically, one can get an empirical sense of how far away they are because they would see how quickly the number is changing as they're moving. So for example, if I said the player is "100" away from the placemark, it doesn't mean much; but if the player then took several steps and noticed the number quickly dropped to 90, they could infer that they were relatively close.

    This add-on can be helpful in many situations. For example, I looking through the numerous vendors in a POT and found an item I was interested in but it seemed expensive, so I wanted to keep looking. I clicked the "mark" button on the Placemarker Add-on and kept looking. 15 minutes later, I decided to return to the first vendor so I clicked "T" to track the placemark and started running in the direction that reduced the distance to metric on the display.

    I think there's much room for improvement that I will work on for subsequent versions. I would like to try to determine some unit of in-game distance by figuring out how much X, Y, Z changes per Avatar-footsteps (in /walk mode). Then perhaps we could say the distance is measured in the number of paces. Another useful metric would be compute the player's speed, leaving the units unknown, but estimating how long it will take to reach the placemark based on how much the number changes in a certain amount of time.

    Crashcodes made a very good tracker as well that also returns the angle to the placemark. I decided to hold off on this feature because the coordinates are inverted in some scenes; he figured it out though.
     
    FrostII, Anpu, Bedawyn and 1 other person like this.
  4. FrostII

    FrostII Bug Hunter

    Messages:
    5,890
    Likes Received:
    11,039
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Pacific Northwest
    That would be useful, and thank you for the script and the explanation.
    I would rather have working maps to mark, but this is useful until they find the time.
     
Thread Status:
Not open for further replies.