• Visit Rebornbuddy
  • [Plugin] GearSwap Reloaded

    Discussion in 'Plugins' started by toNyx, Jul 26, 2014.

    1. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      .
      [table="width: 700, class: grid, align: center"]
      [tr]
      [td]
      BREAKING NEWS : PROJECT DISCONTINUED (Source files available HERE) (29/01/2015)​
      [/td]
      [/tr]
      [/table]

      Hello fellas ! I'm today proud to show you a "kind-of-community-driven" project, more like a Reworked/Improved version of :

      GearSwap (Reloaded)

      Before continuing, I would like to thank some users of this forum that created/helped to make things happen :
      - borderjs : Creator of the plugin, many thanks for this awesome bunch of code ! (DONATE HERE)
      - evern : Creator of the EXTREME version of the plugin, including entire customization of spell usage/Stuff lists.
      - Poohbear : Decent suggestions and explanations about the "zerg-only" part of the logic, and knowledge.
      - mrbubbel : Decent suggestions and explanations about some of the logic that should be reworked.
      - Aazaroth : Decent suggestions.
      - Kevin Spacey : Showing enthusiasm about the project being reworked/improved.

      Now, let's make it happen !

      History Time !
      Alright, so for those that used to plugin they should know that the stuff/gear was hardcoded, so no way to change priorities of those. Evern went and created a custom version (EXTREME) that allowed users to make their own gear list, with their own conditions.

      Why rework it ?
      The creator is now gone (maybe not for long) and there was no updates, the plugin had some flaws and had to be reworked/rethinked for some parts, and the EXTREME version has to be merged into the initial project.

      How can that happen ?
      I had some free time, and saw people arguing about having no updates, of the project nor the author of it. So I decided to get the last version and take a look into it. The code was a bit messy at start, the settings where intialized 2 times (confusion confusion !), some conditions used Timers when there was no need, some of the loops (for, foreach...) were clunky (eg. When we need to search for a single "int", when we find it, we don't need to go through the rest of the collection)

      So the main task was to search for things, that were literally everywhere ! So I've splitten up things into more understandable parts (rrrix did it with Trinity when he took over Giles's one) and commented as much as I could so people can modify parts of the code.

      How it Works :
      GearSwap scans the environment checking for varying conditions (eg. Arcane sentries, Poison cloud, Surrounded by Mobs). After it determines the present condition, it will determine which gear to equip.
      Since several items are equipped in the same slot we must consider using Priorities for those conditions to determine which items are equipped first.

      Remember that even if you don't use all these conditions, no worries, only used ones will be analyzed (they were all analyzed before, I changed it)

      Notes :
      - Remember to set your protected inventory slots in the bot config so your items are not stashed on town runs!
      - Remember to stop the bot to edit your Managed Gear (or dumping current inventory) to make sure there's no errors !
      - If you use Unity or Stone of Jordan all the time, you need to make sure to have Stone of Jordan on the left finger and Unity on the right. Also similarly with Rogar's Huge Stone must be on the left.
      STOP ! the second is no longer true, it'll scan the slot the stuff is in, so basically, they're dynamically assigned so don't bother about it ;)

      TODO :
      - Tell me.

      What can't be done :
      - Anything that is out of my knowledge, my brain is full of possibilities.
      - I can't make coffee or waffles out of this... sadly.

      Changelog :
      See second post.

      Wanna see what's happening on the project : Public GSReloaded Trello Board
      Submit Issue : Post in this thread or send eMail Directly HERE (Any issues? RightClick > Copy mail address)


      WHERE DO I GET THIS AWESOME SHIT ?

      By SVN : Assembla | Direct Link | RELEASE Checkout | BETA Checkout

      Zip Files : LINK !

      Wiki : LINK !

      Current version (Release) : 1.0.4 (Download ZIP)
      Current version (BETA) : 1.0.4.3 (Download ZIP)

      Note : The beta includes every changes that will be included in the next "Release" build, consider using the beta instead of release.


      BONUS :

      Installation
      Just unzip the file in your Plugins folder, it should do the job (tell me if there's some bullshit happening)

      Custom XML Tag
      There's some XML Tags available (see wiki for more informations)

      Playing manually
      - You should disable open backpack (or not if your tinfoil hat is going ham')
      - Use the blank routine and profile linked below,
      It should work.


      I'm so shy.... :$
      If this is what you expected about the rework, or like me, wanna date me, or whatever (straight things tho) let the love rain ! [​IMG]
      Don't forget that most of the work has been done by borderjs and evern ! (the donation links are on top of this post ;))
       

      Attached Files:

      Last edited: Jan 29, 2015
    2. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      + > Stuff added
      ~ > Stuff fixed
      - > Stuff removed
      ? > Stuff added but needs testing

      BETA Changelog (most recent changes) :

      v1.0.4.3 (BETA)
      + Added Cache for Actors so we gather through the cache and don't retrieve them each time (default: 400ms)
      + X1_LR_Boss_Despair Added to the RG's SNO list
      ~ Every condition now use cached data

      v1.0.4.2 (BETA)
      ~ Fixed OnJoinedGame default swapper (throwing error)
      ~ Fixed TrialZone XML Tag & Condition
      ~ Fixed an issue where 2H to 2H swap was considered "special"
      ~ Added missing Rift Guardians SNOs (some may still be missing, thanks to report if you encounter them)
      ~ Well condition now only true when Trinity is targetting/gonna use one. (Suggested distance : 30)
      ~ Shrine condition now only true when Trinity is targetting/gonna use one. (Suggested distance : 30)
      ~ New Tools/Misc tab layout, have fun (make sure to have the bot stopped before pressing any dumping function)

      v1.0.4.1 (BETA)
      + Added "Default" swap override in OnJoinedGame, so after a crash/relog it should swap back.
      + Added XML Tag - <EnableTrialZone state="True/False" /> - To swap before/after Trial.
      + Added option/condition "TrialZone" (only true when using XML tag to enabled/disable it)
      + Added option to override Trinity's wells weighting (Weighting max distance is based on WellDistance *3)
      ~ Changed min distance for Wells from 30 to 0.
      - IsRunningZergProfile no longer checks for profile names.
      - Removed the 250ms break for danettas swap, anyway, it was for testing purposes.

      v1.0.3.9 (BETA)
      + Compatibility with Trinity 2.1.5 and higher !
      + Added Actors update randomly (5 to 10 seconds) (probably becoming useless soon)
      ~ Fixed error for RevertGear method
      ~ Fixed homing pads condition (bad reflection)
      ~ Having a 2H as default doesn't throw an error anymore (and doesn't block swapping)
      ~ Fixed inventory not showing/going full stupid when "Open backpack" setting is enabled.
      ~ Default chests distance now 25. (from 30)
      ~ Default shrines distance is now 30. (from 60)


      v1.0.3.8 (BETA)
      + GUI has been reworked entirely for better understanding and less space usage
      + Added support for "ZupaZerg" mode of KeyBot !! YESH ! (Hover the setting to get informations about it)
      ~ Removed shrine selection for Nemesis, now only working with GoW
      ~ Fixed skill usage, will return true if skill is in list but we have no gear to equip for it


      v1.0.3.7 (BETA)
      + "Health Globes" condition now ready to roll, enjoy reaper wraps.
      + Added Override setting for Health globes weighting in trinity.
      + "Health Globes" condition is only true if we're missing a certain amount of primary ressource
      + Added slider for Primary Ressource missing ("Health Globes" condition)
      + Shrines to detect now configurable (jubisman's suggestion)
      ~ Fixed Shrines SNOs
      ~ Homing Pads condition now have its own behavior, it cancels the recall if it's doing so and equip afterwards.
      ~ Danetta's behavior (CombatDisabled) is fixed (you probably noticed that this was the only behavior not working.)
      ~ GearBehaviors.RefreshItemLocationInBag() now loop until we return a value for the item searched. (Can't infinite loop, max loops is 5)


      v1.0.3.6 (BETA)
      + "CombatDisabled" logic now fully working.
      + "Default" condition now back in track and working.
      + "HP Threshold" condition implemented (if boss/elite HP% > threshold, keep equipped).
      + "HomingPads" condition implemented but needs deeper thinking to make it work as intented.
      + "MovementImpaired" can now take care about being Immune.
      + Chests now have their own slider for distance.
      + Wells now have their own slider for distance.
      + Elites now have their own slider for distance.
      + Added management for Trinity's avoidance (enable/disable) and checkbox.
      + Added GSRContainers XML Tag (see wiki for more informations).
      + Added GSRRestoreContainers XML Tag (see wiki for more informations).
      + Danetta's set now have its own swap behavior, with stuff location checks.
      + Swapping a 2H when we have 1H + OH/Shield now have its own behavior and protect the offhand/shield from being stashed temporary.
      + Added fail-safe "Add Current Gear As Default" behavior for Quivers.
      + Managed Gear List now fully working and organizable.
      + Settings are now saved per char (still needs to reload DB to change the files, gonna think about it asap).
      + GSR now waits 2 seconds before attempting to swap when joining a game or starting the bot.
      ~ Gloves of worship now fixed (and shrine condition overall too).
      ~ Altered Trinity's GearSwap classes (I suggest to delete the GearSwap folder entirely and copy it again)
      ~ Priorities globally fixed.
      ~ Swap for skills may be fixed (well, needs testing but through my tests it worked).
      ~ GUI has been completely reworked.
      ~ All settings default values have been set to False.
      - Removed shit ton of useless code.

      RELEASE Changelog (might be outdated) :

      --- 1.0.4 Well, sounds legit.
      + Includes changes from 1.0.3.1 (BETA) to 1.0.3.9 (BETA)
      + Added KeyBot synergy, KeyBot can now force HomingPads & CombatDisabled condition
      + No more memory usage when in TrialZone or Grift ! :)
      + Added support for Conduit Pylon, disables combat behavior while active. (EXPERIMENTAL, USE WITH CAUTION)
      ~ Swapping with 2H as default no longer throw an error/disable/block swapping
      ~ Chest condition now works on any possible object for the proc. (Sorry, fucked it up in .9)
      ~ Default conditions priorities order has been modified, almost ready2go.
      ~ Fixed GUI Issue with 1 items handling more than 1 condition. (thanks buddyme, he broke the GUI q_q)
      - Removed "SafeZerg" option for KeyBot, no longer needed, buddyme is a boss.
      - Removed Actor Update every 10 seconds (reduce/remove TPS drops)
      - Removed Priorities update for multiple swaps (based on their priorities) /!\ NEEDS TESTING /!\

      --- 1.0.2 Minor bugfixes
      ~ OOC reworked, should now work properly
      ~ OOC Default distance is now 80 (else it's too short and it's swapping too often)
      ~ Reverting stuff should now handle OOC condition
      To avoid issues, when you set OOC gear, set the other piece as Default.

      --- 1.0.1 Minor bugfixes
      + OOC Enabling/Disabling
      ~ Reverting stuff should now be fixed
      ~ Tweaked Elite trigger range to 70 (I may lower it if needed)

      --- 1.0 Initial Release
      + GearSwap now have its own logging tab
      ~ Fixed reverting original stuff back

      Reporting an issue (use this pattern) :

      PHP:
      [B]Version of GSR :[/B]
      [
      B]Condition (GSR ofc) :[/B]
      [
      B]Screenshots of your configuration (linksnot picturesatleast Main and ManagedGear Tabs) :[/B]
      [
      B]Description of the Issue :[/B]
      [
      B]Error in the log ? :[/BY/N
      [B]Error thrown (the thing written in the log) :[/B]
      [
      B]Potential Idea of what is going wrong Guide me messiah ! :[/B]
      Old versions :
       

      Attached Files:

      Last edited: Oct 16, 2014
    3. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      bottoms up! :D
       
    4. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      You know what that means right? :)
       
    5. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      dunno ;D
       
    6. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      I'm testing now :D
       
    7. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      Keep me updated, I seem like to have performance issues from trinity (I'm running through my IDE (visual studio) so it may be this) lemme know if it happens for you too
       
    8. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      first, It's not swap immune amulet, when checked the Arcane, fire, etc , even I have immune amulets in Inventory.

      Second, OutofCombat is work with steed charge with particular item which is I managed in option.
      But, Half works, If I met combat mode, It won't change default weapon gear.
       
    9. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      I don't face it, It works like normal at least now.
       
    10. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      Alright, can you past the log (GearSwap's tab) there, what is your Managed gear configuration, I got my toon to swap for Poison atm, trying Arcane (need to encounter one of those bitches)
       
    11. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      Swiftmount.

      Im sorry to not paste log, i have to sleep now...:(. Its 6 am..

      But, i can tell you that, there is not try to swap original gear(firelight. Which is set to default)

      Gearswap cant recogniZe what is exactly status (combat, ooc)
       
    12. PoohBear

      PoohBear New Member

      Joined:
      Mar 26, 2014
      Messages:
      26
      Likes Received:
      0
      Trophy Points:
      1
      Make sure that you set your managed gear and priority for what gear you are swapping. The hard coded default gears have been moved from this plugin in so that you now have complete control over what equipment is swapped for what status. This however means that you will need to add all equipment swaps manually.
       
    13. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      He's right, the RevertGear is fucked up, trying to fix it up now

      EDIT : It seems i've fixed the revert bullshit, need deeper testing tho, gonna do it for an hour or so, to check. Keep the suggestions/report bugs going!

      EDIT 2 : the items were marked for replace (so basically, swapping back) wrongly when there was 2 or more conditions. checking that
       
      Last edited: Jul 26, 2014
    14. PoohBear

      PoohBear New Member

      Joined:
      Mar 26, 2014
      Messages:
      26
      Likes Received:
      0
      Trophy Points:
      1
      There is a small issue where if you enable and disable the plugin that it keeps adding a new GearSwap tab. I think the OnDisable needs:

      Code:
      public void OnDisabled()
              {
                  Logging.WriteToLog("Plugin Disabled");
                  GameEvents.OnGameLeft -= Events.GameEvents.CleanUp;
                  GameEvents.OnGameJoined -= Events.GameEvents.Prep;
      			LogTab.RemoveTab();
              }
      
       
    15. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      removed it then forgot to put it back... oopsy
       
    16. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      fixed??? I woke up :D . I can't make sure, you updated a file or not. so,, I wait and sit here :D
       
    17. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      Nope, i'm trying to find why when more than 2 pieces are swapped, sometimes it doesn't swap back. Trying to find the part of the code going nuts

      EDIT : such pain to find Arcane + Plagued... xD
       
      Last edited: Jul 26, 2014
    18. PoohBear

      PoohBear New Member

      Joined:
      Mar 26, 2014
      Messages:
      26
      Likes Received:
      0
      Trophy Points:
      1
      I was fiddling around with this and used the existing logic to give me a descent temporary solution for myself. I uncommented the OutOfCombat check as some logging showed me that it is pulsing almost all the time even when in combat. Taking this out, I at least get my gear to revert after the status' that I'm checking.
       
    19. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,771
      Likes Received:
      35
      Trophy Points:
      48
      I added a checkbox for it, but even without this one I think I found the flaw. let's see after some testing

      EDIT : here you go, took me the night but found where the cluncky part was. Version 1.0.1 is out

      let me know if there's any issues (particularly with OOC if some are using)
       
      Last edited: Jul 27, 2014
    20. junggi

      junggi New Member

      Joined:
      May 9, 2014
      Messages:
      110
      Likes Received:
      0
      Trophy Points:
      0
      going to test! yeah
       

    Share This Page