While equipping your mercs, using said equipment to murder people and then using that newly gained loot to further improve our equipment is fun, it can also become tedious. Especially with teams of a larger size, making sure everybody has what they need can take some time, especially after combat.
Armour might be damaged and needs replacement. Medkits are low. Grenades and ammo has been used. You get the idea.
To make that easier, smeagol and DepressivesBrot enthusiastically promoted an idea for several years I just as enthusiastically denied. But you know the saying: when in Bremen, do as the smeagol says. Unless his wife says otherwise . But she didn't, so after this years con, we're here.
Anyway, 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.
A small demonstration:
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 /.
For some tricks with templates, see the next post.
As the buttons won't exist in 640x480 due to no space being left, this feature won't be there in that resolution.
This feature is savegame compatible.
This has been added to the trunk in r8440 & GameDir r2384. The GameDir data is required. Using the new exe without the new GameDir will set in motion an unlikely chain events, ultimately leading to a horrifying (yet undeniably entertaining) autumn of 2022 for the residents of Osaka.
[Updated on: Mon, 07 August 2017 02:07]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
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.
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 -
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.
This is my current, not-at-all-finished Set - Standard Gear:
# Any line beginning with '#' or '/' is treated as a comment
# 1st number stands for the inventory slot
# 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
# 3rd number is for
# This template combines several sub-templates
# This will equip a merc with what I deem to be 'standard gear'
# We do not select a main gun here, but will add attachments to it if we have one in place
# helmets
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
# vests
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
# vest plate inserts
1 0 0 183 837
# legs
2 838
# face items
3 210
4 212
# attach various attachments on any gun in our hands
5 0 0 208 1000 1007 999 1030 1029 209 947 1011 902 1001 1006 1003 1012 950 1005 241 1525 307 322
# LBE
7 1089
8 1082
10 1098
# Insert list of knives here.
13 37
21 213
# sidearm. This obviously could be a very long list
22 1 73
22 2 73
22 6 0
# This forces any sidearm to get a laser sight
22 0 0 1005 241
# medkit
25 201
# Smoke grenade, important for cover. We might want to smoke our own team, so this one better not be dangerous
26 151
# if possible, use a 2nd smoke grenade. If that ain't possible, use something with more pep.
27 151
27 133
27 132
# vacuum grenades
28 131
# Hand grenades. I prefer minigrenades, as they have slightly better range. If those aren't there, use standard hand grenades.
29 134
29 135
# cleaning kit
30 1576
# Water is important to replenish breath. If canteen isn't possible, we might try alcohol
44 214
44 1570
44 255
44 245
44 256
Anyway, go nuts with this, people.
[Updated on: Sat, 12 August 2017 15:51]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
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.
To make that easier, smeagol and DepressivesBrot enthusiastically promoted an idea for several years I just as enthusiastically denied. But you know the saying: when in Bremen, do as the smeagol says. Unless his wife says otherwise . But she didn't, so after this years con, we're here.
That's exactly what happened. Nice to see you expanded on the basic idea.
All items use classes which then have additional classes and properties. There is no simple list. For example armour has an item class of 2048 in Items.xml. It also has a class index which refers to the uiIndex in Armours.xml which then refers to an armour class (0=helmet, 1=vest, 2=leggings, 3=plates).
This feature is savegame compatible.
This has been added to the trunk in r8440 & GameDir r2384. The GameDir data is required. Using the new exe without the new GameDir will set in motion an unlikely chain events, ultimately leading to a horrifying (yet undeniably entertaining) autumn of 2022 for the residents of Osaka.
Newbie Question - Where can I download the "trunk in r8440 & GameDir r2384" ?
Thank you for the very cool features you add all the time!
currently using 8507~8508 (the changelog txt said 8508,but loading screen said 8507??!?)
Frist ,thank you for the gear templates it save me countless hour resupply my guys
I got a bit of bug thing on the new template function,it could also be not a bug just i do't know how to us it correctly
first i post one of the gear template i got problem on
the above set mp5 using C-mag but I want to carry some AP round. the problem slot is # 44 which is a 9 mm SMG ammo AP cold,i cannot make it 2 stack when the LBE pocket is a 2 mag SMG .If the sector invt had the 30 round ammo the template work perfectly fine ,it will fill the # 44 with 2 SMG mag,if there only ammo cache on map it will only fill 1 SMG mag.
maybe I doing something wrong here?because I read the top ,it said the template work on ammo cache .however the I know the forum have many modding term so I maybe getting the wrong idea >..<
the molle slot at #16 is an 3.11 ammo belt I would like to fill it with 8 x 7.62 mag,same problem only fill 1 mags.
another problem is #18 is a sleep bag ,it will always fill 2 sleeping bag which actually a bit useless weight.
the same problem happen on repair box and other big item that not need to carry two max ,is there anyway to reduce so I could save some weight?
there also a bit of small annoying bug happen if you have a lot of molle LBE template and switch around template ,the process sometime fail to clear the molle LBE item first and try to install the new template ,resulting combined molle LBE layout.If the sector having insufficient extra molle this problem happen more often.
I cannot reproduce this bug too often.
Another lesser problem was the helmet which allow sun-glass and NVG inside my normal setup was slot #3 Ear and #4 NVG/sun-glass,#0 helmet sun-glass/NVG
there some change that the game will put both sun-glass and NVG inside a helmet and another nvg/sun-glass at slot #4.in the end i will carry 1 extra sun-glass most game,a bit annoying ,not very heavy tho.
this bug also happen sometime, I try to reproduce it more often and report again
In addition to above report I would like to have some suggestion to this great feature.(One again thx for this new feature saving me a lot of time)
I would like a hotkey or some way to drop all item and all LBE attachment on a mercs,Sometime I was trying to rearrange thing...the bet way is to clear all LBE ITEM and all small small into sector ,the sector invt hotkey only remove all gun ammo and attachment.to remove some LBE attachment I have to click on each of them and drag every 3.11 molle out /ctrl click,anyway a painful job when I did something wrong and want to redo.
A simply way to clear 1 LBE item will be great like ctrl + ALT +shift and right click on a LBE >drop and remove all molle on that item
maybe there some hotkey for that,I still new to this 1.13 mode i might mistake missing it somewhere.
another feature I would like to add is a message to warn player the gear template cannot complete fully
for example if your templates have a Rod & spring inside a gun,the game will not auto merge item for you coz there change to fail.It would be nice to give a small message at bottom text box tell us something like that cannot be done
some gun require EBR(m-14 ,m21) ability to change barrel (SCAR-L,H) would also benefit from a little message as a reminder.
some message like (templates name XYZ SCAR-H WP soldiers ,the weapon slot request an weapons SCAR-H WP plz manually combine the item and try again)
my first post if there any problem break forum rule plz let me know hahaha
pardon me for poor English
Great to see someone using this. The version number is only updates sporadically, trust whatever the SCI says.
As to your ammo problem, there is indeed a problem when feeding purely from crates it seems. I've fixed this in r8518, so this will in the next SCI.
The code always tries to fill up any slots as much as possible, which is the reason you get 2 sleeping bags. I see no easy workaround - how would the game know that sometimes you only want 1 item. The exact number could be written into the template, but then the thing gets way more complicated, with the player essentially having to create the template with the exact number of items they want, which gets muddled if one uses templates with different items with different item sizes and so on... I'd rather not alter that. If it is that bothersome, you could alter how many sleeping bags can be stacked in that LBE slot for example.
Sunglasses and NVG are a problem insofar as they are can be worn in a slot and as an attachment otherwise. It's obvious you only need one of each, but that would require me telling the code basically 'if A already exists somewhere else, don't create another A'. Which can be done, but would, again, make the entire template much more complicated to create and edit (as modders can put the tags that define sunglasses/NVG in other places, it isn't safe to always assume there will only be one required).
This button removes all attachments, including those on LBE, so no new hotkeys needed.
I had messages when an attachment could not be added, or no item was found etc., but on bigger templates that quickly turned into spam, so I turned that off.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
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.
...
another feature I would like to add is a message to warn player the gear template cannot complete fully
for example if your templates have a Rod & spring inside a gun,the game will not auto merge item for you coz there change to fail.It would be nice to give a small message at bottom text box tell us something like that cannot be done
some gun require EBR(m-14 ,m21) ability to change barrel (SCAR-L,H) would also benefit from a little message as a reminder.
some message like (templates name XYZ SCAR-H WP soldiers ,the weapon slot request an weapons SCAR-H WP plz manually combine the item and try again)
...
I've thought about this a bit... as of r8522, you will get a warning along the lines of We cannot attach XXX (item XXX_Nr) as that might damage items.. You will only receive one warning though, in order not to spam the player to death.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
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.