FANDOM


ChrisL created a hotkey that will switch goggles for an entire squad, but Headrock found that this hotkey doesn't always perform as he wanted it to perform. So he has fixed that hotkey, and added an alternate one which works much better.

History Edit

Automatic Goggle Swapping was introduced by ChrisL, and makes use of the SHIFT-N hotkey.

This feature is all about saving time and lots of clicking. Instead of having to go into the inventory of each merc, and swap their goggles manually, the hotkey allows us to switch ALL goggles at the same time.

In theory, this should help prepare the men for battle very quickly. If they all went into a night battle with Sun Goggles on, with the press of a key they are all wearing Night Vision Goggles and ready for battle!

The inverse should also hold true - if entering a day battle with nothing but Night Goggles on, with the press of a hotkey everyone is wearing Sun Goggles.

But I said "In Theory", because that's not always what happens.

So, where's the problem?Edit

The problem comes from the fact that the program doesn't care who's wearing what, not does it care what time of day it is.

For the most part this shouldn't matter. If all your men went into a night battle wearing Night Vision Goggles, and you press the key by mistake, they're all wearing Sun Goggles now. No big deal - press the button again, and they'll be back in Night Vision gear, no problem.

The real trouble begins when not all the mercs on your team are wearing the same kind of goggles to begin with!

In this case, the program goes merc-by-merc, changing his goggles to the OTHER type. If the merc is wearing Sun Goggles, he'll end up with Night Vision Goggles after the keypress. If he was wearing NVG's, he'll end up with Sun Goggles. Since not all men were wearing the same kind of Goggles to begin with, the end result is an inverse mix-up of goggles amongst your team, which is basically not much of an improvement!

The only solution in this case is to manually find the soldiers wearing the wrong set of goggles and make them switch by hand. That totally negates the whole point of having a HOTKEY to do the work for you.

If you're the kind of person who makes sure that his team always wears the same kind of goggles, and always sticks together, then you probably won't notice the problem at all. However, splitting up the team, or changing only one individual's goggles, should be a common occurence in this game. Therefore, the disparity between the Goggles your team-members are wearing should be fairly common as well. And in such cases, the basic 1.13 Goggle Swap is going to be largely useless.

Here is an animated demonstration of the problem:

BasicGoggleSwap


To rectify this, HAM introduces what is called a "uniform goggle swap". This new hotkey makes sure that at the end of the swapping process, everyone is wearing the same kind of goggles, even if it's the wrong kind! The focus is on uniformity.


New Hotkey: CTRL-SHIFT-N Edit

HAM adds a completely new hotkey to serve as a different method of swapping goggles automatically.

This new hotkey triggers what is called a "Uniform Goggle Swap".

It is called that, because at the end of the process, all of your mercs will be wearing the SAME KIND OF GOGGLES.

What, exactly, does this hotkey do?Edit

The program starts by looking at the first character in the active squad.

If he is wearing Sun Goggles, then they will be removed and replaced with Night Vision Goggles. Conversely, if he was wearing Night Vision Goggles, he'll switch to Sun Goggles. Simple so far.

Now comes the interesting part. After the first guy in the squad has made his switch, everyone else will switch their headgear to match him. Whatever he is wearing, everyone will be wearing, regardless of whether or not this is the correct set of goggles for the current ambient light conditions.

So you see, the important part is to get everyone to wear the same thing, regardless of what they had on before!

Wait, what happens if they switch to the wrong kind of gear?Edit

The beauty of a Uniform Swap lies in the fact that everyone ends up with the same kind of gear when it's over. If it's the WRONG kind of gear, however, all it takes is simply to run the swap again, by pressing CTRL+SHIFT+N.

When triggered again, the first squaddie will change his goggles to the CORRECT type, and everyone else will switch to match him. Voila, everyone is now wearing the correct goggles! And it took only two hotkey presses to make that happen.

Most importantly, there is no need to go into anyone's inventory and "correct" a bad swap. Unless special conditions are involved (where one or more mercs need to wear some other sort of headgear for some reason), you are guaranteed to have your men properly equipped within no more than two keypresses.

Here is a visual demonstration, in case you didn't get it:Edit

UniformGoggleSwap


What happens if someone doesn't have the proper goggles in his inventory?Edit

The HAM Uniform Goggle Swap is, as repeated above, focused on getting everyone to wear the SAME kind of goggles. Of course, in some cases, one of the squad-members might not have the goggles required to match the first guy in the group.

If this is the case, the merc in question will simply remove what he is wearing. If you can't match the first squaddie, then at least don't wear the OPPOSITE of what he's wearing, right?

For example, say your squad is switching to Night Vision. Merc #3 doesn't have any Night Vision gear on him, so at the very least he will remove Sun Goggles if he's wearing them, so we don't end up in a situation where he's the only idiot wearing Sun Goggles at night. That's exactly what the Uniform Swap is meant to avoid, after all.

SpaceViking's Smart Goggle Swap Edit

In addition to HAM's Uniform Swap, there is a third and even BETTER Goggle Swap method, which was created by SpaceViking at around the same time. This method is called a "Smart Goggle Swap".

SpaceViking's method dispenses with all the complex logic and does something very simple and sensical:

If it's night, everyone switches to Night Vision Goggles.

If it's day, everyone switches to Sun Goggles.

Don't have the right kind of goggles to switch to? Well, at least the program makes sure you aren't wearing the WRONG kind, by removing such goggles from your head.

No wonder it's called the "Smart" method!

Wait, isn't that better than that obscure HAM Goggle Swap?!Edit

Come to think of it, yes, it is. In the vast majority of cases, you are running an automated swap to quickly get your mercs wearing the right goggles and not the wrong ones, for the current ambient lighting conditions, in whcih case the Smart Goggle Swap does so with a single keypress. There are actually extremely few cases where the HAM Goggle Swap could be better suited.

The only problem? Unfortunately, very few people actually got to use the Smart Swap! That was due to a case of bad timing and unfortunate programming.

See, both the Smart Swap and the Uniform Swap were programmed almost simultaneously. In fact, SpaceViking's Smart Swap was merged into 1.13 just a few days before HAM 2.8 made it into the main code.

Unfortunately, during the HAM 2.8 merger, the Smart Swap was overwritten! All that remained of it was an INI setting... that controlled nothing.

Eventually, SpaceViking realized that his swap wasn't functioning the way it was supposed to (or rather, not at all), although it took a little while to figure out why.

Fortunately, SpaceViking's code was eventually added to HAM 3.5, in the hope to test out that the hybrid between the two systems works as intended. If everything goes smoothly (and so far it has), the Smart Swap will be back in JA2 1.13 very soon.

Have patience!

HAM Fix to SHIFT-N functionalityEdit

HAM also fixed a completely different issue in ChrisL's original 1.13 Goggle Swap. It had a small problem that needed to be addressed.

When SHIFT-N is pressed, the program wants to switch the currently-worn set of goggles with another set that is elsewhere in the inventory. If our merc is not wearing any goggles at the time, no problem! The program simply selects a pair of goggles from his inventory and places them in a headgear slot.

However, if the character is already wearing a pair of goggles, but no other pair is found elsewhere in the inventory, then NO SWITCH IS MADE. This character will keep wearing his current set of goggles no matter how many times you press SHIFT-N.

HAM fixes this issue: If SHIFT-N is pressed when a character is wearing goggles but has nothing to switch to, then those goggles will be REMOVED and placed in the inventory (usually, attached to the helmet).

A second press of SHIFT-N will return those goggles to the headgear slot.

This fix works in all three methods: The 1.13 Swap, the Uniform Swap, and the Smart Swap.

Goggle Swap for all mercs in the sector Edit

HAM 3.5 introduces yet another upgrade for the goggle swap system, with its own INI setting.

See, before HAM 3.5, pressing SHIFT-N or CTRL-SHIFT-N made the automatic swap for all character in the currently active squad. If more than one squad was present, it was necessary to press the hotkey, switch to the next squad, press the hotkey again, switch to the next squad, and so on.

When HAM's Sector Swap feature is activated however, SHIFT-N and CTRL-SHIFT-N will cause a goggle swap for ALL MERCS IN THE CURRENT SECTOR.

With the Uniform Swap and the Smart Swap, this pretty much ensures that all mercs in a battle will switch their gear to the correct type within no more than two keypresses. This saves a WHOLE lot of work, and makes sure that none of your men is wearing the wrong set of goggles.

INI Settings Edit

PLEASE NOTE: Uniform Goggle Swap and the fix for the regular SHIFT-N goggle swap do not have an INI setting. They are always enabled.


GOGGLE_SWAP_AFFECTS_ALL_MERCS_IN_SECTOR Edit

Effect

Controls whether a goggle-swap affects the current squad, or all mercs in this sector.

Range TRUE/FALSE
JA2 Default Value FALSE

When using SHIFT-N or CTRL-SHIFT-N to swap goggles, only mercs in the currently-selected squad are affected.

HAM Recommended Value TRUE When using SHIFT-N or CTRL-SHIFT-N to swap goggles, all mercs in the sector are affected.
Notes This setting is only available from HAM 3.5 onwards.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.