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

[Plugin] Armory

rrrix

New Member
Joined
Jul 11, 2010
Messages
3,449
Reaction score
61
Armory
Author: rrrix
Contributions by: Gniller, Nuok

What is Armory?

Armory is the new "AutoEquipper".

Armory also includes support for purchasing items from "Kadala", the mystery item vendor in Adventure Mode.

How do Upgrades in Armory work?

Armory uses the in-game Tool Tip percentage calculations to determine if an item is an upgrade or not.

WcZNrrU.png


What's the default upgrade formula?

Default, it's basically this:

Code:
if (damage > -0.05 && damage + toughness > 0)
    isUpgrade = true;
if (damage > -0.15 && damage + toughness > 0 && healing > 0)
    isUpgrade = true;

If we lose up to 5% damage but gain more toughness than we lost, it is an upgrade.

If we lose up to 15% damage, gain more toughness than we lost, and gain healing it is an upgrade.

Out of the box, this is pretty good for a hardcore character, but not so much for a softcore character (better to be safe than sorry, though!).

What can I configure?

Almost everything except "custom" formulas. For those, you will need to go into the ItemEvaluator.cs file, find the "CalculateUpgrade" method and from there you are free to create your own upgrade formulas.

I personally use the "Basic Upgrade" formula with 1% damage minimum and -200% toughness until I get to level 70.

RfB8GyQ.png



Customization

You can customize the formulas used by un-commenting the following and editing as necessary, in ItemEvaluator.cs
Code:
/*
 *  Want to DIY? Uncomment below as needed!
 */
// Additive Damage Formula - Damage reduced up to 5% but toughness compensates
//if (damage > -0.05f && damage + toughness > 0)
//    isUpgrade = true;


// Healing Formula - Damage reduced max 15% but toughness buff is "good enough" and healing is > 0%
//if (damage > -0.15f && damage + toughness > 0 && healing > 0)
//    isUpgrade = true;


// Basic Upgrade Formula
//if (damage > 0 && toughness > 0)
//    isUpgrade = true;

Kadala a.k.a. The Mystery Item Vendor

Armory can also purchase items from Kadala. You can specify which kinds of items to purchase and if you want to purchase in sequential or random order.

pBGpCyF.png


If you like this and want to support my work, click here:

Bitcoin: 1NLbH6HJf5wCANFzpAAPUtkAtUqg2WmKGL


When upgrading from a version before 1.2.5, you will need to RESET all your options. The settings will be reset when upgrading from 1.2.x to 1.2.5. ​It now uses per-battletag settings.
 

Attachments

Last edited:
Am I correct that it doesn't show that its installed @ plugins?


Compiler Error: c:\DBQuesting\Plugins\Armory\ItemEvaluator.cs(140,17) : error CS1501: No overload for method 'GetStatChanges' takes 4 arguments
Compiler Error: c:\DBQuesting\Plugins\Armory\ItemEvaluator.cs(145,17) : error CS1501: No overload for method 'GetStatChanges' takes 4 arguments
Compiler Error: c:\DBQuesting\Plugins\Armory\ItemEvaluator.cs(149,17) : error CS1501: No overload for method 'GetStatChanges' takes 4 arguments
Compiler Error: c:\DBQuesting\Plugins\Armory\ItemWrapper.cs(285,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\ItemWrapper.cs(291,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\ItemWrapper.cs(303,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
Compiler Error: c:\DBQuesting\Plugins\Armory\Player.cs(28,122) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Barbarian.cs(59,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Barbarian.cs(60,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Crusader.cs(36,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Crusader.cs(37,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\DemonHunter.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\DemonHunter.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Monk.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Monk.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\WitchDoctor.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\WitchDoctor.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Wizard.cs(57,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'CrusaderShield'
Compiler Error: c:\DBQuesting\Plugins\Armory\Hero\Wizard.cs(58,22) : error CS0117: 'Zeta.Game.Internals.Actors.ItemType' does not contain a definition for 'Flail'
[AutoGear] Initialized.
Setting up Trinity Logging
 
Thanks now I dont have to bodge autogear to work :)
 
running now, will post any issues :)

thanks rrrix and whoever else helped :D


edit: been running on crusader for past 8 levels - and its working an absolute treat !!!
 
Last edited:
Thanks for this rrrix!

How realy this works? on the items you pick up ? or also looks in your inventory to equip?
 
Thx man! I will test now. +Elemental damage is included in calculations?
 
how about

Code:
            if (!(Armory.ActiveHero is Crusader && HeroClass.PassiveSkills.Contains(SNOPower.X1_Crusader_Passive_HeavenlyStrength) && item.IsTwoHand))
            {
                // Don't try to equip shields if we have a 2H equipped
                if (item.IsShield && Player.HasTwoHandEquipped)
                    return false;


                // Don't try to equip 1H into RightHand if we have a 2H equipped
                if (Player.HasTwoHandEquipped && slot == InventorySlot.RightHand)
                    return false;
            }
 
how about

Code:
            if (!(Armory.ActiveHero is Crusader && HeroClass.PassiveSkills.Contains(SNOPower.X1_Crusader_Passive_HeavenlyStrength) && item.IsTwoHand))
            {
                // Don't try to equip shields if we have a 2H equipped
                if (item.IsShield && Player.HasTwoHandEquipped)
                    return false;


                // Don't try to equip 1H into RightHand if we have a 2H equipped
                if (Player.HasTwoHandEquipped && slot == InventorySlot.RightHand)
                    return false;
            }

Or that would seem more obvious now :)

Although you wont be able to check for shield upgrades as ** will return true for is IsDualWielding
Code:
            else if (slot == InventorySlot.RightHand && !Player.HasTwoHandEquipped &&
                     (Player.IsDualWielding || isSlotEmpty))
 
You might even have todo

Code:
            if (Armory.ActiveHero is Crusader && HeroClass.PassiveSkills.Contains(SNOPower.X1_Crusader_Passive_HeavenlyStrength) && (item.IsTwoHand || item.IsOneHand))
            {
                Logger.Debug("We are a Crusader with HeavenlyStrength Pretending we are not using a two hander");
                item.IsTwoHand = false;
                Player.HasTwoHandEquipped = false;
            }
 
Last edited:
[*]UI for Adjustable formula calculations

will we be able to put in actual stat weights? or just adjust ratio of damage/toughness/healing? there is an addon for wow that would calculate an itemscore based on stat weights that you put in something like that would be amazing and make the plugin much more viable at max level as well
 
Back
Top