InventoryUtility.GetCoinValue(...) (decompiled). Sell price & recycling return both come from the same requiredObjectsToCraft list.A material's contribution does not depend on its own sell value — only on its rarity, via
GetRaritySellValue(r) = 1 + max(0, (int)r) * 5. The material's own sellValue is used only as a gate (must be != 0, i.e. sellable).
| Rarity | (int) | Value per unit | In-game name color |
|---|---|---|---|
| Common | 0 | 1 | white/grey |
| Uncommon | 1 | 6 | green |
| Rare | 2 | 11 | blue |
| Epic | 3 | 16 | purple |
| Legendary | 4 | 21 | orange |
Material rarity is not shipped in the SDK → read it in-game from the item's name color and set it per row below. (Legendary items themselves are unsellable → value 0; but they still count as an ingredient.)
Fully supported — the same code path runs for any ObjectID, vanilla or modded:
sellValue=-1 → same rarity + Σ path.GetRaritySellValue(rarity) as long as their sellValue != 0. Only rarity matters — the name is irrelevant. Just add a row and pick its rarity.You don't need the ObjectID. It's only used for the exact ±10% jitter, and modded items get their ObjectID assigned at runtime by PugMod. Leave it blank → the result is shown as a ±10% range that always contains the true value. Plan by name + rarity.
| Material (free name) | Amount | Rarity | Sellable | Contribution |
|---|
num before the item's own part and jitter).InventoryUtility.cs:1088-1175 (GetCoinValue + GetRaritySellValue); jitter via
Unity.Mathematics.Random.CreateFromIndex((uint)objectID).NextFloat(-0.1f,0.1f) (random.cs: WangHash+62, xorshift, NextFloat=(state>>9)/2^23).
Rounding = System.Math.Round (banker's / to-even). Non-stackable sell = num; stackable = num × amount.