How to use "Item Rules 2" in Trinity Item Rules 2 is included in Trinity Releases by default. Actual releases of Trinity and Item Rules 2 are found here LINK. If you need more help i recommand to post in the orginal thread from Item Rules 2 LINK. 0. How is Item Rules 2 structured The "Item Rules 2" structure looks like this ... more or less. Demonbuddy/Plugins/GilesTrinity/ ItemRules +- Core +- Rules ....+- custom ....+- hard ........+- legendary.dis ........+- magic.dis ........+- rare.dis ........+- special.dis ........+- pickup.dis ....+- medium ........+- legendary.dis ........+- magic.dis ........+- rare.dis ........+- special.dis ........+- pickup.dis ....+- soft ........+- legendary.dis ........+- magic.dis ........+- rare.dis ........+- special.dis ........+- pickup.dis 1. How to setup Trinity & Item Rules 2 1.1 Setup Trinity In Trinity you have to change the following marked setting to "File Based Script Rules". 1.2 Configuration Item Rules its all in trinity now .. just check the tab ItemRules 1.3 Check Logs in Demonbuddy If everything is configured right you should see at startup of demonbuddy similar logs. 2. When do the rules apply The item drop event: Code: +-------------------------+ | EVENT | | Item Drop | | FileBasedScriptingRules | +-----------+-------------+ | V +--------------+ | pickup.dis +--> <matching rule> +------+-------+ | | +-> PICKUP V +-> IGNORE <no matching rule> | | | V +--------+---------+ | trinity setting | | decide if item | | pickup | +------------------+ The item stash/trash event: Code: +-------------------------+ | EVENT | | Item Stash\Trash | | FileBasedScriptingRules | +-----------+-------------+ | V +--------------+ | legendary.dis| | rare.dis +--> <matching rule> | magic.dis | | | special.dis | +-> KEEP +------+-------+ +-> TRASH | | V V <no matching rule> SCORE | | |<-----------------+ | V +------------------+ | trinity scoring | | decide if item | | stashed/trashed | +------------------+ 3. How do the rules work A Item rule is structured in three parts. The first part is separated by a '#' sign from the second one and the third part which is optional is separated by a '->'. 'PART1' # 'PART2' example: [QUALITY] == "Legendary" # True or 'PART1' # 'PART2' -> 'PART3' example: [QUALITY] == "Legendary" # True -> [KEEP] PART1 is intended to hold values from an item that are already known before the item is identified. (exception: Legendary Names) This qualifies following Attributes: [NAME] (exception legenderys) [BASETYPE] [TYPE] [ONEHAND] [TWOHAND] [QUALITY] [LEVEL] PART2 is intended to hold values from an item that are only known after the item is identified. This qualifies following Attributes: [STR] [CRIT%] ... PART3 is intended to hold the action that is done when the rule has a positive outcome. It is optional because the default action is [KEEP]. Rules must be writen by a one liner rules over multiple lines are not supported. The structure of the parts in it self isn't important. [STR] > 10 is the same as 10 < [STR]. Example: Code: [QUALITY] == "Rare" # ([AS%] * [CRIT%] * [CRITDMG%]) > 0 -> [KEEP] This rule will multiply attackspeed, critchance & critdmg an every rare item and if the result is bigger then 0 it will keep that item. This qualifies every item that has all three stats on it. 3.1 Actions Following actions exist in Item Rules 2. Actions for pickup rules: (pickups.dis) [PICKUP] pickup item [IGNORE] ignore item Actions for stashing rules: (legendary.dis,rare.dis,magic.dis,special.dis) [KEEP] keep item [TRASH] trash item [SCORE] use score to evaluate item 3.2 Operators Code: AND "&&" true && false -> false OR "||" true || false -> true EQUAL "==" 10 == 11 -> false NOTEQUAL "!=" 10 != 11 -> true LESSEREQUAL "<=" 10 <= 10 -> true BIGGEREQUAL ">=" 10 >= 10 -> true LESSTHEN "<" 10 < 10 -> false BIGGERTHEN ">" 10 > 10 -> false BRACKETS "()" (5+5)*2 == 5+(5*2) -> false PLUS/MINUS "+-" 1 + 2 -> 3 MULT/DIV "*/" 1 * 2 -> 2 3.3 Attributes Code: [BASETYPE] | YES | ItemBaseType | Weapon [QUALITY] | YES | ItemQuality | Rare [TYPE] | YES | ItemType | Axe [LEVEL] | YES | Level | 60 [ONEHAND] | YES | OneHand | true [TWOHAND] | YES | TwoHand | false Code: [STR] | Strength | 100 [DEX] | Dexterity | 100 [INT] | Intelligence | 100 [VIT] | Vitality | 100 Code: [REGEN] | HealthPerSecond | 254 [LIFE%] | LifePercent | 12 [LS%] | LifeSteal | 3 [LOH] | LifeOnHit | 655 [MS%] | MovementSpeed | 12 [AS%] | AttackSpeedPercent | 6 Code: [CRIT%] | CritPercent | 4.5 [CRITDMG%] | CritDamagePercent | 59 [BLOCK%] | BlockChance | 8 Code: [ALLRES] | ResistAll | 80 [RESPHYSICAL] | ResistPhysical | 60 [RESFIRE] | ResistFire | 60 [RESCOLD] | ResistCold | 60 [RESLIGHTNING] | ResistLightning | 60 [RESARCAN] | ResistArcane | 60 [RESPOISON] | ResistPoison | 60 [RESHOLY] | ResistHoly | 60 Code: [ARMOR] | Armor | 345 [ARMORBONUS] | ArmorBonus | 200 [ARMORTOT] | ArmorTotal | 1300 Code: [FIREDMG%] | FireDamagePercent | 3 [LIGHTNINGDMG%] | LightningDamagePercent | 3 [COLDDMG%] | ColdDamagePercent | 3 [POISONDMG%] | PoisonDamagePercent | 3 [ARCANEDMG%] | ArcaneDamagePercent | 3 [HOLYDMG%] | HolyDamagePercent | 3 Code: [DPS] | WeaponDamagePerSecond | 1100 [WEAPAS] | WeaponAttacksPerSecond | 1.5 [WEAPMAXDMG] | WeaponMaxDamage | 560 [WEAPMINDMG] | WeaponMinDamage | 255 [WEAPDMGTYPE] | WeaponDamageType | Fire [MINDMG] | MinDamage | 100 [MAXDMG] | MaxDamage | 200 Code: [THORNS] | Thorns | 2345 [DMGREDPHYSICAL] | DamageReductionPhysicalPerc.| 2 Code: [MAXARCPOWER] | MaxArcanePower | 15 [ARCONCRIT] | ArcaneOnCrit | 10 [MAXMANA] | MaxMana | 5 [MANAREG] | ManaRegen | 5 [MAXFURY] | MaxFury | 5 [HEALTHSPIRIT] | HealthPerSpiritSpent | 245 [MAXSPIRIT] | MaxSpirit | 10 [SPIRITREG] | SpiritRegen | 5 [HATREDREG] | HatredRegen | 5 [MAXDISCIP] | MaxDiscipline | 5 Code: [GF%] | GoldFind | 25 [MF%] | MagicFind | 20 [PICKRAD] | PickUpRadius | 5 [GLOBEBONUS] | HealthGlobeBonus | 5468 [SOCKETS] | Sockets | 1 Code: [MAXSTAT] | highest class specific stat | 200 | (str,int,dex) | [MAXSTATVIT] | highest class specific stat | 250 | (str,int,dex) + vit | [MAXONERES] | highest single resist | 60 | (arcane,cold,fire,holy, | | lightning,physical,poison) | [TOTRES] | total resistance | 140 | (allres,arcane,cold,fire,holy, | lightning,physical,poison) | [DMGFACTOR] | dmg factor | 12 | = as% + crit%*2 + critdmg%/5| | + average/20 | [STRVIT],[DEXVIT],[INTVIT] | primary attribut vitality | 200 [AVGDMG] | average dmg | 200 | = (mindmg + maxdmg) / 2 | [OFFSTATS] | offensiv stats | 3 | = as%,crit%,critdmg%,avgdmg | | counting each as one if it is | bigger then 0 | [DEFSTATS] | defensiv stats | 3 | = vit,allres,armorbonus, | | block%,life%,regen | | counting each as one if it is | bigger then 0 | 3.4 Values ItemBaseType Armor Weapon Jewelry Misc ItemType: 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 MightyWeapon MightyBelt Polearm Cloak Wand SpiritStone Daibo HandCrossbow VoodooMask FollowerSpecial CraftingPlan ItemQuality Inferior Normal Superior Rare Magic Legendary Special Rare4 (only for craftingPlan) Rare5 (only for craftingPlan) Rare6 (only for craftingPlan) 3.5 Functions .dual converting into a binary value 0 and 1. Example: [VIT].dual (item with vitality 123) -> 1 [VIT].dual (item with vitality 0) -> 0 @OFFSTAT:=[AS%].dual+[CRIT%].dual+[CRITDMG%].dual .max returning a percentage of the max value possible on that item. Example: [VIT].max (gloves with 100 VIT, max is 200) -> 0.5 3.6. Macro Macros can be used to reuse predefinated rules and logic. They have to be defined before they are used. For example an implementation of EHP: Code: @EHP := ((1000+[VIT])*(1+[LIFE%]/100)*35)/(1-(1-(1-([ARMORBONUS]/((50*63)+[ARMORBONUS])))*(1-(([ALLRES]+[MAXONERES]/7)/((5*63)+([ARMORTOT]/((50*63)+[ARMORTOT]))))))) after this definition we can use [@EHP] as a existing attribute for everyitem. Code: [QUALITY] == "Rare" && [BASETYPE] == "Armor" # [@EHP] > 60000 4. FAQ 4.1 Use one rule folder for all my bots? This solution helps to have all bots using the same rule set. Copy your rule set with at least the rule strength type (soft,medium,hard,custom) you are using to a separate folder. ....+- hard ........+- legendary.dis ........+- magic.dis ........+- rare.dis ........+- special.dis ........+- pickup.dis For example Then change in config.dis the [RULEPATH] to this folder. From now then Item Rules will load rules from there. 4.2 If i have more then one rule matching an item which will be priorized? Item Rules 2 engine works from top to bottom of the rule files and as soon it has a matching rule it does that action. So only the frist matching rule counts. CONTACT: skype: darkfriend77 email: darkfriend@swissonline.ch PM demonbuddypage: darkfriend77 Donators: get access to private repository get access to beta development get access to private tools get access to new rule sets
Great guide and great work, i'm trying it now. I really want that "AnotherLogViewer", but i don't know where to get it, searched for it on forums and google but with 0 results.... can you tell me where to find it? Thanks a lot
hi, can some1 tell me pls where the difference between these 2 rules is: Code: // keep all Weapon for now //[QUALITY] == "Legendary" && [BASETYPE] == "Weapon" Code: [QUALITY] == "Legendary" && [NAME] == "The Butcher's Sickle" can i assume (IF i remve the "//" in the 1st one) it will be the same because every legendary is listed in the file legendary.dis anyway? or will only the 1st one keep all legendaries? besides: ain't there missing something like -> [KEEP] at the end anyway? im a lil confused here! thx4hlp edit: ok, the last thing is clear now: so, just to be sure i can add [QUALITY] == "Legendary" && [BASETYPE] == "Weapon" (respectively just remove the //) to be sure every legendary is being kept? edit2: strange, my DB is just saying: Code: [17:03:54.097 N] [Trinity]PICKLOG 3 [17:03:54.097 N] [Trinity]KEEPLOG 3 [17:03:54.097 N] [Trinity]reading ... pickup.dis [17:03:54.097 N] [Trinity] ... loaded: 12 pickup rules [17:03:54.097 N] [Trinity] ... loaded: 0 item soft rules [17:03:54.097 N] [Trinity] ... loaded: 0 macros but i changed the path in the config.dis... -> edit4: ok i need to change the path in the DB settings to the config.dis as well, i see ;D
Hi Darkfriend, is there a Donator version where I can get even harder rules made for someoen with many bots? Thanks a lot, Zk
what does trash do? sell or salvage? I looked at the hard rules. Skull Grasp shouldn't have any rules -> can have 4 weapon throw and str and is worth millions... possible other variations...
How do I choose what specific items types to pick up? ( IE which rares to pick up, such as pants, bracers etc, because I wish to not pick up voodoo masks etc). I am new to the forums, so please PM me if you've answered >_<
donate to darkfriend i beleive - at least thats where i got it - awesome app to fix some rules that might trash some valuable items
hello, guys, i have some problem with this item rules (with legendaries rulesets). First of all, I wanna apologize for my bad english With normal itemrules, db "thinks", that all legendaries are trash (dunno why). When i change these rules completely, the operation,that db is doing with an item is (NULL) (should be trash or keep i think), then instantly (autokeep legendaries) . I think problem can be in my diablo version - its Rus. So, may be, some problems with translation, dunno rly . Can u help me?
I don't have the config.dis file in the Rules folder. I checked the most recent trinity build and it's still not there. Where do I go to set which item rules to use? I'm new to this so I apologize if the answer is right in my face. I've been looking. --Beetle
Can someone give me an example of using the [TWOHAND] or [ONEHAND] tags? I'm attempting to get it to ignore all 2h rares, with the following code Code: [QUALITY] == "Rare" || "Rare4" && [TWOHAND] == "YES" -> [IGNORE]
Hi, I'm new to this, and it seems you all know something I don't. How do I edit the item rules, can I open the .dis files and edit directly? I would like to be able to modify the rules as I see fit depending on my needs. Any guidance here would be DOPE! thanks first post
[LIFE%] return 10 life%.max ist 0,1 result [LIFE%].max returns 10 / 0,1 = 100 maxItemStats.Add("MightyBeltFalse[LIFE%]", 0.12);