You are not logged in.

Tunicle

Private First Class

(10)

  • "Tunicle" started this thread

Posts: 123

Activitypoints: 645

Date of registration: May 17th 2008

Reputation modifier: 5

Level: 33 [?]

Experience: 471,828

Next Level: 555,345

  • Send private message

member since 120 month member since 120 month member since 120 month member since 120 month member since 120 month member since 120 month member since 120 month member since 120 month member since 120 month member since 120 month

1

Saturday, May 24th 2008, 9:57am

Adding Commodities

Someone has been busy so you may as well have mine from last site. If an admin wants to download and add the pdf to TLR downloads feel free.

either as .pdf
<!-- m --><a class="postlink" href="http://files.filefront.com/Commodity+Tutorial+Tuniclepdf/;10169964;/fileinfo.html">http://files.filefront.com/Commodity+Tu ... einfo.html</a><!-- m -->

or words, the .pdf has some colour highlighting aiding the navigation

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 <!-- m --><a class="postlink" href="http://downloads.rrjds.com/Tutorials/Ospreys%20Ship%20Icon%20Tutorial.pdf">http://downloads.rrjds.com/Tutorials/Os ... torial.pdf</a><!-- m -->, 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 FLEdids <!-- m --><a class="postlink" href="http://files.filefront.com/fled+idszip/;8410841;/fileinfo.html">http://files.filefront.com/fled+idszip/ ... einfo.html</a><!-- m -->)
or
Freelancer Developer
(<!-- m --><a class="postlink" href="http://www.flwt.com/index.php?board=30.0">http://www.flwt.com/index.php?board=30.0</a><!-- m -->.)
You may also find the infocardhelper from downloads of use and look at <!-- m --><a class="postlink" href="http://forums.seriouszone.com/showthread.php?p=847751">http://forums.seriouszone.com/showthread.php?p=847751</a><!-- m -->
or look for Drizzt4.0.’s The Complete Freelancer Ship Creating & Editing Tutorial.

Social bookmarks

Legend:

Forum contains no new posts
Forum contains new posts
Forum is closed
Forum is an external link