Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Externally fed machineguns
New feature: Externally fed machineguns[message #307574] Tue, 17 July 2012 00:23 Go to previous message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Machineguns can now be fed externally

I've implemented a small feature that can alter the ways we treat MGs. Basically, we can now have dedicated ammo bearers (and thus create 'true' machinegun teams). It works like this:

  • When a merc has ammunition in his hands, and that ammo item is defined as an ammo belt, he can feed the guns of his teammates. A icon on his portrait will show you that.
  • In order to do that, his teammate must be next to him, and they must look in about the same direction, or he looks at his teammate.
  • Also, the gun of our teammate must allow external feeding. This can also be done via an attachment (G3 to HK21, anyone?)
  • The calibers of the gun and the ammo must match, as must the ammo type (AP, Tracer...)
  • If we feed a
  • What now happens is this: If the gun is fired, the bullet is not deducted from the gun's magazine, but instead from our ammo item. So we provide the bullets that the MG shoots.
  • We can feed a gun by holding ammo in our hands, or we can feed our own gun from our inventory:
    • Certain vests (in the trunk the only one will be the LRAK vest) have slots in which ammo belts can be stored.
    • A ammo belt in these slots can supply our own gun, if it is the ONLY ammo belt in this slot.
  • To avoid exploits, the gun's ammo is not restored to full capacity when it is fed externally. All that happens is that the bullets get removed somewhere else, so to speak.
  • Note that the shooting mechanism does not counter in the fact that a gun is fed externally. This means that if your gun's ammo count is down to 1, you can only fire a single bullet at a time, even if someone esle supplies you with a fresh 100-bullet belt.
  • This system also works if you have a gun in every hand and each one is belt-fed. So yes, you can now wield dual-belt-fed machineguns, provided some modder would allow something this wacky. :headbanger:

This feature can be controlled via the JA2Options.ini.

All necessary xml changes are in the . AS of now, several people are developing new features that need this tag, so I'll decide the definite number once this reaches the trunk.

This does not break savegames at all, as this is a pure xml-based feature.

My advice to any modder wanting to truly emphasize MG teams with this: Lower the magazine site of your MG (like to 20 or so). This will force the player to either reload hideously often, or rely on this feature. Very Happy

And now a few demo pics:

http://i46.tinypic.com/ht5tv8.jpg
Blood guns down an enemy. As you can see, his ammo count does not go down. Len currently provides the ammo, as you can see by a) The icon on his portrait and b) his ammo item has an ammo count (which only shows if it is feeding a gun).

http://i46.tinypic.com/34gooz9.jpg
Now blood is alone. His gun is now fed from the ammo belt in his vest.

As usual, this could eventually enter the trunk. This thread is the place to discuss this, and find errors in the concept, or improvements I haven't thought of.

Edit: This is now in the trunk (r5415), required GameDir revision is r1474. The necessary tags in the -tag in Items.xml are:
#define BELT_FED	0x00000080	//128		// item can be fed externally
#define AMMO_BELT	0x00000100	//256		// this item can be used to feed externally
#define AMMO_BELT_VEST	0x00000200	//512		// this is a vest that can contain AMMO_BELT items in its medium slots

[Updated on: Mon, 23 July 2012 21:28] by Moderator

Report message to a moderator

Captain

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: turncoats
Next Topic: New feature: Take prisoners, interrogate them
Goto Forum:
  


Current Time: Fri Mar 29 08:56:21 GMT+2 2024

Total time taken to generate the page: 0.01430 seconds