New feature: Externally fed machineguns[message #307574] |
Tue, 17 July 2012 00:23  | |
Flugente
|
 |
Messages:3525
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. 
And now a few demo pics:

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).

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
|

|
|
|
Re: New feature: Externally fed machineguns[message #307584] |
Tue, 17 July 2012 04:22   | |
usrbid
|
  |
Messages:1527
Registered:December 2008 |
|
|
Yo Flugente, There used to be a maximum mag size, 250 or something like that, has that been increased e.g. can you have 1,000 round belts now? If not, that is something we should do.
Another thing, is it possible to give the ammo can a size so that e.g. it won't fit into a pocket other than a large backpack? What I mean is we probably need to separate ammo mags which can be potentially attach to a gun from ammo containers which can never be attached to a gun. Ideally we want an entire backpack slot for mostly just ammo for WH40k.
Don't forget that some ammo containers can not be used as a mag or belt fed, such as retail boxes of e.g. 20 or 50 rounds in styrofoam in cardboard (or a tin can). Some mods have these retail style boxes, they are usually small-ish and relatively heavy.
I have seen a mod with a belt feed attachment. Once you attach the item to a gun, it becomes a belt fed weapon. Maybe this can be used somehow to switch from magazine operated to belt fed, which is also called in professional circles as "let it rain". :giggles:
|

|
|
|
|
|
|
|
Re: New feature: Externally fed machineguns[message #307620] |
Tue, 17 July 2012 21:04   | |
Flugente
|
 |
Messages:3525
Registered:April 2009 Location: Germany |
|
|
I have to correct Depri here. I originally planned to introduce a new magazine type, yes (and asked about that in IRC). However, I also want to allow the possibility to feed from ammo crates. That is why wether an item can be used as a belt (or, more generally speaking, 'external ammo source') is determined by the new flag 'AMMO_BELT' in in Items.xml. This allows shenanigans like this:

Yes, gentleman, Blood's MG is fed from a 2500-bullet box 
It's that simple: if the tag is set it works, if not, then not.
@H412: The gun can fire both boxes. At first, the bullets will be deducted from the external belt, after that from the internal magazine.
@Dieter: In WH40K, I plan to simply allow a crate of bolter ammo to be attached to power armor, and will put in an additional check to check that slot. Thus the Adepta Sororitas can feed their Heavy Bolters from their armor.
[Updated on: Tue, 17 July 2012 21:06] by Moderator
|

|
|
|
|
|
|
|
|
|
Re: New feature: Externally fed machineguns[message #308068] |
Tue, 24 July 2012 23:03   | |
Hazapuza
|
  |
Messages:263
Registered:February 2009 Location: Finland |
|
|
Right now, mostly this and the scope modes. You have a point there, so I guess that leaves only the scope modes. The rest of Flugente's work doesn't seem to fit the AI very well, either.
Mostly I'm trying to say that with all the new features that get added to 1.13, the AI should also be improved and given the chance to use as many of the actions available to the player as possible, like scope modes, walking with weapon raised, sidesteps, using scopes for observing an area (I doubt this one is added yet, despite the discussion some time ago). I know it's easy to ask for all these things, and that AI programming is hard and not many people here can do it properly. Still, personally I'd love to see the AI being improved along with the general gameplay, a better and less predictable AI goes a long way to making the combat much more interesting.
But just to be clear, I respect every coder and modder here for all the hard work they have already done.
[Updated on: Tue, 24 July 2012 23:10] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|