Log in

View Full Version : Tip on Generated Focus Macros



kazxex
04-17-2009, 10:47 AM
Hopefully I'm not repeating well known information, but here is a useful trick I've added to my ISBoxer setup.

I'm boxing three characters, I've got innerspace setup to generate focus macro and broadcast keystroke when I switch the active slot.

After exporting to Innerspace from ISBoxer toolkit then in the wow/interface/addons/ISBoxer directory there are generated lua files for each character:
ISBoxer_Character-Name1.lua
ISBoxer_Character-Name2.lua
ISBoxer_Character-Name3.lua

inside each of those files is some code like this


isboxer.SetMacro("F8","/focus Name1\n",nil,nil,nil,1);
isboxer.SetMacro("F9","/focus Name2\n",nil,nil,nil,1);
isboxer.SetMacro("F10","/focus Name3\n",nil,nil,nil,1);


I went in and manually edited these to look like:
ISBoxer_Character-Name1.lua


isboxer.SetMacro("F8","/focus Name1\n/jamba setmeasmaster all\n",nil,nil,nil,1);
isboxer.SetMacro("F9","/focus Name2\n",nil,nil,nil,1);
isboxer.SetMacro("F10","/focus Name3\n",nil,nil,nil,1);


ISBoxer_Character-Name2.lua


isboxer.SetMacro("F8","/focus Name1\n",nil,nil,nil,1);
isboxer.SetMacro("F9","/focus Name2\n/jamba setmeasmaster all\n",nil,nil,nil,1);
isboxer.SetMacro("F10","/focus Name3\n",nil,nil,nil,1);


ISBoxer_Character-Name3.lua


isboxer.SetMacro("F8","/focus Name1\n",nil,nil,nil,1);
isboxer.SetMacro("F9","/focus Name2\n",nil,nil,nil,1);
isboxer.SetMacro("F10","/focus Name3\n/jamba setmeasmaster all\n",nil,nil,nil,1);



This way when I switch characters they also automatically become the jamba leader and all my tells / jamba messages get sent there.

I find it very useful to have this happen automatically and just wanted to share this tip.

Crucial
04-17-2009, 10:58 AM
Thanks for the tip. The only major drawback is that whenever you export to innerspace you've gotta manually edit the files again since I would assume they get overwritten.

Lax
04-17-2009, 12:25 PM
This brings up a couple things.

First, I'd like to add better integration with Jamba into ISBoxer, so I'm open for suggestions. I have also been considering adding some features similar to Jamba's, but not looking to reinvent the wheel or "steal" Jafula's work.

And to make your idea easier: You can skip checking the Generate box if you want to manually create the macros (can still be done in ISBoxer) instead.

1. Create a Mapped Key with an obscure Hotkey that you will never use (this can be F13, for example). The purpose of this Mapped Key is only to create WoW Macros and have them assigned.
2. Add a WoW Macro Action for each Focus Target macro to be generated. One on key combination F8, one on key combination F9, one on key combination F10 and so on (note: These correspond to the Broadcast key in the Hot Character switch notifier section of the Slot in your Character Set -- for onlookers, you would use the key combinations you broadcast).
3. For the commands in the macros:
Slot 1:

/focus {SLOT1}
!if (character is "slot 1") /jamba setmeasmaster all

Slot 2:

/focus {SLOT2}
!if (character is "slot 2") /jamba setmeasmaster all

Slot 3:

/focus {SLOT3}
!if (character is "slot 3") /jamba setmeasmaster all

... and so on

Although I *think* it should be faster to use /jamba setmaster, since afaik setmeasmaster requires sending a message through the server and setmaster should take immediate effect. I'm not real sure on the syntax but I imagine it goes something like:
Slot 1:

/focus {SLOT1}
/jamba setmaster {SLOT1}

As long as the Mapped Key is in a Key Map that is assigned (or assignable via a Key Map State Action) to the Character Set, you will get the same effect as the manual editing, without the manual editing each time it's exported. :)

kazxex
04-17-2009, 01:52 PM
Lax, thanks alot. This is very useful information and not having to edit the files by hand is going to be very nice.

Lax
04-17-2009, 08:01 PM
I'm writing some Jamba integration for ISBoxer, and it just occurred to me that if you're having ISBoxer generate the Focus Target macro on switch, you can actually check "On Focus Change Set Master To Focus" in the Jamba options page under the Switch tab. The master will automatically be set to the focus when ISBoxer sets it, if that option is enabled :) If I can enable that option without it saving to your non-ISBoxer Jamba settings I'll hook it up automatically.

Lax
04-18-2009, 11:08 AM
Ok, Jamba integration is now officially part of ISBoxer, in ISBoxer Build 32 (released a few minutes ago). Here's the related changes:
Jamba Addon Integration Integration is performed by the ISBoxer Addon. This integration requires the Jamba-Comms module (included with Jamba and enabled by default). Jamba saved variables (settings) when using ISBoxer will be kept in Jamba-ISBoxer.lua instead of Jamba.lua, meaning that options changed when using ISBoxer will not be kept when not using ISBoxer If "Generate a Focus Target Macro" option is set the Jamba option "On Focus Change Set Master To Focus" will be enabled Jamba Team will automatically be synchronized with the Character Set, with the Master set to the Character in Slot 1 In other words, using Jamba with ISBoxer should now be transparent and idiot proof. :)