Jump to content

Has anyone had any luck making several types of ammo for a single weapon type?


Max_Caine

Recommended Posts

I'm having quite the struggle trying to get one weapon to a) display 2 ammo types for one weapon on the UI and b) making both ammo types usable in-game. The closest I have got so far is to make the same weapon (in this case, the assault rifle) twice in weapons.xml, one with the normal ammo type, one with the exotic ammo type (which have been properly defined in ammos.xml, items.xml, weapons_gc.xml and strings.xml). I can then assign ammo clips from weapon 1b to a solider carrying weapon 1a, and then when the solider exhausts the clip on weapon 1a, he can then load clips from weapon 1b into weapon 1a.

I have tried:

Defining the exotic ammo (henceforth known as EA) as a weapon.grenade.EA and assigning it as an ammo type in weapons_gc.xml, but while it shows up on the base and gc UI correctly, it will not load into the weapon

Defining the EA as a weapon.EA type (like rockets), but that crashes the base UI

Defining the EA as a standalone ammo.ballistic.EA type in weapons.xml, but that crashes the base UI.

Someone cleverer than me got any ideas?

Link to comment
Share on other sites

I messed about with this for a week or so when the huge debate about multiple shotgun damage types was running.

I never got it to work either but there were a few things I didn't bother trying.

The next on my list was to create weapons that were all classed as rocket launchers.

A weapon that the game treated as a rocket launcher but that acted like an assault rifle on the ground (ie zero damage radius ammo) should be able to have multiple ammo types listed in with the rockets.

I think setting weapons to bullettype=rocket disables burst fire mode though which is less than ideal.

The game automatically assigns an explosion graphic to impacts as well I think, even if they have no damage radius or explosive impact spectre set.

That ammo may also be able to be used by the normal rocket launcher, I didn't look into the settings for that.

Setting a weapon to bullettype=grenade seems to mean it is treated as a standalone weapon rather than ammo, it can be thrown but not loaded into another weapon.

Basically the only way I found was to duplicate the weapon as you did, you can take either weapon and as many clips of each type you require.

I think if Goldhawk could get the UI to display multiple ammunition types then this problem would go away and be a big boost for modders.

Hopefully it is on the list for the new UI.

Any word on that Chris if you are reading?

Link to comment
Share on other sites

Aside from being a help to modders, I think it would be useful for the ground combat in general, as I see there are a large variety of rockets the rocket launcher can have, and I find it clunky to go through into the inventory screen each time I use a rocket. for the same reason, an unload function would also be useful if I want to mix and match my rockets to the situation at hand.

Link to comment
Share on other sites

I was thinking more along the lines of the base UI being able to display multiple ammo types per weapon.

Although the GC UI does need to be able to do the same.

The reload button working in the same way as the grenade button would be nice, right click to choose ammo type from available ones then click to reload.

Link to comment
Share on other sites

In my experience, the UI on the equipment selection screen is the biggest stumbling block here, as you've mentioned. When I tinkered around with adding different ammo types, I ended up just having to add an entirely new weapon for it; so I had "Shotgun - Slug" "Shotgun - Buckshot" as two different weapons, for example.

What I never got round to trying out (and I keep meaning to) is taking the one weapon type and taking some of the other weapon's ammo into a mission (so, taking the Slug shotgun from the example above, but taking 2 clips of slug ammo and a clip of Buckshot ammo too)

In theory, as long as the weapons are setup to take the different ammo types, this could be a work-around for the equipment screen UI problem.

Link to comment
Share on other sites

Well if you figure out how it works for the rocket launcher. Maybe change rocket.blabla to m16.blabla same for ammo? On a side note how would Chris make to game more moddable.

The rocket launcher is treated differently by the game to the 'normal' weapons.

Some of these differences seem to be buried in the source code so no amount of tweaking or name changing will alter them.

The trick is to find a way to make it work well enough to be of use for what you want to achieve.

Chris can have things moved out from the source code to the easily altered xml files or change the place the game looks for them in order to make mods easier.

For example shot damage and armour penetration (pen) used to be set on the weapon so all ammunition fired by that weapon shared the same values.

Chris had that changed so that the damage and pen were set on the ammunition.

That means you can now have multiple ammunition types for a single weapon that act differently.

For example a high damage low pen hollow point style round and a high pen lower damage FMJ style round can both be used by the same pistol, or the shotgun can have a beanbag style less than lethal round added that deals little damage but causes stun damage.

A good step, now we just need to be able to add those additional types!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...