• Visit Rebornbuddy
  • Default Combat Discussion

    Discussion in 'Combat Routines' started by Ama, Jan 5, 2015.

    1. obseoe

      obseoe New Member

      Joined:
      Sep 17, 2014
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      0
      Hello! I have next problem with default combat (before i used Joe's combat, but with Joe's my bots does not resurrect from time to time):
      When my bot stuck, he trying to run back and left, doing that 3 times. If that's does not help, after 3 attempts of running back bot and game usually crashing or character start running at random side and doing it till game crashing. So Every time when my bot stuck if run back and left does not help he will crash or run away from spot.
      How to fix that?

      Also additional question. I'm new user and purchased 3x sessions, i spent 3 weeks to get one my bot to level 50, other 2 is lower then 40 lvl.
      I tried to use questing profiles for leveling, but found them very unstable. Then i decide to use usual grind profiles, make them by myself. But how i see now leveling to level 50 from 1 will take about 8-10 days minimum.
      I find on forum posts about class quests with 12x experience, but i have not found any working profile for that method. Can anybody recommend me ways of leveling for my toons.

      And last problem. When i run bot on any of my PC's (for example i7 4770 / 32gb) buddywing.exe load one of 8 cores for 100% (so i see in taskmanager 12-13% loading of cpu from buddywing.exe) when character start combat. At any other moment, looting, moving all fine, but as soon as i'm in fight - getting overloading of cpu.

      Sorry for my bad English.
      I'm really already spent 3 weeks before write this post and very hope that somebody can help me.
       
      Last edited: Sep 12, 2015
    2. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      This is for the codes around here (Ama, Alltrueist, etc.)
      I keep getting this over and over during combat inside my log:
      Code:
      2015-09-12 10:00:19,341 [Main Bot Thread] ERROR Log - System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
         bij Buddy.Swtor.Objects.TorObject.get_DataBaseOffset()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.get_DbOffset()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](UInt64 , HeroType )
         bij Buddy.Swtor.Objects.TorObject.GetField[T](DomFieldIds field, HeroType forcedType)
         bij Buddy.Swtor.Objects.TorCharacter.get_InCombat()
         bij DefaultCombat.Helpers.Extensions.IsValidTarget(TorCharacter c) in [B][...]\Routines\DefaultCombat\Helpers\Extensions.cs:regel 103[/B]
         bij DefaultCombat.Core.Targeting.<get_ScanTargets>b__0(Object param0) in [[B]...]\Routines\DefaultCombat\Core\Targeting.cs:regel 121[/B]
         bij Buddy.BehaviorTree.Action.RunAction(Object context)
         bij Buddy.BehaviorTree.Action.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij DefaultCombat.Core.LockSelector.Tick(Object context) in [B][...]\Routines\DefaultCombat\Core\LockSelector.cs:regel 17[/B]
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.Common.HookExecutor.Run(Object context)
         bij Buddy.BehaviorTree.Action.RunAction(Object context)
         bij Buddy.BehaviorTree.Action.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.CommonBot.BotMain.?????????????????????????????????????????()
      
      Its stating that it has troubles with some lines inside 3 files.
      Can anyone confirm this, they have the same?
      Maybe this is what causes the lag during combat?

      Extensions line 103:
      Code:
      return c != null && c.InCombat && c.IsHostile && !c.IsDead && !c.IsStunned && !c.IsCrowdControlled();
      
      Part of (lines 101 to 104):
      Code:
              public static bool IsValidTarget(this TorCharacter c)
              {
                  return c != null && c.InCombat && c.IsHostile && !c.IsDead && !c.IsStunned && !c.IsCrowdControlled();
              }
      
      
      Targeting line 121:
      Code:
      if (c.IsValidTarget())
      
      This line of targeting goes back to extensions

      Lockselecter line 17:
      Code:
      return base.Tick(context);
      
      Part of lines 1-22:
      Code:
      using Buddy.BehaviorTree;
      using Buddy.Swtor;
      
      namespace DefaultCombat.Core
      {
          public class LockSelector : PrioritySelector
          {
              public LockSelector(params Composite[] children)
                  : base(children)
              {
              }
      
              public override RunStatus Tick(object context)
              {
                  using (BuddyTor.Memory.AcquireFrame())
                  {
                      return base.Tick(context);
                  }
              }
          }
      }
      
       
    3. Teo

      Teo Member

      Joined:
      Oct 6, 2012
      Messages:
      35
      Likes Received:
      1
      Trophy Points:
      8
      On Targetting.cs, replace line 178 from:
      Code:
      objects.Add(c as TorCharacter);
      
      with:
      Code:
      {
          var o = c as TorCharacter;
          if (o != null)
              objects.Add(o);
      }
      
      Same on line 186.

      Let me know if that helps.
       
    4. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Thanks man, tested it, but it still throws errors out.
      its only in targeting, which referes back to Extensions to this code:
      Code:
              public static bool IsValidTarget(this TorCharacter c)
              {
                  return c != null && c.InCombat && c.IsHostile && !c.IsDead && !c.IsStunned && !c.IsCrowdControlled(); //this line!
              }
      
      code part of targeting:
      Code:
                                  //Dps
                                  if (c.IsValidTarget())
                                  {
                                      //Enemies.Add(c);
                                      EnemyPoints.Add(c.Position); // this line!
                                  }
      
      Also Lockselector still craps out.
       
    5. Teo

      Teo Member

      Joined:
      Oct 6, 2012
      Messages:
      35
      Likes Received:
      1
      Trophy Points:
      8
      Peculiar...

      Try replacing the line in extensions with:
      Code:
                  [COLOR=#008080][B]try[/B][/COLOR]
                  {
                      [COLOR=#000080]return[/COLOR] c != [B]null[/B] && !c.IsDeleted && c.InCombat && c.IsHostile && !c.IsDead && !c.IsStunned && !c.[COLOR=#191970][B]IsCrowdControlled[/B][/COLOR]();
                  }
                  [COLOR=#008080][B]catch[/B][/COLOR]
                  {
                      [COLOR=#000080]return[/COLOR] [COLOR=#008b8b][B]false[/B][/COLOR];
                  }
      
       
    6. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Thanks Teo, That worked for targeting!
      BUT, we got a new issue now in the buff part:
      Code:
      2015-09-13 09:55:50,788 [Main Bot Thread] ERROR Log - System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
         bij DefaultCombat.Routines.Combat.<get_Cooldowns>b__4(Object ret) in h:\Buddywing\BuddyWing 1.0.1236.734\Routines\DefaultCombat\Routines\Advanced\Sentinel\Combat.cs:regel 32
         bij DefaultCombat.Core.Spell.<>c__DisplayClass1b.<Buff>b__16(Object ret) in h:\Buddywing\BuddyWing 1.0.1236.734\Routines\DefaultCombat\Core\Spell.cs:regel 78
         bij Buddy.BehaviorTree.Decorator.CanRun(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij DefaultCombat.Core.LockSelector.Tick(Object context) in h:\Buddywing\BuddyWing 1.0.1236.734\Routines\DefaultCombat\Core\LockSelector.cs:regel 17
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij DefaultCombat.Core.LockSelector.Tick(Object context) in h:\Buddywing\BuddyWing 1.0.1236.734\Routines\DefaultCombat\Core\LockSelector.cs:regel 17
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.Common.HookExecutor.Run(Object context)
         bij Buddy.BehaviorTree.Action.RunAction(Object context)
         bij Buddy.BehaviorTree.Action.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.Decorator.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.BehaviorTree.PrioritySelector.?????????????????????????????????????????.MoveNext()
         bij (IEnumerator )
         bij Buddy.BehaviorTree.Composite.Tick(Object context)
         bij Buddy.CommonBot.BotMain.?????????????????????????????????????????()
      
      My guess is Lockselector craps out all the time, as every code goes into lockselector in the end.
      So for the buff part it relates to this piece of code:
      Code:
              #region Buff
              public static Composite Buff(string spell, Selection<bool> reqs = null)
              {
                  return
                      new Decorator(
                          ret => (reqs == null || reqs(ret)) && !Me.HasBuff(spell),
                          Spell.Cast(spell, ret => Me, ret => true));
      
              }
              #endregion
      
      BTW the lags people are having is, i think, related to BW itself. Whenever the game lags i get these like errors:
      Code:
      2015-09-13 09:58:16,224 [Main Bot Thread] INFO  Log - [Poi.Clear] Reason: Targeted unit is dead, clearing Poi and carrying on!
      2015-09-13 09:58:16,359 [Main Bot Thread] ERROR Log - System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
         bij [B]Buddy.Swtor.Objects.TorObject.get_DataBaseOffset()[/B]
         bij ?????????????????????????????????????????.?????????????????????????????????????????.get_DbOffset()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](UInt64 , HeroType )
         bij Buddy.Swtor.Objects.TorObject.GetField[T](DomFieldIds field, HeroType forcedType)
         bij Buddy.Swtor.Objects.TorCharacter.get_Health()
         bij Buddy.Swtor.Objects.TorCharacter.get_IsDead()
         bij Buddy.Swtor.Objects.TorNpc.get_IsLootable()
         bij Buddy.CommonBot.DefaultLootTargetingProvider.?????????????????????????????????????????([B]TorNpc [/B])
         bij System.Linq.Enumerable.<>c__DisplayClass0`1.<CombinePredicates>b__1(TSource x)
         bij System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
         bij System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         bij System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         bij Buddy.CommonBot.DefaultLootTargetingProvider.GetObjectsByWeight()
         bij Buddy.CommonBot.Targeting.Pulse()
         bij Buddy.CommonBot.Logic.BrainBehavior.?????????????????????????????????????????()
      
      or
      Code:
      2015-09-13 09:59:26,606 [Main Bot Thread] ERROR Log - System.Exception: Function GetHealth does not exist.
         bij ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](Boolean , String , Object[] )
         bij Buddy.Swtor.Objects.TorCharacter.get_Health()
         bij Buddy.Swtor.Objects.TorCharacter.get_IsDead()
         bij Buddy.Swtor.Objects.TorNpc.get_IsLootable()
         bij Buddy.CommonBot.DefaultLootTargetingProvider.?????????????????????????????????????????(TorNpc )
         bij System.Linq.Enumerable.<>c__DisplayClass0`1.<CombinePredicates>b__1(TSource x)
         bij System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
         bij System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         bij System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         bij Buddy.CommonBot.DefaultLootTargetingProvider.GetObjectsByWeight()
         bij Buddy.CommonBot.Targeting.Pulse()
         bij Buddy.CommonBot.Logic.BrainBehavior.?????????????????????????????????????????()
      
      or
      Code:
      2015-09-13 09:59:34,503 [Main Bot Thread] ERROR Log - System.Exception: Een ReadProcessMemory- of WriteProcessMemory-opdracht is slechts gedeeltelijk uitgevoerd, at addr: FF7C001F, Size: 168
         bij GreyMagic.ExternalProcessMemory.ReadByteBuffer(IntPtr addr, Void* buffer, Int32 count)
         bij GreyMagic.MemoryBase.ReadBytes(IntPtr addr, Int32 count)
         bij ?????????????????????????????????????????.?????????????????????????????????????????.get_Struct()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.get_Definition()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.get_NodeView()
         bij Buddy.Swtor.Objects.TorObject.get_DataBaseOffset()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.get_DbOffset()
         bij ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](UInt64 , HeroType )
         bij Buddy.Swtor.Objects.TorObject.GetField[T](DomFieldIds field, HeroType forcedType)
         bij Buddy.Swtor.Objects.TorCharacter.get_Health()
         bij Buddy.Swtor.Objects.TorCharacter.get_IsDead()
         bij Buddy.Swtor.Objects.TorNpc.get_IsLootable()
         bij Buddy.CommonBot.DefaultLootTargetingProvider.?????????????????????????????????????????(TorNpc )
         bij System.Linq.Enumerable.<>c__DisplayClass0`1.<CombinePredicates>b__1(TSource x)
         bij System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
         bij System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         bij System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         bij Buddy.CommonBot.DefaultLootTargetingProvider.GetObjectsByWeight()
         bij Buddy.CommonBot.Targeting.Pulse()
         bij Buddy.CommonBot.Logic.BrainBehavior.?????????????????????????????????????????()
      
       
    7. obseoe

      obseoe New Member

      Joined:
      Sep 17, 2014
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      0
      Can anybody help please?
       
    8. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
    9. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      You cant, Joes may has some handling with it, as he also had handling for resurecting in the same spot as death, but its not in the Defaultcombat routine. Its handled by BW itself.

      Hand level, its the fastest way. If you dont want this accept the instability or start editing files on your own.

      Set BW Affinity to 2 cores, and Priority to belownormal .
      Set SWTOR (both processes) to 6 cores and Priority to Realtime or High.
      You can set this under Taskmanager - Processes / details tab - right click on the proces.
       
    10. obseoe

      obseoe New Member

      Joined:
      Sep 17, 2014
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      0
      Set BW Affinity to 2 cores, and Priority to belownormal .
      Set SWTOR (both processes) to 6 cores and Priority to Realtime or High.
      You can set this under Taskmanager - Processes / details tab - right click on the proces.
      [/QUOTE]

      Thank you very much for answer!
      I have do that, but still (when i'm using default combat routine) buddywing.exe loads my processor to 13% and bot working very slow, in lags, while in combat. But as soon as combat ends, he start working fine again.
      So game working perfectly, no lags, swtor.exe (1) use about 5% of processor, swtor.exe (2) use same about 5% max, but buddywing.exe want 13% all time in combat and 1-5% out of combat. =/
       
    11. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Sadly known issue. We need to wait for Ama or someone else to take a look at the defaultcombat routine, to check out where this problem is coming from (IF its in the routine).
       
    12. nivitro

      nivitro New Member

      Joined:
      Jul 10, 2012
      Messages:
      89
      Likes Received:
      0
      Trophy Points:
      0
      I only had the fps drop issue while doing lvl1-10.

      When I was able to choose the specialization (Im inquisitor and chose assassin/deception) the fps drop issue was gone.

      The problem must be with the basic class rotation files (Agent.cs, BountyHunter.cs, Consular.cs, Inquisitor.cs, Knight.cs, Smuggler.cs, Trooper.cs & Warrior.cs).

      I also tried with my max lvl BountyHunter/Merc and fresh BountyHunter. Same thing, huge fps drop/lag from lvl1-10 with basic rotation but when specialization was chosen, no problem at all!
      To be sure I tried the same with my agent and same thing happened as before.
       
    13. Praline

      Praline Member

      Joined:
      Aug 17, 2015
      Messages:
      150
      Likes Received:
      2
      Trophy Points:
      18
      Could you guys also please look at Mercenary Bodyguard?
      As you can see it still does not pick up the correct Discipline and Rotation.

      <---begin log>
      2015-09-19 14:24:09,060 [7] INFO Log - Chose DefaultCombat as your combat routine.
      2015-09-19 14:24:09,061 [7] INFO Log - [DefaultCombat] Level: 60
      2015-09-19 14:24:09,062 [7] INFO Log - [DefaultCombat] Class: BountyHunter
      2015-09-19 14:24:09,062 [7] INFO Log - [DefaultCombat] Advanced Class: Mercenary
      2015-09-19 14:24:09,090 [7] INFO Log - [DefaultCombat] Discipline: CombatMedic
      2015-09-19 14:24:09,118 [7] INFO Log - [DefaultCombat] [Hot Key][F7] Toggle AOE
      2015-09-19 14:24:09,118 [7] INFO Log - [DefaultCombat] [Hot Key][F8] Load UI
      2015-09-19 14:24:09,119 [7] INFO Log - [DefaultCombat] [Hot Key][F12] Set Tank
      2015-09-19 14:24:09,119 [7] INFO Log - [DefaultCombat] Rotation Selected : Commando Combat Medic
      2015-09-19 14:24:09,144 [7] INFO Log - [DefaultCombat] Healing Enabled
       
    14. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Try adding this:
      Code:
      			
                  if (name == "CombatMedic" && BuddyTor.Me.AdvancedClass == AdvancedClass.Mercenary)
                  {
                      name = "Bodyguard";
                  }			
      
      after:
      Code:
                  if (name == "Balance" && BuddyTor.Me.AdvancedClass == AdvancedClass.Shadow)
                  {
                      name = "Serenity";
                  }
      let me know if this works, so it can be taken in the main build.
       
    15. Praline

      Praline Member

      Joined:
      Aug 17, 2015
      Messages:
      150
      Likes Received:
      2
      Trophy Points:
      18
      It is not happy with that. :)

      <begin log>....
      2015-09-21 13:00:32,100 [7] INFO Log - User is a BountyHunter
      2015-09-21 13:00:33,257 [7] INFO Log - Advanced Class: Mercenary / Discipline: CombatMedic
      2015-09-21 13:00:33,257 [7] INFO Log - Routine Path: Routines
      2015-09-21 13:00:34,905 [7] INFO Log - Medpac Created!
      2015-09-21 13:00:34,931 [7] INFO Log - [DefaultCombat] Level: 60
      2015-09-21 13:00:34,932 [7] INFO Log - [DefaultCombat] Class: BountyHunter
      2015-09-21 13:00:34,933 [7] INFO Log - [DefaultCombat] Advanced Class: Mercenary
      2015-09-21 13:00:34,956 [7] INFO Log - [DefaultCombat] Discipline: CombatMedic
      2015-09-21 13:00:34,981 [7] ERROR Log - Unhandled exception during init:
      System.ArgumentNullException: Value cannot be null.
      Parameter name: type
      at System.Activator.CreateInstance(Type type, Boolean nonPublic)
      at System.Activator.CreateInstance(Type type)
      at DefaultCombat.Core.RotationFactory.Build(String name) in d:\SWTOR Stuff\BwNew\Routines\DefaultCombat\Core\RotationFactory.cs:line 47
      at DefaultCombat.DefaultCombat.Initialize() in d:\SWTOR Stuff\BwNew\Routines\DefaultCombat\DefaultCombat.cs:line 55
      at Buddy.CommonBot.RoutineManager.set_Current(ICombat value)
      at Buddy.CommonBot.BotMain.SetCurrentCombatRoutine()
      at Buddywing.MainWindow.?????????????????????????????????????????()
       
    16. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      Probably the only way till the fix is to put bodybuard combat rotation skills into that combatmedic file
       
    17. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Does your RotationFactory.cs look like this?
      Code:
      using Buddy.Swtor;
      using DefaultCombat.Routines;
      using System;
      using System.Reflection;
      
      namespace DefaultCombat.Core
      {
          public class RotationFactory
          {
              public RotationBase Build(string name)
              {
                  //Set the basic class as the rotation if char has no advanced class
                  if (BuddyTor.Me.AdvancedClass == AdvancedClass.None)
                  {
                      name = BuddyTor.Me.CharacterClass.ToString();
                  }
      
                  if (name == "Rage" && BuddyTor.Me.AdvancedClass == AdvancedClass.Marauder)
                  {
                      name = "Fury";
                  }
      
                  if (name == "Focus" && BuddyTor.Me.AdvancedClass == AdvancedClass.Sentinel)
                  {
                      name = "Concentration";
                  }
      
                  if (name == "DirtyFighting" && BuddyTor.Me.AdvancedClass == AdvancedClass.Scoundrel)
                  {
                      name = "Ruffian";
                  }
      
                  if (name == "Balance" && BuddyTor.Me.AdvancedClass == AdvancedClass.Shadow)
                  {
                      name = "Serenity";
                  }
      			
                  if (name == "CombatMedic" && BuddyTor.Me.AdvancedClass == AdvancedClass.Mercenary)
                  {
                      name = "Bodyguard";
                  }			
      
                  string ns = "DefaultCombat.Routines";
                  var assembly = Assembly.GetExecutingAssembly();
                  var type = assembly.GetType(ns + "." + name);
                  var instance = Activator.CreateInstance(type);
                  return (RotationBase)instance;
              } 
          }
      }
      
       
    18. Praline

      Praline Member

      Joined:
      Aug 17, 2015
      Messages:
      150
      Likes Received:
      2
      Trophy Points:
      18
      Exactly like that, yes. :) As a matter of fact, I copied your code into a new Rotationfactory.cs and exactly the same errors as before. (And yes, I promise you I always remember to delete the CompiledAssemblies folder). I know it sucks if you cannot test yourself, but this time, it is really kinda messed up. Since the new GUI, a couple of things went haywire, and the calls to Rotationfactory.cs seems one of them) :)
      But, it does work to copy the Bodyguard.cs file to the Commando medic- was just hoping for a cleaner "fix" so others that might not want to edit and change, could play this class as well.
      Again, thank you very much for your help.
       
      Last edited: Sep 21, 2015
    19. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Meh i dont understand why it craps out. Its the same code as everything above.
      Anyways i put it up as extra info on the patchday info, hoping Aevitas takes it in, as it is annoying as crap to have these bugs still in.
       
    20. Praline

      Praline Member

      Joined:
      Aug 17, 2015
      Messages:
      150
      Likes Received:
      2
      Trophy Points:
      18
      Thx, Cryo. Yeah, it is annoying as hell, but at least the bot works with the workarounds posted by you guys. Just that it really should not be needed as you said elsewhere as well.
       

    Share This Page