What are Custom Strings?

Written by Gumdrops (Community Manager)

Updated at June 20th, 2022

Custom Strings allow you to highly customize and tightly control your TradeSkillMaster settings. Custom Strings can be categorised in three main ways:

  1. Price Sources. These are price-based sources for an item, and will return a positive numerical quantity in gold/silver/copper such as 10g 52s 12c
  2. Value Sources. These are value-based sources for an item, and will return a positive integer, or a decimal number such as 100, or 0.3
  3. Functions. These are expressions, formulas or terms that can be used as building blocks to combine Price Sources and Value Sources to answer questions or create decision points.
  4. Additionally, you can create Custom Sources which are variables that you define for easier reference and repeated use of a particular Custom String.

This page contains an overview of what you can reference from each category when configuring TSM, with links to an itemised breakdown of each category. This is a reference document and does not give any recommendations on how you should configure TSM.


In-game Reference

Tip: You can surface a list of Price Sources and Value Sources available to you in-game by typing /tsm sources

Web-Based Custom String Editor

Tip: You can use this web-based resource made by 'trenchy' to create Custom Strings outside of the TSM Addon: http://directive.io/tsm-editor

Price Sources

Price Sources will return a numerical quantity in gold/silver/copper, and can be split between external and internal sources. External sources are provided by and/or calculated by TradeSkillMaster, such as DBMarket or DBRegionSaleAvg from AuctionDB, and internal sources are derived or calculated from other configurations and activity you have set or recorded in the addon, such as crafting or avgbuy. There are multiple Price Sources which you can use in your Custom Strings, the following are some examples.


Examples

VendorBuy
DBMarket
Crafting
AvgBuy
ShoppingOpMax

Check the Which Price Sources can I use and what do they mean? page for a complete list, and details on each specific Price Source.

Value Sources

Value Sources will return a positive integer or a decimal number, and can also be split between external and internal sources. External sources are provided by and/or calculated by TradeSkillMaster, such as DBRegionSaleRate from AuctionDB or the RequiredLevel of an item, and internal sources are derived or calculated from other activity you have recorded in the addon, such as NumExpires or NumInventory. There are multiple Value Sources which you can use in your Custom Strings, the following are some examples.

Examples

DBRegionSaleRate
SaleRate
RequiredLevel
ItemLevel

NumExpires

Check the Which Value Sources can I use and what do they mean? page for a complete list, and details on each specific Value Source.

Functions

Functions are expressions or terms that can be used as building blocks to combine Price Sources and Value Sources to answer questions or create decision points. They cannot be used in isolation, and don't inherently provide any numerical quantities without being applied to a Price Source, Value Source or a combination thereof. There three kinds of Functions you can utilise in TradeSkillMaster:

  1. Arithmetic. You can use simple Arithmetic Operators such as addition, subtraction, multiplication, and any number of parentheses.
  2. Standard Functions. Some Standard Functions allow you to calculate averages, take the highest, lowest, or first valid Price Source from a set or perform basic value checks.
  3. Logic Functions. Advanced Logic Functions allow you to input multiple Price or Value Sources and evaluate a single output through various logic gates and operations.

Check the Which Functions can I use and what do they mean? page for a complete list, and details on each specific Function.

Fixed Gold

If you're just getting started, or if you know the exact value you want to use, you can also simply use a fixed gold amount in your Custom String.

Examples

100g
50s20c
1000g2c