How to change commodity names and base prices?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
hangar18
Competent
Competent
Posts: 45
Joined: Sun Sep 04, 2011 9:10 am

How to change commodity names and base prices?

Post 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)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: How to change commodity names and base prices?

Post 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.
hangar18
Competent
Competent
Posts: 45
Joined: Sun Sep 04, 2011 9:10 am

Re: How to change commodity names and base prices?

Post 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.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: How to change commodity names and base prices?

Post 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.
Post Reply