https://docs.google.com/spreadsheet/pub?...utput=html
16) You'll notice that all the consumption bases have their base code names in Column F, while only California Minor is in Column H. This is a quick visual indicator to me which bases only buy the commodity, and which ones buy and sell. Resale points for commodities have high potential to create bugged trade routes. I'll illustrate by example.
In the case of this commodity set-up, probably all the Tier 1 bases could resell the commodity without creating any bugged routes. But what if Altona Station, a Tier 2 consumer, resells Iron? The potential issue is that The Ring is a Tier 1 consumer, and Altona lies along the travel path from California Minor to The Ring. With Altona buying/selling at a rate of 235 c/sec, and The Ring buying at 255 c/sec, what is the profitability of a route from Altona to The Ring? To determine this I would normally load all the prices into the mod and then use Freelancer Companion to check the Iron route from Altona to The Ring. But since this is just an example and the prices aren't actually in the mod, we'll do the math by hand. The travel time from Altona to The Ring is 240 seconds.
I can see from the spreadsheet that Altona's price is 1705 and the price at The Ring is 2397.
2397 - 1705 = 692.
So if you purchase Iron at Altona for 1705 and sell it at The Ring for 2397 you'll earn 692 credits over 240 seconds.
692 / 240 * 100 = 288 c/sec
So the profitability of Iron is:
California Minor to Altona - 235 c/sec
California Minor to The Ring - 255 c/sec
Altona to The Ring - 288 c/sec
Obviously the Altona to The Ring trade route is a bug, because the rate of profitability to make that one trade from Hamburg to New Berlin is greater than from California to New Berlin. Therefore, Altona cannot resell Iron.
Nearly every case where someone asks for a resale point for a commodity that I deny as unworkable is because of this type of bug. Geography and math determine which bases can resell and which cannot. Bases with low profit rates along major travel paths usually can't resell. Bases outside the main travel paths can sometimes resell without being a problem. This is exactly the situation that created the 4.84 New Berlin-Kyushu Diamond-Niobium run, when the routes should have been going from Falkland and Bautzen where those commodities are produced.
17) Debug, debug, debug. After all the code is in the mod, open Freelancer Companion and check every base for problems. If Tier 2 bases are resale points, there will be bugs to find somewhere. Even some Tier 1 resales can be bugs if the geography is just right.
There are countless exceptions, special circumstances, and nuances for the dozens of commodities in the mod, but these are the basic mechanics of the process for creating and pricing a new commodity. This process is how we got from a vanilla market_commodity.ini file of 80kb to our current mod's 1,768kb and over 27,000 manually determined prices.