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 next message
Flugente

 
Messages:3461
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



Re: New feature: Externally fed machineguns[message #307575] Tue, 17 July 2012 00:27 Go to previous messageGo to next message
lockie

 
Messages:3908
Registered:February 2006
Location: Scotland
Phew . Anything else hidden away in that brain of yours ? :ok:


Re: New feature: Externally fed machineguns[message #307584] Tue, 17 July 2012 04:22 Go to previous messageGo to next message
usrbid

 
Messages:1552
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 #307587] Tue, 17 July 2012 05:04 Go to previous messageGo to next message
H_412

 
Messages:27
Registered:October 2009
Another great looking feature, as always Smile

In the screens the MG is loaded as per usual but it's also being fed by another belt, does this mean the gun can fire all of both before needing to reload or do you have to spend reload aps when the first belt finishes?

Also re: max mag size, there seemed to be some relevant work in the New Mag System (http://www.bears-pit.com/board/ubbthreads.php/topics/280585/6/IDEA_New_Magazine_System.html) Somewhere near the top ChrisL mentions that adding a 1,000 round belt would be possible, so presumably the max mag has had something done to it. Maybe it might be worth someone having another crack at the NMS?

Thanks again Flug!
Re: New feature: Externally fed machineguns[message #307599] Tue, 17 July 2012 11:49 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Magazine size has been lifted long time ago, remember: Crates are magazines ... technically.


Re: New feature: Externally fed machineguns[message #307617] Tue, 17 July 2012 20:23 Go to previous messageGo to next message
usrbid

 
Messages:1552
Registered:December 2008
Thanks DB! Flugente and I were talking about Meltaguns in WH 40k with a very high ammo count due to self recharging batteries, something like 9999 or so would be sufficient for the duration of the game.

DepressivesBrot
... remember: Crates are magazines ...


Yah, this is why I wanted something that disallows some ammo containers to be used as belt fed (essentially remote) magazines.

For example an ammo crate may not have links to chain each bullet to another. Or you can't just take a box of 50 you picked up at the supermarket and use it out of your pant pocket.


Re: New feature: Externally fed machineguns[message #307619] Tue, 17 July 2012 20:38 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
That's why there's a new magazine type, belts.


Re: New feature: Externally fed machineguns[message #307620] Tue, 17 July 2012 21:04 Go to previous messageGo to next message
Flugente

 
Messages:3461
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:

http://i46.tinypic.com/fbz0o7.jpg

Yes, gentleman, Blood's MG is fed from a 2500-bullet box Smile

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 #307624] Tue, 17 July 2012 22:23 Go to previous messageGo to next message
usrbid

 
Messages:1552
Registered:December 2008
Flugente
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.


Oh my God, sooo cool!! I probably came a little just now...


Re: New feature: Externally fed machineguns[message #307839] Sat, 21 July 2012 14:11 Go to previous messageGo to next message
K0ukku

 
Messages:192
Registered:December 2009
Cool!

For future development, it could be ubercool for the Bodybuilding (and a specific amount of STR) - mercs to be possible to use a heavy MG in one hand and an ammo belt in the other hand!
Re: New feature: Externally fed machineguns[message #307840] Sat, 21 July 2012 14:22 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
While the system perfectly accepts feeding a gun with ammo in the other hand, Machineguns are currently only usable with both hands. Allowing mercs with high strength to hold them in one hand wouldn't require much coding, but it wouldn't be nice, and could lead to some weird stuff (especially if a merc loses strength while holding an mg.

For starters, you could just make an MG a one-handed gun.


Re: New feature: Externally fed machineguns[message #307996] Mon, 23 July 2012 21:24 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Update: This feature is now in the trunk (r5415). You will need the newest GameDir files for it (r1475).

The MG3 and the FN Mag can now be fed externally from any 100-rnd 7.62 NATO mag. You can also feed from your inventory if you store the ammo in the medium slots in the LRAK vest.

See first post for the specific numbers required to Items.xml if you want to add this to your guns.

Edit: Thanks to DepressivesBrot, any MG in the standard that could possibly be beltfed can now be beltfed. The 100-rnd 7.62 NATO, 200-rnd 5.56 NATO and 200-rnd 7.62x54R WP ammo items can be used for that.

[Updated on: Mon, 23 July 2012 22:07] by Moderator



Re: New feature: Externally fed machineguns[message #308042] Tue, 24 July 2012 17:44 Go to previous messageGo to next message
Hazapuza

 
Messages:263
Registered:February 2009
Location: Finland
Seems like an excellent system. Nice job, Flugente. Wink

Maybe someone has told you this before, or you've thought about if yourself, but IMHO, you should also concentrate on making all of these cool new features available to the AI, if that's within your expertise. To be honest, with all this fancy new stuff, some further (Edit: Along the lines of WarmSteel's latest work) improvements to the AI would be extremely welcome.

[Updated on: Tue, 24 July 2012 22:17] by Moderator

Re: New feature: Externally fed machineguns[message #308045] Tue, 24 July 2012 18:24 Go to previous messageGo to next message
Sam Hotte

 
Messages:2012
Registered:March 2009
Location: Middle of Germany
What features exactly are you thinking of here, Haza?
Since the AI soldiers are just created anew randomly in the moment you load the tactical view of a sector, i don't think it'd be of relevant worth to enable AI using externally fed MGs.
I mean, better have the one with MG spray its internal 100+ bullets and another attacks you also with his gun instead of the 2 of them just fire a single gun against player's mercs, don't you think?
Re: New feature: Externally fed machineguns[message #308068] Tue, 24 July 2012 23:03 Go to previous messageGo to next message
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. Smile

[Updated on: Tue, 24 July 2012 23:10] by Moderator

Re: New feature: Externally fed machineguns[message #308070] Tue, 24 July 2012 23:12 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Concerning this feature in specific:

The AI can use this feature just as the player does. However the AI doesn't put ammo into their hands. However:

Feeding from your own inventory is also possible. For the player, this can only be done via dedicated slots in a vest (see LRAK-vest). For the enemy, however, any slot will do, as long as there is only one ammo belt there. So the AI can automatically use it.

However this point is pretty insignificant, as the AI rarely ever gets the chance to shoot over 100 bullets and then reload Smile

Way too much 'However's here...


Re: New feature: Externally fed machineguns[message #308072] Tue, 24 July 2012 23:16 Go to previous messageGo to next message
Sam Hotte

 
Messages:2012
Registered:March 2009
Location: Middle of Germany
ACK. Better, more challenging AI would always be highly appreciated (by all, i guess). Tho i doubt that switching through scope modes would be worth the effort for AI. Using recently added movements and stances etc. should be available for AI, if possible, ACK.
Using scopes for observing is AFAIK implemented since 4870 release. At least i do see AI sniper raising gun and scanning around now and then.
Re: New feature: Externally fed machineguns[message #308156] Thu, 26 July 2012 12:04 Go to previous messageGo to next message
usrbid

 
Messages:1552
Registered:December 2008
Flugente
... Feeding from your own inventory is also possible. For the player, this can only be done via dedicated slots in a vest (see LRAK-vest). ...


How about from a backpack?


Re: New feature: Externally fed machineguns[message #308157] Thu, 26 July 2012 12:20 Go to previous messageGo to next message
Headhunter

 
Messages:265
Registered:November 2009
Location: Sweden
Dieter
Flugente
... Feeding from your own inventory is also possible. For the player, this can only be done via dedicated slots in a vest (see LRAK-vest). ...


How about from a backpack?


Maybe from something like this:

http://www.youtube.com/watch?v=rFuiPVJwSUQ[/video]
Re: New feature: Externally fed machineguns[message #308158] Thu, 26 July 2012 12:36 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
It looks like something could easily get caught in that belt and dislocate the links or something, leading to jams ... I'd prefer the enclosed versions:
http://img827.imageshack.us/img827/9986/deathmachinem6002.jpg


Re: New feature: Externally fed machineguns[message #308162] Thu, 26 July 2012 13:59 Go to previous messageGo to next message
Headhunter

 
Messages:265
Registered:November 2009
Location: Sweden
Either works, I just want more LBE in stock 1.13... Wink
Re: New feature: Externally fed machineguns[message #308228] Fri, 27 July 2012 13:37 Go to previous messageGo to next message
usrbid

 
Messages:1552
Registered:December 2008
DB and Smeagol are working on more LBEs!


Re: New feature: Externally fed machineguns[message #308230] Fri, 27 July 2012 13:47 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Those are for AIMNAS though Razz


Re: New feature: Externally fed machineguns[message #308233] Fri, 27 July 2012 14:30 Go to previous messageGo to next message
Maalstroom

 
Messages:344
Registered:December 2008
Location: en route to San Hermanos
hi,
if this LBE type appears somehow then externally fed machine guns should be available for AI too! it makes a great addition to suppression fire!

amazing stuff flugente!!
Re: New feature: Externally fed machineguns[message #308844] Wed, 08 August 2012 20:33 Go to previous messageGo to next message
Wil473

 
Messages:2864
Registered:September 2004
Location: Canada
A question/concern about the requirement that there is only one magazine item (ammo belt) in a pocket before it will feed - is this a technical limitation or a design choice?

It struck me that I could cut down on items if I could use shorter lengths of belt and stack a bunch of them in the Belt ammo pocket. The weapon's inherent capacity would be 40-50 rounds, and a stack of the same 40-50 round magazine items could sit in a vest pocket to represent the remaining rounds to make up a 200 round belt.

Previously I was considering adding a series of low capacity magazine items for a belt fed weapon's inherent capacity, but if I could replace the "full" belt item with a stack of "short" belts sitting in a Vest pocket then I wouldn't need to create these extra items. Also the weapon could create belt items on its own. The split ammo crate feature seems to fill all empty pockets. I still prefer some way to produce only the belt magazines item(s), and having the weapon 's internal feed use the same mag size as the belt just makes sense to me.


Re: New feature: Externally fed machineguns[message #308930] Sat, 11 August 2012 15:55 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Its a bit of both.

Technical limitation because I was unsure if I wanted to display a huge sum of bullets and had a problem with deleting mags from stacks.

Design choice... I wanted some kind of 'punishment' for using the external feed mechanism from inventory, and the limitation to only one belt struck me as feasible. I am not really happy with the slot implementation, I just can't think of any way to better represent the belts people wear around their neck...

Your suggestion seems very reasonable. I'll propably make a change to the code today in that regard.

Also, I just heard that you have made cleaning kits for Urban Chaos. Could I add the item pictures for that to the trunk? And if yes, where can I get them from?


Re: New feature: Externally fed machineguns[message #308933] Sat, 11 August 2012 16:55 Go to previous messageGo to next message
H_412

 
Messages:27
Registered:October 2009
For belts slung around the neck what about using the sling slot? Don't know if/how it would be possible.
Re: New feature: Externally fed machineguns[message #308934] Sat, 11 August 2012 16:58 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Good idea, but that would cause a lot more problems, the least being the need to alter if an item can fit in there for a myriad of items...

As a solution, I just coded the possibility to have stacks of ammo to feed. So the limitation of only one belt isn't valid anymore. I'll commit later.


Re: New feature: Externally fed machineguns[message #308936] Sat, 11 August 2012 17:36 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Actually, you only need to increase one capacity for the sling pocket from 0 to something else and change the restriction on that pocket to include ammo to be able to store belts. So what are the other problems?


Re: New feature: Externally fed machineguns[message #308939] Sat, 11 August 2012 17:54 Go to previous messageGo to next message
Wil473

 
Messages:2864
Registered:September 2004
Location: Canada
Flugente
Also, I just heard that you have made cleaning kits for Urban Chaos. Could I add the item pictures for that to the trunk? And if yes, where can I get them from?


Sure, the cleaning kit graphics are available in the current UC-1.13 v3.7x release as P5Items 758. Graphics are kept in a separate Data-Graphics folder.

While we're on the subject of graphics and your features, you also have permission to grab the interface image for the Masterkey. I seem to remember that the current one is only a place holder. Graphic P4Items 89. Additionally, it fits a small attachment slot.

EDIT: both graphics also have tileset graphics as well. One of the things I'm doing is filling in some tile sets for attachments and gun items.

[Updated on: Sat, 11 August 2012 17:56] by Moderator



Re: New feature: Externally fed machineguns[message #308944] Sat, 11 August 2012 19:01 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Super! Thank you for that.

To complete this trade, r5458 now allows you to feed from stacks of ammunition.

Would definetely trade again Smile


Re: New feature: Externally fed machineguns[message #308946] Sat, 11 August 2012 19:48 Go to previous messageGo to next message
Wil473

 
Messages:2864
Registered:September 2004
Location: Canada
Thank you, now I have space to add one or two more calibres to the planning documents for v4.xx

EDIT: that or add back the 12g Taser round I cut when I ran out of room... any plans for electrical effects as an explosion?

[Updated on: Sat, 11 August 2012 19:49] by Moderator



Re: New feature: Externally fed machineguns[message #308947] Sat, 11 August 2012 19:56 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Planned to add that in the far far future for my WH40k stuff... but I do not have any explosion animations for that. I also don't see any real-world electric explosions that would fit the game.

So no.


Re: New feature: Externally fed machineguns[message #353794 is a reply to message #307574] Fri, 15 June 2018 02:56 Go to previous messageGo to next message
No-Nothing

 
Messages:57
Registered:March 2013
Hello!
You refused the idea of replacing a gun magazine with an ammo belt what seems to be one bad decision!
Was that decision made purely by design concept or unwilling to mess with accordingly boosted complexity of coding?

I think it'd be righter to focus on MG feed process instead of MG team. Something like this:
1) MG must be UNLOADED
2) MGner must have his weapon IN ANY HAND
3) if 1)+2)=OK he/helper must spend APs for READYING / INSERTING belt into the gun (10-20 by default) *
* maybe by $-menu? You could even to choose which belt in a vest (if a vest has some belts) / other places to feed from this way!
4) the ammo belt TEMPORALLY CLONES itself. One copy stay like it is (and is the base). Another is temporally inserted (temporal magazine). Shooting the gun causes both copies sync-spend ammo! Of course "temporal magazine" disappears if 5) happens!
5) Removing MG from hands, depleted or taken away belt means the process must be repeated
If you could do this that would be very cool! I like very much both this feature and how it interfaced now. But I feel strong luck of adjustments I described above.
To explain further I have to highlight the most disturbing things at now! It is inability to feed MG with unmatching ammo (HP, AP, Tracer...) and this weird way how ammo count allowed to be fired (from OUTER source) depends on ammo count INSIDE MG magazine.

Additionally possibility to feed (the way described above or the present one) from attachment may be useful. And further would go a special ammobelt slot (somehow involving spending APs) instead of secondary hand for guns recognized as belt-feeded to allow belt-feed without helper / special vest. This way could difference between MG able to attach an ammobox to itself like PKM and MG not able to be highlighted.
Another problem is you cannot transform ammo to for example 200 round belt IF you don't have a MG with this amount!!! Not sure how this is to do the simplest but have one thought. It's an attachment like "masterkey" UB shotgun plus coding that an UBgun cannot be chosen by scrolling through firemodes (by "B" key) if it's ammo belt.
Re: New feature: Externally fed machineguns[message #353804 is a reply to message #353794] Fri, 15 June 2018 21:21 Go to previous message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Yeah, no. Cloning objects this way (so the same object is at 2 placces at once and properly synchronized all the time) would require waaaaay to much code, especially for such a niche feature.

I don't really get how attaching ammo would help at all. That would complicate firing and display code for no gain I can see.



You gotta wash your hands before picking up a baby. They can see the bacteria burning into their flesh.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Previous Topic: New (unofficial) mercs: The Ryder twins (Mass Effect: Andromeda)
Next Topic: New feature: mp3 support
Goto Forum:
  


Current Time: Tue May 21 15:45:43 EEST 2019

Total time taken to generate the page: 0.01171 seconds