Advertisement
Khataran

Sheyrah's Transmog Operation Explained

Jul 31st, 2018
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.61 KB | None | 0 0
  1. Sheyrah's Transmog Operation Explained
  2. So guys, I finally updated my transmog group as promised. The sorting feature I needed wasn't implemented until this week. So I've re-sorted all the transmog based on 70% avg(dbregionmarketavg, dbglobalmarketavg). It really doesn't matter how it's sorted, doesn't change any of the operations, it's just more for visual appeal.
  3.  
  4. Then I wanted to make a really solid operation for transmog. My idea going into it was that I wanted the operation to do a number of things:
  5.  
  6. -I wanted to sell all the cheap transmog <1000g for really cheap (aggressive) prices that referenced dbmarket. Because most people just want to get rid of the trash ASAP, in fact most people vendor that cheap stuff. But for a beginner, those little bits of profits might be a little meaningful in the beginning.
  7.  
  8. -I wanted to of course incorporate an avgbuy feature to ensure people never sold anything less than their average buy price. I pretty much always incorporate these safety features in all my operations. I think it is really important.
  9.  
  10. -The third part was the more confusing part. I wanted to have the price it sold good transmog (>1000g) to slightly increase as the price of the transmog increased. I could have gone with nested if functions but that would result in large jumps in prices. As an example, a 4,999g item might sell at 60% and a 5,001g item might sell at 80%. That's a huge jump I didn't want. I wanted smooth gradual increases in prices as the value of the item went up. I also wanted to use RegionMarketAvg for the pricing reference for all items >1000g. This is a more stable number and once you start getting into selling higher value transmog, you need to use more stable numbers or you risk letting your item go for way too cheap.
  11.  
  12. So we will build part 3 of the operation first, then add in the other little bits at the end. Also a big shout out to BilisOnyxia for helping me with building this string. Thanks for all the patience you have provided me.
  13.  
  14. So in order to build this linear operation, you first have to define 2 points on that line. So I went with:
  15.  
  16. For items with a value of 5k or below, use 50%
  17.  
  18. For items with a value of 50k or above, use 85%
  19.  
  20. Then you'd end up with two points P1(5000g, 50%) and P2(50000g, 85%)
  21.  
  22. Based on these two points you can now have tsm calculate the percentage for any given value So lets say an item has a value of 27500g That's exactly in the middle between the two values So the resulting percentage will be exactly in the middle between the two percentages So for an item with a value of 27.5k you'd use 67.5%
  23.  
  24. Remember we said, for items worth 50k or above, use 85% So for items worth 50k or above, use 85% so an item worth 100k won't use 110% It would use 85%
  25.  
  26. So this is how we build that linear function
  27.  
  28. (DBRegionMarketAvg - minvalue)*(maxpercentage-minpercentage)/(maxvalue-minvalue)+minpercentage
  29.  
  30. Now, minvalue = 5000g
  31.  
  32. maxvalue = 50000g
  33.  
  34. minpercentage = 50
  35.  
  36. maxpercentage = 85
  37.  
  38. So that would be this:
  39.  
  40. (DBRegionMarketAvg- 5000g)*(85-50)/(50000g-5000g)+50
  41.  
  42. So far this formula will spit out a percentage in copper
  43.  
  44. so, if DBRegionMarketAvg is 27500g as in our example earlier this string will equate to 68c, (67.5% rounded up)
  45.  
  46. Now, we want to ensure that this can never be lower than 50% and never higher than 85% So we wrap it in a max() and a min() So now it will look like this:
  47.  
  48. min(max((DBRegionMarketAvg- 5000g)*(85-50)/(50000g-5000g)+50, 50), 85)
  49.  
  50. Now this will always equate to something in between 50 and 85
  51.  
  52. Now all you need to do is multiply DBRegionMarketAvg with it and divide it by 100
  53.  
  54. DBRegionMarketAvg * min(max((DBRegionMarketAvg- 5000g)*(85-50)/(50000g-5000g)+50, 50), 85) / 100
  55.  
  56. So, for that item with a DBRegionMarketAvg value of 27500g, this would equate to 27500g * 67.5 / 100 Which is the same as 67.5% 27500g = 18562g50s
  57.  
  58. Now we said we wanted to do things differently for items with a DBRegionMarketAvg value of less than 1k. So now we use some of the new TSM4 logic functions:
  59.  
  60. iflt(DBRegionMarketAvg, 1000g, X, DBRegionMarketAvg * min(max((DBRegionMarketAvg- 5000g)*(85-50)/(50000g -5000g) + 50, 50), 85) / 100)
  61.  
  62. Where X is for those items with a DBRegionMarket value <1000g. We just are going to use dbmarket for that, to allow people to just get rid of their very cheap stuff very quickly.
  63.  
  64. So for minimum price, for items with a DBRegionMarket value <1000g, I will be using 25% dbmarket for my minimum price, 90% dbmarket for normal price and 110% for maximum price. That will certainly get rid of your cheap stuff quickly. So here is what minimum price would start looking like:
  65.  
  66. iflt(DBRegionMarketAvg, 1000g, 25% dbmarket, DBRegionMarketAvg * min(max((DBRegionMarketAvg- 5000g)*(85-50)/(50000g -5000g) + 50, 50), 85) / 100)
  67.  
  68. Now we need to incorporate avgbuy/0.95 into the string to account for your average buy price and also to take into account the AH. Remember avgbuy/0.95 does this but gives you no profit. So we will use 110% avgbuy/0.95 to ensure 10% profit on top of your average buy price including the AH cut. So we get this:
  69.  
  70. max(110% AvgBuy / 0.95, iflt(DBRegionMarketAvg, 1000g, X, DBRegionMarketAvg * min(max((DBRegionMarketAvg - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100))
  71.  
  72. Now we need the ability to adjust this overall formula, so we can have the normal price being slightly higher than our minimum price, and then our max price needs to be higher than our normal price. Because you want a nice range to work in. You obviously don't want your number for minimum price, normal price and maximum price the same. You can go and adjust the 50 and 85 parts if you like, to adjust it to meet this goal. But for people who are new to this kind of thing, that would perhaps be too confusing. So to make it nice and simple for someone newer to this, we will just slap percentages at the beginning.
  73.  
  74. So we will do something like this for our minimum, normal and maximum prices:
  75.  
  76. max(110% AvgBuy / 0.95, iflt(DBRegionMarketAvg, 1000g, 25% dbmarket, DBRegionMarketAvg * min(max((DBRegionMarketAvg - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100))
  77.  
  78. 175% max(110% AvgBuy / 0.95, iflt(DBRegionMarketAvg, 1000g, 90% dbmarket, DBRegionMarketAvg * min(max((DBRegionMarketAvg - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100))
  79.  
  80. 500% max(110% AvgBuy / 0.95, iflt(DBRegionMarketAvg, 1000g, 110% dbmarket, DBRegionMarketAvg * min(max((DBRegionMarketAvg - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100))
  81.  
  82. Now, if you want to adjust that range a little yourself, you can just adjust the percentages at the beginning of the strings.
  83.  
  84. You could obviously simplify things like 85 - 50 to 25 But I think it's better to leave it as 85-50, so you can follow it better and understand what it's doing.
  85.  
  86. I thought I was done here, but I ran into 2 problems.
  87.  
  88. First, for really expensive transmog items, my max price was sometimes going over gold cap which it is not possible to post things on the AH above 9,999,999g99s99c. So I had to incorporate that to ensure the string would work for everything. So I changed my maximum price to this:
  89.  
  90. min(500% max(110% AvgBuy / 0.95, iflt(DBRegionMarketAvg, 1000g, 110% dbmarket, DBRegionMarketAvg * min(max((DBRegionMarketAvg - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100)), 9999999g99s99c)
  91.  
  92. So anytime my maximum price would have pushed me over 9,999,999g99s99c, then the sting above now limits us to 9,999,999g99s99c
  93.  
  94. The second problem with the string was that there were a very small handful of transmog items that were so rare that they did not even have a DBRegionMarketAvg value, so I also had to account for that.
  95.  
  96. So I changed every instance of DBRegionMarketAvg to first(DBRegionMarketAvg, DBGlobalMarketAvg)
  97.  
  98. Now it will use DBRegionMarketAvg if the number exists and for those few situations where that number is invalid, it when then move on and use DBGlobalMarketAvg. Now the formula starts looking a little messier:
  99.  
  100. min(500% max(110% AvgBuy / 0.95, iflt(first(DBRegionMarketAvg, DBGlobalMarketAvg), 1000g, 110% dbmarket, first(DBRegionMarketAvg, DBGlobalMarketAvg) * min(max((first(DBRegionMarketAvg, DBGlobalMarketAvg) - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100)), 9999999g99s99c)
  101.  
  102. Then I decided I wanted to account for those situations where people have artificially inflated dbmarket on their servers for those items that were <1000g DBRegionMarketAvg. So this change only affects those cheap transmog items that you just want to get rid of as quickly as possible. So every instance of DBMarket I replaced with min(DBMarket, first(DBRegionMarketAvg, DBGlobalMarketAvg))
  103.  
  104. This will prevent you from wasting your time and deposit fees posting your cheap transmog for over inflated dbmarket values if that ever happens to be the case on your server for those items <1000g DBRegionMarketAvg. So now you are left with a formula that looks like this:
  105.  
  106. minimum price:
  107.  
  108. max(110% AvgBuy / 0.95, iflt(first(DBRegionMarketAvg, DBGlobalMarketAvg), 1000g, 50% min(DBMarket, first(DBRegionMarketAvg, DBGlobalMarketAvg)), first(DBRegionMarketAvg, DBGlobalMarketAvg) * min(max((first(DBRegionMarketAvg, DBGlobalMarketAvg) - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100))
  109.  
  110. normal price:
  111.  
  112. 175% max(110% AvgBuy / 0.95, iflt(first(DBRegionMarketAvg, DBGlobalMarketAvg), 1000g, 50% min(DBMarket, first(DBRegionMarketAvg, DBGlobalMarketAvg)), first(DBRegionMarketAvg, DBGlobalMarketAvg) * min(max((first(DBRegionMarketAvg, DBGlobalMarketAvg) - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100))
  113.  
  114. maximum price:
  115.  
  116. min(500% max(110% AvgBuy / 0.95, iflt(first(DBRegionMarketAvg, DBGlobalMarketAvg), 1000g, 50% min(DBMarket, first(DBRegionMarketAvg, DBGlobalMarketAvg)), first(DBRegionMarketAvg, DBGlobalMarketAvg) * min(max((first(DBRegionMarketAvg, DBGlobalMarketAvg) - 5000g)*(85 - 50)/(50000g - 5000g) + 50, 50), 85) / 100)), 9999999g99s99c)
  117.  
  118. So I think it's pretty clear why I anticipated people might need some help understanding this string if they import my transmog group I just updated and re-sorted yesterday. I did not want to burden any tsm team members or discord members from having to explain this to people. I created this mess, it's my responsibility to help people understand this auctioning operation.
  119.  
  120. Also beyond just explaining my transmog operation. I also thought it would be helpful for other people in showing them how to build a string like this, as it can be used for lots of stuff, like pets for example. You can now adjust it or build your own as you have a clear explanation of what all the parts are doing.
  121.  
  122. TSM4 transmog group with operations can be found here: https://pastebin.com/tpTrmwmC
  123.  
  124. TSM4 transmog group without operations can be found here: https://pastebin.com/LkhGjSqZ
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement