• Visit Rebornbuddy
  • [BotBase] RaidBot - 30fps CC Execution

    Discussion in 'Botbases' started by Apoc, Feb 19, 2012.

    1. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      Basically; all this bot does is run your current CC's Heal->CombatBuff->Combat behavior, at 30fps, within a FrameLock.

      This is meant to be used for people who use LazyRaider *only* for the "fight for me" support. It makes no claims to deal with targeting, or anything else. It simply runs your entire CC at 30fps (or as close as it can get to it).

      Note: I haven't actually messed with this myself, but it should work.

      The idea is, since HB by itself tends to be a bit slow due to plugins, and other overhead, it can vastly drop your DPS. Add on top of that some internal complexities, and you gradually slow down how frequently HB can "Pulse". This BotBase works around these issues, by ensuring the entire combat logic is executed within a single frame.

      I take no responsibility for any CC not working, or for any bugs you may encounter. Hopefully this may spawn a new set of super-speed CCs designed to run at 30fps (and achieve the top-DPS numbers that normal players can).

      I won't bother uploading the .cs file, nor explaining how to install/use it. This is simply some proof-of-concept code to show that HB can run as fast as your game (almost)

      Code:
      using Styx;using Styx.Logic.BehaviorTree;
      using Styx.Logic.Combat;
      
      
      using TreeSharp;
      
      
      namespace RaidBot
      {
          public class RaidBot : BotBase
          {
              private byte _oldTps;
              private Composite _root;
      
      
              #region Overrides of BotBase
      
      
              public override string Name { get { return "Raid Bot"; } }
              public override Composite Root { get { return _root; } }
      
      
              public override PulseFlags PulseFlags { get { return PulseFlags.Objects | PulseFlags.Lua; } }
      
      
              #endregion
      
      
              public override void Start()
              {
                  _oldTps = TreeRoot.TicksPerSecond;
                  TreeRoot.TicksPerSecond = 30;
                  _root = new Decorator(
                      ret => StyxWoW.Me.Combat && StyxWoW.Me.GotTarget && !StyxWoW.Me.CurrentTarget.IsFriendly,
                      new LockSelector(
                          RoutineManager.Current.HealBehavior,
                          RoutineManager.Current.CombatBuffBehavior,
                          RoutineManager.Current.CombatBehavior));
              }
      
      
              public override void Stop()
              {
                  TreeRoot.TicksPerSecond = _oldTps;
              }
      
      
              #region Nested type: LockSelector
      
      
              private class LockSelector : PrioritySelector
              {
                  public LockSelector(params Composite[] children) : base(children)
                  {
                  }
      
      
                  public override RunStatus Tick(object context)
                  {
                      using (new FrameLock())
                      {
                          return base.Tick(context);
                      }
                  }
              }
      
      
              #endregion
          }
      }
       
      highvoltz, shinavaka and m0rf0 like this.
    2. znuffie

      znuffie Banned

      Joined:
      Feb 23, 2010
      Messages:
      864
      Likes Received:
      30
      Trophy Points:
      28
      Keep in mind this will NOT pulse your plugins (in simple terms: your plugins won't work/run).
       
    3. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      Correct. Thats by design. (Most plugins just do pointless stuff that slows down the pulses. This should avoid that as much as it can.)
       
    4. Giwin

      Giwin Well-Known Member Buddy Store Developer

      Joined:
      Dec 3, 2011
      Messages:
      3,431
      Likes Received:
      49
      Trophy Points:
      48
      okay.jpg
       
    5. kkkade

      kkkade New Member

      Joined:
      Jan 15, 2010
      Messages:
      40
      Likes Received:
      1
      Trophy Points:
      0
      this is what i was searching for. no more addons now :p thanks apoc
       
    6. Kopped

      Kopped New Member

      Joined:
      Feb 24, 2010
      Messages:
      178
      Likes Received:
      1
      Trophy Points:
      0
      I hope everyone includes this to their cc's :)
       
    7. buzzerbeater

      buzzerbeater Well-Known Member

      Joined:
      Mar 21, 2011
      Messages:
      5,419
      Likes Received:
      28
      Trophy Points:
      48
      Great, always had huge problems with slowly reacting CCs.

      Will give it a try at home.
       
    8. weischbier

      weischbier Guest

      Here it is as a *.cs file.
      I just added PrecombatBuffBehaviour into it nothing more.

      THIS IS A BOT. YOU HAVE TO PUT THIS INTO YOUR BOT FOLDER!

      I won't maintain this nor will i take any bug reports. This is simple copy pasta, basta.

      greetz

      Weischbier
       
    9. jamjar0207

      jamjar0207 New Member

      Joined:
      Feb 4, 2010
      Messages:
      80
      Likes Received:
      0
      Trophy Points:
      0
      Thanks Apoc.
      I decided to run a quick test and copied your code and used it as a botbase.
      I ran ultraxion 25 LFR using my custom warlock file with felmaster.

      Using combat bot i did 19.6k DPS.
      Using raidbot i did 29.5k DPS
       
    10. sevaa

      sevaa Member

      Joined:
      Apr 28, 2010
      Messages:
      327
      Likes Received:
      0
      Trophy Points:
      16
      Works great thanks Apoc , and thanks weischbier for the .cs

      Tested on my crappy ilvl 344 destro lock , LazyRaider + Plagueheart did 9.5k on 85 dummy , Raid Bot + Plagueheart did 12.8k
       
    11. neodite

      neodite New Member

      Joined:
      Oct 12, 2010
      Messages:
      498
      Likes Received:
      3
      Trophy Points:
      0
      Cheers for this Apoc.

      The slow down of DPS/HPS within HB was really hurting it. (Even tho people argued the toss it was fine)

      Nice to see it was simple to get around it to have HB as pure pewpew bot when people need it
       
    12. theatristformallyknownasG

      theatristformallyknownasG New Member

      Joined:
      Jan 16, 2010
      Messages:
      3,043
      Likes Received:
      8
      Trophy Points:
      0
      Must install lazyraider one day.

      G
       
    13. Kopped

      Kopped New Member

      Joined:
      Feb 24, 2010
      Messages:
      178
      Likes Received:
      1
      Trophy Points:
      0
      How can we get this on other botbases? :p
       
    14. bot till ya drop

      bot till ya drop New Member

      Joined:
      Dec 4, 2011
      Messages:
      151
      Likes Received:
      0
      Trophy Points:
      0
      This is good news, ive been using a different Bot for combat/healing and HB for farming leveling due to the difference in Hps/Dps
       
    15. CodenameG

      CodenameG New Member

      Joined:
      Jan 15, 2010
      Messages:
      38,396
      Likes Received:
      231
      Trophy Points:
      0
      we do NOT want this in other botbases, most things like normal fighting or gathering does not need to be run at 30 ticks. this is one of those only times where
      1. your only running 1 WoW and 1 Honorbuddy
      2. you dont need plugins - as your playing manauly
      3. your not running advanced logic like questing

      doing this WILL increase CPU usage, so integrating it into places where its not needed makes no sense.
       
    16. znuffie

      znuffie Banned

      Joined:
      Feb 23, 2010
      Messages:
      864
      Likes Received:
      30
      Trophy Points:
      28
      [​IMG]

      RaidBot + Singular (ILA Modifications + My Own)... I was the tank.
       
    17. Filmfilm

      Filmfilm Member Legendary

      Joined:
      Jan 15, 2010
      Messages:
      118
      Likes Received:
      1
      Trophy Points:
      18
      Just did Madness with DeathShade v2.0 ALPHA CC. 391 ilevel Rogue.
      He did 63.2k DPS. Thats amazing.

      With lazyraider I've gotten about half that.
      That beeing said, Shaddar just updated his CC. So I'll have to use lazyraider with the same CC to compare.
      Anyway, this looks very promising! Cheers apoc
       
    18. jamjar0207

      jamjar0207 New Member

      Joined:
      Feb 4, 2010
      Messages:
      80
      Likes Received:
      0
      Trophy Points:
      0
      Ok i'm a bit new to this and need some clarification.

      Say i have an exeptionally long CC and on line 10000 i have CastSpell("Exorcism") If PlayerHasBuff("Art of War") if the pulse occurs b4 the CC gets to the line would the CC return to the begining never casting exorcism or would it continue through the CC only updating the values/definitions.


      Thanks Apoc i understand now.
       
      Last edited: Feb 20, 2012
    19. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      It will only pulse as fast as your CC can allow. (Please google "Control Flow" in terms of programming for a better explanation, and answer to your question)
       
    20. imdasandman

      imdasandman Active Member

      Joined:
      Feb 2, 2011
      Messages:
      1,207
      Likes Received:
      6
      Trophy Points:
      38
      Apoc I am gonna test this exclusively next week in HM's instead of running PQR but so far doing test in 5mans on my alt warrior this thing is processing logic faster than PQR. So if this holds up you just finally made HB the best of all worlds type bot :D
       

    Share This Page