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

A problem with custom ammunitions

The general place to discuss MOD''ing Freelancer!

Post Sat Aug 11, 2007 1:48 am

A problem with custom ammunitions

Hello, I got another problem with a project I'm working on.
I've decided to make every gun and turret in my mod require Ammunition to fire. Since my server is designed to be a pvp server, it will make for some interesting battles, and will also require the pilot to increase their aim, and no one will be able to fight forever without pit stops.

I've done all the changes needed, it too me a really long time to make all the ammunitions in weapon_goods.ini
and I've added each of the goods to market_misc.ini

like this:
marketgood = fc_or_gun01_mark02_ammo, 2, -1, 50, 50, 0, 1

How ever, when I try to buy ammunition in game, the dealer doesn't sell any.

This is the Munition entry

[Munition
nickname = fc_or_gun01_mark02_ammo
hp_type = hp_gun
requires_ammo = true
hit_pts = 2
hull_damage = 52.700001
energy_damage = 0
weapon_type = W_Laser01
one_shot_sound = fire_laser4
munition_hit_effect = pi_laser_02_impact
const_effect = pi_laser_02_proj
lifetime = 0.800000
force_gun_ori = false
mass = 1
volume = 0.000100

and this is the Goods entry

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

Now the only problem I could see is there are a few things in the Munition entrys on the Missiles that aren't in the Guns. I'm not sure which are relevant, though.

Can anyone help with this? Once I get this sorted I'll make a Tut on this so anyone who wants it can get it without going through the pain and boredom I went through, heh heh.

_______________________________
Amare et sapere vix deo concetidur.

Post Sat Aug 11, 2007 2:08 am

The only thing I can imagine to be responsible for this is the "units_per_container = 10" line all missiles have in their ammunition block. Try this.

Post Sat Aug 11, 2007 2:09 am

The goods entry is supposed to be in Weapon_goods.ini file instead of goods.ini



Get yer hosting!

Post Sat Aug 11, 2007 2:35 am

Are you sure this does matter, cheese on toast? I suppose there's no difference between the two files except for the type of goods that are stored. There are no entries that act global so it should work in both ways.

Edited by - Flamebird on 8/11/2007 3:35:14 AM

Post Sat Aug 11, 2007 5:17 am

Goods.ini is for hull commodities and such, there wouldn't be a specific weapon goods file unless it wasn't needed

when you make a new weapon, the exe will look in that file for the goods entry if it cannot find it, it wont display


*EDIT*

i need to learn some grammar and spelling
Edited out sig

Edited by - cheese on toast on 8/11/2007 6:17:48 AM

Edited by - FINALDAY on 8/11/2007 6:42:14 AM

Post Sat Aug 11, 2007 5:51 am

Freelancer searches for all goods-inis that are defined in freelancer.ini.

goods = equipment\goods.ini
goods = equipment\engine_good.ini
goods = equipment\misc_good.ini
goods = equipment\st_good.ini
goods = equipment\weapon_good.ini

As you see, there's no difference in the entries except for the filenames. It doesn't matter at all where you store your goods as long as that file has an entry in freelancer.ini. Furthermore it's no problem to create new files for new equipment and it works perfectly.

Sky_Jocky's problem must lie within his code, it's not the file he's using (or verify the opposite ).

I think DA used various files just because it's clearer than to store everything in one _big_ file.

Edited by - Flamebird on 8/11/2007 6:52:31 AM

Post Sat Aug 11, 2007 6:05 am

wait... are you docking at the correct base to begin with? (just a thought LOL)

and true, but i find it easier to use whats there (it is easier to see plus it helps on processing )

now to sur the rest of ma billboards!

Ogu

Post Sat Aug 11, 2007 7:04 am

The following is from the Excelcia Mod (they did the same thing you're doing now by giving some guns ammo usage).

Here's what you need:

[Good
nickname = ku_turret01_mark03_ammo
equipment = ku_turret01_mark03_ammo
shop_archetype = equipment\models\weapons\li_rad_missile.3db
material_library = equipment\models\li_equip.mat
category = equipment
price = 3
item_icon = equipment\models\commodities\nn_icons\EQUIPICON_powerplant.3db
combinable = true

[Munition
nickname = ku_turret01_mark03_ammo
hp_type = hp_gun
requires_ammo = true
hit_pts = 2
hull_damage = 280
energy_damage = 0
weapon_type = W_Neutron01
one_shot_sound = fire_neutron3
munition_hit_effect = ku_neutron_03_impact
const_effect = ku_neutron_03_proj
lifetime = 1
force_gun_ori = false
mass = 1
volume = 0.0014
ids_name = 463815
ids_info = 464815
DA_archetype = equipment\models\commodities\nn_icons\equipicon_powerplant.3db
material_library = equipment\models\li_equip.mat
loot_appearance = ammo_crate
units_per_container = 50

Post Sun Aug 12, 2007 3:30 am

Yeah don't worry, all the stuff was in the weapon_goods.ini, I must have mislead you when I was too lazy to type out weapon_ all the time.
I was thinking that might be the problem, with the unit container, but I thought that would just be for loot NPCs' drop, and wouldn't matter since no npcs' drop them.

I'll try it out tomorrow when I get home from school, I'm dead tired from work right now.

Thanks for all your help,
Sky~

_______________________________
Amare et sapere vix deo concetidur.

Post Sun Aug 12, 2007 10:04 pm

Adding those two lines didn't make the gun ammunition available in the shop. Does it matter where the lines are placed, or is it ok if I just put them on the end of the Munition entrys?

Also another problem I encountered was Bases and NPCs' can no longer use their weapons, and I'm not quite sure how to edit their loadouts so that they have the ammunition.

It'd be preferable if the NPCs' could have infinite ammunition, is this possible?

I guess it would be easy to make the bases' guns not need to use ammunition, so theres no need to worry about that.

_______________________________
Amare et sapere vix deo concetidur.

Post Sun Aug 12, 2007 10:56 pm

Ok ok, nevermind I solved the problem of the ammunition not showing up by myself.
It turns out they weren't showing up because I had forgotten to put in the IDS entries.

Now I just gotta figure out the loadouts of NPCs'.

_______________________________
Amare et sapere vix deo concetidur.

Return to Freelancer General Editing Forum