Posts: 2,122
Threads: 244
Joined: Oct 2007
Staff roles:
Over the next several posts, I am going to provide an example of how a new commodity is organized and priced. This will be a fictional example.
This spreadsheet will illustrate the process: https://docs.google.com/spreadsheet/pub?...utput=html
1) First a base is chosen to produce the new commodity. Typically a base that does not already produce a commodity is the first choice, but since there are very few of those left in the mod, and basically none within the Houses among lawful bases, for the purposes of this example I am going to choose Planet California Minor in the California system of Liberty.
2) Once a base is chosen, I read the base's infocards and develop an understanding of the role that base already plays in the overall economy and lore, or I develop a new role for the base. For this example, I'll introduce lore that surveyors on Cali Minor have located large deposits of iron. After hundreds of years of exploiting iron deposits, the price of iron has increased due to dwindling sources, and a new source of iron has economic potential.
3) Columns A & C: Next I'll need to decide on the name of the commodity that will be used in the game files. The infocard will say Iron, but the game files will call it commodity_iron. Setting up a new spreadsheet for pricing iron, this goes in Column A. I'll use a google spreadsheet for this example, but in reality I use Open Office Calc. Column C has the name of the production base, Cali Minor.
4) Column B: This contains the "Base Price" or default price for the commodity that is located in the goods.ini game file. Any base that does not have a price manually set for it will buy the commodity at this price. This number is also used in the final calculation in the pricing process. This number is important to choose carefully, because if a base has a manual price set to sell the commodity that is below the base price, then that will create a profit margin to every other base in the mod. The old infamous Tau 31 prisoner bug resulted from a mistake doing this. Most raw metals have a base price of 100, so that's what I'll choose.
5) Column D: This is the price that California Minor will sell Iron for. This is what I call the production price, and this is usually the lowest price you can pay to buy a commodity. For Iron, I'll choose 109.
6) Column E: This is the name assigned to California Minor by the game files: li02_02_base. These names break down as follows. The two letters refer to the region where the base is located, in this case li for Liberty. The first 2 numbers refer to the system; California is designated as Liberty's second system, so 02. The next two numbers designate the base within that system, Cali Minor is 02, Los Angeles is 01. All base names end in _base.
7) Columns G, N, O: Now for the fun stuff. This is where all the bases are listed that will buy the commodity. First, California Minor gets an entry at the very top, because this creates an entry for a price that will go into the mod. To create the rest of the list, I use a master list of all the economically relevant bases in the mod (not shown here). This master list shows me base names, game names, faction affiliation, region, system, and economic role for each base. Economic roles are things like luxury, raw materials, processing, unlawful, semilawful, population, battleship, lawful outpost, etc. I sort my master list by role, and then I have grouped together all the processing bases that handle metals. These are going to be Tier 1 consumers for Iron, and I put them in the pricing spreadsheet at the top. Next I look through the generic processing stations for any that might also have a high demand for Iron, and add them to Tier 1. For this example I'll assume there aren't any. Columns N & O show the role of the base, and the price Tier.
8) Next I add all the Tier 2 bases to the list. For this example, this will include the rest of the processing bases, population bases, shipyards, and shipping stations. At this point I might remove unlawful bases on the list from Tier 2 and move them to Tier 3, or I might not, but for this example I won't edit the list further. This takes us to Row 191 in the spreadsheet.
9) Now I'll add the Tier 3 bases to the spreadsheet. These will be all the unlawful outposts (pirate bases) that pirates can sell pirated Iron at. Other raw materials producers, battleships, police outposts, and luxury liners don't need Iron in large quantities, so they will be left off the list.
At this point, I need to fill in Column J with the base to base travel times. I'll begin the next post with that when I have more time.
Check out my Trade Development Blog
for all the latest news on Nerfs and Final Nails, or to request trade changes.
I dont know, if this is the right place to ask this. But can smuggling of Cardamine and Artifacts be buffed up a bit?
The most profitable sell points are lawful and mostly high activity areas. This makes it tough go for unlawfuls to find a good profit in selling contraband. Maybe the highest sell points can be moved to unlawful bases that make some sense. For example, Corsairs can have the highest sell points of Artifacts in Trafalgar, since Bretonia is the area of interest for Junkers.
Cardamine can have its highest sell point in Rochester or Beaumont, or any of the Rogue bases inside Liberty. This increases solo-smuggling in both of these factions, instead of Freelance or Junker ID/IFF smuggling. If their profit can be on par to that of ores, not that much, maybe 6k or so, it might do good for smuggling, which is literally fading off now, since it is very easy to get ores from PoBs or by self "power mining".
The same kind of things can be done to other contraband to. The only contraband now, that is worth its time and adventure would be human organs. Unfortunately it is located in Gallia, where there is nil activity. So, if quasi lawful or even some lawful companies that have shady businesses want to smuggle, they can use lawful bases for a low profit, since they dont ususally smuggle a lot. This has been my thinking for the past month or so, after I tried out various smuggling routes.
Also, is there any chance that Iridium recieves a buff? Mining as well.
I need to complain to you about your methods again, but I'll just stick to one pet peeve.
If you make one more goddamn station like FP4 buy M0X next to a system that sells M0X, but it only buys Rheinland M0X, I'm going to find your lawn and take a dump on it.
Posts: 2,122
Threads: 244
Joined: Oct 2007
Staff roles:
That was the fun part. This is the really fun part.
10) I have two tools for finding the travel time between bases. Both of them use a feature in Freelancer Companion that Wizou was gracious enough to develop for me. If you open FLC and go to the File menu you will see an option for "Save base-to-base travel times". If you select that and then open the dump.csv file it creates, you'll find a text file that contains every possible permutation of the travel times between all the bases in the mod. In case your bored wingman ever asks you, there are currently over 352,000 of them. If every base in the mod sold a unique commodity to every other base in the mod, that's how many manually determined prices there would be.
The second entry of the dump.csv looks like this:
"br01_01_base","br01_02_base",71400
That is the entry for the travel time between Planet New London (br01_01_base) and Southampton Shipyard (br01_02_base). The number at the end is the travel time between the two bases shown in milliseconds. In order to transform it to seconds, move the decimal point 3 places to the left: 71.4
For whatever reason, the dump.csv does not include the 20 seconds of time that it takes a ship to undock from a base, although FLC uses those 20 seconds when calculating c/sec proft/distance. So you have to add 20 seconds to each time in the dump file. The actual travel time between PL New London and Southampton Shipyard is 91.4 seconds.
The java tool that Cannon wrote for me uses that dump.csv file to find and display the travel time in seconds between two selected bases. I use that for spot checking or when I only have a very few bases to set up prices for.
When I have many bases to set up prices for, I use a perl script that DeathsOverture wrote for me. I copy/paste the base pairs from Column E & F in the spreadsheet into a separate spreadsheet, then save it as a .csv file. I then run the perl script on that .csv file and it pulls the travel times from the dump.csv file and produces a text file of travel times that are already adjusted from milliseconds to seconds and include the added 20 seconds for undocking. I then copy/paste those travel times into the spreadsheet. The perl script runs to completion in just a few seconds, even if I have it run on all 27,000 transactions in the mod (which I do every time there are geography changes).
If you look at the spreadsheet now, you'll see the travel times in Column J. https://docs.google.com/spreadsheet/pub?...utput=html
What you see is a nice orderly set of numbers, but they originally looked more like this:
1014.766
258.04
1345.649
554.042
368.883
1263.457
635.942
After I put the travel times into the spreadsheet I sorted the Tiers so that the travel times are shown in descending order. The longest travel time in each Tier is at the top, and the shortest is at the bottom.
11) If you look at the last three travel times in Tier 1 you'll notice that these are fairly short distances. In fact, these are bases that are within Liberty. Since California Minor, our source for Iron, is also in Liberty, this creates a balance problem. Even though these bases are logical prime consumers for Iron, trade traffic between Houses needs to have a higher rate of profitability than trade within a House. So to fix this, I will move all the Liberty bases in Tier 1 all the way down to Tier 3. I repeat the same thing for the Tier 2 Liberty bases. Once I've done that, transactions that cross Liberty's international border have the highest rate of profit.
So at this point we have all the consumption bases sorted according to 3 Tiers, with the bases farthest from California Minor at the top of each Tier. For this example, I've created a new spreadsheet and copied the data into it so you can see what the spreadsheet looks like before and after this change. https://docs.google.com/spreadsheet/pub?...utput=html
In the next post I'll explain how the c/sec is assigned and show the formulas for working out the math.
Check out my Trade Development Blog
for all the latest news on Nerfs and Final Nails, or to request trade changes.
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.
(04-02-2014, 06:22 PM)Moriarty. Wrote: I dont know, if this is the right place to ask this. But can smuggling of Cardamine and Artifacts be buffed up a bit?
The most profitable sell points are lawful and mostly high activity areas. This makes it tough go for unlawfuls to find a good profit in selling contraband. Maybe the highest sell points can be moved to unlawful bases that make some sense. For example, Corsairs can have the highest sell points of Artifacts in Trafalgar, since Bretonia is the area of interest for Junkers.
Cardamine can have its highest sell point in Rochester or Beaumont, or any of the Rogue bases inside Liberty. This increases solo-smuggling in both of these factions, instead of Freelance or Junker ID/IFF smuggling. If their profit can be on par to that of ores, not that much, maybe 6k or so, it might do good for smuggling, which is literally fading off now, since it is very easy to get ores from PoBs or by self "power mining".
The same kind of things can be done to other contraband to. The only contraband now, that is worth its time and adventure would be human organs. Unfortunately it is located in Gallia, where there is nil activity. So, if quasi lawful or even some lawful companies that have shady businesses want to smuggle, they can use lawful bases for a low profit, since they dont ususally smuggle a lot. This has been my thinking for the past month or so, after I tried out various smuggling routes.
Also, is there any chance that Iridium recieves a buff? Mining as well.
Posts: 2,122
Threads: 244
Joined: Oct 2007
Staff roles:
(04-04-2014, 06:32 PM)Moriarty. Wrote: [quote='Moriarty.' pid='1508723' dateline='1396459379']
I dont know, if this is the right place to ask this. But can smuggling of Cardamine and Artifacts be buffed up a bit?
...
The pattern is that contraband moves from unlawful bases to lawful bases, or from lawful bases to unlawful bases (and maybe some lawful too). The point is that having to be in scanner range of a lawful base at some point creates the risk that justifies the higher profit margin. An unlawful to unlawful commodity is not going to get high profit margins.
Check out my Trade Development Blog
for all the latest news on Nerfs and Final Nails, or to request trade changes.