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

Ammo Dependent Particle Cannons

The general place to discuss MOD''ing Freelancer!

Post Thu Jul 24, 2003 12:43 am

Ammo Dependent Particle Cannons

I've read on removing the ammo dependencies of missile launchers and essentially converting them to energy torpedoes, but what I'm suggesting is adding ammo dependencies for the particle cannons.

I could create ammo for any of the weapons along with their effects, but I'm having trouble getting past the 50 max ammo capacity limit. I can't make a Vulcan Particle Cannon with 1200 ammo. So far I've only modded mine to support Rail Guns like the Diamondbacks with the 50 max ammo. If you have 2 equipped, only allows for 25 shots. Kinda leaves very little room for error so I upped the damage a bit.

So here's the million dollar question, where can I find this ammo max limit?

Post Thu Jul 24, 2003 2:16 am

i believe there is no limit
i have had mine up to 10k

Mess With the Best Die lIke the Rest

Post Thu Jul 24, 2003 3:14 am

Can you be a little more specific? Which ini/dll file and what variable/parameter to change?

Here's what I know that don't work with market_misc.ini

MarketGood = missile01_mark01_ammo, 0, -1, 50, 50, 0, 1

to

MarketGood = missile01_mark01_ammo, 0, -1, 500, 500, 0, 1

It looked like a good place to start but no go.

Here's another one that don't work with weapon_good.ini

[Good
nickname = li_gun01_mark01
equipment = li_gun01_mark01
category = equipment
price = 500
item_icon = equipment\models\commodities\nn_icons\EQUIPICON_gun.3db
combinable = false
free_ammo = li_gun01_mark01_ammo, 1200
ids_name = 263357
ids_info = 264357
shop_archetype = equipment\models\weapons\li_heavy_ion_blaster.cmp
material_library = equipment\models\li_equip.mat

Notice the free_ammo line set to 1200, but when you play the game it resets to 50. So even buying the gun with ammo as a replacement unit is not possible as a workaround.

So how EXACTLY did you adjust the ammo cap to 10k? That would be very helpful.

Post Thu Jul 24, 2003 4:39 am

It's in constants.ini

There's an answer floating around here somewhere, you have to add a line that isn't already in the file but I can't remember what it is.

Post Thu Jul 24, 2003 9:59 am

Got it..

Thx for the tip, Vic. I found the script params in common.dll and inserted it in constants.ini

MAX_PLAYER_AMMO = 12000

12K Should be enough for testing. Too bad this is a system-wide hack. I can't specify a limit for each weapon, but I already have a workaround for this problem.

I just won't sell ammo, but sell the weapon prepackaged with ammo using the free_ammo script in weapon_good.ini. This way I don't have to worry about creating info lines for ammo. The price will jack itself up by number of bullets x price per bullet. The free_ammo line is misleading, ammo is not really free. I also won't worry about ammo being lootable. It doesn't make sense to be able to salvage ammo from a ship you just blew to bits and be able to use it in space without docking first at an equipment dealer. Here's the catch, I won't be able to know how much bullets I have left at the equipment dealer. So reloading when possible is essential.

Reloading your weapon at the equipment dealer is simple. Sell the weapon then buy it back. The free_ammo script automatically reloads the weapon. Reloading a partially used up magazine is costly this way because of the difference between buying and selling equipment. So I have to come up with a cost scheme that's reasonable.

for example:
Justice MK I buy price is 500 but sell price is 150. I lose out by 70%.

Even if the ammo has zero cost, it would still be too expensive.

So finally down to this question, how do you adjust buy and sell factor for equipment? Maybe someone already knows this, maybe another constant perhaps... Plz, send me a clue, tip or a link to a tutorial if it might help...

BTW, this factor seem to be only applicable to equipment.

Post Thu Jul 24, 2003 10:30 am

I am not too sure about this but in one of the inis there will be a line about how much something is sold for over the base price, usualy 1 for weapons, it is resonable at asume that there is a line about how much it is bought back for, you would just need to change that to 1

Post Thu Jul 24, 2003 11:35 am

Found it in market_misc.ini

MarketGood = li_gun01_mark01, 0, -1, 10, 10, 0, 1

1st - Level Requirement
2nd - Reputation Minimum Requirement
3rd - ???
4th - ???
5th - Sell Factor (Orig. Price x SF = Player Selling Price. If 0, vendor uses the global constant, probably 30%)
6th - Buy Factor (Orig. Price x BF = Vendor Selling Price)

Well, got the factor figured out. I'm setting the SF cost to 2% of original price. So the formula looks like this:

Magazine Size = free_ammo <<= script from weapon_good.ini

Ammo Cost = Price Per Bullet x Magazine Size

Buying Cost = (Gun Price x BF) + Ammo Cost

Selling Cost = (Gun Price x SF) + Ammo Cost

Reload Cost = Buying Cost - Selling Cost

I've been testing different fast refire rates to simulate a Vulcan type gattling gun of sort, but sadly I just can't get the ammo numbers to reflect the ammo supply as you hold the mouse trigger button. I'm guessing the updates is happening too fast. You know, watch the numbers dwindle down to zero really fast.

Arghhh, further testing shows my workaround won't work. Reloading via buy and sell doesn't work. I need to make the ammo available through the vendor which means I need to create info cards. That's a maybe... I'll be back when I figure this out...

Post Thu Jul 24, 2003 9:25 pm

cool

I AM BIG! I AM STRONG!I AM........... WWWWIIIIILLLLDDDD!!!!!!!

Return to Freelancer General Editing Forum