[Zekken] Avoid telegraphed attacks! (v1.4.2) 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.)
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
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
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.
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.
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
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.
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.
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?
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.
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.
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!
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.
Thanks for the work done. Is there any picture to demo the size chart of the shape flags, how large is large?