FAQ  •  Register  •  Login

ISBoxer 35: Understanding Mapped Key virtualization

Moderator: MiRai

<<

lax

User avatar

Site Admin

Posts: 7301

Joined: Tue Nov 17, 2009 9:32 pm

Post Fri Feb 26, 2010 8:03 pm

ISBoxer 35: Understanding Mapped Key virtualization

The current ISBoxer 35 preview build (come to the ISBoxer Chat Room for a download or more information) introduces a feature referred to as Mapped Key virtualization. Similar to how Virtual Files work -- the game wants one file but is directed to another -- this feature will let you refer to one Mapped Key (with a Click Bar or Do Mapped Key Action) but have it directed to another.

This feature is relatively advanced, and so the following reading assumes you have an understanding of Mapped Keys and is not intended to be a step-by-step tutorial for a new user to set this up (but could easily be used by an experienced user).

Use Case 1
I am currently playing a team of multiple classes. I've chosen to dedicate a Key Map per class, and inside that Key Map is a Mapped Key for each of the combat spells or macros (/castsequence etc). So, say I want to make a round-robin spell interrupt key. I would previously do this on a per-team basis and just have 5 steps that do a specific spell on each guy when it's their turn -- e.g. Hammer of Justice for paladins, Earth Shock or Wind Shear for shamans, and so on. But now I have a lot of teams and I'm finding myself recreating basically the same thing tailored for each team.

With virtual Mapped Keys, however, I don't need to know who is in which slot or what class they are or even what spell they need to cast, in order to have this. So I can make ONE round-robin spell interrupt key that works for all teams, even if I'm mixing and matching from my other teams.

So it goes something like this. I can define a Key Map that contains Mapped Keys that don't really need to do anything. The mappings will have names like "Instant Interrupt" -- totally generic. They don't even need Hotkeys, because I intend only for these to be used via Do Mapped Key Action (or maybe Click Bars). Instead, I have a Mapped Key called "RR Instant Interrupt" for example, in a Key Map I can assign to every single Character Set I have. It would have one Step for each Slot in my Character Sets -- I play 5. Here's what the Steps would look like:
Step 1: Do Mapped Key Action. Target = Slot 1 (NOT a specific character). Mapped Key = Instant Interrupt
Step 2: Do Mapped Key Action. Target = Slot 2 (NOT a specific character). Mapped Key = Instant Interrupt
Step 3: Do Mapped Key Action. Target = Slot 3 (NOT a specific character). Mapped Key = Instant Interrupt
Step 4: Do Mapped Key Action. Target = Slot 4 (NOT a specific character). Mapped Key = Instant Interrupt
Step 5: Do Mapped Key Action. Target = Slot 5 (NOT a specific character). Mapped Key = Instant Interrupt

Notice the only difference is that it's sending Instant Interrupt to a different slot. Here's where the magic happens.

For each of my Characters, I would set up a Virtual Mapped Key, such that "Instant Interrupt" would map to a mapped key specifically for Hammer of Justice if the character was a paladin, Earth Shock or Wind Shear if it's a shaman, and so on. (There's nothing more to it, you go into the Character, click on Virtual Mapped Keys, drag in the original, drag in the new one, and then it reads as "Instant Interrupt" is now "Hammer of Justice", for the paladins)

Use Case 2
"FTL" is essentially a specific implementation of Virtual Mapped Keys. Depending on which guy you are controlling at the time, a "follow" or "assist" key gets translated into a different key combination in order to tell the game to follow or assist someone different. With World of Warcraft, one macro as defined in the game can interpret the different key combinations and follow or assist the right person. That doesn't hold true for any other game at the moment that I'm aware of. However, the concept applies to any game that will allow you to create enough specific macros to follow or assist each individual character (preferrably, for you, without having to switch between banks of hotkeys).

You want one assist key that you push to make your guys target the same thing you are, regardless of which window you're in. That's the whole basis for the FTL concept; Building auto-assist into the keys you push to perform abilities is secondary but also useful if you don't want to manually assist (I manually assist, personally).

So here's how it can work in another way. This is a little more involved than the first example. Here's the idea ...
You need one Mapped Key per Character, to assist that particular Character. One for /assist Joe, one for /assist Bob, and so on. They each, necessarily, send a different Key Combination. Then the trick is to virtualize an Assist key, such that the Character-specific Mapped Key for your active window is the one that is executed. To do so, use a Mapped Key Virtualization Action, which can set virtualization dynamically while playing, in a Mapped Key configured to execute when you switch windows (selected per Slot in your Character Set). For bonus nerd points, that Mapped Key can be virtualized too.

So you switch windows, and a Mapped Key Virtualization Action sends an instruction to all to indicate that, for example, "Assist Me" is now "Assist Joe". Any Mapped Key that sends "Assist Me" will get interpreted by each of the targets as "Assist Joe" instead. Win!
<<

creo

ISBoxer Expert

Posts: 33

Joined: Mon Nov 30, 2009 2:14 pm

Post Sun Feb 28, 2010 6:17 pm

Re: ISBoxer 35: Understanding Mapped Key virtualization

So,

I am liking the Virtual Key concept. I see a great potential to allow for more elegant solutions to otherwise tricky (if not "virtually" impossible... pardon the pun :? ) implementations. The ability to virtualize at the char level along with general virtualization at the keymap level allows for a great deal of flexibility.

I am going to elaborate on a method to extend things to the char set level to provide 2 tiered virtualization which is required in order to facilitate a flexible assist / follow functionality in LOTRO. Implementing the second use case for LOTRO would be very difficult without virtualization since it has a very limited functionality in that regard and needs a lot of help to make things work correctly. So given the following set of characters:

Moe
Larry
Curly
Joe
Shemp

And the following char sets:

Set1 - Moe, Larry, Curly
Set2 - Curly, Shemp, Joe

Perform the follow setup operations in ISBoxer:

    1) Create a generic "Select Me" mapped key in one of your current keymaps. I have a "Base" keymap that I used. Since this mapped key will server as a place holder to be virtualized, the actions it performs are not important, but it should have some action to avoid its being filtered out as an empty keymap by IS.

    2) Create a base "Select / Focus" mapped key that gets executed by "self" when the "Select / Focus" hotkey (I use a logitech G5 mouse and have mouse5 assigned to this task) is pressed. I use a 2 step mapped key here which performs an action on "press OR release".
    a) On step 1 (the press) I send "F1" or "select self" to all other (exclude current). This step is important to avoid selecting a pet or a soldier (skirmish) when trying to select a player.
    b) On step 2 (the release) you have a "do mapped key" that executes the generic "Select Me" mapped key created in step 1 above.

    3) Create a new keymap to hold your character specific virtual keys (you can use an existing keymap, but I created a new one to keep them separate).

    4) In the new keymap, create mapped keys for each character to be included as follows (these will be virtualized as well, so their action can be something simple):
    a) "Select Moe"
    b) "Select Larry"
    c) "Select Curly"
    d) "Select Shemp"
    e) "Select Joe"

    5) For each character that you want to include in the process, add a virtual mapped key (in the character definition) that replaces the generic "Select Me" mapped key created in step 1 above with a character specific "Select xxx" mapped key (example: "Select Moe") created in step 4.

    6) Create a "Select xxx" (where "xxx" is a character name i.e. "Moe") mapped key in a character set specific keymap for each character in the character set. Do not confuse this mapped key with the ones created in step 4 above even though the names used here are the same format. This mapped key will send the appropriate F key to each fellowship member to select the current active character, whereas the ones in step 4 above are never executed, but instead are replaced by a mapped key specific to the character set. For Set2 above assuming that the fellowship is formed in the order listed and that Shemp is the current active window:
    a) "F2" will be sent to Curly
    b) "F3" will be sent to Joe
    c) Nothing is sent to Shemp so that his target is not lost

    7) Create a mapped key that will set the virtualized "Select xxx" to a character set specific mapped key. I created a keymap that was specifically for a character set and assigned it to my character set. This mapped key can be a single step where you add one action for each character in the character set:
    a) Under "Key Map Action" select "New Mapped Key Virtualization Action"
    b) Set the target to "all"
    c) Set the "When performing this Mapped Key" to the mapped key created in step 4 above.
    d) Choose the "Do this Mapped Key instead" option and set it to the mapped key created in step 6

    8) Create a mapped key that will get executed the first time you activate the main game instance (i.e. when you switch to that window the first time only). You can create this mapped key in any of your keymaps that are active for your character set.
    a) Set the mapped key to perform an action on "press OR release"
    b) Create 2 steps in the mapped key
    c) In step 1 display some popup text indicating that the init is being performed
    d) In step 1 Perform a "do mapped key" action where you execute the mapped key created in step 7
    e) In step 2 add a "Key Map Actions" of "New Mapped Key State Action" with target set to "all" and turn off this mapped key that was just created. (NOTE: This will prevent the mapped key from executing again unless a reload is performed)

    9) In the character set that has your main / primary character (the one that will be the fellowship leader):
    a) Select that slot (slot 1 in my char set) and check the "When I switch to this character" option.
    b) Select the "Do this Mapped Key" option and select the initialize mapped key created in the previous step

Now, if you did all the steps correctly (and I did not accidentally leave out some key piece or otherwise make an error in my description :oops: ), you should be able to select any of your game windows and hit your "Focus" hotkey and all the members should select the current active character. If you then hit your "Follow" hotkey, they should follow that character...

I should also point out that it will be important to get the targets correct for each mapped key in the chain from the time you press the "focus" hotkey until the final execution of the mapped key that actually sends the F keys to the individual characters. Keeping it straight in your mind what is being done on the current active character versus what is being done by each other character.

I just finished implementing this for a 5 character fellowship and it is working very well. It may seem very complicated (particularly given the way I described it :shock: ), but once you get things working it will not seem so bad. The long term flexibility is great though because all you have to do is setup your char set specific mapped keys and you are ready to go, without having to go and change any existing stuff (unless you change the members of your char set of course... :D )...

Hope this is not too hard to follow. There may very well be a more simple (and by definition elegant) way to implement the same thing. I would welcome suggestions and improvements...

Cheers,

creo

**NOTE: I have added an attachment that is a simple ISBoxer configuration to illustrate the pieces needed to make this work. This example has been updated to use a new feature (virtualized keys at the character set level) which Lax implemented after I wrote up the original post. This eliminates the need to perform the initialization step for the character set and is a much cleaner implementation.

Additionally, to eliminate some confusion caused by my choice of character names, I have used the more generic names of number1 through number5 in this sample setup. I have not actually tested this, so I may have left something out, but it was actually derived my my personal working configuration, so it should be close.

Creo
Attachments
LOTRO_VK_Sample.xml
(70.91 KiB) Downloaded 962 times
<<

creo

ISBoxer Expert

Posts: 33

Joined: Mon Nov 30, 2009 2:14 pm

Post Sun Mar 14, 2010 6:22 pm

Re: ISBoxer 35: Understanding Mapped Key virtualization

Added a sample configuration to the previous post, for those that would like to see how things are implemented.

Cheers,

creo
<<

ShadowKntSDS

Posts: 39

Joined: Tue Sep 28, 2010 2:19 pm

Post Wed Sep 29, 2010 12:17 pm

Re: ISBoxer 35: Understanding Mapped Key virtualization

Thanks to lax and creo for providing and explaining this feature. I went ahead and implemented the method creo described, and I used it as a self driven tutorial of sorts. Most of the description makes 100% more sense when you have iSBoxer in front of you and you are actually doing the steps. I understand the implementation of mapped keys way better now =).

I did have some questions and comments:

It is still not clear to me how the virtual mapped keys in the character definition in step 5 are applied. Is it applied when that character is active? Any time the character is loaded? After I had every thing set up, it appeared as though it was either taking a random one on every key press, or it was cycling through all of them in the character set. I resolved this by using the "When I switch to this character" option for each slot. The one for slot 3 for example, virtualizes "Select Me" with "Select Curly" for your 1st char set above. Since the slots are assigned the character set, and not the character, I think this allows you to remove a layer of virtualization. The slot 3 swap switch in "Set 1" can directly map to "Set 1":"Select Curly" instead of having to go through "Select":"Select Curly" -> "Set 1":"Select Curly" ("Select" was the name of my keymap for all the items made in step 4).

I did not try to remove this layer, but instead had fun playing the game for a bit. I was able to lead/assist/follow with any of the characters in my party.


For Lotro in particular, the group ordering is a mess after the first 3 characters. Provided the same invite order, all characters see themselves as F1, the leader as F2, newly invited characters added at the end, and everyone in a seemingly non-nonsensical order. From my experience last evening, it appeared as though the ordering for the characters in the fellowship that are already there when you join (excluding self and the leader) is reverse order compared to the order that leader sees. I tried this many times with a party of 5 last night, with the same results:

from char4's perspective:
f1 - char4 (self)
f2 - char1 (leader)
f3 - char3 <-- ( f3 and f4 are reversed from )
f4 - char2 <-- ( what the leader sees )
f5 - char5 (added after char4 joined, thus in the correct spot)

from char4's perspective:
f1 - char5 (self)
f2 - char1 (leader)
f3 - char4 <-- ( These 3 are reverse )
f4 - char3 <-- ( from what the )
f5 - char2 <-- ( leader sees )


Anyway, I adjusted my maps and was able to get the desired results. I noticed you had a setup posted here, but did not get a chance to take a look at it yet. Anyway, thanks to both of you for the work!

Return to Key Maps

Who is online

Users browsing this forum: No registered users and 0 guests