Author: Outlawled
Author Website:

Requirements: Community Base addons A3

Version: 3.1.3
Signed: Yes, serverkey included

Short description: This mod takes all the bullets from each magazine in the player's inventory and repacks them into the fewest magazines possible.

Date: 2015-08-31 15:34
Submitted by: Outlawled


Comments: (16)
Rating:



 



Mag Repack

by
Outlawled


Description:
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.

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

It comes in both an addon as well as a script version!


Installation:
Addon version:
Extract into the ArmA 3 Directory, by default this is located in:
32-Bit - C:/Program Files/Steam/Steamapps/Common/ArmA 3/
64-Bit - C:/Program Files (x86)/Steam/Steamapps/Common/ArmA 3/
After extraction it should look like this:
Steam/Steamapps/Common/ArmA 3/@your_mod_folder_name

You can also use the "Arma 3 Alpha" folder in your "My Documents" folder. Your folder setup could than look like for example this:
mydocuments\Arma3 Alpha\@your_mod_folder_name\
mydocuments\Arma3 Alpha\@your_mod_folder_name\
mydocuments\Arma3 Alpha\@your_mod_folder_name\

You'll also need to add a Launch Parameter to Steam, in order to do so right-click on ArmA 3 Alpha and click Properties and then Set Launch Options. In the window that opens enter in -mod=@your_mod_folder_name
For using multiple mods you would then do so like this:
-mod=@mod_name;@mod_name2;@mod_name3;@mod_name4;@mod_name5

Note:
You can also use -nosplash to get rid of the splash art and intro videos.


And of course you can also enable and disable community made addons and mods through the in-game Options Expansions menu if you do not want to mess with startup parameters!

When the above information still does not provide you with enough to learn how to install custom addons and mods you can always ask in our Guide On Installing Mods.

Script version:
Place the "outlw_magRepack" folder into your mission folder.
Add the following to your init.sqf:
[] execVM "outlw_magRepack\MagRepack_init.sqf";
Add the following to your description.ext:
#include "outlw_magRepack\MagRepack_config.cpp"


Included files:
outlw_magRepack.pbo


Usage:
- 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.
- Because of the new keybinding system in v3.1.0, everyone's keybinding has been reset to the default.


Media:



Future plans:
- 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).


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.


Changelog:
v3.1.3
- Signed the addon version PBO with new outlw.bikey file (make sure to delete old outlw.bikey files if you still have them).

v3.1.2 (thanks to GiPPO)
- Fixed: GUI bugs caused by the latest ArmA 3 update.
- Fixed: Not all belt magazines were recognized as belt magazines (anything with 100 or more bullets will count as a belt now).
- Fixed: Tracer ammo and non-tracer ammo were able to be mixed together.

v3.1.1
- Fixed: RPT error.

v3.1.0
- Fixed: Error dialogs popping up about the scrollbars.
- Removed: Mag Repack logo from the bottom left of the main dialog.
- Overhauled keybinding system. It now allows just one key and any combination of Shift, Ctrl, and Alt modifiers. For example: "Ctrl+R", "Alt+J", "Shift+Ctrl+N", "Shift+Alt+Ctrl+Space", etc.
- Redesigned Keybinding dialog based on the new keybinding system.
- Magazine type (i.e. whether the magazine is a belt magazine or a regular magazine) is determined by the magazine's "nameSound" config entry instead of just being based on the magazine's capacity.
- Rewrote 40mm grenade conversion system so it no longer uses a predefined list.

v3.0.2
- Fixed: Updated UI classnames to be unique so as to avoid possible conflicts.
- Fixed: An issue with the keybinding not being recognized if another key wasn't pressed between keybinding presses.
- Changed "MagRepack_config.cpp" file extension to ".hpp".

v3.0.1
- New: Pressing the keybinding while the dialog is open will now close the dialog.
- Back-end optimizations.
- Adjusted size of the Mag Repack logo to be slightly smaller.
- Fixed: Now uses the keyName command to get the Strings associated with each keyboard key instead of having them hardcoded like an idiot.
- New: Can now change the bullet and belt repack times via outlw_MR_bulletTime and outlw_MR_beltTime variables (script version).
- All default repack times slightly increased.
- Fixed: Changed script version init file name to "MagRepack_init_sv.sqf" to avoid conflict when user has the addon version installed while playing on a server running the script version.

v3.0.0
- Removed: Everything.
- New: Added a GUI.
- New: Players may now repack bullets from different types of magazines as long as both magazines use the same ammo.
- New: Players may now convert 1rnd 40mm magazines into 3rnd 40mm magazines and vice versa.
- New: Players may now change their keybinding.
- New: Optional debug info.
- Fixed: Added animations for prone, launchers, and no weapon.

v2.1.3
- Fixed: Now uses CBA's Extended Pre-Init EventHandlers instead of the Post-Init ones which were broken with the ArmA 3 Beta update.

v2.1.2
- Fixed: Uses "hintSilent" instead of "hint" for most cases.
- Fixed: The sorting function is now a proper function available in the player's function library.

v2.1.1
- Fixed: Now works with latest ArmA 3 Alpha Development Build.

v2.1
- Fixed: Changed global variable "plzSort" to "outlw_FNC_QuickSort" to be less likely to cause mod incompatibilty.

v2.0
- New: Animation changed to 'Gear' animation.
- New: Magazine types are now repacked one by one.
- New: How long it takes to repack each magazine type depends on how many bullets of that magazine type need to be repacked.
- New: A magazine type can be skipped by pressing the 'Space' key.
- New: Repack can be exited by moving (if player is inside a vehicle, getting out will exit, pressing movement keys will do nothing).
- Fixed: Player can no longer repack magazines while in the driver, gunner, or commander seat of a vehicle.
- New: Informational hint after repacking now displays each individual magazine ammo count from before and after the repack. E.G. [15,16,12,5,3] >> [20,20,11]
- New: While repacking, a hint displays which magazine type is being repacked and the current ammo counts of each individual magazine of the current magazine type.
- Fixed: Vaulting and reloading are now disabled during repack.

v1.3
- Added more descriptive hints when the repack fails


Forum topic:
- BI forums



- Community Base addons A3 (only for the addon version)




Enable javascript to be able to download from Armaholic please!



Tags: Repack,   Ammo,   Magazines