Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Adding Commodities

from Tunicle

I am sure many will know how to do this and maybe a good single tutorial already exists
however here is a thumbnail of information gleaned over the last few months whilst TLR has
been down.

All work is on decrypted ini’s

Making the commodity exist

File to alter: Data\equipment\select_equip.ini

A typical commodity entry

[Commodity]
nickname = commodity_niobium (link to goods.ini, what nickname commodity has for the game
to recognise it)
ids_name = 261616 (link to the .dll entry for its name, new commodity will need new name
adding, see end)
ids_info = 65909 (link to the .dll entry for its infocard, new commodity will need new name
adding, see end)
units_per_container = 30 (how many units held per container, important for when ship is killed
as FL seems to only spawn 5-7 crates per ship/cargopod. Appears to be 5 per cargopod or 6/7
depending on ship type)
pod_appearance = cargopod_grey (what cargo pod is carried by transports, copying one of the
defaults works)
loot_appearance = lootcrate_grey (what it looks like when looted or mined, again choose a
default from similar commodity)
decay_per_second = 0 (how many hit points the commodity loses per second when carried, 0 =
non-perishable)
volume = 1 (the volume taken up in the cargo hold)
hit_pts = 250 (how many hit points it has when shooting in space and linked to the speed of
disappearing with perishable cargo)

So a new commodity may look like


[Commodity]
nickname = commodity_druidfluid
ids_name = 589827
ids_info = 589828
units_per_container = 10
pod_appearance = cargopod_green
loot_appearance = lootcrate_green
decay_per_second = 0
volume = 1
hit_pts = 250

Now you have the commodity, the next stage is the buying and selling
Buying and selling the Commodity

On to Data\equipment\goods.ini

A typical entry
[Good]
nickname = commodity_niobium (what the commodity is called)
msg_id_prefix = gcs_gen_commodity_niobium (used when the npc references this in game voice
– can leave out if adding custom commodity, unless you wish to add audio)
equipment = commodity_niobium (nickname that select_equip.ini file will use, see above)
category = commodity (so the commodity dealer will know that they sell it)
price = 320 (the base price per single unit)
combinable = true (true = they are not listed as individual units in cargo hold but combined as
one number, compare with false (e.g. weapons) when they will be listed separately.)
good_sell_price = 2.550000 (a multiplier of the base price that will show up as good (green)
when selling to the dealer, so for this commodity = 320 x 2.55 = 816)
bad_buy_price = 2.550000 (a multiplier of the base price that will show up as bad (red) when
buying from the dealer)
bad_sell_price = 1 (a multiplier of the base price that will show up as bad (red) when selling to
the dealer)
good_buy_price = 1 (a multiplier of the base price that will show up as good (green) when
buying from the dealer)
shop_archetype = Equipment\models\commodities\nn_icons\cwire_refinedmats_2.3db (what it
looks like/which crate appears in the dealer scene, again copy one used for a similar substance
already in file)
item_icon = Equipment\models\commodities\nn_icons\COMMOD_metals.3db (the icon that
appears at dealer and in cargo hold, choose a default or make own, see Ospreys Ship Icon
Tutorial http://downloads.rrjds.com/Tutorials/Ospreys%20Ship%20Icon%20Tutorial.pdf, there
are quicker methods but this is a good resume of FL icons)
jump_dist = 7 maximum number of system jumps away from selling base that an npc will carry
this cargo, values between 1 and 10 appears ok

So a “new” commodity may look like


[Good]
nickname = commodity_druidfluid
equipment = commodity_druidfluid
category = commodity
price = 750
combinable = true
good_sell_price = 3.7
bad_buy_price = 3.7
bad_sell_price = 1
good_buy_price = 1
shop_archetype = Equipment\models\commodities\nn_icons\cwire_rawmats_1.3db
item_icon = Equipment\models\commodities\nn_icons\commod_alcohol.3db
jump_dist = 10

Now it exists and can be bought and sold the final of the basic stages is to decide where it is
bought or sold.
Where the commodity is bought or sold.

This is handled in Data\equipment\market_commodities.ini

A typical base entry consists of


[BaseGood]
base = Br01_01_base

This is the first base, Planet New London, the header is then followed by a list of commodities
looking either like
MarketGood = commodity_basic_alloys, 0, -1, 150, 500, 0, 1.500000
or
MarketGood = commodity_cardamine, 0, -1, 0, 0, 1, 2.6

The first number (0) is the level a player needs to be to buy or sell (usually always 0)
The second (-1) is the rep a player needs with the base to buy and sell this
commodity (normally -1 so if you can dock you can but it)
The next 3 are base buy or base sell 0, 0, 1 (base buys), 150, 500, 0 (base sells)
The final number is the base price multiplier for the amount it buys or sells at the base.

In basic form 0, -1, 150, 500, 0, = the base sells and 0, -1, 0, 0, 1, = the base buys

Plus add a final number to be applied to the base price, so in the above example, if basic_alloys
is listed as 100 (in the goods.ini price) then this base will sell at 150.
And if cardamine has a listed 100 base price this base will buy at 260.

You add these values at each base for the commodities you wish to buy and sell.

No entry will mean the base will buy at the default price of one unit as specified in goods.ini.

So a small base entry may look like


[BaseGood] ;Grand Void Cathedral (it helps later on if you place the base name here after a ; )
base = MO01_09_Base
MarketGood = commodity_civilians1, 0, -1, 0, 0, 1, 120
MarketGood = commodity_bananas, 0, -1, 0, 0, 1, 20
MarketGood = commodity_gold, 0, -1, 0, 0, 1, 8.000000
MarketGood = commodity_pilgrims, 0, -1, 0, 0, 1, 11
MarketGood = commodity_treasure, 0, -1, 0, 0, 1, 8
This base buys a limited selection of material and sells nothing at the commodity dealer.

Two other files you may wish to add to


commodities_per_faction.ini, to decide which of your npc ships may carry as cargo
and lootprops.ini to govern how the npc ships drop the cargo if looted.

Infocards
Ids_name = is the commodity name as it will appear to players and is usually in the
nameressources.dll
Ids_info = 65887 <- is the Info Card of the commodity, usually in infocards.dll

However, many mods create a custom .dll to handle this information.


To add to these infocards there are a number of programmes you could use for example FLEd-
ids (http://files.filefront.com/fled+idszip/;8410841;/fileinfo.html)
or
Freelancer Developer
(http://www.lancersreactor.com/index.php?option=com_wrapper&Itemid=8&link=http://www.la
ncersreactor.com/forum/forumdisplay.php?f=17) or http://www.fl-
wt.com/index.php?board=30.0.

You may also find the infocardhelper from downloads of use and look at
http://forums.seriouszone.com/showthread.php?p=847751
or look for
Drizzt4.0.’s The Complete Freelancer Ship Creating & Editing Tutorial.

You might also like