Buff Monitor System

Discussion in 'Player Created Lua Script Repository' started by Tirrag, Jun 26, 2020.

  1. Tirrag

    Tirrag Avatar

    Messages:
    252
    Likes Received:
    435
    Trophy Points:
    28
    Location:
    Iowa, US
    Greetings! Over the last several months I have been working on a system to monitor certain buffs within SotA. I am primarily a heavy spec tanker and for my playstyle the most important skill to keep active is Defensive Stance. My initial version of this mod was simply monitoring for Defensive Stance but has since been enhanced to monitor 17+ skill buffs. Please note that the LUA interface for SotA does not have any direct access to the buff information on your player, though there are some stats that are directly related to a buff for which SotA does provide access and it is these stats this addon is based on. Some of the buffs have to be gauged a little due to the variety of equipment and skill levels that can affect them. If you find you are not able to get a monitor working please see the "Customizing Thresholds" section below.

    Buffs Currently Monitored - updated 2020-07-12
    Berserk
    Berserkers Stance
    Celestial Blessing
    Death Shield
    Defensive Stance
    Deflect
    Dodge
    Douse
    Evasion
    Fortify Defenses
    Glancing Blow
    Immolation
    Parry
    Purify
    Shield of Air
    Shield of Crystal
    Shield of Ice

    What does it do?
    This addon will create indicators on your UI that will show when a buff is activated. When the buff expires the indicator will turn red, and then 20 seconds after that the buff indicator will disappear (unless the buff is reactivated). Buff indicators can be positioned individually so you may place them where you see fit. Where possible, some buffs have a yellow warning indicator as well letting you know that the buff is going to expire soon.

    Examples of the Defensive Stance indicator:

    [​IMG] [​IMG]

    Getting Started
    You will need to download two things to get started. The first is the wonderful libsota library by @CatweazleX . You will need at least version 0.4.6+ and may find the library at:

    https://www.shroudoftheavatar.com/f...lper-library-in-lua-for-shroud-in-lua.160222/

    Second, you will need to download the Buff Monitor System addon at:

    https://g2-games.com/sota/buff_monitor_system_v1.04.zip

    Please follow the instructions in the libsota forum post for installation of libsota. For installation of the BMS addon please extract the files and directories from the zip download into your Lua SotA folder. When installed properly you should see a file called:

    buff_monitor_system.lua

    in your root Lua folder and a folder called "bms".

    If you cannot find your lua folder, while in-game in the local chat type:

    /datafolder

    This will open up a dialog showing your SotA data folder of which one subdirectory will be the Lua folder.

    If you extracted the files into your Lua folder while in-game they will not be active yet until you either restart the game or in the local chat type:

    /lua reload

    Upon reload, you should see messages in the lua chatbox (be sure lua is checked for that tab) indicating that the addon is active.

    First Time In-Game
    Once you have confirmed via the lua messages that the addon is active it is time to give it a try. All indicators are initially positioned in the upper left of your screen. To activate one, enter combat mode and activate one of the supported buffs. You should see the corresponding indicator in the upper left. Please note that if you call /lua reload with a buff already active it may throw the addon off until the buff expires.

    With the indicator visible you can now relocate it. To relocate an indicator, hold down the Left Control button and click the indicator. Keep the Left Control button held and move the mouse to reposition the indicator. Once you have the indicator located where you desire, release the Left Control button. The new position will be remembered the next time you load the game.

    Activating/Deactivating Monitors - new 2020-07-12
    Holding the RightAlt key and pressing M will bring up the activation/deactivation screen for individual monitors.

    [​IMG]

    To deactivate a monitor click the icon and it will toggle the activation. A red monitor icon indicates that the monitor for that buff is currently deactivated. The settings are saved immediately and will be restored the next time SotA starts. It is important to note that some buffs operate on the same stats and can cause incorrect detection. You can use this screen to deactivate any skills that are not needed or conflict with your current deck and equipment. To close the configuration screen either click the X in the upper right or hold RightAlt and press M.

    Customizing Thresholds - new 2020-07-12
    The buff monitor system operates by detecting changes to stat values. These values are dependent on a variety of things including skill levels and equipment. Due to this it is sometimes necessary to teach the monitor system what to expect for your specific skill levels and equipment. To enter learn mode, hold the RightAlt key and press L.

    [​IMG]

    First ensure you have no buffs active and that you have the equipment on that you will be tuning the thresholds for. If you want to be as encompassing as possible, equip your lowest level equipment for the learning process. To teach the system your specific levels click the buff icon you wish to teach. The icon will turn yellow and the system will be looking for changes. While the icon is yellow, cast the buff using a single click (ie dont hold/stack). If detected properly you will see a lua message indicating so. If no skill was cast within the learn period the icon will revert to normal and a lua message will indicate the failure. It is important to note that when teaching the system if you use the lowest equipment you may get false indicators when switching to higher level equipment. In this situation see "Resetting the System" below. To close the configuration screen either click the X in the upper right or hold RightAlt and press L.

    Resetting the System- new 2020-07-12
    Sometimes the system will get confused and will stick an indicator. If this happens hold the RightAlt key and press R to reset the buff monitor system. If the system is reset while buffs are activate most indicators will not activate again for that skill until it has expired.

    Whats next?- updated 2020-07-12
    I would like to eventually make different layout sets similar to different decks. It would be nice if the SotA Lua system provided information when swapping decks but unfortunately it doesnt so anything I do here will not be a seamless as I would like. I have also been thinking about a layout configuration screen where you can place all the skills without needing to cast them first. There are more monitors to come as I find ways to accurately detect them based on the stats lua provides. I would also like to alleviate some of the conflicting buffs.

    Known Issues?- updated 2020-07-12
    Again some stats that a buff modifies are also modified by other buffs. Because of this there can be some false-positives. Also alternating equipment can cause false positives. Using RightAlt+R to reset will help get the system back up and running.
     
    Last edited: Jul 28, 2020
  2. Tirrag

    Tirrag Avatar

    Messages:
    252
    Likes Received:
    435
    Trophy Points:
    28
    Location:
    Iowa, US
    UPDATE (2020-07-12): New v1.04 released (see ZIP link in initial post). This release has a slew of new features including many new buffs monitored. Activation/deactivation has been consolidated into a single screen (RightAlt+M). There is a new learning mode to teach the system thresholds related to your specific configurations (RightAlt+L). There is a reset in case the system gets confused (RightAlt+R). You should not lose any settings with this release. Please read the info section above for more details. Please note that there was one restructure performed which relocated all the images into a subfolder. While it will not hurt to have images where they were prior to this revision, if you wish to cleanup the main BMS folder by removing all images please feel free to do so. If you choose to cleanup, please be very careful not to delete the monitors.ini or users.ini file.

    UPDATE (2020-06-28): New v1.01 released (see ZIP link in initial post). This release adds the warning indicator for buffs with two stages (an initial big buff, then a few seconds later it drops). It also breaks the user settings into their own file. This means that with any new release after this one you hopefully will not lose your settings. Unfortunately with this release you will need to reset any activations and reposition your indicators.

    UPDATE (2020-06-26): I noticed the settings for glancing blow were missing from the initial v1.00 release. The ZIP download has been updated but there is an updated ini file available at:

    https://g2-games.com/sota/monitors.ini

    Place this in your lua/bms subfolder. You do not need this if you have updated to a higher version already. NOTE: It will overwrite your current position settings.
     
    Last edited: Jul 28, 2020
    FrostII, Net, Anpu and 1 other person like this.
  3. Tirrag

    Tirrag Avatar

    Messages:
    252
    Likes Received:
    435
    Trophy Points:
    28
    Location:
    Iowa, US
    Monitor updated. Info above.
     
    Last edited: Jun 28, 2020
    FrostII likes this.
  4. Tirrag

    Tirrag Avatar

    Messages:
    252
    Likes Received:
    435
    Trophy Points:
    28
    Location:
    Iowa, US
    New version of the buff monitor system has been released. See above for details.
     
    Last edited: Jul 12, 2020
    FrostII, Drake Aedus and Anpu like this.