I built PriceScout because I had no idea what to charge in Fallout 76

By JDUpdated 7 min readDevelopmentGaming
On this page
  1. Getting a price out of the game
  2. What the price on the panel means
  3. What I'd use each pricing method for
  4. F10 when I'm restocking

I had no idea what anything in my Fallout 76 stash was worth. The game could tell me an item's value, but I still had to pick a number when I put a spare plan in my vending machine. And when I saw the same plan at somebody else's C.A.M.P., I couldn't remember what the last person wanted for it.

That's why I built PriceScout. It's a PC mod that remembers the asking prices at the player shops I visit. The next time I highlight an item at a vending machine, I can see a suggested sell price, the middle asking price, how many vendors had it and the range they were asking. The numbers come from my own shopping trips. PriceScout on Nexus Mods

Getting a price out of the game

The first problem was getting a price the mod could save. Fallout 76's Scaleform interface already has the numbers it draws in the shop. PriceScout is written in ActionScript 3 and runs inside that interface. A Python script makes a starter SWF, JPEXS compiles the ActionScript into it, and the build packs the result into PriceScout.ba2. HUD Mod Loader loads that SWF into the game's HUD. PriceScout build script · HUD Mod Loader

For the xScal research, the two pieces I needed were modStorage for keeping the history between sessions and the Input callbacks for the F10 switch. PriceScout waits for the HUD's __SFCodeObj to expose the storage API before it loads its settings and history or starts polling keys. The wait also gives us a diagnostic to look at after a game patch. xScal needs an Address Library that matches the game version before PriceScout can save or read F10 again. xScal source and Address Library notes · xScal's API and release notes

The prices themselves come from the game's UI data. OtherInventoryTypeData tells PriceScout it's looking at a vending machine. CampVendingOfferData has the listings, with the caps amount in vendingData.price. The highlighted item comes from InventoryItemCardData. Its serverHandleID lets PriceScout find the corresponding entry in the list.

The odd part was that the HUD's watch on the offers could hold on to the first shop's inventory for the whole session. A new vendor could open with the old vendor's prices still in the data. When that happens, PriceScout can drop the watch, subscribe again and ask for the current value. These are the three calls at the center of that code.

this.dataManager.RemoveWatchFromDataConnector(provider);
this.dataManager.Subscribe(provider, this.handlerFor(provider));
fresh = this.dataManager.GetDataFromClient(provider);

PriceScout also fingerprints the list using its item handles. If it already saw that list under a different vendor, it rejects the list and tries the watch again. Reopening the shop you just closed is its own case. The game can leave the vendor and item card data alone because their values haven't changed, so PriceScout checks for them again if they haven't arrived after 300 milliseconds. The price history stays on your PC as JSON under Data\modsdata. It stores a hash of the vendor's identity with each observation. PriceScout's ActionScript source

What the price on the panel means

PriceScout works from 30 days of asking prices. A vendor gets one vote per item. For each vendor, the mod finds the most recent day with an eligible listing and uses the lowest price it saw there that day. It skips free listings and prices at 40,000 caps or more. With one vendor in the sample, the panel shows that observation dimmed and leaves the sell suggestion blank.

I went with the lower quartile as the default sell price because the stuff you see on a shelf is the stuff that hasn't sold yet. Cheap listings can disappear quickly. An expensive listing can sit there for days. The median is still worth showing as typical, but I'd usually start a little below it when stocking my own machine. The code finds a percentile by looking between the two prices on either side of the requested position. Here it is with the spacing adjusted for the article.

private static function quantile(sorted:Array, q:Number):Number
{
    var pos:Number = q * (sorted.length - 1);
    var below:int = int(Math.floor(pos));
    var above:int = int(Math.min(sorted.length - 1, below + 1));
    return Number(sorted[below]) +
        (Number(sorted[above]) - Number(sorted[below])) * (pos - below);
}

When I'm shopping, PriceScout leaves the open vendor out of the comparison. Its Best deals strip uses the lower quartile of at least two other vendors and looks for prices at least 10% below it. It skips legendary gear and plans or recipes I already know. The highlighted-item panel can still show comparable legendary listings by name and star count. Later-star effects are missing from the vendor list, so I'd read the item card before buying a specific roll. PriceScout's pricing and panel documentation

What I'd use each pricing method for

Say nine shops have the same spare plan at 60, 100, 120, 140, 160, 180, 200, 220 and 9,999 caps. These are made-up listings. Changing the method puts the same plan anywhere from 55 to 160 caps.

Method Price and when I'd use it
percentile 120 caps at the default 25th percentile. I'd use it for routine restocks, go lower for plans I keep accumulating, or try the 50th percentile (160 caps here) if I'm happy to let one sit.
undercut 55 caps with the default 5% undercut and rounding. I'd use it to clear some stash space. The cheapest ask drives the whole result, so I'd look at that low price before using it on anything scarce.
fencedMedian 150 caps after dropping the 9,999-cap ask. I'd use it for a middle price when a few listings sit far outside the rest. With fewer than four vendors, it behaves like an ordinary median.

The fenced median uses Tukey's rule. It drops prices more than 1.5 times the spread of the middle half below the lower quartile or above the upper quartile, then takes the median of what's left.

With the game closed, open pricescout_settings.json in the game's Data\modsdata folder. To try the undercut on a stash cleanup without rounding the result back toward the cheapest listing, I'd use these settings. The example above would come out at 57 caps with whole-cap pricing.

{
  "sellMethod": "undercut",
  "undercutPercent": 5,
  "roundTo": "none"
}

There's another knob for items I've barely seen. If PriceScout knows the game's item value, itemValueWeight can blend that value plus the configured markup into the sell suggestion. A weight of three gives the marked-up item value 60% of the result with two vendors and about 9% with 30. I keep that off by default. It's available if I want the game's value to steady a price based on a couple of listings. PriceScout settings

F10 when I'm restocking

The regular Better Containers feed fills in starting prices for non-legendary items with at least two vendors in the sample. If I've already set a price myself, the ordinary feed leaves it alone. I can browse or use the pricing panel without installing Better Containers. Better Containers on Nexus Mods

Market-price mode is for a different job. At my own machine, I press F10 before opening Better Containers' Vendor manager with M. PriceScout calculates new starting prices with the sell method I picked and temporarily replaces the remembered ones. If it has fewer than two vendors for an item and knows its in-game value, it uses that value plus 30% by default. A plan the game values at 100 caps would start at 130. That gives me a number to work from while putting up a batch of mixed items, including things I haven't seen for sale.

F10 works on the prices the Vendor manager starts from when I put something up for sale. I still choose which items to list. The mode stays on until I toggle it off. At that point PriceScout restores my saved prices wherever its own changes are still in place. If I hit M first, I close and reopen the machine so Better Containers rereads the prices on the next visit. PriceScout's market-price mode instructions

Download PriceScout on Nexus Mods or read the source and build instructions on GitHub. Once it's installed, open another player's vending machine to start collecting prices.

Comments

Sign in or create an account to comment and vote.

No comments yet. Start the discussion.