• Visit Rebornbuddy
  • [Zekken] Avoid telegraphed attacks.

    Discussion in 'Plugins' started by Neverdyne, Dec 6, 2014.

    1. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      [Zekken] Avoid telegraphed attacks! (v1.4.2)

      [​IMG]

      Because she wouldn't have stood in the fire.
      Version 1.4.2

      October 10, 2015

      I've attached a new version that mistahmikey was kind enough to update. It should make compiling the shape database safer. Previously, if you had the formatting wrong, it would destroy your database file upon compilation.

      Changes v1.4.2

      • Fixed screenshots. The behavior is the same as before, however anything that is on your primary monitor is what will show up on the screenshot. For best results, keep the game's window open.
      • Added a few more spells to the database.
      • Minor tweaks to the movement logic.

      Changes v1.4.1

      • Changed the settings window.
      • Refactored some stuff to make code cleaner.
      • Changed avoidance logic to move less in general.
      • Changed flag "TargetedOnOther" to "TargetedOnRandom".
      • Cleaned up the database a little.
      • Added a Settings window now. You can disable / enable different avoidance situations. Compile button is inside the window now.

      Changes v1.3

      • Minor update.
      • Made Zekken less chatty, won't spam your log too much now.
      • It will now log the spell ID and shape when avoiding, so if you think a flag is wrong you can correct it in the DB.
      • Bigger database, up to 58 spells now!

      Changes v1.2

      • Major changes to the avoidance logic. Should be much smarter than before.
      • Multi-cast awareness, Zekken now avoids spells from any mob nearby irregardless of what your target is.
      • No longer avoids directional telegraphs if the mob is not facing you.
      • Now waits for telegraphs to blow up before going back in.
      • If multiple mobs are casting stuff near you, Zekken will try to find the safest position by combining their avoidance vectors.
      • Removed the "Radius" "Height" and "Angle" flags. Don't worry, the compiler will clean your databases for you.
      • Flags "Height" and "Radius" are now "Reach". There was no need to have them apart.
      • Flag "Angle" is now "Width", no need to have it.
      • Added the "NotTelegraphed" flag. You can now add normal spells to the database with this flag, and Zekken will ignore them and NOT log them anymore.
      • You can now compile the database without having to stop the bot, Zekken will reload it safely and continue.

      To merge your current database with the new version, simply move the XDatabase.xml file you have right now to somewhere else and rename it. Then delete the Zekken folder and copy the new version's folder. After that, move your old XDatabase.xml file back into the Shapes folder and Compile.

      Install

      1. Simply place the uncompressed Zekken folder into your /Rebornbuddy/Plugins/ folder.
      2. Use either FateBot or OrderBot with the combat routine of your choosing.

      Description

      Zekken will make your bot avoid telegraphed spells depending on their shape characteristics. Currently, it avoids frontal and circular spells originating from the mob. A spell that is not currently in Zekken's database will instead make Zekken hide your UI and take a screenshot of it. Right now, there is no way for Rebornbuddy to know if a spell is telegraphed and what its shape is. Because of this, Zekken uses a separate Spell Shape Database that lists spells by ID and provides them with shape characteristics.

      Shape Database

      Quick Explanation Video

      If you're grinding a spot and one of the mobs does a nasty telegraphed spell, to make Zekken avoid it in the future you have to add it to the shape database. To do that, do the following:

      1. Go to /Rebornbuddy/Plugins/Zekken/Spell Screenshots/ and take a look at the screenshot of the spell you want to add. Notice the number in the screenshot's name, that's the spell's ID.
      2. Go to /Rebornbuddy/Plugins/Zekken/Spell Shapes/ and open the XDatabase.xml file.
      3. There are a few spell shape entries on the database already, copy paste one of the "XSpellShape" elements and change the ID property to the new spell's ID.
      4. Modify the "Flags" properties of your new entry. These flags describe the shape of the telegraph. Be accurate, don't leave "Circle" and "Rectangle" on the same spell.
      5. Save the XDatabase.xml file and close it.
      6. On the Rebornbuddy application, go to Plugins and select Zekken. Click the "Compile" button, located where plugin settings usually are.

      That's it! Now Zekken will avoid the new spell.

      Sharing The Database

      Zekken facilitates sharing your spell shape database with others. Simply post the XDatabase.xml file on the forums. If you want to add someone else's database to yours, simply change the name of their XDatabase.xml file and put it into the same folder as yours (you can change their names to whatever you want no problem) and click "Compile". The compilation process takes care of sorting out repetitions and merging flags.

      Shape Flags

      These are the flag attributes you can add to a spell entry.

      • Cone
      • Rectangle
      • Circle
      • WidthSmall
      • WidthMedium
      • WidthLarge
      • ReachSmall
      • ReachMedium
      • ReachLarge
      • DirForward (The spell is projected forward from the mob's perspective.)
      • DirBackward
      • DirLeft
      • DirRight
      • TargetedOnRandom
      • TargetedOnTarget (The spell originates from the mob's target's position.)
      • TargetedFromCaster (The spell originates from the mob's position.)
      • Interruptible
      • NotTelegraphed (Zekken ignores spells with this flag, the spell won't be logged either.)
       

      Attached Files:

      Last edited: Oct 11, 2015
      Gentoo and parrot like this.
    2. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      I'll upload a video to youtube later to show how to add your own spell shapes into the database.
       
    3. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      Your missing tons of the ones I uploaded!!! Booo on you! I'll have to add them myself!
       
    4. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      Bug sir! I added in Double Smash, and it's working great,

      Code:
        <XSpellShape>
          <Id>618</Id>
          <Flags>Cone</Flags>
          <Flags>AngleLarge</Flags>
          <Flags>TargetedFromCaster</Flags>
          <Flags>DirForward</Flags>
          <Flags>HeightMedium</Flags>
        </XSpellShape>
      
      Bug comes in when you're /already/ behind the mob. The bot detects the cast and moves forward, butting you right into the AoE lol
       
    5. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Haha, yeah I know that happens. I'm still changing the movement logic to make it better, honestly it's a little premature right now. But I decided to release it like this because all the database stuff is set in stone, so people can start adding spells they care about. Even if the movement logic changes later, your database stays the same so you only have to add spells once, and none of the database stuff will change so you're safe populating it now.

      So yeah it's not a bug it's a....errr...feature! ....that will change in the next version lol
       
      Last edited: Dec 6, 2014
    6. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      I'll also start populating the database myself with the spells you guys sent to the drive, but I just haven't had the time due to making the plugin. I'll first make the movement logic better and then get on to the database. The good thing though is that the database is easy to share, during compilation any repetitions or conflicts are resolved and all the XML files in that folder get merged into one, so you can put someone else's database in the folder and safely compile, merging them and cleaning them automatically.
       
    7. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      I added a few I've captured while using it and also reordered things and cleaned things up and put them in order by ID (I'm a bit OCD), attaching it here if you want to use it.
       

      Attached Files:

    8. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      Also, another "feature" lol. Sometimes it detects the ability twice

      Code:
      [21:25:01.397 N] [Zekken] Avoiding! Using strategy "Run Through Him!"
      [21:25:01.397 N] [Zekken] Moving towards <645.6854, 317.464, -382.2538> with direction (True, True).
      [21:25:02.273 N] [Zekken] Avoiding! Using strategy "Run Through Him!"
      [21:25:02.273 N] [Zekken] Moving towards <645.6854, 316.6254, -382.2538> with direction (True, True).
      
      It's detecting the same spell cast twice :(
       
    9. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Ok that is a bug lol, that should not happen. Just to make sure, did the bot maybe change targets? If it's the same target and same spell then yeah it's a bug, I'll look into it. Also, don't worry about the ordering, I'll do it automatically every time you compile. I didn't want to go too much into it so the description doesn't get too complicated, but what the compilation actually does is:

      1. Grabs any .xml files on the folder, doesn't matter their name (except for the example one).
      2. Extracts the shape information out of each, and combines it removing duplicates and merging flags.
      3. Deletes every .xml file on the folder, then saves a new XDatabase.xml file with all the data combined.
      4. Creates the ShapeData.bin file one folder before, which is what Zekken actually uses.

      Notice you don't have to worry about wether a spell is already there or not, you can simply add it and if it was already there the compilation will remove the duplicate.
       
    10. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      Okay cool, good to know.

      ANd yeah, it didn't change mobs. It was the Bellyfull FATE in Coerthas Central Highlands, it's a boss FATE so there was only one mob.
       
    11. keikune

      keikune Member

      Joined:
      Sep 30, 2012
      Messages:
      36
      Likes Received:
      0
      Trophy Points:
      6

      Thx mate :D
       
    12. Shambo

      Shambo New Member

      Joined:
      Jul 4, 2014
      Messages:
      89
      Likes Received:
      1
      Trophy Points:
      0
      Oh wow, this is going to be awesome once all the data is there. Great work.
       
    13. ZaneMcFate

      ZaneMcFate Member

      Joined:
      Nov 17, 2014
      Messages:
      137
      Likes Received:
      2
      Trophy Points:
      18
      I must say, this is a brilliant method for crowd sourcing your content; well done! I have already added a couple projected spells to my database, and the plugin is avoiding them. Might have to tighten down the avoidance methods, but I'll take anything over the previous behavior!

      So, one thing I have noticed off the bat, while avoiding a cone spell I entered, my character very quickly runs through the mob, turns, and runs back in, well within the telegraphed time frame, so he still takes the hit. Is this operating on a standard time frame for the telegraphed attack, or does it just run the routine so quickly that it gets back too fast?
       
    14. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Thanks! Yeah, the idea is that categorizing thousands of spells myself would be impossible, but if people add the spells they care about and merge their database with others, little by little the data grows.

      @ZaneMcFate The problem you're describing is exactly what you said, the behavior for small cones on 1.0 is to move through the mob if you're near it, and only move until you reach melee range on the other side. The combat routine then regains control. I'm guessing the combat routine might have it's melee range too close to the mob so it runs back in front. But yeah, Zekken moves him out then passes control back to the combat routine, at which point the routine is free to move wherever. I'll look into possible solutions to this, the problem is that if I only return control after the spell is cast, your character will stand there for a while doing nothing waiting for it.

      Avoidance in general is very rough right now, the idea is to get the plugin out asap so people can start populating the database. I'm working on a new version right now with much improved avoidance logic, even including multi-cast avoidance, meaning Zekken will try to avoid spells from any enemy nearby if that spell would hit you, irregardless of who your target is, which should help healers. I'll test it tomorrow and maybe release it late at night.
       
    15. kagamihiiragi17

      kagamihiiragi17 Community Developer

      Joined:
      Jun 24, 2014
      Messages:
      873
      Likes Received:
      25
      Trophy Points:
      0
      Hmm. Where do most people call their movement logic in a CR? You could always manually call the combat hooks when in the process of avoiding, if those hooks don't move the character.
       
    16. ZaneMcFate

      ZaneMcFate Member

      Joined:
      Nov 17, 2014
      Messages:
      137
      Likes Received:
      2
      Trophy Points:
      18
      Some sort of non threaded wait might work, since you know you have a few milliseconds to stajd around, just don't execute the avoidance until closer to expiration.

      Very happy to see someone addressing this situation!
       
    17. ZaneMcFate

      ZaneMcFate Member

      Joined:
      Nov 17, 2014
      Messages:
      137
      Likes Received:
      2
      Trophy Points:
      18
      Zekken is throwing exceptions in Coerthas, not sure the cause at the moment. Log attached.
       

      Attached Files:

    18. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Thanks, I'll look into it. I should hopefully be able to release the next version today.
       
    19. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Major redesign of the plugin, now hopefully much smarter than before. Your current database can be merged with the new one no problem, just put both files on the folder and Compile. You can rename one of them to whatever you want so there's no naming conflicts.
       
    20. hkme

      hkme Member

      Joined:
      May 12, 2014
      Messages:
      197
      Likes Received:
      0
      Trophy Points:
      16
      Thanks for the work done. Is there any picture to demo the size chart of the shape flags, how large is large?
       

    Share This Page