Page 1 of 1

How to change commodity names and base prices?

Posted: Thu Jan 09, 2014 8:19 pm
by hangar18
Hi Guys,

I've been trying to modify the following without much success:

1. Change the name and price of Alien Items to Alien Artefacts and price to 1,000 not the 50 or so CR
2. Change the maximum amount of gems you can sell - at the moment it is fixed at 127.
3. Change the prices offered for delivery contracts

I can see various details in the default config commodities plist file but the values for each good don't make any sense nor does changing the name or values seem to do anything. Any help would be greatly appreciated on this and the other points above! I'm using the pods oxp and bloombergs markets and starting the game holding shift down to clear the cache's each time I make a change but to no avail. Thx in advance!

1. The name of the commodity
2. Units available at a market (this is calculated at each marketplace)
3. Price per unit at a market (this is calculated at each marketplace)
4. The base price per unit MARKET_BASE_PRICE ( base price x 1/4 )
5. An adjustment to price based on the economy MARKET_ECO_ADJUST_PRICE ( price adjust )
6. An adjustment to units availble based on the economy MARKET_ECO_ADJUST_QUANTITY ( quantity adjust )
7. The base quantity available to a market MARKET_BASE_QUANTITY ( base quantity )
8. A 'mask' which defines how the price varies MARKET_MASK_PRICE ( price mask )
9. A 'mask' which defines how the quantity varies MARKET_MASK_QUANTITY ( quantity mask )
10. The unit of quantity (0 == tons, 1 == kilos, 2 == grams)

Re: How to change commodity names and base prices?

Posted: Thu Jan 09, 2014 8:32 pm
by cim
hangar18 wrote:
1. Change the name and price of Alien Items to Alien Artefacts and price to 1,000 not the 50 or so CR
2. Change the maximum amount of gems you can sell - at the moment it is fixed at 127.
These are not possible via commodities.plist and would require a change in the source - the maximum price for a good is 102.3 credits (with 102.0 being the maximum generated), and the maximum quantity which can be in stock at any station of a good is 127. (Well, you can rename Alien Items by changing the various "commodity-name x"entries in descriptions.plist, but otherwise no)

The documentation page for [wiki]Commodities.plist[/wiki] describes the meaning of the various factors in more detail, and gives a worked example for Radioactives.

The whole algorithm is a very close match - including limitations - to the original Elite, so flexibility or comprehensibility is not one of its points. In Oolite 1.77 or later you can change the market prices by Javascript but still only within the original 0-102.3 range.
hangar18 wrote:
3. Change the prices offered for delivery contracts
This you can do (assuming you're running Oolite 1.77 or later) by making a Scripts/oolite-contracts-cargo.js file which is a copy of the one distributed with the game but with the modifications as needed to change the prices.

Re: How to change commodity names and base prices?

Posted: Thu Jan 09, 2014 8:43 pm
by hangar18
Many thanks, appreciate the quick response! At least I know now editing these things is a bit limited but will try having a go at the source code.

Re: How to change commodity names and base prices?

Posted: Thu Jan 09, 2014 9:11 pm
by Norby
hangar18 wrote:
2. Change the maximum amount of gems you can sell - at the moment it is fixed at 127.
You can check my SellAll OXP in this topic.