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

Gun Needing Ammo

The general place to discuss MOD''ing Freelancer!

Post Tue Aug 28, 2007 6:18 am

Gun Needing Ammo

Hi,
I just made a custom gun and I need it to use ammunition (similar to missiles) - the gun is still a regular plasma gun, I only want it to use ammunition so the player has to dock to resupply.

I got the gun working (that is, it is in the equipment dealer, I can buy it, mount it, fly with it, but can't use it because there is no ammo).

My problem is the ammo. Whatever I do, it just does not show up in the equipment dealer. I tried everything, but it just won't show up.


My weapon_equip.ini entries:

"nickname" = "pell_ammo01"
"loot_appearance" = "ammo_crate"
"units_per_container" = 10
"hp_type" = "hp_gun"
"requires_ammo" = "true"
"hit_pts" = 2
"hull_damage" = 332.600006
"energy_damage" = 0
"weapon_type" = "W_Plasma01"
"one_shot_sound" = "fire_plasma2"
"munition_hit_effect" = "li_plasma_03_impact"
"const_effect" = "pell_laser_01_proj"
"lifetime" = 1.285714
"force_gun_ori" = "false"
"DA_archetype" = "equipment\\models\\weapons\\li_rad_missile.3db"
"material_library" = "equipment\\models\\li_equip.mat"
"ids_name" = 198082
"ids_info" = 67013
"mass" = 1
"volume" = 0.000100

["Gun"
"nickname" = "pell_gun01_mark01"
"ids_name" = 198081
"ids_info" = 67012
"DA_archetype" = "equipment\\models\\weapons\\li_plasma_blaster.cmp"
"material_library" = "equipment\\models\\li_equip.mat"
"HP_child" = "HPConnect"
"hit_pts" = 450
"explosion_resistance" = 1.000000
"debris_type" = "debris_normal"
"parent_impulse" = 20
"child_impulse" = 80
"volume" = 0.000000
"mass" = 10
"hp_gun_type" = "hp_gun_special_4"
"damage_per_fire" = 0
"power_usage" = 47.500000
"refire_delay" = 0.357142
"muzzle_velocity" = 450
"use_animation" = "Sc_fire"
"toughness" = 3.800000
"flash_particle_name" = "li_plasma_03_flash"
"flash_radius" = 15
"light_anim" = "l_gun01_flash"
"projectile_archetype" = "pell_ammo01"
"separation_explosion" = "sever_debris"
"auto_turret" = "false"
"turn_rate" = 90
"lootable" = "true"
"LODranges" = 0, 20, 60, 100

(IDS numbers match).


My weapon_good.ini entries:

["Good"
"nickname" = "pell_gun01_mark01"
"equipment" = "pell_gun01_mark01"
"category" = "equipment"
"price" = 8929
"item_icon" = "equipment\\models\\commodities\\nn_icons\\EQUIPICON_gun.3db"
"combinable" = "false"
"ids_name" = 198081
"ids_info" = 67012
"shop_archetype" = "equipment\\models\\weapons\\li_plasma_blaster.cmp"
"material_library" = "equipment\\models\\li_equip.mat"

["Good"
nickname = "pell_ammo01"
equipment = "pell_ammo01"
shop_archetype = equipment\models\weapons\li_rad_missile.3db
material_library = equipment\models\li_equip.mat
category = equipment
price = 175
item_icon = equipment\models\commodities\nn_icons\EQUIPICON_missiles.3db
combinable = true


And my market_mic.ini entry:

["BaseGood"
"base" = "Li03_05_base"
"marketgood" = "missile01_mark01", 0, 0.400000, 10, 10, 0, 1
"marketgood" = "missile01_mark01_ammo", 0, 0.400000, 50, 50, 0, 1
"marketgood" = "missile01_mark02", 0, 0.400000, 10, 10, 0, 1.200000
"marketgood" = "missile01_mark02_ammo", 0, 0.400000, 50, 50, 0, 1
"marketgood" = "missile01_mark03", 0, 0.400000, 10, 10, 0, 1.400000
"marketgood" = "missile01_mark03_ammo", 0, 0.400000, 50, 50, 0, 1
...
and so on
...
"MarketGood" = "pell_gun01_mark01", 10, 0, 10, 10, 0, 1
"MarketGood" = "pell_ammo01", 2, 0, 50, 50, 0, 1


I hope someone can help me out on this one, I have absolutely no idea why the ammo does not show up at the dealer. The gun does and it would even work, if it had the ammo. When flying, I get the little 0 beside the gun's name, so the "requires_ammo" = "true" line is also recognised.

Any ideas?

Post Tue Aug 28, 2007 11:16 am

Other information: I tried changing the line in market_misc.ini to something else. It appeared in the list. I also tried to change the nickname of the ammo (I also changed all the references to it), but no success. I tried having a Javelin Missile under that nickname, but that didn't work either (there was no duplicate Javelin Missile in the list).

It is almost as if Freelancer would intelligently pick on that entry, in whatever way do I modify it, even to the extent that it has little to nothing to do with the original. I'm convinced there is some small little mistake in the code that I can't catch - but what?

Post Tue Aug 28, 2007 8:04 pm

Check out my tutorial on the Tutorial forums. Its got everything you need for this.

Post Tue Aug 28, 2007 8:08 pm

Might be the pell_ammo01 <-- 01 after. I've noticed on some things, naming conventions need to be stuck to (I have the headache to prove it :p )
So you might try just using something like pell_gun01_mark01_ammo instead.


Edited by - Mini_Me on 8/28/2007 9:38:29 PM

Post Tue Aug 28, 2007 9:10 pm

I renamed the nick, but no success. It might have something to do with the fact that it is an ammo - otherwise, I'm stuck

I used your tutorial as a starting point SkyJocky It is very good. One thing I missed though, is that there are no ids_name and ids_info set for the ammunitions; how do they show up at the equipment trader? Well, otherwise, I did everything as you did; but I added the ids_name and ids_info after the first test has proven that the ammo just does not appear.

Edited by - BBalazs on 8/28/2007 10:10:17 PM

Post Wed Aug 29, 2007 4:26 am

*slaps head* Quotation marks.

Ogu

Post Wed Aug 29, 2007 6:36 am

It was seriously coded with quotation marks as you showed above? I just figured you were nuts. In that case, make sure you change the // to / in the icon, archetype and mat entries.

Post Wed Aug 29, 2007 8:34 pm

He may be using a different method to the conventional one, so the quotes and that may not be the problem. I'm sure he didn't go through everything and add quotes to it.

The IDs are simply set as "gun ammunition"
Its simple to rename them, I just set them all the same because it would have taken a long time to change them all. The ID is a standard ID that comes in the DLL. Since you only have one gun that uses ammunition it'll be easy to change, but at the end of the day its just a name and shouldn't effect the good.

There is one thing I realise now that I forgot in my tutorial, although you've already got that in yours so thats not the problem.

Try adding this to your weapon entry in the "Weapon_good.ini" file:

free_ammo = missile01_mark02_ammo, 10

with the nickname of your ammo in place of the "missile01_02_ammo"
Then run freelancer and buy one of your guns, if you receive ammo then the problem is nothing to do with your ammunition or good entries, but your market entry.

Change this:

"MarketGood" = "pell_gun01_mark01", 10, 0, 10, 10, 0, 1
"MarketGood" = "pell_ammo01", 2, 0, 50, 50, 0, 1

to this:

"MarketGood" = "pell_gun01_mark01", 10, 0, 10, 10, 0, 1
"MarketGood" = "pell_ammo01", 2, -1, 50, 50, 0, 1

Then it should work.

Post Wed Aug 29, 2007 11:29 pm

Yep, the code was full of typos, like the quotation mark thing and the slash symbols too. I also added the free_ammo entry, and turned the ammunition's nick into pell_gun01_mark01_ammo to make it more conventional.

The problem as it were was that faulty market_good entry. Everything is perfect now, including the effect I made for the gun. Thank you for all your support

Not if it was a problem, but if I'm here I might as well ask - the beam_effects.ini stores two kinds of effects that we can use - BeamSpear and BeamBolt. I wonder, where the other effects, like the plasma cannon effects are. The ALE files?

Ogu

Post Thu Aug 30, 2007 8:52 am

They're all in effects.ini. You can't edit them (easily) like you can with the beamspear and beambolt entries, but you can overlap them by adding more than one vis_effect lines under one nickname to make some pretty cool effects. Plus, you can always use engine effects as guns (most of them turn out to be small spheres), not to mention tradelane effects (shooting a huge ring looks neat ) and dyson effects. Shooting cloak effects is kinda neat, and i think you can shoot explosions too.

The ALE's are all in the FX/Weapons folder (I think), and there's an ini called weapons_ale.ini, which lists all the effects you can use for the vis_effect in effects.ini. Does that make sense?

Post Fri Aug 31, 2007 2:00 am

Perfectly understandable. Very detailed and not complicated at all. Thank you very much.

Return to Freelancer General Editing Forum