Posts: 2,122
Threads: 244
Joined: Oct 2007
Staff roles:
https://docs.google.com/spreadsheet/pub?...utput=html
12) Next the c/sec profitability is assigned for all the consumption bases. To start out with, I need a top c/sec for Tier 1 bases. This is determined for most commodities using a formula:
a) First I start with a baseline for normal commodities: 250 c/sec
b) Then I add 5 c/sec for each system jump from the nearest capital planet to the production base. For California Minor, that is 1 system jump from Manhattan.
c) Then there is a bonus for production cost. For each 100 credits that a commodity costs above 100 credits, there is a 1 c/sec bonus. So a commodity that costs 500 credits at the production location would get a 4 c/sec bonus (500-100)/100=4. Iron is priced at 109, so there is no bonus in this case.
d) There is a 5 c/sec bonus for commodities produced in Dublin, Dresden, and Omega 11. This reflects the fact that these are historic conflict zones between pirates and House authorities.
e) For Iron, the formula looks like this: 250 + 5 + 0 + 0 = 255 c/sec
Contraband, people, House alcohol, Food Rations, and in-House transition commodities like Consumer Goods have their profit margins determined arbitrarily according to different criteria, but this is the basic formula for ordinary, manufactured, or raw material commodities.
13) All of Tier 1 receives 255 c/sec as their profit margin. Tier 2 receives 255 - 20 = 235. Tier 3 receives 255 - 40 = 215. Moving Liberty bases into Tier 3 actually creates an effective Tier 4. Everything from Ouray Base and below will have 180 c/sec, because they are so close to California Minor. 20 c/sec difference between the Tiers and 180 for the very bottom is fairly standard across all normal commodities.
14) At this point, 4 critical pieces of data are in the spreadsheet: Base Price (Col B), Production Price (Col D), Travel Time from Producer to Consumer (Col J), and c/sec profitability (Col K). These 4 numbers allow me to create the final code that goes into the mod using the "Multiplier". It will help to define a few terms before explaining further.
Column L Profit = Travel Time * (c/sec) / 100 (This is the amount of profit earned on a transaction. Division by 100 is necessary to transform cents/sec into credits/sec: 100 cents = 1 credit)
Column M Consumption Price = Production Price + Profit (This is the price a base pays when you sell a commodity)
Column I Multiplier = Consumption Price / Base Price
So the math is fairly straight forward. I put the necessary formulas into each column and let the spreadsheet do the math. In my actual working spreadsheet I combine the math in Column L and M into one formula, but I kept them separate here to make the example easier to follow.
15) The game does not store the actual price for each commodity at each base. Instead, the market_commodity.ini file stores code for each commodity priced at each base in the form of a 6 decimal number called the Multiplier. When you dock at a base and go to the commodity dealer and select a commodity, the game looks up that base in the market_commodity.ini file and then checks to see if there is a commodity line of code assigned to that base. If there is not, then the price you see on your screen is the Base Price. If there is a line of code, then the game calculates the price you see as follows : Multiplier x Base Price. Here is an example of code in the market_commodity.ini file.
base = Br01_01_base
MarketGood = commodity_ablativearmor, 0, -1, 0, 0, 1, 5.540000
MarketGood = commodity_aluminium, 0, -1, 150, 500, 0, 29.900000
This shows code for Planet New London, Ablative Armor Plating and Aluminium.
0, -1, 0, 0, 1 indicates that the base only purchases this commodity, and does not sell it.
0, -1, 150, 500, 0 indicates that the base will buy and sell the commodity.
The number with 6 decimal places at the end of the line of code is the multiplier.
So in order to produce the code for Iron at each base, I'll need a line of code like this:
MarketGood = commodity_iron, 0, -1, 0, 0, 1,
I take the Multiplier from the spreadsheet for each base and add it to the end of a code line for each base.
At that point, the only task left to do is to insert the new code lines into the market_commodity.ini file.
Fortunately, putting the Multiplier into lines of code and inserting those lines of code into the market_commodity.ini file is an extremely regimented step by step process, the kind of process that relatively simple program scripting can do for me. So I don't do that manually. Instead I arrange the data in a fresh spreadsheet, save it as a text file, and have my computer rewrite the data into code lines. I then run another script to insert the code into the market_commodity.ini file.
In the next post I'll explain the problems inherent in resale points for commodities at bases other than the production base.
Check out my Trade Development Blog
for all the latest news on Nerfs and Final Nails, or to request trade changes.