We currently offer many different prices from various sources including AuctionDB, Accounting, and more, but we recognize that these are not the only values that are important to TSM users when configuring their operations. If no value of “b” is sent in, then the functions round to the nearest copper, as appropriate. For example, “round(crafting, 10s)” would return the crafting cost rounded to the nearest 10 silver. The first value “a” is the number you want to round and the second value “b” is the factor you would like to round to. You can send in 1 to 2 values in the format round(a, b). The “Round” functions also follow a similar usage to each other. If it is not, the value of “d” is given back if one was supplied, otherwise the whole thing is treated as invalid.
If it is, the value of “c” is given back to us. TSM4 then looks at which “IF” function you are using, in our example I am using “if greater than”, so it checks if “a is greater than b”. TSM4 checks if “a” and “b” are valid in the same method used for check() above. You can send in 3 to 4 values in the format of ifgt(a, b, c, d) where d can be optional. The “IF” functions are all used in the same way. Rounddown() – “Always Round Down – aka Floor” Roundup() – “Always Round Up – aka Ceiling” With that in mind, TSM4 adds the following new functions: In TSM4, one of our main goals was to expand on the logic-based functionality of the check() function and make it easier and more intuitive for our users to incorporate logic in their custom prices. If you did not supply a value for “c” and “a” is not is not greater than 0, then the whole thing is treated as invalid. If “a” is greater than 0, the custom price will give you the value of “b” back, otherwise it gives the value for “c”. If “a” is not valid, the custom price returns invalid. The check() function then takes a look at “a”, and looks to see if it is valid and greater than 0. These 3 values can be any value TSM recognizes, from custom prices to flat gold values, to simple price source references like DBMarket. To quickly explain check(), you can feed it 2 to 3 values in the format of check(a, b, c) where “c” can be optional. I’m pretty sure I used TSM for over a year before I fully understood it! In my own personal experience, check() is definitely something that at times can be hard to wrap your brain around. If your intent is to craft and undercut item level 151 crafts regardless of the secondary stat applied to the item, then you would group the item as 'Item Level'.Many users have become somewhat aware of the check() function in TSM3 thanks to the popularity of BilisOnyxia’s sniper string. Notice that there are now only 3 items 'Ungrouped' as 2 are of the same item level in the example. This means the BonusIDs that determine the secondary stat(s) are not included when adding the item to a group. In the following example, 'Show ungrouped items as' is set to ' Item Level'.
If your intent is to undercut other item level 151 crafts with 40 Haste and 40 Mastery, then you would group the item as 'Specific Item'. This means all BonusIDs are considered including the item level, secondary stats and required level. In the following example, 'Show ungrouped items as' is set to ' Specific Item'. You generally should not group items by 'Base Item' for crafting purposes.
The item level 175 version cannot actually be crafted, Blizzard uses this as the 'base' and then adds BonusIDs for each of the real item variations. In this screenshot, the item in the inventory is item level 210, but shows in TSM as item level 175 to be added to a group. Selecting ' Base Item' in the 'Show ungrouped items as' drop down menu will show the item without reference to any of the BonusIDs that determine the item level, secondary stats, required level or any other information about the actual item. If it finds the base item, the module will ignore all random enchants when conducting its operation(s) for the purposes of that item. When a module goes to look up what group an item is in, it'll look for the specific random enchant first, and then the base item second. This means that if you have the base item in a group, you will still be able to put the specific random enchant in the same or a different group. It's important to note that you can put both the base item (the item without the random enchantment) and specific random enchants in groups. This means you can consider the item level of your craft, but ignore the secondary stat combination(s) of the craft, if you want to undercut any other auction or restock a set number of crafts regardless of those secondary stats. In TSM 4.10, we introduced a new option to group items by 'Item Level'.