Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Market_Misc.ini values and question.

The general place to discuss MOD''ing Freelancer!

Post Fri Mar 28, 2003 6:11 am

Market_Misc.ini values and question.

Ok, this file (Market_Misc.ini) contains all the codes for what equipment you can buy and where. I am trying to decipher the code used however. You have something that looks like:


MarketGood = ge_s_cm_02, 2, -1, 10, 10, 0, 1

MarketGood = xxxxxxxxxx, a, b, c, d, e, f

xxxx is the item name - there's already a thread to tell you what each item is.
a is the level you need to be to buy it
b is somehow related to the hostility factor, comes in decimals occasionally.
-1 - buy anytime, I think the higher the number, the more friendly you must be.

c is number stackable I think. Seems to be 10 for everything escept missiles and mines, in which case it is 50. For Batteries and Nanobots it is 100. Don't know what this means. Possibly 100 tells it to look to the ship for another value, or is an ingame max chosen for programming purposes. This is just conjecture, but possibly the '10' refers to size, telling it to look to the equipment type and available hardpoint values. Since 10 is the largest possible hardpoint, this number is never more than 10 for a mountable item. Like I said, this is just conjecture. My theory - Missiles take up '1', with a max of 50. Batteries take up '1' with an ingame max of 100 (but i've never seen more than 71), Equipment takes up a value equal to it's hardpoint rating, to a max of 10.

d is apparently always the same value as 'c' for weapons. Any ideas?

e I have no idea. Always seems to be '0'

f Price multiplier at a base. 1 is 100% of normal price, .500000 would be 50%. Thanks to Thundercleese for clarifying this.

One way to test my theory about the values of 'c' would be to change a few values. IE. change the ship max of batteries to 110, and see if you are able to buy more than 100. If so, than 100 is not a hardcoded limit. Also, make something like a class-1 turret combinable and try to stack them. If it works the way I think, you should be able to get 10. Personally, I think this will probably crash the game, so I'm not going to try it right away. Maybe over the weekend when I have a little more time.

'c' and 'd' appear to have values for commodities of either 0,0 or 150,500. I still don't know what these mean. If they have values of 150,500 the base sells them. Else, they do not. Perhaps this has something to do with maximum buyable/sellable? I'm going to mess with it a little. If it simply a sellable toggle, something like 1 would have been more appropriate. Also, with weapons having a different set of values vs. commodities, there must be additional meaning.


What I was looking at the values for is trying to correct a game-play issue. The way the game determines net worth is screwy. You gain the full value of a looted weapon to net worth, when the actual value is significantly less. I was hoping to find a simple way to change this in the following way:

Example: You loot a Supa Blasta Cannon from a ship. It has an Actual Value of 4000.
To buy said SBC you would pay 4000, while the resale value is only 1200. The game credits you 4000 to net worth, and then your net worth drops when you sell it. In this example you buy for 100% and sell for 30% of actual value.
Instead I would like the system to work as follows.
The SBC has an actual value of 1200, with a purchase modifier of 333.333% and a sale modifier of 100%. That way the value credited to your net worth is consistent with how much money you actually get for it. Also, an adjustment might need to be made to repair costs, so that you don't end up repairing something too cheaply. But this could possibly be worked out.

So, does anyone know if the weapon price and purchase/resale modifiers are available to mod, or are they hard-coded into the engine? I know price can be modded, what I am wondering about is the percentage modifier.

Thanks,
Larry

Edited by - ceylon on 30-03-2003 04:36:00

Post Fri Mar 28, 2003 1:10 pm

I can only relate to commodities, but weapons shouldn't differ too much. As I understand it, you can only define one price for each item and base, which is then used for both sell and buy price. So I don't think that you can give different buy/sell-prices for the same item. If you try, only one of them would probably be used

Post Fri Mar 28, 2003 5:04 pm

Weapons differ.

Post Fri Mar 28, 2003 8:25 pm

Right, I don't think the buy/sell price can be altered for different bases. What I want to do is alter the actual value, which is currently listed as price, to 1/4 that. Then alter the bases so that instead of selling for actual price and buying for 1/4, they buy for actual price and sell for 4x. That way you don't get credited 100,000 credits for a gun you can only sell for 25,000. It might slow down the leveling up a bit. I am afraid however that the buy/sell ratio is coded in, and can't be modified.

Larry

Post Sat Mar 29, 2003 12:31 am

Weapon_goods.ini effects the price of all weapons for all bases. You can only have 1 price for all equipment.

The way commedities word is you have a base price and the game uses a multiplier of that base price for the different bases.

Post Sat Mar 29, 2003 2:38 am

I'm not trying to alter commodities. They work on a multiplier for each base. I am wondering about equipment, which seems to have the same multiplier for each base. Does anyone know where that mutiplier is?

Larry

Post Sat Mar 29, 2003 6:59 am

When you open yourself to commodities, all shall be revealed...

A cursory look at market_commodities.ini makes it clear that both files use the same format. The last number (f) is the price multiplier. The reason why all equipment costs the same amount of money at every base is because all the equipment price multipliers are 1.

I just bought a Justice Mk I from Planet Manhattan for $4500 (9 times normal price!)

Have fun!

Post Sat Mar 29, 2003 8:14 am

I am not looking for the price multiplier, I am looking for the buy to sell ratio. That way I can change, not the value of the actual item, but the difference between buying and selling price. It's not hard to make something especially expensive or cheap, I want to leave the prices basically the same, while changing the value of the item. I could go and change every single price multiplier at every single base, and then change the price of every item, but that would be a rather convoluted way to accomplish something that should be relatively simple otherwise.

If I cannot find any other way to modify it, I may do it that way however. The main problem is that it would then make the mod incompatible with most other mods. I am trying to do something that makes changes in one or two places only, so that any user who wants it can install it, without affecting gameplay or other mods significantly.

Larry

Post Sun Mar 30, 2003 2:06 am

Well, I have modifed the files to make this work the way I want with one exception. By changing the base price, all weapons that are not available at the station become worth only about 9% of their original value. Any suggestions how to fix this?

What I did:

Changed all the weapon prices to 30% of default (sell value).
Changed all bases to apply a 333.33% price modifier to all weapons.

The end result is that for weapons available at a base, the price is correct, and the value applied when you loot them is correct as well. However, if you sell a weapon at a base that you cannpt buy it from, you only receive 9% (30% x 30%).

I would like to fix this if possible, without going in and making all weapons available at all bases. I thought it might be possible to do so, by making any weapon not normally available at a base require level 50 to purchase or something, but that would be clunky and ugly.

Thanks,
Larry

Post Sun Mar 30, 2003 2:19 am

Hmm.. you're suprisingly ungracious.

My only suggestion would be to make all equipment available at all bases, but see if you can make the entries "buy only". Look at market_commodities.ini again. There are prices listed for commodities that can only be sold to bases. Maybe if you figure out how that works, you can try creating "buy only" entries for each piece of equipment at each base with your price modifier.

Post Sun Mar 30, 2003 3:13 am

Thunder,

I do not mean to be ungracious, but several people have suggested similar solutions to what you did. I have been specifically looking for a constan built into the engine elsewhere. My main reason for trying to avoid this particular solution is that it would not be very compatible with people attempting other mods to equipment. A change to a constant would allow a much more robust mod, that would be much easier to integrate with other mods.

Again, apologies if I seem ungrateful.

Thanks,
Larry

Post Wed Apr 09, 2003 5:40 pm

Well, I have modifed the files to make this work the way I want with one exception. By changing the base price, all weapons that are not available at the station become worth only about 9% of their original value. Any suggestions how to fix this?

What I did:

Changed all the weapon prices to 30% of default (sell value).
Changed all bases to apply a 333.33% price modifier to all weapons.

The end result is that for weapons available at a base, the price is correct, and the value applied when you loot them is correct as well. However, if you sell a weapon at a base that you cannpt buy it from, you only receive 9% (30% x 30%).

-------------
@ceyleon

Hey can I use your idea? I think selling loot equipment to bases that do NOT normally trade in said item SHOULD give you you less money 9% because they do not normally deal with it, like in real life. Also, it helps to remove more cheese from game.

That .300 constant is hard coded. You can increase repair cost to euipment (but not hull) by lowering the number in Constants.ini a line at top of file attatched_equip_modifier =5 to smaller like 1 and watch how much more damage your weapons get and cost through the roof!.

The .300 is hard coded. It could be in content.dll which is hack able hard code; I did it myself. I would have to look for it in there. I also want to change the 600 piont hard coded ship hull repair points cost; it is way too cheap to fix a hull IMHO.

---------------------------------
Give me a house I sleep for the night; give me a hammer, I sleep forever.

Medieval Man had Lock Pick; Modern Man has Hex Editor.

Post Wed Apr 09, 2003 9:53 pm

Sure Xerx, just go into the weapon_equip.ini (I think) and just change all the values of weapons. Or I could email you my file. It has the values changed for ALL weapons, included those that cannot currently be bought (battleship turrets, etc) and level 10 weapons.

I am currently modding my original price mod. At htis point, all weapons more than three classes below the lowest sold at a base drop to 9%, and all shields more than two classes drop to 9%. I did this becasue they are just out of date at those bases.

I am also adding in a price increase in bases selling low-level weapons. If a weapon is three classes above the highest sold at the base, it will have a 10% per level markup. Shields the same. It is still not profitable to run guns, but it is more realistic.

You think the 30% limit may be in content.dll? I will scan through it. Which tool are you using to access the DLL's? i am using Visual Studio. It doesn't seem able to access them.

Thanks,
Ceylon

Return to Freelancer General Editing Forum