Adding custom ammo types to weapons -1 reply

Please wait...


I didn't make it!

0 XP

#1 10 years ago

Hi I made a new type of ammo;

[ammo_5.56x45_ss190]:ammo_base GroupControlSection = spawn_group discovery_dependency = $spawn = "weapons\ammo\ammo_5.56x45_ss190" ; option for Level Editor class = AMMO cform = skeleton visual = weapons\ammo\ammo_556x45_ss190.ogf description = enc_weapons1_ammo_ammo-5.65x45 $prefetch = 64

cost = 1

box_size = 1000

inv_name =ammo-5.56x45_ss190 inv_name_short =ammo-5.56x45_ss190 inv_weight = .2

inv_grid_width = 2 inv_grid_height = 1 inv_grid_x =13 inv_grid_y =10

k_dist = 20.0 k_disp = 0.05 k_hit = 4.0 k_impulse = 10.0 k_pierce = 30.0 impair = 3.0 buck_shot = 1 tracer = on wm_size = 0.1 explosive = off

How do I add this to my weapons? Oh, I forgot to mention that I named it "Shryll Inc 'Gravi' 5.56x45 ss190"


Pack some antirads

50 XP

29th April 2008

0 Uploads

69 Posts

0 Threads

#2 10 years ago

Looks like a killer ammo :D

But anyway, adding it to weapons is easy. First, change the very first row of that ammo [ammo_5.56x45_ss190]. Change it to whatever you want to call it, like "ammo_5.56x45_gravi" This is to tell the game you have totally new ammo type. Also you have to change inv_name, for example inv_name = ammo-5.56x45_gravi and, inv_name_short = ammo-5.56x45_gravi Then, add the ammo to all the weapons you want to use it with, 5.56 is usually in the NATO rifles (G36K, LR300, L85, F2000 and perhaps some others I dont remember.)

As an example, LR300: open w_lr300.ltx and find a row that says "ammo_class". It currently has already two types of ammunition: ammo_5.56x45_ss190, ammo_5.56x45_ap. Just add a comma and ammo_5.56x45_gravi. Now it should be: ammo_class = ammo_5.56x45_ss190, ammo_5.56x45_ap, ammo_5.56x45_gravi

Now your ammo is ready and set. But we still need to add it to traders so you can buy them.

open misc\trade_trader.ltx. That's Sidorovich's trader file. There are others too, but let's first add new ammo here. You should add the ammo the same way others are in that file, you can add it to all sections. Find supplies_start and add this under the ammo there: ammo_5.56x45_gravi = 5, 1 (or whatever values there are currently. I don't know that the numbers are, but I used same values that the others had.) You could add same to other sections too, and of course in the buy section, so you can also sell those ammo.

Oh, you also need to add the ammo name and description in config\text\eng\string_table_enc_weapons.xml At the beginning part of the file, after that Ammunition text and , add this: 5.56x45mm 'Gravi' rounds and, also: 5.56x45 Gravi

That adds a name to your rounds. But now we still need a description. Scroll down the file. You'll know youre in the right place when you see longer texts.

Again, add this: Shryll Inc 'Gravi' rounds (whatever description you want here)

Make sure you don't break any tags, otherwise you'll get funny results or errors. If everything went correctly, you should have working Gravi rounds buyable from Sidorovich.

edit: oops, now your new description won't work. In weapons.ltx, take a look at description = enc_weapons1_ammo_ammo-5.65x45 <<-- this should be ammo-5.56x45-gravi