v1.31.4
What's new
Royal Revenue
v1.31.4 (2026-10-09)
- v1.31.4: identical orders showing different concentration cost
Two near-identical "Potion of Recklessness" orders rendered with one
showing concentration 177 in the Reagents column and the other
showing nothing. The SavedVariables confirm both have minQuality = 2,
so both need concentration - this was not the v1.31.1 optional filter.
Queue.OrderPlan collapsed three different situations into one line:
if minQ <= 1 or not q0 or q0 >= minQ then return false .... The
not q0case means "the game didn't compute this order's quality"
(happens when the order isn't open/selected in the crafting window),
and the addon reported it as "no concentration needed" - a silently
wrong answer that varies per order depending on what the client has
loaded, which is exactly why two identical orders diverged.
The three cases are now distinct: minQ <= 1 is optional, q0 >= minQ
genuinely doesn't need it, and a nil q0 falls back to the profession
scan (mandatory when the recipe's normal quality misses the minimum
and a concCost exists), flagged via x.concEst and shown as "(~)" with
an explanation in the tooltip. OrderConc passes c.row through for the
fallback.
Also deepened the ordersDebug snapshot from 3 to 5 levels: the
customer reagent's itemID lives at
reagents[i].reagentInfo.reagents[j].itemID and was being truncated to
"", which obstructed this diagnosis.
Test: tests/t99.lua covers all four cases
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.31.3: Moxie reward finally gets its real icon
Found in the live SavedVariables (Saalla, Blacksmithing): the Moxie
reward carries no itemLink at all. The game sends
, while other rewards arrive as
.
v1.29.0 started parsing currency:(%d+) out of the link, but with no
link there was still no id, no icon, and the question-mark fallback
with the generic "AH value: bound / no price" tooltip.
Now reads rw.currencyType directly (link parsing stays as a
fallback). 3257 is Blacksmithing Moxie, matching the same per
profession map CraftSim uses.
Visual.lua gained cached V.CurrencyIcon / V.CurrencyName so Queue.lua
stops repeating C_CurrencyInfo.GetCurrencyInfo in three places. A
currency reward now shows its own tooltip via SetCurrencyByID plus the
quantity, without the item-only "AH value" line.
Test: tests/t99.lua covers the three real reward shapes
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.31.2: yellow book icon only for the first-craft bonus
Professions_Icon_FirstTimeCraft was being drawn for any knowledge
reward, so it showed on nearly every row - but that atlas is the
first-craft icon, which is what CraftSim uses it for.
Queue.IsFirstCraft reads firstCraft from a live
C_TradeSkillUI.GetRecipeInfo (the recipe may have been crafted since
the last scan) and falls back to r.firstCraft from the scan, cached
30s. Scanner now stores r.firstCraft so it also works for alts.
The book now appears only when the recipe hasn't been crafted yet,
with a gold border and a "First craft" tooltip. Knowledge coming from
a reward item is marked again by the green border on that item's own
icon rather than a separate icon.
Test: tests/t99.lua extended
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.31.1: fix orders table layout, column order and icon counts
- Columns overlapped the item name: widths were fixed and itemW had a
math.max(120, ...) floor, so at ~750px the Custo column started at
x=80 while the name ran to x=126. The Item column now has a
guaranteed 170px minimum and the others shrink proportionally down
to their own minimums; itemW never crosses into Custo. Checked from
520 to 1200px. - Column order is now Item, Custo, Reagentes, Recompensa, Lucro,
Tempo, Claim (Reward and Profit used to come before Reagents). - "Every order uses concentration": the Reagentes column also drew the
OPTIONAL concentration from v1.29.0, which applies to nearly every
recipe. Only mandatory concentration (required by the order's
minimum quality) is a reagent now; optional stays in the tooltip. - Counts spilled out of their icon (rendering as "2.394", "8.294"
where two icons collided). Canvas:Icon now uses NumberFontNormalSmall
for small icons or 4+ digits and abbreviates above a thousand; icon
spacing went from 23 to 25/26px.
Test: tests/t99.lua updated
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
- Columns overlapped the item name: widths were fixed and itemW had a
- v1.31.0: crafting orders as a proper column table
Each order was one loose line: icon, name, a subtext cramming
everything in ("Patron - Name - +1 knowledge - conc 162"), reward
icons glued to the name, profit and button. Now a header + aligned
columns: Item, Custo, Recompensa, Lucro, Reagentes, Tempo, Claim.- Item: crafted-item icon then the name in quality color, nothing
between or over it; patron moved to a subtext, long names truncate. - Custo: only the materials you supply, itemized in the tooltip.
- Recompensa: net commission plus reward icons (knowledge first, then
Moxie and items), each with its quantity overlaid and a tooltip. - Knowledge left the subtext and became a reward icon using the
Professions_Icon_FirstTimeCraft atlas, same as CraftSim. - Reagentes: icons with quantity for what you supply, and
concentration as one more reagent (profession concentration currency
icon + points). Quantity turns red when short on either. - Tempo: order expirationTime, which the game already sent and the
addon ignored. - Sorting by clicking a column title, stored in config.orderSort.
- Only one order can be claimed at a time: with one already claimed on
this character the other buttons are disabled with an explanatory
tooltip. Order reading and ClaimOrder are untouched.
Visual.lua: Canvas:Icon gained o.atlas and o.countColor; Canvas:Button
re-enables on pool reuse. Fixed twoa and b or cbugs (falls to c
when b is false) in the sort comparator and the title-click toggle.
Harness widgets now implement Enable/Disable/IsEnabled.
Test: tests/t99.lua
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
- Item: crafted-item icon then the name in quality color, nothing
- v1.30.1: rows created after UI.Layout rendered with no text
The "No profit" group reported "1-40 of 46" but only ~9 rows showed
text; below them ~30 rows drew just the item icon and the zebra
stripe. sec.MakeRow builds the column FontStrings with a width and
justification but no anchor point - UI.Layout is what anchors them.
Rows built at startup get the UI.Layout that runs right after, but
UI.LayoutRows creates extra rows when a section gains space, and it
runs inside UI.Refresh, after UI.Layout. An unanchored FontString
doesn't draw, leaving only the icon (which has its own point).
Long-standing, but v1.28.0 exposed it: with 3 groups instead of 4, the
No-concentration tab's "No profit" section started receiving ~40 slots
while only 5 widgets existed up front.
UI.Layout now records the column geometry in frame.colGeom and
MakeRow applies it to the row it just created. No layout changes.
Also verified the item icon path per the report: V.ItemIcon already
uses C_Item.GetItemIconByID (resolves uncached items), falls back to
GetItemInfoInstant, requests RequestLoadItemDataByID and redraws on
arrival; 134400 only appears with no itemID. The actual question mark
with "30" was Moxie - a currency, not an item - fixed in v1.29.0.
Test: tests/t98.lua
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.30.0: each Receitas tab gets its own ABC curve
The Concentration tab had a real gold-per-point curve, but the No
concentration tab dumped everything profitable into A (the abcFree
flag from v1.27.1), with no B, C or share - Wondrous Synergist (94.2%
margin) and Haranir Phial of Finesse (3.6%) both read as A.
Each tab now ranks by the resource it actually consumes:
Concentration by gold per concentration point, No concentration by
margin (profit / material cost), i.e. gold returned per gold tied up
in reagents. The mix outcome joins the margin curve since it spends no
concentration. Recommendable no longer bypasses no-concentration
outcomes; they're judged by the margin curve.
Weighting by sales/day was rejected here too, for the v1.27.0 reason:
Bouquet of Herbs (270,218 region sales/day) alone would take nearly
the whole total and degenerate the curve to A=1, C=5.
Verified on sv11 (Radunz Alchemy): Concentration A=16 B=4 C=5, No
concentration A=3 B=2 C=1, and the same recipe can land differently
per tab - Bouquet of Herbs is A on margin (43.9%) but C on gold/point
(0.3).
Test: tests/t97.lua
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.29.0: concentration icon, optional order concentration, Moxie icon
Order bug: concentration was only computed when an order demanded
minQuality > 1, so two orders for the same recipe (1230859, concCost
179, quality 1, maxQuality 2) rendered differently - Auctioneer Jenath
(minQuality 2) showed "conc 177" while Astalor Bloodsworn (minQuality- showed nothing, even though the recipe has a concentration cost
either way, which is what the game and CraftSim display. OrderConc now
falls back to the scanned recipe's cost and flags x.concOpt; profit
only deducts the points when concentration is mandatory.
Concentration icon: ns.ConcTexture/ns.ConcStr resolve the profession's
concentration currency (C_TradeSkillUI.GetConcentrationCurrencyID ->
C_CurrencyInfo iconFileID), the same source CraftSim uses, and render
icon + value. Applied across the Receitas column and tooltip, the plan
bar/tooltip and HOLD line, order and queue rows, Investment and the
Salvage projection. Falls back to the bare number without the API.
Moxie icon: patron rewards arrive as |Hcurrency:ID| links (Moxie is a
per-profession currency), but the code only parsed item:(%d+), so they
had no id, icon or name. Now parses currency:(%d+) and uses the
currency's icon, SetCurrencyByID tooltip and name.
Test: tests/t96.lua
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
- showed nothing, even though the recipe has a concentration cost
- v1.28.0: Receitas tabs for Concentration / No concentration
Dropped the volume-based split: the "Volume" and "Baixo volume, alto
lucro" sections are now a single "Com lucro" group, leaving 3 sections
(profitable / no profit / unknown recipes).
Added a tab bar styled after the Mercado > Comprar list bar, between
the controls row and the column headers: Concentration shows only
outcomes that spend concentration (variant == "conc", the higher
quality), No concentration shows the rest (normal craft, better
reagents, NPC resale). Applies to unknown recipes too. Reuses the
per-outcome views from v1.27.1.
Layout shifted 30px to make room (headers -82 to -112, list -102 to
-132, row-slot math -128 to -158); tabs resize with the window in
UI.Layout. config.collapsed migrated once via secMig7.
volumeMinSpd still exists but now only anchors the Sales/day column
color, so its setting label no longer mentions a section.
Test: tests/t95.lua
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.27.1: classify the ABC curve per item, not per recipe
The Receitas list renders one row per outcome (UI.Variants: base Q1,
conc Q2, mix, NPC resale), but r.abc lived on the saved recipe and the
views inherit everything through __index, so every row showed the same
class. Light's Potential Q1 (item 241309, -6.4k loss when crafted)
displayed as A because the recipe had entered the curve via its Q2
outcome (item 241308, +2.1 gold/point with concentration).
ApplyABC now classifies each outcome by its own item: r.abc/r.abcFree
for the base craft, r.concAbc/r.concAbcShare for the concentration
outcome (the gold/point curve), r.mixAbc for the better-reagents
outcome. The conc/mix/NPC views override abc accordingly, and
Recommendable picks the field matching the requested outcome.
Also fixes a bug in the previous commit: a recipe with no concItemID
produces the same item as the base, so the concentration outcome must
use the base item's bind type. The check only ran when the IDs
differed, letting a bound item into the concentration curve.
Test: tests/t94.lua
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.27.0: ABC curve now ranks by best use of concentration
The curve was pure sales volume: sorted by region sales/day, cut by
cumulative sales. Profit never entered, so a high-turnover/low-margin
recipe became class A.
Now only profitable recipes enter (perConc > 0 with concentration, or
profit > 0 without), whose item can reach the AH, and that have
turnover. The metric is gold per concentration point: order = spend
priority, A/B/C cut = cumulative share of that gold/point. Recipes
profitable without concentration don't compete for points, so they're
class A (r.abcFree) and fall back to the turnover rule in
Recommendable, same as gathered items already did.
Weighting by sales/day was tried and rejected: spd/concSpd are
region-wide (10k-270k/day), not personal throughput. Using
"sales/day x profit" gave Bouquet of Herbs (0.3 gold/point, 270,218
sales/day, capped at 2 charges) 85.3% of the profession's "profit" and
degenerated the Alchemy curve to A=28, B=0, C=1. With gold/point it
correctly lands in C.
Verified on the real sv11 fixture: Alchemy A=16 B=4 C=5, Cooking A=12
(all concentration-free), Inscription A=16 B=4 C=2; the concentration
plan still builds for all 16 character/professions.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.26.3: ABC curve only counts items that can go to the AH
A crafted item that's bind-on-pickup or bound to warband/account still
counted toward the ABC curve and sales % if it had sale-per-day data,
even though it can never actually be listed. Added ns.IsAuctionable
(same bind-type classification RecipeShop.lua already uses) and have
ApplyABC exclude those items from the total/list, same treatment as
gathered items already got. New tooltip line explains the "-" in the
ABC column when it's due to bind type.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.26.2: share one window size between Craft/Market and Livro-caixa
Both windows kept independent saved sizes (LucroCraftDB.size vs
LucroLivroDB.size), so resizing one never affected the other. They
now both read/write RoyalRevenueDB.winSize (already shared for
language/scale/last-module), each still clamped to its own minimum
(Craft: current tab's; Livro: fixed 780x460) and to the screen.
Resizing either window's grip immediately applies the new size to
the other if it's already open (root.ApplyLivroSize / ApplyCraftSize);
opening Livro-caixa also re-applies it in case it changed while
closed. /rr reset clears the shared size instead of two separate ones.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.26.1: stop the Craft/Market window from resizing on every tab switch
UI.ApplyTabSize ran on every tab change and always grew the frame to
at least the active tab's TabMinWidth, even with a saved
LucroCraftDB.size — so switching to a tab needing more width (List,
Buy, Sell, ...) silently resized the whole window away from whatever
size the user had chosen.
Now, once a size is saved, it's used as-is (only clamped to the
screen), and the resize-drag lower bound is capped at the saved size
so Blizzard's frame system can't force it back up either. First-run
(no saved size yet) behavior is unchanged.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.26.0: quality button is now icon-only and opens a dropdown menu
Replaced the "Qualidade: N" text box on the Sugestão bar with just the
profession quality-tier icon (ns.QIcon). Click opens a proper context
menu (MenuUtil.CreateContextMenu + CreateRadio, same pattern already
used for columns/period/character pickers elsewhere in the addon)
instead of just cycling on click.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.26.0: revert dual-icon rows, add a quality toggle on the Sugestão bar instead
The per-row two-icon layout from the previous commit looked bad in
game. Replaced it with a single "Qualidade: 1/2" button on each
"Sugestão" group header (one shared setting, LucroCraftDB.config.consQuality)
that decides which of the two item IDs Consum.Pick returns. Rows are
back to the original single icon/price/signal/cost/buy-button layout;
owned/needed amounts still sum across both qualities (a correctness
fix kept from before, unrelated to the layout).
Co-Authored-By: Claude Opus 5 noreply@anthropic.com - v1.26.0: show both qualities side by side for consumables
Consum.Pick always fell back to the first ID because
GetItemCraftedQualityByItemInfo returns 0 for plain consumables (it's
meant for crafted-quality items), so the "pick the better quality"
comparison never won. Instead of fixing the picker, show both options
on the same row: owned/needed amounts now sum across both item IDs,
and the Buy row renders two independent icon+price+buy-button blocks
when a material has more than one quality variant.
Verified against the real SavedVariables fixture (sv11): health
potion (271883/271884) renders with distinct prices (130,000c vs
1,337,800c) and food (242747/242275, one with no price data) both
draw without error.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
This mod has no additional files

