What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Buddywing - Editing or Creating new combat routines

scaasi

Member
Joined
Jul 10, 2015
Messages
43
Reaction score
0
Hi all,

Does anyone know of a guide that can help either creating new combat routines or editing the ones that are found in the DefaultCombat folder. I ask this because I found some of the routines are not up to date or don't work at all. I've tried editing them myself (e.g. adding new spells to a routine) and after I save that same routine that I have just edited, it becomes corrupted and starts spewing forth error messages as the bot itself no longer seems to no longer identify it.

Any help regarding this would be greatly appreciated as I do greatly enjoy unleashing the fury during pvp :)

Cheers!
 
Hi all,

Does anyone know of a guide that can help either creating new combat routines or editing the ones that are found in the DefaultCombat folder. I ask this because I found some of the routines are not up to date or don't work at all. I've tried editing them myself (e.g. adding new spells to a routine) and after I save that same routine that I have just edited, it becomes corrupted and starts spewing forth error messages as the bot itself no longer seems to no longer identify it.

Any help regarding this would be greatly appreciated as I do greatly enjoy unleashing the fury during pvp :)

Cheers!

https://www.thebuddyforum.com/honor...agradts-guide-combat-routine-development.html

This guide is for Honorbuddy, but the basics of what a routine does and how to code a routine in Visual Studio are the same. Should give you a good understanding of all the parts at work and how to write them.
 
I would suggest posting what your trying to do and then pasting your code into code blocks for people to see, there's enough talent here to help teach you where you went wrong and help squeak out some more dps.
 
I would suggest posting what your trying to do and then pasting your code into code blocks for people to see, there's enough talent here to help teach you where you went wrong and help squeak out some more dps.

Yep no probs, ok so this is what I'm trying to do; as I only play SWTOR for pvp I going through most of the classes I'm finding that a majority of the pvp favoured specs aren't working 100%, the main problem seems to be that they aren't conducting their rotation. The bot identifies the class and spec and but when I move to a training dummy nothing happens. So take the Commando Assault Specialist vs Mercenary Innovative Ordanance. Mando will not attack the dummy (this is including loading up the profile Combat Bot.xml) but Merc does, so thats the first issue.

Ok so staying on as Merc Inno Ordanance spec, the rotation is a little off. Below is a copy of what is written in routine for just basic rotation:

Code:
                    Spell.Buff("Determination", ret => Me.IsStunned),
                    Spell.Buff("Vent Heat", ret => Me.ResourcePercent() >= 50),
                    Spell.Buff("Energy Shield", ret => Me.HealthPercent <= 40),
                    Spell.Buff("Kolto Overload", ret => Me.HealthPercent <= 30)
                    );
            }
        }

        public override Composite SingleTarget
        {
            get
            {
                return new LockSelector(

                    //Movement
                    CombatMovement.CloseDistance(Distance.Ranged),

                    new Decorator(ret => Me.ResourcePercent() > 40,
                        new LockSelector(
                            Spell.Cast("Rail Shot", ret => Me.HasBuff("Prototype Particle Accelerator")),
                            Spell.Cast("Rapid Shots")
                    )),

                    //Rotation
                    Spell.Cast("Disabling Shot", ret => Me.CurrentTarget.IsCasting && Me.CurrentTarget.Distance <= Distance.Melee && !DefaultCombat.MovementDisabled),
                    Spell.Cast("Rail Shot"),
                    Spell.DoT("Incendiary Missile", "", 12000),
                    Spell.Cast("Thermal Detonator"),
                    Spell.Cast("Electro Net"),
                    Spell.Cast("Power Shot"),

Now I want it to read like this (and this is somewhat copied from Mando Assault rotation, obviously changing the spells to reflect Merc talents:

Code:
                return new LockSelector(
                    Spell.Buff("Vent Heat", ret => Me.ResourcePercent() >= 50),
                    Spell.Buff("Energy Shield", ret => Me.HealthPercent <= 40),
                    Spell.Buff("Kolto Overload", ret => Me.HealthPercent <= 30)
                    Spell.Buff("Supercharged Gas", ret => Me.BuffCount("Supercharge") == 10),
                    );
            }
        }

        public override Composite SingleTarget
        {
            get
            {
                return new LockSelector(

                    //Movement
                    CombatMovement.CloseDistance(Distance.Ranged),

                    new Decorator(ret => Me.ResourcePercent() > 40,
                        new LockSelector(
                            Spell.Cast("Rail Shot", ret => Me.HasBuff("Prototype Particle Accelerator")),
                            Spell.Cast("Rapid Shots")
                    )),

                    //Rotation
                    Spell.Cast("Disabling Shot", ret => Me.CurrentTarget.IsCasting && Me.CurrentTarget.Distance <= Distance.Melee && !DefaultCombat.MovementDisabled),

                    Spell.Cast("Rail Shot"),
                    Spell.DoT("Incendiary Missile", "", 12000),
                    Spell.Cast("Thermal Detonator"),
                    Spell.DoT("Serrated Shot", "Bleeding"),
                    Spell.Cast("Unload"),
                    Spell.Cast("Power Shot")
                    );


So what I've done is
1. remove the auto "remove stun"
2. Added the auto use of Supercharged Gas
3. Removed electro net
4. Added Serrated Shot
5. Added Unload

And then I get these errors in the bot interface:


User is a BountyHunter
Advanced Class: Mercenary / Discipline: InnovativeOrdnance
Compiler Error: e:\Utils\Buddywing\Routines\DefaultCombat\Routines\Advanced\Mercenary\InnovativeOrdnance.cs(30,80) : error CS1026: ) expected
Compiler Error: e:\Utils\Buddywing\Routines\DefaultCombat\Routines\Advanced\Mercenary\InnovativeOrdnance.cs(30,80) : error CS1002: ; expected
Compiler Error: e:\Utils\Buddywing\Routines\DefaultCombat\Routines\Advanced\Mercenary\InnovativeOrdnance.cs(31,93) : error CS1002: ; expected
Compiler Error: e:\Utils\Buddywing\Routines\DefaultCombat\Routines\Advanced\Mercenary\InnovativeOrdnance.cs(31,93) : error CS1525: Invalid expression term ','
Compiler Error: e:\Utils\Buddywing\Routines\DefaultCombat\Routines\Advanced\Mercenary\InnovativeOrdnance.cs(31,94) : error CS1002: ; expected
Compiler Error: e:\Utils\Buddywing\Routines\DefaultCombat\Routines\Advanced\Mercenary\InnovativeOrdnance.cs(32,21) : error CS1525: Invalid expression term ')'
Unhandled exception during init: System.InvalidOperationException: No routines were loaded. Please ensure there is a routine for your class before starting the bot.
at Buddy.CommonBot.BotMain.SetCurrentCombatRoutine()
at Buddywing.MainWindow.​​‎‎**‏‎**‎‎‬‫‫**‫*​‫****()
Buddy Wing: The Old Robot is ready!



And that isn't the full rotation. I actually really what it to look like is something like this:

Code:
                return new LockSelector(
                    Spell.Buff("Tenacity", ret => Me.IsStunned),
                    Spell.Buff("Vent Heat", ret => Me.ResourceStat <= 40),
                    Spell.Buff("Energy Shield", ret => Me.HealthPercent <= 70),
                    Spell.Buff("Kolto Overload", ret => Me.HealthPercent <= 30),
                    Spell.Buff("Supercharged Gas", ret => Me.BuffCount("Supercharge") == 10),
                    Spell.Buff("Thermal Sensor Override", ret => Me.ResourceStat <= 60)
                    );
            }
        }

        public override Composite SingleTarget
        {
            get
            {
                return new LockSelector(
                    new Decorator(ret => Me.ResourcePercent() < 60,
                        new LockSelector(
                            Spell.Cast("Mag Shot", ret => Me.HasBuff("Ionic Accelerator") && Me.Level >= 57),
                            Spell.Cast("Rail Shot", ret => Me.HasBuff("Ionic Accelerator") && Me.Level < 57),
                            Spell.Cast("Rapid Shots")
                    )),

                    //Movement
                   CombatMovement.CloseDistance(Distance.Ranged),

                   //Rotation
                    Spell.Cast("Disabling Shot", ret => Me.CurrentTarget.IsCasting && !DefaultCombat.MovementDisabled),

                    Spell.Cast("Mag Shot", ret => Me.HasBuff("Ionic Accelerator") && Me.Level >= 57),
                    Spell.Cast("Rail Shot", ret => Me.HasBuff("Ionic Accelerator") && Me.Level < 57),
                    Spell.Cast("Missle Blast", ret => Me.HasBuff("Volatile")),
                    Spell.Cast("Thermal Detonator"),
                    Spell.DoT("Serrated Bolt", "Bleeding"),
                    Spell.DoT("Incendiary Missile", "Burning (Incendiary Missile)"),
                    Spell.Cast("Electro Net"),
                    Spell.Cast("Unload"),
                    Spell.Cast("Mag Shot", ret => Me.Level >= 57),
                    Spell.Cast("Rail Shot", ret => Me.Level < 57),
                    Spell.Cast("Power Shot")
                    );
            }
        }

        public override Composite AreaOfEffect
        {
            get
            {
                return new Decorator(ret => Targeting.ShouldAOE,
                            new LockSelector(
                               Spell.DoT("Serrated Shot", "Bleeding"),
                               Spell.DoT("Incendiary Missile", "Burning (Incendiary Round)"),
                               Spell.Cast("Thermal Detonator", ret => Me.CurrentTarget.HasDebuff("Burning (Incendiary Round)")),
                               Spell.Cast("Explosive Dart", ret => Me.CurrentTarget.HasDebuff("Bleeding")),
                               Spell.Cast("Missile Blast", ret => Me.HasBuff("Volatile Warheads")),
                               Spell.CastOnGround("Sweeping Blasters", ret => Me.ResourcePercent() >= 90)

I thought it couple be just a simple copy and paste job from the Commando Assault specialist spec and just rename the talents, but that's not the case. Any help you guys can provide would be much appreciated
 
Last edited:
Please edit the post and under advanced hit the hashtag which is the code block and put your code between it

Code:
Code easier to read

like that so it's easier to read.
 
No probs, all done

Just highlight the specific changes you made. There are simple syntax errors here, but you need to point out what you changed so I can tell you how to fix it. What program are you using to edit these files? You should use Visual Studio
 
visual studio Is free for express but if you are only going to do very lightweight editing then notepad++ would work just as well and is a small install.
 
Please edit your post and add code brackets. It's a pain to read.
You start with [code.] and end with [/code.]remove the dot . Inside the bracket as they shouldn't be there, but else we can show you
 
Hey guys, I also attempted using the functional Merc Innovative Ordanance and replaced all the talents with Commando Assault Specialist talents and the copied and pasted the script into the Commando Assault specialist combat routine. However I get another error saying that there was now more than one Merc Innovative Ordanance profile.

Code:
using Buddy.BehaviorTree;
using DefaultCombat.Core;
using DefaultCombat.Helpers;

namespace DefaultCombat.Routines
{
    public class InnovativeOrdnance : RotationBase
    {
        public override string Name { get { return "Commando Assault Specialist"; } }

        public override Composite Buffs
        {
            get
            {
                return new PrioritySelector(
                    Spell.Buff("Plasma Cell"),
                    Spell.Buff("Fortification")
                    );
            }
        }

        public override Composite Cooldowns
        {
            get
            {
                return new LockSelector(
                    Spell.Buff("Tenacity", ret => Me.IsStunned),
                    Spell.Buff("Recharge Cells", ret => Me.ResourcePercent() >= 50),
                    Spell.Buff("Reserve Powercell", ret => Me.ResourcePercent() >= 70),
                    Spell.Buff("Supercharged Cell", ret => Me.BuffCount("Supercharge") == 10),
                    Spell.Buff("Reactive Shield", ret => Me.HealthPercent <= 40),
                    Spell.Buff("Adrenaline Rush", ret => Me.HealthPercent <= 30)
                    );
            }
        }

        public override Composite SingleTarget
        {
            get
            {
                return new LockSelector(

                    //Movement
                    CombatMovement.CloseDistance(Distance.Ranged),

                    new Decorator(ret => Me.ResourcePercent() > 40,
                        new LockSelector(
                            Spell.Cast("High Impact Bolt", ret => Me.HasBuff("Ionic Accelerator")),
                            Spell.Cast("Hammer Shot")
                    )),

                    //Rotation
                    Spell.Cast("Disabling Shot", ret => Me.CurrentTarget.IsCasting && Me.CurrentTarget.Distance <= Distance.Melee && !DefaultCombat.MovementDisabled),
                    Spell.Cast("Assault Plastique"),
                    Spell.Cast("Plasma Grenade"),
                    Spell.Cast("High Impact Bolt"),
                    Spell.DoT("Incendiary Round", "", 12000),
                    Spell.DoT("Serrated Bolt", "Bleeding"),
                    Spell.Cast("Sticky Grenade"),
                    Spell.Cast("Full Auto", ret => Me.Level < 57),
                    Spell.Cast("Charged Bolts")
                    );
            }
        }

        public override Composite AreaOfEffect
        {
            get
            {
                return new Decorator(ret => Targeting.ShouldAOE,
                    new LockSelector(
                        Spell.CastOnGround("Mortar Volley", ret => Me.CurrentTarget.Distance > Distance.MeleeAoE),
                        Spell.Cast("Plasma Grenade", ret => Me.HasBuff("Tech Override")),
                        Spell.Cast("Sticky Grenade"))
                );
            }
        }
    }
}
 
Hey guys, I also attempted using the functional Merc Innovative Ordanance and replaced all the talents with Commando Assault Specialist talents and the copied and pasted the script into the Commando Assault specialist combat routine. However I get another error saying that there was now more than one Merc Innovative Ordanance profile.

Change the lines
Code:
public class InnovativeOrdnance : RotationBase
    {
        public override string Name { get { return "Mercenary Innovative Ordnance"; } }

to

Code:
class AssaultSpecialist : RotationBase
    {
        public override string Name { get { return "Commando Assault Specialist"; } }
 
ok so I tried that and this is the error that I receive:

Advanced Class: Commando / Discipline: AssasultSpecialist
Medpac Created!
[DefaultCombat] Level: 56
[DefaultCombat] Class: Trooper
[DefaultCombat] Advanced Class: Commando
[DefaultCombat] Discipline: AssasultSpecialist
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 e:\Utils\Buddywing\Routines\DefaultCombat\Core\RotationFactory.cs:line 41
at DefaultCombat.DefaultCombat.Initialize() in e:\Utils\Buddywing\Routines\DefaultCombat\DefaultCombat.cs:line 55
at Buddy.CommonBot.RoutineManager.set_Current(ICombat value)
at Buddy.CommonBot.BotMain.SetCurrentCombatRoutine()
at Buddywing.MainWindow.​​‎‎**‏‎**‎‎‬‫‫**‫*​‫****()
Buddy Wing: The Old Robot is ready!

and this is how the script looks

Code:
using Buddy.BehaviorTree;
using DefaultCombat.Core;
using DefaultCombat.Helpers;

namespace DefaultCombat.Routines
{
    class AssaultSpecialist : RotationBase
    {
        public override string Name { get { return "Commando Assault Specialist"; } }

        public override Composite Buffs
        {
            get
            {
                return new PrioritySelector(
                    Spell.Buff("Plasma Cell"),
                    Spell.Buff("Fortification")
                    );
            }
        }

        public override Composite Cooldowns
        {
            get
            {
                return new LockSelector(
                    Spell.Buff("Tenacity", ret => Me.IsStunned),
                    Spell.Buff("Recharge Cells", ret => Me.ResourcePercent() >= 50),
                    Spell.Buff("Reserve Powercell", ret => Me.ResourcePercent() >= 70),
                    Spell.Buff("Supercharged Cell", ret => Me.BuffCount("Supercharge") == 10),
                    Spell.Buff("Reactive Shield", ret => Me.HealthPercent <= 40),
                    Spell.Buff("Adrenaline Rush", ret => Me.HealthPercent <= 30)
                    );
            }
        }
 
Also a massive thanks to everyone that has been patient and helped out so far.
 
Also a massive thanks to everyone that has been patient and helped out so far.

Patience young padawan - patience. :) Maybe it will be easier to post your .CS file here as an attachment. That way lesser mortals like me could perhaps help with obvious mistakes you made without having my eyes and head hurting trying to figure out what you want to do and what you actually did before compiling.

Oh and one OBVIOUS issue you have I already addressed in another message. It is a typo that Aevitas have to fix.
What you need to do is RENAME your AssaultSpecialist.cs file to AssasultSpecialist.cs. Then also edit the class name appropriately inside the file. That should do it.
 
Last edited:
Fix it! :) You guys have just made my favourite class and unstoppable mofo!
 
Back
Top