Gear Templates

This feature allows you to create a template from the gear the current merc has equipped. Such a template can than be loaded at anytime - the game will try to recreate the saved equipment template with items found in the sector inventory. Depending on how elaborate these templates are, this could save you quite a bit of time.


 * As seen in the above video, we can simply create a template that stores the current merc's inventory via a button in the strategic inventory.
 * Templates are stored in \Profiles\UserProfile_whatever folder according to your vfs\GearTemplate. They are stored as .txt files. I've added an advanced template to SVN, too.
 * Templates are savegame-independent. You can create or use them whenever you like. You can also share them with others. Perhaps you have neat equipment ideas others would benefit from?
 * When we load a template, roughly the following happens:
 * 1. We drop any existing item in our merc inventory that would block a template item for that slot if the item exists in the sector in the first place. If the item is in an LBE slot, we drop all items in the slots of that LBE too.
 * 2. For each template entry, if the corresponding slot is empty, we pick the best item (best is determined by item status) from the sector inventory. If that fails for ammo, we search for other items in the sector containing the same bullets and create mags from that. So equipping from crates is not a problem. We also add attachments to LBE items at this point.
 * 3. We loop over our inventory, and for every item (not just those from the template) we try to find a better version from the sector, and exchange the two (this is similar to the Update gear function). If this is a stack of kits or ammo, we merge them before that. If the stack is not full, we add more items from the sector. We also try to improve all attachments with better versions (status) from the sector.
 * 4. We try to add attachments from the sector in the order they appear in the template if the template item is the same as is currently equipped, or if the template item is 0. This effectively allows us to use a wildcard, more on that later.
 * 5. We reload any gun and fill up any magazine. If the ammo is specified in the template, we try to use that. If the ammo does not fit (e.g. due to mag size modifiers), we use a more fitting ammo item.
 * Even if the template is empty (the game will create a Update Gear template), the above functions still run. An empty template will still try to replace all items with better versions, refill kits and fill up mags. Which is already kinda useful.
 * Note that if searching for a better item, only the status of the item is taken into account. Temperature, dirt, jams, fingerprint IDs etc. are ignored.
 * Attachments that require skill checks (Rod&Spring, Barrel Extender...) are not attached by this. Otherwise the current merc, who might be a klutz, might accidentally ruin your gun. You have to do those attachments yourself.
 * Note that no attachments are removed from items you drop. I advise using the sector inventory buttons to remove attachments prior to starting the process.
 * There is no limit on how many templates you can have. As you will be the one using it, having a thousand will only hurt yourself.
 * You can comment inside templates by starting a line with # or /.
 * As the buttons won't exist in 640x480 due to no space being left, this feature won't be there in that resolution.

Advanced
The first step in setting up a template is to equip a merc with the gear you want, and then save that. But by editing these template, you can create pretty neat (at least in my view) templates to further speed up the equipment process.

First, remember that if templates include attachments, the game will try to find and attach all those attachments in that order. So the entry 5 12 94 1007 1030 1029 means the following: ''In our hands (slot 5) equip an M4 (item 12) and load it with a 30-rnd 5.56 AP mag (item 94). Try to attach 7x scope (item 1007), if that fails, a 4x scope (item 1030), if that fails a 2x scope (item 1029).''

This means that we effectively provide alternatives for the game - if one attachment cannot be found, equip the next best one - according to what data we provided.

It doesn't stop there. By removing the explicit requirement of the item being a M4 and replacing it with 0, we get this: 5 0 0 1007 1030 1029 This will cause the game to try the above-explained scope attachment list on any item in our hand. We can of course extend that - 5 0 0 208 1000 1007 999 1030 1029 209 947 1011 902 1001 1006 1003 1012 950 1005 241 1525 307 322 would try to outfit any gun with a number of attachments (as seen in the video). Provided you enter all attachments according to your liking, you can shorten the entire process of attaching things to a few templates. In some instances these might vary - you would want scopes with less magnification on CQB, or prioritize suppressors in a 'stealth template' only. It's up to you.

The same goes for armour - 1 0 0 183 837 attaches plates to any worn armour.

Templates can of course be combined - in the video, I applied a 'Set - Standard gear' and then applied small changes for doctors, repair guys or radio operators.

You can even move the gun selection to this, as also seen in the video: 5 1066 5 347 5 12 5 13 5 14 This provides several guns for the main hand, we pick the best item of the highest entry.

Meanwhile, you can also force the use of a certain ammotype, even if the gun (and thus the caliber) won't be fixed: 5 0 1400 This forces any gun kept in our hands to try to use item 1400 (9x19mm Box, Ball rounds). If that isn't possible, due to wrong calibre or magsize, we try to equip a better fitting one. So you can now force any gun you use to use mags of a specified calibre.

The main drawback to remember for this is that what is 'best' is only determined via status. If there is an item 1066 with 1% status, we will always pick up that before we try pick up a 100% 347. That's just the way it is. Any attempt to create a function to determine which gun with which attachments will be better than another gun seems like a surefire way to needless debate, so we're not having that.

Example Template
0 182 0 181 0 180 0 825 0 813 0 801 0 834 0 822 0 810 0 179 0 178 0 177 0 302 0 176 1 827 1 815 1 803 1 836 1 824 1 812 1 283 1 166 1 165 1 164 1 191 1 190 1 189 1 161 1 284 1 0 0 183 837 2 838 3 210 4 212  5 0 0 208 1000 1007 999 1030 1029 209 947 1011 902 1001 1006 1003 1012 950 1005 241 1525 307 322 7 1089  8 1082  10 1098 13 37  21 213  22 1 73 22 2 73 22 6 0 22 0 0 1005 241 25 201  26 151  27 151  27 133  27 132  28 131  29 134  29 135   # cleaning kit 30 1576 44 214  44 1570  44 255  44 245  44 256
 * 1) Any line beginning with '#' or '/' is treated as a comment
 * 2) 1st number stands for the inventory slot
 * 3) 2nd number is for the item that should be equipped. If 0 is used, any attachments following will be tried to be attached to an item in that slot
 * 4) 3rd number is for
 * 1) This template combines several sub-templates
 * 2) This will equip a merc with what I deem to be 'standard gear'
 * 3) We do not select a main gun here, but will add attachments to it if we have one in place
 * 1) helmets
 * 1) vests
 * 1) vest plate inserts
 * 1) legs
 * 1) face items
 * 1) attach various attachments on any gun in our hands
 * 1) LBE
 * 1) Insert list of knives here.
 * 1) sidearm. This obviously could be a very long list
 * 1) This forces any sidearm to get a laser sight
 * 1) medkit
 * 1) Smoke grenade, important for cover. We might want to smoke our own team, so this one better not be dangerous
 * 1) if possible, use a 2nd smoke grenade. If that ain't possible, use something with more pep.
 * 1) vacuum grenades
 * 1) Hand grenades. I prefer minigrenades, as they have slightly better range. If those aren't there, use standard hand grenades.
 * 1) Water is important to replenish breath. If canteen isn't possible, we might try alcohol