Adding Commodities on bases and setting their prices
-
Hello there
Here’s my problem:
What I would wish would be to set up a certain commodity produced by a specific faction on a single base, so at the most cheaper price, and naturally to be available in all Sirius at higher prices. I had begun by adjusting every price for every station but obviously, it led to incoherences.
Browsing forums, and thanks to Helloween, I maybe found a solution:But, what do this software (great tool btw) is a little bit random (Or maybe I didn’t understood how it works).
Is there a way (method?) to resolve this?Thanks by advance
-
I think creating a new commodity would be the best approach as you want it to be sold at only one location and bought at multiple locations at different prices.
[BaseGood]
base = Br01_01_base
MarketGood = commodity_cardamine, 0, 0, 0, 0, 1, 1
MarketGood = commodity_Uranium, 0, 0, 0, 0, 1, 10
MarketGood = commodity_Chlorine, 0, 0, 0, 0, 1, 1
MarketGood = commodity_Sodium, 0, 0, 0, 0, 1, 1
MarketGood = commodity_Coal, 0, 0, 0, 0, 1, 1
MarketGood = commodity_construction_machinery, 0, 0, 0, 0, 1, 10
MarketGood = commodity_sidearms, 0, 0, 0, 0, 1, 96
MarketGood = commodity_food, 0, 0, 150, 500, 0, 1
MarketGood = commodity_luxury_food, 0, 0, 0, 0, 1, 1
MarketGood = commodity_pharm, 0, 0, 0, 0, 1, 190
MarketGood = commodity_engine_components, 0, 0, 0, 0, 1, 1The code block above is from New London market_commodity.ini entry and the only item for sale is food. of the others Uranium, construction_machinery, sidearms and pharm will pay more than the basic selling rate by factors of 10, 10, 96 and 190.
These numbers define the selling price of these items at this base so 10 x basic selling rate etc…… see below for adding a new commodity and FL Companion
http://the-starport.net/modules/news/article.php?storyid=39&keywords=adding+new+commodity
-
This might help a little more…
This is quite easy to do manually.
1. Create your commodity in DATA\EQUIPMENT\goods.ini - here is the Boron definition as an example:
[Good]
nickname = commodity_boron
equipment = commodity_boron
msg_id_prefix = gcs_gen_commodity_boron
category = commodity
price = 120
combinable = true
good_sell_price = 4.1
bad_buy_price = 4.1
bad_sell_price = 1.5
good_buy_price = 1.5
shop_archetype = Equipment\models\commodities\nn_icons\cwire_rawmats_1.3db
item_icon = Equipment\models\commodities\nn_icons\COMMOD_chemicals.3db
jump_dist = 5message_id_prefix is the location of the recorded word “Boron”. You can record your own name recording but that is another subject beyond my scope here.
Note the price, 120.
This is the NOMINAL price. The actual sell or buy price for this commodity is set on each base by a multiplier, I will explain this shortly.combinable = true means that you can buy and carry more than one unit of this commodity at a time.
Note these multipliers:
good_sell_price = 4.1
bad_buy_price = 4.1
bad_sell_price = 1.5
good_buy_price = 1.5These are margins to guide you in selling and buying the commodity, but they didn’t seem to do much when I played with them briefly. They are not as I expected because 4.1x120=492 and a good sell price should be anything over 140. So you can set them as you like in your commodity.
shop_archetype is the icon displayed for Boron at the dealer, this one is a pile of rocks, as Boron is a mineral.
item_icon is the icon displayed for the commodity in your ship’s inventory.
jump_dist is how many jumps the commodity will last if it is perishable (degrades with time), it’s not used for non-perishable commodities and I’m not sure what part it plays for perishables in fact sice the lifetime
Open market_commodities.ini and we will see that Pittsburg (Li01_02_base) sells (and also buys) Boron:
[BaseGood]
base = Li01_02_base
MarketGood = commodity_boron, 0, -1, 150, 500, 0, 1And in the same file we see that Manhattan (Li01_01_base) buys (and also sells) Boron:
[BaseGood]
base = Li01_01_base
MarketGood = commodity_boron, 0, -1, 150, 500, 0, 1.3Also in the same file, we see that Southampton Shipyard (Br01_02_base) buys but doesn’t sell Boron:
[BaseGood]
base = Br01_02_base
MarketGood = commodity_boron, 0, -1, 0, 0, 1, 5.5Here are the parameters:
Pittsburg: 0, -1, 150, 500, 0, 1
Manhattan: 0, -1, 150, 500, 0, 1.3
Southampton Shipyard: 0, -1, 0, 0, 1, 5.5
= (minimum player rank to deal), (minimum player rep to this base to deal), (stock control 1), (stock control 2), (buy only/buy and sell),(price multiplier)1. Minimum player rank to deal: 0 is lowest so any rank player can deal with this base for this commodity. If you set this to 30 then only players ranked 30 or higher can deal with this base for this commodity.
2. Minimum player reputation to this base to deal: the range is -1 (totally hostile) to +1 (totally friendly). So -1 means players of any rep can deal at this base for this commodity. CAUTION: If you make it 1 then NOBODY can deal because the highest rep in the game engine is 0.99
To make it so that only friendly players can deal at this base, set this rep parameter to 0.23. Stock control 1: this can be 0 or 150 for commodities. Must be 0 for bases selling this commodity. Stock control was not finished and so it is not implimented, so although this parameter is 150 for commodities, there is no limit to how much you can buy of any commodity in this game, you can buy as much you can pay for. In the vanilla game this parameter is set to 3 for Order shields and thrusters, 10 for weapons and equipment, 50 for ammo, and 100 for shield batteries & repair nanobots. For ships it is 0 or 1.
4. Stock control 2: this can be 0 or 500 for commodities. Must be 0 for bases selling, and 500 is the normal for bases only buying this commodity. As for Stock control 1, it is not implemented but must be more than 0 to work. For commodities it is only 0 or 500. For other goods it is set to the same value as Stock control 1. For ships it is 0 or 1.
5. Buy only/Buy & sell: I don’t know its true name, but this is what this parameter does. For bases selling this commodity, it must be 1. For bases only buying, it must be 0. Note: in the market_ships.ini there is an entry for all ships in the vanilla game, but all of the buy entries can be removed, leaving only the ships sold at each base, to make the file smaller. I haven’t played with it but this could have been put in to enable us to vary the sell price for our old ship when we part-exchange it for one sold at the base.
6. Price multiplier: This is the price-setter. Multiply the NOMINAL price by this multiplier to set the price for this commodity at this base.
So on Pittsburg, the price of Boron is: 120 x 1 = 120 credits
And on Manhattan, you can sell it (or buy it) for 120 x 1.3 = 156 credits
And on Southampton Shipyard you can sell it for a huge profit; 120 x 5.5 = 660 credits!
NOTE: the multiplier can be less than 1, e.g. 0.4, so the price will be 120 x 0.4 = 48 credits, so the player will lose money if he/she sells at a base with this price multiplier.
If you set the multiplier to 0, tell me what happens?For simplicity until you know more about what to change:
a. if you want your base to sell (as well as buy) your commodity, just copy the Pittsburgh parameters to your base commodity list and set your price multiplier.
b. if you want the base to only buy your commodity, then copy the Southampton Shipyard parameters to your base commodity list, and set your buy price multiplier.If you omit putting in the commodity in a particular base, that base will still buy, but at the NOMINAL price.
Ask if you need more info.
-
Hi there
Sorry for late reply
@CK258
Thanks, I will study this more deeply, and yes, I had already created new commodities. The purpose is to allow a custom house to have the monopoly of a commodity what will lead to tense diplomatic relations with some other houses. Well, that is what I imagined in my story line.
Excellent ! I have finally some explanations about some parameters I didn’t understood, thanks again.
About message_id_prefix, when I set it with my new commodity, FLScan shows me an error, I thus setted it with a Vanilla commodity, and by looking in other mods, I noticed that the most of devs doing the same thing. I nevertheless browsed all the files which could be concerned but found nothing. if someone have more infos, he’s more than welcome.Okay, it seems that I have a few hours of studying in front of me…I love it !
I promise, I willl post if I have more questions…no doubts I will heheVery Best Regards
~Myrdhin
-
As I said, those are sound files which say the name “Boron” by female and male voices, for example when a ship pilot says he (or she) is “carrying Boron to the Liberty Systems”. So as your commodity name does not exist, there will be an error.
But…
If you look in DATA/AUDIO/voices_space_female.ini and DATA/AUDIO/voices_space_male.ini you will find the same name “gcs_gen_commodity_boron” under several different voices for the different pilots who can say it. In these files the “envelopes” of the sounds are defined - how long it will take to play it, and the volume, and priority (how close they sound to you and if 2 messages clash, which takes precedence).
The actual recording of the word “Boron” is in the xxx.utf files, one file per voice, which contain all the audio recordings (words and phrases) which that voice can say.
In the .utf files, the recordings are saved under hash codes of the message_id_prefix name.
So you can copy the envelope for another commodity name of similar length for each voice and rename it to your commodity name, and record your commodity name for each voice (using a microphone and a different accent or language for each pilot of course) and then convert it to .mp3 but in a .wav file and store that in the .utf file for each voice that can say it, using the hashcode of your own commodity’s message_id_prefix as the node name, and if you get it right you will hear these new words in the game when NPCs carry your commodity! WOW!!
But… this is from memory and I probably missed a step somewhere… !
Then you must do the same for your new systems and planets and bases names…
Here it gets more complex.
You need to play with all of those things like we did. I think NexOse recorded all voices in Chinese, didn’t you Nex?
And your teeth will fall out, and your beard will grow long and grey and your wits and your wife and your dog will leave you and your kids will have PhD degrees, and the world will slowly stop revolving! In the meantime you will lose all interest in playing the game and devote the rest of your lonely life to modding it instead!
Cheers pal. See you in a few months/years!
-
Oh, misunderstanding from my part:
When you said “recorded word”, I didn’t understood you talked about a real audio file.
Yeesssss , thanks to you, I got a direction.I almost forgot: The explanations you gave me earlier allowed me to make really fine settings with the commodities, it’s still a huge sum of work, but this time, nothing random.
And to answer to this questoin:If you set the multiplier to 0, tell me what happens?
I guess the commodity won’t be buyable / saleable anymore, didn’t try yet, but it looks logical.
And your teeth will fall out, and your beard will grow long and grey and your wits and your wife and your dog will leave you and your kids will have PhD degrees, and the world will slowly stop revolving! In the meantime you will lose all interest in playing the game and devote the rest of your lonely life to modding it instead!
ROTFL
For information, I already have a long grey beard hahaha
Well, to be honnest, I don’t play Freelancer anymore since a few months, but I have a lot of fun by modding…and by conversations on boards hehe.
When I take the time to play, I launch another space game:…X3 TCSee you soon
-
OK glad you understood what I meant.
I found X3 very hard and frustrating to start and then it got boring quickly later.
I always come back to FL but my connection keeps dropping so I can’t play and get tired of trying.
One day… !
-
A little bit off topic but:
X3 is a little bit hard to enjoy at the beginning, it’s true, but later, you will see a fantastic game with a lot of possiblilties and a true dynamic economy.
The last time I played, I had a fleet of about 200 vessels + about 30 bases which produced goods.
The only bad side of X3 is that there is no MP mode yet, but seeing the amount of stuff in it, I can’t imagine the kind of server needed to host 100/200 players.A last thing:
The next release will include a market exchange and a more easy GUI. More infos here -
Yup, back on track…
I found a couple of SP bases (Ithaca and Benford Station) which had the price multiplier 0.0 but as I recall there was no commodity dealer on those bases in the game, so I haven’t tested to see if the price of that item becomes 0 credits or if they won’t buy at all?
-
Thanks, good to know.