Okay, first of all, hello everyone! This is my first time actually making a post on this particular forum, though I've been lurking around Lancersreactor for the modding tutorials on Freelancer for at least 5 or 6 years, off and on. If anyone is wondering why my username is Gmod4ever, it's because it was my first username (for a Garry's Mod [HL2 Mod] forum, Facepunch Studios) and I like to keep everything the same, so I don't forget things. Again, hello everyone!
Now, back to my problem. I have tried and tried many a times, and I still can not get this to work. I am at my patience's end, now.
What I'm trying to do is make a basic additional commodity mod, just to get started with modding Freelancer. I can make the commodity fine, put it on bases to sell and buy, do the description and all that jazz. This all works fine. But I can not, for the life of me, get NPCs to drop it as loot. I'm not sure what I'm doing wrong.
Here's all my scripts (I prefer using XML files because I'm used to using them when modding STALKER: Shadow of Chernobyl), from beginning to end.
script.xml:
- <script>
- <header name="Commodity Mod">
- <scriptversion>
- 1.0
- </scriptversion>
- <author>
- Kaiser
- </author>
- <description>
- Adds a variety of commodities to the game.
- </description>
- </header>
- <!-- Add all the commodity drop information. Order of numbers goes from the chance (from 0 to 100) of an item being dropped, and the rest I don't know. Keeping the same as batteries and water, just because.. -->
- <data file="data\missions\lootprops.ini" method="append">
- <source>
- [mLootProps]
- nickname = commodity_phenzine
- drop_properties = 100, 0, 1, 1, 150, 150
- [PhantomLoot]
- nickname = commodity_phenzine
- toughness_range = 0, 100
- percent_chance = 60
- num_to_drop = 6, 9
- </source>
- </data>
- </script>
com_buysell.xml
- <script>
- <scriptversion>
- 1.0
- </scriptversion>
- <!-- Add all the commodity buy/sell points. This is going to be quite extensive. I'm going to comment each zone I modify. Li01_01_base = Manhattan -->
- <data file="data\equipment\market_commodities.ini" method="sectionappend">
- <section>
- [BaseGood]
- base = Li01_01_base
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, -1, 150, 500, 0, 3.28
- </source>
- </data>
- <!-- Li01_13_base = Rochester -->
- <data file="data\equipment\market_commodities.ini" method="sectionappend">
- <section>
- [BaseGood]
- base = Li01_13_base
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, -1, 150, 500, 0, 0.8
- </source>
- </data>
- <!-- Li01_12_base = Buffalo -->
- <data file="data\equipment\market_commodities.ini" method="sectionappend">
- <section>
- [BaseGood]
- base = Li01_14_base
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, -1, 150, 500, 0, 0.8
- </source>
- </data>
- </script>
commodities.xml
- <script>
- <scriptversion>
- 1.0
- </scriptversion>
- <!-- Add all the new commodities. This section includes their reference, their price and good/bad buy/sell variations, their icon and model, and the max amount of systems NPCs will jump with this cargo. -->
- <data file="DATA\EQUIPMENT\goods.ini" method="append">
- <source>
- [Good]
- nickname = commodity_phenzine
- msg_id_prefix = Gcs_gen_commodity_pharmaceuticals
- equipment = commodity_phenzine
- category = commodity
- price = 110
- combinable = true
- good_sell_price = 5.100000
- bad_buy_price = 5.100000
- bad_sell_price = 0.600000
- good_buy_price = 0.600000
- shop_archetype = Equipment\models\commodities\nn_icons\cwire_contraband_1.3db
- item_icon = Equipment\models\commodities\nn_icons\COMMOD_drugs.3db
- jump_dist = 50
- </source>
- </data>
- </script>
com_information.xml
- <script>
- <scriptversion>
- 1.0
- </scriptversion>
- <!-- Add all the commodity information. This section includes the nickname referenced above, as well as the item name and information, how many units can be held in a container, how the item appears in space (both dropped and as loot), and the decay rate (if higher than zero, it loses this many hit_pts per second). -->
- <data file="DATA\EQUIPMENT\select_equip.ini" method="append">
- <source>
- [Commodity]
- nickname = commodity_phenzine
- ids_name = 0 ;GENERATESTRRES("Phenzine")
- ids_info = 0 ;GENERATEXMLRES("<?xml version="1.0" encoding="UTF-16"?><RDL><PUSH/><TRA data="1" mask="1" def="-2"/><JUST loc="center"/><TEXT>Phenzine</TEXT><PARA/><TEXT> </TEXT><PARA/><TRA data="0" mask="1" def="-1"/><JUST loc="left"/><TEXT>Phenzine, engineered by Cryer Pharmaceuticals, is a pharmaceutical engineered for relieving the symptoms of common ailments, such as the cold and influenza, as well as hasten the recovery over these ailments. Phenzine is also reported by consumers to help alleviate stomach cramps as well as feelings of lightheadedness, headaches, vertigo, and nausea, those these effects are not advertised with the product. Some scientists think that these alleviations are merely the result of a placebo, where the patients hope so diligently that the medication will help with these feelings that they actually trick their body into thinking it has. Recent studies have shown there is a slight risk of developing dependency on Phenzine, but these risks are so low, and the studies so sparse, that Phenzine is currently legal in all parts of the Sirius system.</TEXT><PARA/><TEXT> </TEXT><PARA/><POP/></RDL>")
- units_per_container = 14
- pod_appearance = cargopod_red
- loot_appearance = lootcrate_red
- decay_per_second = 0
- volume = 1
- hit_pts = 250
- </source>
- </data>
- </script>
com_carriers.xml
- <script>
- <scriptversion>
- 1.0
- </scriptversion>
- <!-- Add all the commodity faction carriers. This determines what all factions can carry commodities. This is going to be pretty extensive. fc_lr_grp = Liberty Rogues -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = fc_lr_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- co_be_grp = Border World Exports -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_be_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- co_rs_grp = Republican Shipping -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_rs_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- co_ss_grp = Universal Shipping -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_ss_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- co_hsp_grp = Cryer Pharmaceuticals -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_hsp_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- fc_c_grp = Corsairs -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_c_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- fc_ou_grp = Outcasts -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_ou_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- fc_j_grp = Junkers -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_j_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- fc_x_grp = Xenos -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_x_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- <!-- fc_lh_grp = Lanehackers -->
- <data file="data\equipment\commodities_per_faction.ini" method="sectionappend">
- <section>
- [FactionGood]
- faction = co_c_grp
- </section>
- <source>
- MarketGood = commodity_phenzine, 0, 0
- </source>
- </data>
- </script>
As you can see, In script.xml, I've appended two entries to lootprops.ini. The first of which is a [mLootProps], declaring my commodity (commodity_phenzine). As far as I can tell, from both inferences and searching the Internet, the drop_properties read as follows: Probability of dropping loot if ship holds it (from 0 to 100, in percent), Max rank points (with 0 being no max), Min rank points, Unknown, Unknown.
The second appendage is a PhantomLoot, which from what I can tell is a simple random drop percentage, with the NPC in question not requiring to actually hold the item (hence the "phantom")
Maybe I have the percentage too high, but nonetheless, I've done a mission or two against Rogues (on my own LAN server, where the commodity exists and is buying on Manhattan for my desired price of 360) and have killed about ten total. Absolutely none of these Rogues has dropped any Phenzine.
Also, just to throw it in there, I'm assuming that the trade routes NPCs take are dynamically generated, so to make like, Cryer, transport Phenzine from Manhattan to somewhere else, I'd have to make Phenzine be sellable at some other station at a higher price than what it's buyable in Manhattan?
I have no idea if this is a place to post this, since, looking around, this forum seems unfortunately dead. I'm hoping to get some responses, though. This has been irking me forever.
Thanks to anyone who posts, even if you can't help me - just the support is nice