Jump to content

Recommended Posts

Update - 31 August 2015 - Version 3.1.3 Released

Hey, this is my magazine repacking mod. It lets you consolidate your non-full magazines so that you don't just walk around with a bunch of almost-empty magazines all the time like an idiot.

Description:

- Allows the player to repack the ammo in his magazines.
- Default keybinding to open the Mag Repack dialog is "Ctrl+R", this can be customized via the options menu in the Mag Repack dialog.
- Pressing "Alt+Shift+Ctrl+Backspace" will reset the keybinding to the default setting (in case the player forgets what he changed his keybinding to).
- The player may choose a magazine from a list of all of his magazines to be the "Source" magazine and then he may choose a magazine from a list of all of his magazines of the same ammo type as the Source magazine to be the "Target" magazine (or vice versa). As soon as the Source and Target are both defined, bullets from the Source magazine will automatically start repacking into the Target magazine.

Notes:

- The addon version requires CBA.
- This is my first time creating any kind of UI, and I haven't tested it out on a screen that isn't 1920x1080, so if your monitor has a different resolution, you should let me know how it looks...
- The mod lets you repack bullets from different kinds of magazines as long as the two magazines you're repacking use the same ammo. Unfortunately, there are some problems with the actual classnames of the different ammo types.
- For example:

- The '30Rnd_65x39_caseless_mag' and '30Rnd_65x39_caseless_mag_Tracer' both use 'B_65x39_Caseless' rounds (meaning you can repack between tracer and non tracer magazines).
- The '150Rnd_762x51_Box' and '150Rnd_762x51_Box_Tracer' both use 'B_762x51_Tracer_Green' rounds.
- And the '20Rnd_762x51_Mag' uses 'B_762x51_Ball' rounds (meaning you can't repack from either of the 7.62mm box magazines into the 20Rnd 7.62mm magazine).

- I may release an update soon that will make the mod ignore the tracer part of tracer rounds so that you can repack any ammo type with its tracer counterpart. Or maybe BIS will fix the classnames, I dunno.

Future Plans (should I ever return to ArmA modding):

- Custom sounds
- Custom animations
- The option to keep empty magazines instead of automatically discarding them when you fire the last bullet. (Right now, I'm not sure this is possible. I created a script that would let you keep your empty magazines, but when you have a magazine with 0 bullets in your inventory, any scripting commands related to magazines don't work properly.)
- Ammo boxes (like the ammo crates currently in the game but filled with bullets instead of magazines) which can be carried in a backpack or deployed on the ground.
- The ability to repack from magazines in nearby players' inventories (with their permission).

Changelog:

  Reveal hidden contents



Download (includes addon and script versions):

 

- Version 3.1.3 - 31/08/15

- Version 3.1.2 - 07/08/15
- Version 3.1.1 - 05/12/14
- Version 3.1.0 - 05/02/14
- Version 3.0.2 - 08/10/13
- Version 3.0.1 - 04/10/13
- Version 3.0.0 - 14/09/13
- Version 2.1.3 - 22/06/13
- Version 2.1.2 - 15/06/13
- Version 2.1.1 - 05/04/13
- Version 2.1 - 04/04/13
- Version 2 - 04/04/13
- Version 1.3 - 22/03/13

Images:

kG3BjmFs.jpgZbHQlSYs.jpgLU6W0MNs.jpg2jbwxzTs.jpgtdlHs6Is.jpgfXQvJOrs.jpgNjmGgnhs.jpg

Video:

Edited by outlawled

Share this post


Link to post
Share on other sites

Very nice little addon. Can you either make it an option, or make another version where it's a menu choice instead of a key stroke?

Share this post


Link to post
Share on other sites
  AJsarge said:
Very nice little addon. Can you either make it an option, or make another version where it's a menu choice instead of a key stroke?

If we're going to be perfectly honest, I'm not entirely sure what you mean. Can you elaborate a bit?

Share this post


Link to post
Share on other sites

Nice one, but features like these should exist in core from BIS sadly.

How does arma handles alot of mods btw?

Share this post


Link to post
Share on other sites

Great idea! However, I think the process should take a lot longer. It takes away a part of the charm that you have to manage your half empty mags, so it should not be magically fixed in 5 secs. If it would take maybe 20 sec, the player would make sure he's in a safe position before doing this. However, then you need to be able to break out the animation, and abort the repack.

Share this post


Link to post
Share on other sites
  rundll.exe said:
Great idea! However, I think the process should take a lot longer. It takes away a part of the charm that you have to manage your half empty mags, so it should not be magically fixed in 5 secs. If it would take maybe 20 sec, the player would make sure he's in a safe position before doing this. However, then you need to be able to break out the animation, and abort the repack.
It would also be a nice touch being able to do the repack while in a vehicle as passenger...

Yay!

Share this post


Link to post
Share on other sites
  rundll.exe said:
Great idea! However, I think the process should take a lot longer. It takes away a part of the charm that you have to manage your half empty mags, so it should not be magically fixed in 5 secs. If it would take maybe 20 sec, the player would make sure he's in a safe position before doing this. However, then you need to be able to break out the animation, and abort the repack.

So I tried responding to this a minute ago, but my post didn't show up...so if it pops up in a second and I double post, I'm sorry.

Um. Last night I finished working on an update that does pretty much everything you just said...haha. We're on the same page for sure.

The new update makes it so the player repacks each magazine type one by one. It tells you which type of magazine you are currently repacking and gives you the option to either skip to the next magazine by pressing 'Space' or exit the repack altogether by pressing any of the movement keys (D, A, W, S).

How long it takes to repack each magazine type is dependent on how many bullets you are repacking for that magazine type. So it won't take long to repack two half-empty 20rnd mags, but it will take quite a while to repack five half-empty 200rnd box cases.

  Gliptal said:
It would also be a nice touch being able to do the repack while in a vehicle as passenger...

That is a really good suggestion. I hadn't even thought about vehicles at all. Have you tried repacking your magazines in a vehicle and it didn't work? I'll have to look into this...

'S gonna delay the new update a bit, though. 8(

EDIT: Hey, so I just checked it out, and you can repack your magazines while in a vehicle, but you can also do it while you're the driver or gunner which is not good. So...I'm gonna make it so you can only repack if you're a passenger and if you get out of the vehicle mid-repack, you stop repacking.

Thank you for drawing my attention to this.

Edited by Outlawled

Share this post


Link to post
Share on other sites
  Outlawled said:
but it will take quite a while to repack five half-empty 200rnd box cases.

The "repacking" of two belts together is relative fast. Dont forget that you have to unclip two bullet and use this free parts to clip them togeher. The longest part is the repacking in the box bot that is even faster as a 30 rounds mag (open magazine) but please dont forget to remove a bullet for each new mag.

can you make a buddy belting for the MG? i mean cip a new mag together with the loaded one? Ill love this to keep the supressive fire online

but dont forget that you need a bigger amount of bullets left on the belt:-)

Share this post


Link to post
Share on other sites
  SaltatorMortis said:
The "repacking" of two belts together is relative fast. Dont forget that you have to unclip two bullet and use this free parts to clip them togeher. The longest part is the repacking in the box bot that is even faster as a 30 rounds mag (open magazine) but please dont forget to remove a bullet for each new mag.

can you make a buddy belting for the MG? i mean cip a new mag together with the loaded one? Ill love this to keep the supressive fire online

but dont forget that you need a bigger amount of bullets left on the belt:-)

I really like that buddy belting idea. I could maybe make it a scroll-wheel action... Hm. I'll look into it. Thanks for the suggestion!

Edited by Outlawled

Share this post


Link to post
Share on other sites

I don't know what the issue is, but right now if I have 11 full magazines and do a repack, I get only two magazines with 30 rounds each (and total bullett count on the popup is 33); if I repack again, I get only one magazine with 6 bullets inside...

Yay!

Share this post


Link to post
Share on other sites

Hm. It shouldn't let you repack your magazines if all your magazines are full...I'm not sure what would be causing that problem.

I did just release version 2.0 of the mod, though, so maybe that will have been fixed. I tested repacking 11 full magazines and had no problems, so...I dunno. Let me know if you encounter this or any other problems again.

Version 2.0 Released

Changelog:

  Reveal hidden contents

Share this post


Link to post
Share on other sites
  Outlawled said:
Hm. It shouldn't let you repack your magazines if all your magazines are full...I'm not sure what would be causing that problem.

I did just release version 2.0 of the mod, though, so maybe that will have been fixed. I tested repacking 11 full magazines and had no problems, so...I dunno. Let me know if you encounter this or any other problems again.

Version 2.0 Released

Changelog:

  Reveal hidden contents

Great, will try this releas as soon as I can!

Yay!

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

PS: if you do not mind any feedback from me.

Mission makers (and others as well) may not be happy if you change the pbo name with each update. It is not adviced to do that (missions made with the older version will have to be reworked for example).

So, maybe leave the versioning out of the pbo name?

Just a thing I noticed :o

Edited by Guest
updated to latest version!

Share this post


Link to post
Share on other sites

Version 2.1 Released

Changelog:

  Reveal hidden contents
Edited by Outlawled

Share this post


Link to post
Share on other sites

The update is great, this is the best magazine repacking I've ever seen for a game. However, would it be possible to make it more obvious which magazine is the "current" magazine in the list, for instance by surrounding its number in the hint list with some symbol? i.e. [15, 16, >12<, 5, 3]; It would make it more precise to skip magazines.

Share this post


Link to post
Share on other sites
  Outlawled said:
Hm. It shouldn't let you repack your magazines if all your magazines are full...I'm not sure what would be causing that problem.
I have the same issue with 2.1 version: only Mods active are yours and CBA...

With the new UI I think it's quite clear what is happening: the actual N bullets in magazines are for some reason counted as N/10 (where / is integer division)... This means that if I have 10 magazines with 30 rounds each, the mod counts them as 10 magazines with 30/10 = 3 rounds each, and obviously (and correctly) repacks them in one 30 round magazine and one 3 round magazine: if I run the repack again, the Mod will once again count a magazine with 30/10 = 3 rounds and, fore some odd reason, won't do this division with the 3 rounds magazine (since it should be 3/10 = 0)...

So i looks like the division is made only if the number of rounds in a magazine is more than 10: if I shoot enough rounds to make the number drop in the twenties, the repack will count 2 (24/10 = 2 for example); same thing with the tens (16/10 = 1 for example)...

It's nearly as if this sort of code was implemented for the magazine count function (I'm just writing this to make myslef as clear as possible, I have no idea how the code actually looks like):

int countBullets (Magazine ToRepackMag)
 {
 if (ToRepackMag.bulletsInMag >= 10)
   return ToRepackMag.bulletsInMag / 10;

 else if (ToRepackMag.bulletsInMag < 10)
   return ToRepackMag.bulletsInMag;
 };

Or another possibility could as well be:

int countBullets (Magazine ToRepackMag)
 {
 int numOfBullets = ToRepackMag.bulletsInMag / 10;        //if bullets < 10 then numOfBullets = 0

 if (numOfBullets != 0)
   return numOfBullets;

 else
   return ToRepackMag.bulletsInMag:
 };

I would be glad to make a video if I wasn't clear enough...

Yay!

Edited by Gliptal

Share this post


Link to post
Share on other sites

Could you make a quick video demonstrating your problem, Gliptal? I'm having trouble reproducing your error.

  Quote
This means that if I have 10 magazines with 30 rounds each, the mod counts them as 10 magazines with 30/10 = 3 rounds each, and obviously (and correctly) repacks them in one 30 round magazine and one 3 round magazine

I'm so confused as to what is causing this problem for you two. Haha.

Thanks for bringing it to my attention, though. And lemme know when that video is up.

EDIT: So I determined where the error would likely be and started trying to fix it even though it wasn't broken for me...and ended up breaking it for me. So I was able to reproduce your error after changing the code. And now I fixed it again, but...if the way it was before didn't work for you and it did for me...I dunno why this would work for you. I need to understand why it wasn't working for you...

Which version of ArmA 3 are you running?

Also edit:

  Kaelies said:
The update is great, this is the best magazine repacking I've ever seen for a game. However, would it be possible to make it more obvious which magazine is the "current" magazine in the list, for instance by surrounding its number in the hint list with some symbol? i.e. [15, 16, >12<, 5, 3]; It would make it more precise to skip magazines.

For the "current" magazine thing, the mod sorts the magazine array descendingly, so that particular mag array would be [16,15,12,5,3], the right-most magazine is always the one that is having bullets taken out of it and the left-most, non-full magazine is the one having the bullets placed in.

I will take a look at making it more obvious, though.

Edited by Outlawled

Share this post


Link to post
Share on other sites

Just to know, what was the error?

I'll make the video ASAP by the way!

Yay!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×