-
Keeper of the Zoo
It's actually not as complex as people make it out to be, but that's okay. You really just need to understand what Do Mapped Key Action actually DOES (and this is exactly the same regarding the Targets used by buttons on a Click Bar), which is the problem for most people. From your post it sounds like you've figured it out.
I'm going to go into a whole lot of detail with various scenarios so I can come back to this post later for a user manual/wiki article, future posts with the same question, etc. I was originally going to say something about your wall of text that was hard to follow, but I'm dwarfing it 
Think of it like this.
Say you have a Keystroke Action. A Keystroke Action passes a keystroke directly to the game in whichever Target windows, for the game to interpret. You get that, I get that, simple right? So sending "1" to the second window will just press "1" in that window, as if you were playing that window without ISBoxer. Or in the case of the auto-generated FTL DPS Keys, you hit 1, and the other windows assist and press 1.
Well, say you're in window 2, and you want that to happen as if you're in window 1 instead -- meaning that everyone auto-assists the guy in window 1, and presses 1. To activate that Hotkey in window 1, you can't just use a Keystroke Action to send 1 to window 1, because as we already know, that would just push 1 in the game in that window and nothing else. Instead, you would use a Do Mapped Key Action, set to do "DPS 1" in window 1.
It's the exact same thing as a Keystroke Action, except ISBoxer is accepting it instead of WoW (and instead of the Hotkey, you're referencing the Mapped Key by name). The Mapped Key is going to fire exactly as if you pressed its Hotkey, in *each of the Target windows*. It quite literally just sends a message to each of the Target windows, saying Fire this Mapped Key as if I hit its Hotkey! p.s. this is in fact documented: http://isboxer.com/wiki/Do_Mapped_Key_Action; granted it could be linked from the Do Mapped Key Action editing pane. (Related notes: any given window may prevent the Mapped Key from being processed, by not having that Mapped Key loaded; any given window may also change the Mapped Key that is executed, by virtualizing the Mapped Key used by the Do Mapped Key Action.)
In terms of math:
The Target from your Do Mapped Key Action is therefore effectively multiplied by the Targets used in the Mapped Key it's "do"ing -- by virtue of "exactly as if you pressed its Hotkey in each Target window" as described above. There is no special Target handling for any particular Action, all Targets work exactly the same and are always respected.
- "Current window" always means whichever window activated the Mapped Key. (Regardless of whether it came from you pressing the Hotkey in this window, or a Do Mapped Key Action, or a Click Bar Button)
- "Other" always means any window that did NOT activate the Mapped Key. (the exact opposite of Current window)
You can fairly easily tell how many windows are going to receive any given Action. I'll start with one Action, say a Keystroke Action. There is no fancy multiplication when solving for one action.
Where N is the number of windows:
- Window:Current aka "self" = 1
- Window:All w/ Current aka "all"= N
- Window:All w/o Current aka "all other" = (N-1)
- A slot, eg. Slot 1, or a Character by name = 1
- Group(all of) = size(Group)
- Group(others in) = size(Group)-1 if "current window" is in the group, otherwise size(Group)
Now let's multiply! On the left side of the multiply sign is the Target of a Do Mapped Key Action, and on the right side is the Target of a Keystroke Action within the Mapped Key it's "do"ing. And on the right side, the number of Keystrokes sent. I'll start by using the SAME Target in both the Do Mapped Key Action, and the Keystroke Action.
- Window:Current * Window:Current = 1*1 = 1
- All * All = N*N
- All other * All other = (N-1)*(N-1)
- Slot 1 * Slot 1 = 1*1 = 1
- Group(all of)*Group(all of) = size(Group)*size(Group)
- Group(others in)*Group(others in) = (size(Group)-1) * (size(Group)-1)
This is the most common mistake, because people think that the Do Mapped Key Action is going to do the Mapped Key in the current window and mutate the targets of the actions. In some cases that behavior is desirable and I should certainly make it possible in Joe Multiboxer -- this would make it so All * All = N instead of All * All = N*N. However, Do Mapped Key Action is about as simple as can be, and mutating the targets in the actions in ISBoxer would require a huge rewrite (which JMB already is) and it'd probably end up breaking things.
So anyway in interpreting that last table, if you've got a group of 5, N*N is 5*5 = 25. The Keystroke Action is executed 5 times in each window. That's "bad" (not useful, nor will it get you banned). Even worse is All other * All other, which isn't going to stay "other" for long because your current window is going to get N-1 keystrokes sent to it. You'd be telling all of the other windows, to EACH tell all of their "other" windows to press a key.
So what is good? Well that's easy. You generally want it to solve to a number less than or equal to N, because if it's greater than N, you know for certain that you're doubling up on at least one window. That generally means one or the other (between the Do Mapped Key Action's Target, and the Keystroke Action's Target) should solve to 1 in the first table. In other words, one of the Targets should be a specific window (current or otherwise).
Good examples, table 1:
- Window:Current * Window:Current = 1*1 = 1
- Window:Current * All = 1*N
- Window:Current * All other = 1*(N-1)
- Window:Current * Slot 1 = 1*1
- Window:Current *Group(all of) = 1*size(Group)
- Window:Current *Group(others in) = 1 * (size(Group)-1)
This table shows that Do Mapped Key Action with Target=Window:Current, is exactly like hitting the Hotkey for the other Mapped Key in the current window. Just like I explained earlier
That's excellent for various purposes, but will generally not let you, for example, easily send the keystroke to a different target just by changing the Target of the Do Mapped Key Action. That's because the Target is built into the Keystroke.
Good examples, table 2:
- Window:Current * Window:Current = 1*1 = 1
- All * Window:Current = N*1
- All other * Window:Current = (N-1)*1
- Slot 1 * Window:Current = 1*1
- Group(all of) * Window:Current = size(Group)*1
- Group(others in) * Window:Current = (size(Group)-1)*1
This table is nearly identical to the previous table. The solutions turn out to be essentially the same, and that's important because you might want the same end result, but with added capabilities. The difference here, is that the Keystroke Action is configured to use Window:Current, and the Do Mapped Key Action is configured to use, well, anything! You can send this keystroke to ANY window or set of windows, just by changing the Target of the Do Mapped Key Action. This is how I would recommend configuring pretty much any mapped keys meant to be used with a Do Mapped Key Action.
.... with the particular exception of "FTL Follow Me", "FTL Assist Me", and "FTL Target Me". These keys have to preserve the original source -- the guy you want to follow, which is "Me". You can use these with a Do Mapped Key Action sent to a specific Character. The "Me" in the name of the Mapped Key is meant to indicate that. If you send "FTL Follow Me" to multiple windows via Do Mapped Key Action, each of those windows becomes "Me" and will ask each of its "others" to follow. (Note to self: add the source window as a possible Target)
Good examples, table 3:
- Slot 1 * Window:Current = 1*1 = 1
- Slot 1 * All = 1*N
- Slot 1 * All other = 1*(N-1)
- Slot 1 * Slot 1 = 1*1
- Slot 1 *Group(all of) = 1*size(Group)
- Slot 1 *Group(others in) = 1 * (size(Group)-1)
Equally as good as Good examples, table 1, with the exception that it has to pass through Slot 1 regardless of which window you're in. That's either better or worse than table 1, depending on your needs. Passing through a specific Slot can be useful for multi-step Mapped Keys, when you want the Step state not to be held individually in all windows. By that I mean, say your Keystroke Action is actually in a Mapped Key with 2 Steps. Say one step sends a keystroke to Slot 1 and the other sends a keystroke to Slot 2. Each window keeps the state of each Mapped Key (on or off, what step it's on, etc) independently of others, so if you use Do Mapped Key to Window:Current, you could go through and hit the Hotkey one time in each window, and every one of those Keystroke Actions will send to Slot 1 (by executing the first Step). However, by using Do Mapped Key to Slot 1, you force Slot 1's state to be used for that mapped key. So now by going through and hitting the Hotkey one time in each window, instead of sending keystrokes only to Slot 1, it will rotate between the Steps based on Slot 1's state -- meaning it doesn't matter which window you're in, it's going to go 1 2 1 2 1 2 no matter what.
Alternatively, a Mapped Key Step Action can be used in each Step of the multi-step Mapped Key, to sync the state in the other windows. That's what some of the Mapped Keys do that are generated by the Quick Setup Wizard. Activate Maps in the Control key map for example tells the other windows what Step to put the Mapped Key on. This gives similar behavior, while keeping the state decentralized.
I'd go on to table 4 being the reverse of table 3 but I don't think it's necessary to show that and at the moment I don't have anything else to add that would make good use of that particular table.
Posting Rules
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Connect With Us