Apoc
Well-Known Member
- Joined
- Jan 16, 2010
- Messages
- 2,790
- Reaction score
- 94
Demonbuddy supports a very complex (or very simple, depending on your views) item rule system. The item rules determine everything for picking up, stashing, selling, and salvaging items. It fully supports "by name", specific item stats, stack quantities, etc, of items in the game.
The following is the default rule set shipped with Demonbuddy (you can find it in the Rules folder of your Demonbuddy install):
I'll try to explain each tag as simply as possible to convey the meaning, and ability of each tag.
First and foremost, the root tag (ItemRules) supports 2 attributes, name and useRoundedValues. The first attribute (name) is just a description value for whatever you'd like to call the rules. The second attribute (useRoundedValues) is to instruct Demonbuddy to round any values it encounters while pulling item stats (similar to how D3 displays it's item stats. 17.7% gets rounded to 18%, etc)
The next tag you'll encounter is the Priority tag. This only takes 3 attributes, priority1, priority2, and priority3. These instruct Demonbuddy to evaluate a certain category of rules in a specific order. This tag is required, and must not be left out.
The only other tag supported within the root tag (ItemRules) itself, is a Categories tag, which will contain a set of Category tags. These determine the "type" of rules defined within them.
Category has one attribute ruleType which may have one of four values. PickUp, Sell, Keep, and Salvage. Within the Category tag, you can define item rules for the type you specified in the attribute. This is where Demonbuddy looks for basically all things item related. If a rule matches (or doesn't) a specific action will occur.
Now on to the actual rules!
Within a Category tag, you can have any number of ItemRule tags, which will contain all the rules for a certain item (or multiple items). There are a few attributes, and child tags supported in the ItemRule tag which will help you decide what to do with an item.
I'll give a brief overview of the ItemRule tag, as its mostly self explanatory.
Attributes
Within each ItemRule tag, there is a child tag named StatRules which is a container for Stat tags. The Stat tag is where you define stat-specific rules (if any). The following is a list of attributes available in this tag. (Note, you can have as many Stat rules in an ItemRule as you want!)
Attributes
As you can see, you can make very complex, or very simple sets of rules. If you have any questions, please feel free to ask!
The following is the default rule set shipped with Demonbuddy (you can find it in the Rules folder of your Demonbuddy install):
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<ItemRules name="Default Item Rules" useRoundedValues="true">
<!-- The order in which item rules are evaluated. Typically, this is fine for almost all rule sets.
However, you may want to switch things around sometimes if you want to force-sell things that may match keep rules. -->
<Priority priority1="Keep" priority2="Salvage" priority3="Sell" />
<Categories>
<Category ruleType="PickUp">
<!-- Pick up all magic+ items -->
<ItemRule>
<StatRules>
<Rule quality="Magic1" />
</StatRules>
</ItemRule>
<!-- Pick up gold, at least in stacks of 100 -->
<ItemRule itemName="Gold">
<StatRules>
<Rule stacks="100" />
</StatRules>
</ItemRule>
<!-- Pick up all pages and tomes, blacksmithing/jewelcrafting -->
<ItemRule itemName="Page of*" />
<ItemRule itemName="Tome of*" />
<!-- Gems -->
<ItemRule itemName="*Ruby*" />
<ItemRule itemName="*Emerald*" />
<ItemRule itemName="*Topaz*" />
<ItemRule itemName="*Amethyst*" />
<!-- Health potions -->
<ItemRule itemName="*Health Potion*" />
</Category>
<Category ruleType="Keep">
<ItemRule itemBaseType="Weapon" twoHanded="true" description="High DPS 2h Weapons">
<StatRules>
<!-- Magic Weapons should have at least 1200 DPS -->
<Rule stat="DPS" minValue="1100" quality="Magic1" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Weapon" oneHanded="true" description="High DPS 1h Weapons">
<StatRules>
<Rule stat="DPS" minValue="900" quality="Magic1" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Armor" description="Rare armor with Intelligence">
<StatRules>
<Rule stat="Intelligence" minValue="100" quality="Rare4" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Jewelry" description="Rare jewelry with Intelligence">
<StatRules>
<Rule stat="Intelligence" minValue="100" quality="Rare4" />
</StatRules>
</ItemRule>
<ItemRule itemName="String of Ears" description="High DR% String of Ears">
<StatRules>
<!-- String of Ears should have at least 17% damage reduction. Any lower and its not worth a whole lot.-->
<Rule stat="DamageReductionPhysicalPercent" minValue="17" />
</StatRules>
</ItemRule>
<ItemRule itemName="Talisman of Aranoch" description="Talisman of Awesome Lowbieness" />
<!-- Keep rares and legendaries, regardless of stats. -->
<ItemRule ruleType="Keep" description="Rare and better items!">
<StatRules>
<Rule quality="Rare4" />
</StatRules>
</ItemRule>
</Category>
<Category ruleType="Sell">
<ItemRule description="Sell Everything">
<StatRules>
<Rule quality="Magic1" />
</StatRules>
</ItemRule>
</Category>
</Categories>
</ItemRules>
I'll try to explain each tag as simply as possible to convey the meaning, and ability of each tag.
First and foremost, the root tag (ItemRules) supports 2 attributes, name and useRoundedValues. The first attribute (name) is just a description value for whatever you'd like to call the rules. The second attribute (useRoundedValues) is to instruct Demonbuddy to round any values it encounters while pulling item stats (similar to how D3 displays it's item stats. 17.7% gets rounded to 18%, etc)
The next tag you'll encounter is the Priority tag. This only takes 3 attributes, priority1, priority2, and priority3. These instruct Demonbuddy to evaluate a certain category of rules in a specific order. This tag is required, and must not be left out.
The only other tag supported within the root tag (ItemRules) itself, is a Categories tag, which will contain a set of Category tags. These determine the "type" of rules defined within them.
Category has one attribute ruleType which may have one of four values. PickUp, Sell, Keep, and Salvage. Within the Category tag, you can define item rules for the type you specified in the attribute. This is where Demonbuddy looks for basically all things item related. If a rule matches (or doesn't) a specific action will occur.
Now on to the actual rules!
Within a Category tag, you can have any number of ItemRule tags, which will contain all the rules for a certain item (or multiple items). There are a few attributes, and child tags supported in the ItemRule tag which will help you decide what to do with an item.
I'll give a brief overview of the ItemRule tag, as its mostly self explanatory.
Attributes
- itemName - This can either be a partial name (such as "*Ruby" to match all types of Ruby gems, or a complete name to match a specific item by name [note: Names are not localized! You will need to ensure they're in the correct language for your client!] - This attribute is optional.
- stack - A minimum stack amount for an item. (Useful for Gold, stacks of gems, etc) - This attribute is optional.
- itemBaseType - If you want to specify a rule for a "type" of item, you'll find that using this is the easiest way. Valid values are Armor, Weapon, Jewelry, Misc (for tomes, potions, etc), and Gem. - This attribute is optional.
- itemType - if you need fine-grained filtering of items, this is the attribute to use. Valid values are as follows:
- Axe
- Sword
- Mace
- Dagger
- Bow
- Crossbow
- Staff
- Spear
- Shield
- Gloves
- Boots
- Chest
- Ring
- Amulet
- Quiver
- Shoulder
- Legs
- FistWeapon
- Mojo
- CeremonialDagger
- WizardHat
- Helm
- Belt
- Bracer
- Orb
- twoHanded - Only useful for Weapons, this will let you distinguish a 1h weapon rule, from a 2h weapon rule. - This attribute is optional
- description - Use this to have Demonbuddy display this when it selects it as a rule match. If this isn't defined, it will display a default message. - This attribute is optional
Within each ItemRule tag, there is a child tag named StatRules which is a container for Stat tags. The Stat tag is where you define stat-specific rules (if any). The following is a list of attributes available in this tag. (Note, you can have as many Stat rules in an ItemRule as you want!)
Attributes
- quality - This determines the quality (as a greater than or equal) value of an item. There are quite a few values, but the ones you'll likely be using are as follows: Inferior, Normal, Superior, Magic1, Rare4, Legendary. - This is optional
- minValue - The minimum value of a "stat" defined. This is to ensure items have above (or equal) a value of a stat. - This is optional
- maxValue - The same as above, but the "max" value. - This is optional.
- value - Use this if you want a specific value on an item. (Such as a 20% DR String of Ears, or 25% IAS weapon). You may also just use minValue to achieve the same effect. - This is optional
- stat - This is what determines what to look for (assuming quality is not defined) in a stat. There are many, many values you can use. The following is a list of currently available stats that may be looked at on any item (identified item).
- Intelligence
- Strength
- Vitality
- Dexterity
- Armor - this is the "base" armor of an item.
- ArmorBonus - this is the "bonus" armor on the item. Represented in the tooltip as "+x Armor"
- ArmorTotal - this is the "total" armor for the item.
- FireDamagePercent
- ColdDamagePercent
- LightningDamagePercent
- PoisonDamagePercent
- ArcaneDamagePercent
- HolyDamagePercent
- MinDamage - this is the smaller of the 2 when the tooltip states "+5-10 damage" or similar.
- MaxDamage - the max value of the above
- DPS - weapon DPS. This is the DPS as shown in the tooltip.
- GoldFind
- MagicFind
- AttackSpeedPercent
- WeaponAttacksPerSecond
- WeaponMinDamage
- WeaponMaxDamage
- MovementSpeed - run speed %
- HealthGlobeBonus
- HealthPerSecond
- LifePercent
- Level - item level. DOES NOT MATCH IN-GAME ITEM LEVEL REQUIREMENT!
- ResistAll
- ResistArcane
- ResistCold
- ResistPhysical
- ResistLightning
- ResistFire
- ResistPoison
- ResistHoly
- Thorns
- DamageReductionPhysicalPercent
- Sockets - this is how many sockets an item has
- CritPercent
- CritDamagePercent
As you can see, you can make very complex, or very simple sets of rules. If you have any questions, please feel free to ask!
Last edited: