# Commodity Calculator

Commodity Calculator

A tool to calculate prices for your OXP station, or for where to head next planning your journey across the stars.

It comes with almost no instructions as for OXP developers it should be pretty straight forward and testing and practice makes perfect...

## Instructions

• Enter the values in the fields & press button "Calculate Price" to get the prices.
• Do the same for quantities. You can insert the default values by selecting the wanted commodity clicking that very button.
• You can change the commodity name of the plist string for commodity.plist file by simply changing the name in the preset field

### Order of values in the array

```0.	The name of the commodity
1.	Units available at a market (this is calculated at each marketplace)
2.	Price per unit at a market (this is calculated at each marketplace)
3.	The base price per unit MARKET_BASE_PRICE
6.	The base quantity available to a market MARKET_BASE_QUANTITY
9.	The unit of quantity (0 == tons, 1 == kilos, 2 == grams)
```

Prices (at top): The first box takes #3, the second takes #4 and the third takes #7

Quantity (below): The fourth box takes #5, the fifth takes #6 and the sixth takes #8

So, from the Galactic_Navy.oxp commodities.plist (for the SecCom stations):

```		<array>
<string>Food</string>
<integer>0</integer>       <-#1
<integer>0</integer>       <-#2
<integer>12</integer>      <-#3
<integer>0</integer>       <-#4
<integer>0</integer>       <-#5
<integer>0</integer>       <-#6
<integer>1</integer>       <-#7
<integer>0</integer>       <-#8
<integer>0</integer>       <-#9
</array>

yields a quantity of 0 for sale (whatever the system type), but a price (for buying) between 4.8 - 5.2₢ (whatever the system type).
```